%#! luajitlatex %%% a test of ruby. \documentclass[a4paper,10pt]{ltjsarticle} \usepackage{luatexja-otf,amsmath} \usepackage[match]{luatexja-fontspec} \usepackage[kozuka-pr6n]{luatexja-preset}\normalsize \def\emph#1{\textbf{\textgt{#1}}} \def\headfont{\normalfont\bfseries\gtfamily} \setmonojfont{KozGoPr6N-Regular.otf} \usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry} \advance\leftmargini-1\zw\advance\leftmarginii-1\zw \protected\def\Param#1{\underline{\smash{\textsf{\mdseries #1}}}} \usepackage{luatexja-ruby,showexpl,booktabs} \lstset{ preset=\normalsize, basicstyle=\small\ttfamily, basewidth=0.5em, explpreset={numberstyle=\tiny, numbers=left, numbersep=1em, columns=fixed}, } \makeatletter\let\SX@Info=\relax\makeatother \fboxsep=0mm \usepackage{hyperref,bookmark,xcolor} \hypersetup{% unicode, colorlinks, allbordercolors=1 1 1, allcolors=blue, pdftitle={luatexja-ruby.sty} } \def\Node#1#2{\,\vcenter{\hbox{\fboxsep=1pt\fbox{\vbox{\small\halign{\hfil##\hfil\cr #1\mathstrut\cr\noalign{\hrule height.4pt}\strut#2\cr}}}}\,}} \def\LuaTeX{Lua\TeX} % 三分ルビ用 \DeclareFontShape{JY3}{mc}{mc}{n}{<-> [0.92487] KozMinPr6N-Regular:extend=0.67;jfm=ujisc33}{} \title{\textsf{luatexja-ruby}パッケージ} \begin{document} \catcode`\<=13 \def<#1>{{\normalfont\rm\itshape$\langle$#1\/$\rangle$}} %\fontsize{13.19873}{15}\selectfont% \maketitle \begin{abstract} \textsf{luatexja-ruby}パッケージは,\LuaTeX-jaの機能を利用してルビの組版処理を行う追加パッケージである. \LuaTeX, \LuaTeX-jaの内部処理に割り込むことにより,熟語ルビ中の行分割や, 行頭形・行中形・行末形の自動検出,また進入許容量の自動設定などを可能とした. \end{abstract} \tableofcontents \newpage \section{\ltjruby{利|用|方|法}{り|よう|ほう|ほう}} パッケージ読み込みは,\verb+\usepackage{luatexja-ruby}+ で良く, 必要ならば自動的に\LuaTeX-ja本体を読み込む. plain \LuaTeX でのロードはまだサポートしておらず, \LaTeXe のみサポートしている. \subsection{\ltjruby{用|語}{よう|ご}} 「進入(intrusion)」「突出(protrusion)」という用語は, \href{http://zrbabbler.sp.land.to/pxrubrica.html}{\textsf{pxrubrica}パッケージ}% での用法に準ずる. \begin{quotation} 進入あり:と\ltjruby{暁}{あかつき}の 進入なし:{\setkeys[ltj]{ruby}{mode=0}と\ltjruby{暁}{あかつき}の} 突出あり:{\setkeys[ltj]{ruby}{stretch={1}{2}{1}}\ltjruby{聴衆}{ちようしゆう}} 突出なし:{\setkeys[ltj]{ruby}{stretch={0}{2}{0}}\ltjruby{聴衆}{ちようしゆう}} \end{quotation} \subsection{\ruby{命|令}{めい|れい}} \paragraph{\tt\textbackslash ltjruby} ルビ出力用命令の本体.\verb+\ruby+ という別名を定義している. \begin{quote} \tt \textbackslash ltjruby[