Skip to content

Instantly share code, notes, and snippets.

@suzusime
Created February 9, 2017 07:44
Show Gist options
  • Save suzusime/2eb2ac27c5766315064fbaf453e0e67e to your computer and use it in GitHub Desktop.
Save suzusime/2eb2ac27c5766315064fbaf453e0e67e to your computer and use it in GitHub Desktop.
gochiusa_tex_template
% 文字コードは UTF-8
\documentclass[a4paper,xelatex,ja=standard, enablejfam=true]{bxjsarticle}% ドライバ指定は無し
%%%フォント関連ここから--------------------
\XeTeXgenerateactualtext=1
\usepackage{zxjatype}
%\setjamainfont{Yu Mincho Regular}
%仮名のブロックを定義しておく。
%定義した後は一度キャンセルしておく(そうしないとかなを別フォントに指定しないフォントの定義が面倒になる)
%仮名混植をするフォントを定義する場合はRestoreしてCancelするとよい。
\xeCJKDeclareSubCJKBlock{kana}{ "3040 -> "309F , "30A0 -> "30FF}
\xeCJKCancelSubCJKBlock{kana}
\setjamainfont{游明朝 Regular}
\setjasansfont{Yu Gothic Regular}
\setjamonofont{Yu Gothic Regular}
\xeCJKRestoreSubCJKBlock{kana}
\setCJKfamilyfont{midashi1}[kana=07ラノベPOP]{Noto Sans CJK JP Black}
\xeCJKCancelSubCJKBlock{kana}
%%文書専用マクロ
\usepackage{l_xe_kaiwa_gochiusa}
\title{ココアちゃんと学ぶFourier解析}
\author{すずしめ}
\begin{document}
\maketitle
\section{測度論}
\subsection{測度論のめざすところ}
\begin{kaiwa}
\item[ココア] じゃあ,さっそくだけれど,まずは解析学には欠かせない「測度」のはなしをしていくよ.
\item[チノ] 測度...... ききなれない言葉ですね.
\item[ココア] 測度っていうのはね,かんたんにいうと,面積とか体積みたいなものをもっと一般化したもの,かな.
\item[チノ] 一般化......?
\end{kaiwa}
\subsection{測度の定義}
\end{document}
\usepackage{ifthen}%条件分岐のために必要
\newcommand{\kaiwaheadfont}{07ラノベPOP}
\setCJKfamilyfont{KaiwaDefaultHeadFont}{\kaiwaheadfont}
\setCJKfamilyfont{KaiwaHeadFontChino}[Color=e2e3f8]{\kaiwaheadfont}
\setCJKfamilyfont{KaiwaHeadFontCocoa}[Color=eec3a0]{\kaiwaheadfont}
\setCJKfamilyfont{KaiwaHeadFontRize}[Color=ead3e7]{\kaiwaheadfont}
\setCJKfamilyfont{KaiwaHeadFontChiya}[Color=a9d744]{\kaiwaheadfont}
\setCJKfamilyfont{KaiwaHeadFontSyaro}[Color=ceaf49]{\kaiwaheadfont}
\newenvironment{kaiwa}{%
\list{}{%
\leftmargin=2\zw
\labelwidth=\leftmargin
\labelsep=1\zw
\advance \labelwidth by -\labelsep
\let \makelabel=\kaiwalabel}}{\endlist}
\newcommand*\kaiwalabel[1]{%
\ifthenelse{\equal{#1}{ココア}}{\CJKfamily{KaiwaHeadFontCocoa}}{%
\ifthenelse{\equal{#1}{チノ}}{\CJKfamily{KaiwaHeadFontChino}}{%
\ifthenelse{\equal{#1}{リゼ}}{\CJKfamily{KaiwaHeadFontRize}}{%
\ifthenelse{\equal{#1}{千夜}}{\CJKfamily{KaiwaHeadFontChiya}}{%
\ifthenelse{\equal{#1}{シャロ}}{\CJKfamily{KaiwaHeadFontSyaro}}{%
\CJKfamily{KaiwaDefaultHeadFont}%
}}}}}%
#1\hfil}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment