X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja-ruby.tex;h=4d4be4f4f11f46877998afd48c6ba305f1c65810;hb=f078ac2f7998a102c7ec765e725f2269eed9f872;hp=5fa8f45e43ba56bc1c43cb27893d0e5b8f9ef7b7;hpb=924db550ede738f06fcccf39680d42d9733cf20d;p=luatex-ja%2Fluatexja.git diff --git a/doc/luatexja-ruby.tex b/doc/luatexja-ruby.tex index 5fa8f45..4d4be4f 100644 --- a/doc/luatexja-ruby.tex +++ b/doc/luatexja-ruby.tex @@ -2,27 +2,22 @@ %%% 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} -\makeatletter -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \romanfamily\ttdefault\ttjfam\selectfont} -\makeatother -\newjfontfamily\ttjfam{KozGoPr6N-Regular.otf} +\setmonojfont{KozGoPr6N-Regular.otf} \usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry} -\usepackage{luatexja-adjust}%\ltjdisableadjust \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} @@ -34,11 +29,6 @@ pdftitle={luatexja-ruby.sty} } - -\def\kata{\ltjsetruby{kata}} -\def\notalign{\setkeys[ltj]{ruby}{stretchhead = {1}{2}{1}, stretchend = {1}{2}{1}}} -% 行頭・行末で揃えない - \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} @@ -47,7 +37,7 @@ \DeclareFontShape{JY3}{mc}{mc}{n}{<-> [0.92487] KozMinPr6N-Regular:extend=0.67;jfm=ujisc33}{} -\title{\texttt{luatexja-ruby.sty}} +\title{\textsf{luatexja-ruby}パッケージ} \begin{document} \catcode`\<=13 \def<#1>{{\normalfont\rm\itshape$\langle$#1\/$\rangle$}} @@ -56,7 +46,7 @@ \maketitle \begin{abstract} -\texttt{luatexja-ruby.sty} は,\LuaTeX-jaの機能を利用してルビの組版処理を行う追加パッケージである. +\textsf{luatexja-ruby}パッケージは,\LuaTeX-jaの機能を利用してルビの組版処理を行う追加パッケージである. \LuaTeX, \LuaTeX-jaの内部処理に割り込むことにより,熟語ルビ中の行分割や, 行頭形・行中形・行末形の自動検出,また進入許容量の自動設定などを可能とした. \end{abstract} @@ -72,7 +62,7 @@ plain \LuaTeX でのロードはまだサポートしておらず, \subsection{\ltjruby{用|語}{よう|ご}} 「進入(intrusion)」「突出(protrusion)」という用語は, -\href{http://zrbabbler.sp.land.to/pxrubrica.html}{\texttt{pxrubrica}\ パッケージ}% +\href{http://zrbabbler.sp.land.to/pxrubrica.html}{\textsf{pxrubrica}パッケージ}% での用法に準ずる. \begin{quotation} @@ -171,9 +161,9 @@ plain \LuaTeX でのロードはまだサポートしておらず, \item[後突出禁止] \verb+{1}{1}{0}+ \end{description} -\item[stretchhead=\{\}\{\}\{\}] 行頭形〜. +\item[stretchbol=\{\}\{\}\{\}] 行頭形〜. 既定値は\ \verb+{0}{1}{1}+ である. -\item[stretchend=\{\}\{\}\{\}] 行末形〜. +\item[stretcheol=\{\}\{\}\{\}] 行末形〜. 既定値は\ \verb+{1}{1}{0}+ である. \item[maxmargin=] 親文字の方がルビより長い時に,ルビの先頭と親文字の先頭,及び @@ -198,10 +188,19 @@ plain \LuaTeX でのロードはまだサポートしておらず, \item[kenten=]各文字につく圏点の出力命令を指定する.既定値は「\verb+\ltjalchar`•+」 であり,\texttt{U+2022} (Bullet)を\textbf{ALchar}として出力することを指定している. + \item[fontcmd=]ルビ用のフォント切り替え命令を指定する. このキーの内容が実行された後に\ \verb+\fontsize...\selectfont+\ が実行されるので, このキーの指定では最後に\ \verb+\selectfont+ を加える必要はない. +この \texttt{fontcmd} キーの内容は多くの回数実行される. +例えば,\textsf{luatexja-fontspec}パッケージを用いてOpenTypeフォントを用いる場合, +\begin{lstlisting} + fontcmd=\addjfontfeatures{Style=Ruby} +\end{lstlisting} +のようにしてルビ用字形を用いることが可能だが,現在の実装ではタイプセットに時間がかかるようになる. + + \end{description} \medskip @@ -221,31 +220,31 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1} \end{description} \paragraph{\tt\textbackslash ltjsetruby\{