\def\cs#1{\texttt{\upshape
\texorpdfstring{\textbackslash\hbox{\ltjsetparameter{autoxspacing=false}#1}}{\textbackslash#1}}}
\ltjsetparameter{alxspmode={`\\,allow}}
+\def\text@#1{%
+ \ifnum\mathstyle<\scriptstyle
+ \mbox{#1}
+ \else\ifnum\mathstyle<\scriptscriptstyle
+ \mbox{\let\f@size\sf@size\selectfont#1}
+ \else
+ \mbox{\let\f@size\ssf@size\selectfont#1}
+ \fi\fi
+}
%%%%%%%%
\makeatother
%%%%%%%%
%<*en>
\item The following 12~Japanese fonts are preloaded:
\begin{center}\small
-\begin{tabular}{cccccc}
+\begin{tabular}{llllll}
\toprule
\textbf{direction}&
\textbf{classification}&\textbf{font name}&\bfseries ``10\,pt''&\bfseries ``7\,pt''&\bfseries ``5\,pt''\\\midrule
%<*ja>
\item 以下の12個の和文フォントが定義される:
\begin{center}\small
-\begin{tabular}{cccccc}
+\begin{tabular}{llllll}
\toprule
\emph{組方向}&\emph{字体}&\emph{フォント名}&\bfseries``10\,pt''&\bfseries``7\,pt''&\bfseries``5\,pt''\\\midrule
-\smash{\raisebox{-1ex}{横組}}&
+\smash{\raisebox{-0.7\zh}{横組}}&
明朝体&IPAex明朝&\cs{tenmin}&\cs{sevenmin}&\cs{fivemin}\\
-&ゴシック体&IPAexゴシック&\cs{tengt} &\cs{sevengt} &\cs{fivegt}\\
+&\textgt{ゴシック体}&IPAexゴシック&\cs{tengt} &\cs{sevengt} &\cs{fivegt}\\
\midrule
-\smash{\raisebox{-1ex}{縦組}}&
+\smash{\raisebox{-0.7\zh}{縦組}}&
明朝体&IPAex明朝&\cs{tentmin}&\cs{seventmin}&\cs{fivetmin}\\
-&ゴシック体&IPAexゴシック&\cs{tentgt} &\cs{seventgt} &\cs{fivetgt}\\
+&\textgt{ゴシック体}&IPAexゴシック&\cs{tentgt} &\cs{seventgt} &\cs{fivetgt}\\
\bottomrule
\end{tabular}
\end{center}
%</ja>
\begin{itemize}
%<*en>
-\item With \texttt{luatexja.cfg}, one can use other fonts
-as ``default'' Japanese fonts (Subsection~\ref{ssec:cfg}).
+\item The ``default'' Japanese fonts (and~JFMs for them) can be
+ modified by defining \cs{ltj@stdmcfont} etc.\ \emph{before}
+ one inputs \texttt{luatexja.sty} (Subsection~\ref{ssec:cfg}).
%</en>
%<*ja>
-\item \texttt{luatexja.cfg} を用いることによって,標準和文フォントを
-IPAexフォントから別のフォントに置き換えることができる.\ref{ssec:cfg}節を参照.
+\item 標準和文フォントやJFMをIPAexフォントから別のものに置き換えるには,
+ \cs{ltj@stdmcfont}等を\texttt{luatexja.sty}読み込み\emph{前}に定義すればよい.
+ \ref{ssec:cfg}節を参照.
%</ja>
%<*en>
\item
By default, the following fonts are used for these two families.
\begin{center}\small
-\begin{tabular}{ccccc}
+\begin{tabular}{lllll}
\toprule
\textbf{classification}&\textbf{family}&\cs{mdseries}&\cs{bfseries}&\textbf{scale}\\\midrule
\emph{mincho} (明朝体)&\tt mc&IPAex Mincho&IPAex Gothic&0.962216\\
%<*ja>
\item \pLaTeX と同様に,標準では「明朝体」「ゴシック体」の2種類を用いる:
\begin{center}\small
-\begin{tabular}{cllc}
+\begin{tabular}{llll}
\toprule
\emph{字体}&&&\emph{ファミリ名}\\\midrule
明朝体&\verb+\textmc{...}+&\verb+{\mcfamily ...}+&\cs{mcdefault}\\
\newpage
\item 標準では,次のフォントが用いられる:
\begin{center}\small
-\begin{tabular}{ccccc}
+\begin{tabular}{lllll}
\toprule
\emph{字体}&\emph{ファミリ}&\cs{mdseries}&\cs{bfseries}&\emph{スケール}\\\midrule
明朝体&\tt mc&IPAex明朝&IPAexゴシック&0.962216\\
-ゴシック体&\tt gt&IPAexゴシック&IPAexゴシック&0.962216\\
+\textgt{ゴシック体}&\tt gt&IPAexゴシック&IPAexゴシック&0.962216\\
\bottomrule
\end{tabular}
\end{center}
However, above settings are not sufficient for Japanese-based
documents. To typeset Japanese-based documents, you are better to use
class files other than \texttt{article.cls}, \texttt{book.cls}, and so on. At
-the present, we have the counterparts of \Pkg{jclasses} (standard
+the present, \LuaTeX-ja has the counterparts of \Pkg{jclasses} (standard
classes in \pLaTeX) and \Pkg{jsclasses} (classes by Haruhiko
Okumura), namely, \Pkg{ltjclasses}\footnote{%
\texttt{ltjarticle.cls},~\texttt{ltjbook.cls}, \texttt{ltjreport.cls},
},
\Pkg{ltjsclasses}\footnote{%
\texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls}, \texttt{ltjsreport.cls},~\texttt{ltjskiyou.cls}.}%
-がそれぞれ用意されている.
+がそれぞれ\LuaTeX-ja標準で用意されている.
元々の\Pkg{jsclasses}では本文のフォントサイズを設定するのに\cs{mag}プリミティブが使われていたが,
\LuaTeX~beta-0.87.0以降ではPDF出力時の\cs{mag}のサポートが廃止された.
%<*en>
\begin{center}\small
-\begin{tabular}{cccccc}
+\begin{tabular}{llllll}
\toprule
&\textbf{encoding}&\textbf{family}&\textbf{series}&\textbf{shape}&\textbf{selection}\\\midrule
alphabetic fonts
%</en>
%<*ja>
\begin{center}\small
-\begin{tabular}{cccccc}
+\begin{tabular}{llllll}
\toprule
&\emph{エンコーディング}&\emph{ファミリ}&\emph{シリーズ}&\emph{シェープ}&\emph{選択}\\\midrule
-欧文
+\emph{欧文}
&\cs{romanencoding}&\cs{romanfamily}&\cs{romanseries}&\cs{romanshape}
&\cs{useroman}\\
-和文
+\emph{和文}
&\cs{kanjiencoding}&\cs{kanjifamily}&\cs{kanjiseries}&\cs{kanjishape}
&\cs{usekanji}\\
-両方&---&--&\cs{fontseries}&\cs{fontshape}&---\\
-自動選択&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\
+\emph{両方}&---&--&\cs{fontseries}&\cs{fontshape}&---\\
+\emph{自動選択}&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\
\bottomrule
\end{tabular}
\end{center}
\caption{\Pkg{luatexja-fontspec}で定義される命令}\label{tab:ltj_fntspc}
\medskip
{\centering\small
-\begin{tabular}{cllll}
+\begin{tabular}{lllll}
\toprule
-和文
+\emph{和文}
&\cs{jfontspec}&\cs{setmainjfont}&\cs{setsansjfont}&\cs{setmonojfont}$^*$\\
-欧文
+\emph{欧文}
&\cs{fontspec}&\cs{setmainfont}&\cs{setsansfont}&\cs{setmonofont}\\
\midrule
-和文
+\emph{和文}
&\cs{newjfontfamily}&\cs{renewjfontfamily}$^{**}$&\cs{setjfontfamily}$^{**}$\\
-欧文
+\emph{欧文}
&\cs{newfontfamily}&\cs{renewfontfamily}$^{**}$&\cs{setfontfamily}$^{**}$\\
\midrule
-和文
+\emph{和文}
&\cs{newjfontface}&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\
-欧文
+\emph{欧文}
&\cs{newfontface}&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\
\bottomrule
\end{tabular}\par}
\hyphenchar\font=-1 \exhyphenchar=-1
hiragino-pro, hiragino-pron, ipa, ipa-hg, ipaex, ipaex-hg,
kozuka-pr6, kozuka-pr6n, kozuka-pro, moga-mobo, moga-mobo-ex,
- morisawa-pr6n, morisawa-pro, ms, ms-hg, noembed, noto-otc, noto-otf,
+ bizud, morisawa-pr6n, morisawa-pro, ms, ms-hg, noembed, noto-otc, noto-otf,
sourcehan, sourcehan-jp, ume, yu-osx, yu-win, yu-win10
\end{quote}
\ref{ssec:fontspec}節 (\Pkg{fontspec}) の方法で手動で指定する必要がある.
%</ja>
-%<en>\subsection{Changing default Japanese fonts}
-%<ja>\subsection{標準和文フォントの変更}
-\label{ssec:cfg}
-%<*en>
-If \texttt{luatexja.cfg} can be seen from \LuaTeX, \LuaTeX-ja automatically reads it.
-The main use of \texttt{luatexja.cfg} is for changing default Japanese fonts,
-when IPAex fonts cannot be installed in \TeX~system.
-One should not overuse this \texttt{luatexja.cfg}; fonts which will be used in
-a document should be specified in its source.
-
-For example,
-\begin{lstlisting}
-\def\ltj@stdmcfont{IPAMincho}
-\def\ltj@stdgtfont{IPAGothic}
-\end{lstlisting}
-makes that IPA~Mincho and IPA~Gothic will be used as default Japanese fonts, instead of
-IPAex~Mincho and IPAex~Gothic.
-
-For another example, the following two lines makes that
-non-embedded fonts Ryumin-Light~and~GothicBBB-Medium as default Japanese fonts
-(as the earlier version of \LuaTeX-ja):
-\begin{lstlisting}
-\def\ltj@stdmcfont{psft:Ryumin-Light}
-\def\ltj@stdgtfont{psft:GothicBBB-Medium}
-\end{lstlisting}
-%</en>
-%<*ja>
-\LuaTeX から見える位置に \texttt{luatexja.cfg} があれば,\LuaTeX-jaはそれを読み込む.
-このファイルを用いるとplain~\TeX, \LaTeXe における標準和文フォントを
-IPAex明朝・IPAexゴシックから変更することができる.
-しかし,基本的には\emph{文章中で用いるフォントは(例えば \Pkg{luatexja-preset} などで)
-文書ソース内で指定するべき}であり,この \texttt{luatexja.cfg} は,
-「IPAexフォントがインストールできない」など,IPAexフォントが使用できない場合にのみ
-応急処置的に用いるべきである.
-
-例えば
-\begin{lstlisting}
-\def\ltj@stdmcfont{IPAMincho}
-\def\ltj@stdgtfont{IPAGothic}
-\end{lstlisting}
-と記述しておけば,標準和文フォントがIPA明朝・IPAゴシックへと変
-更される.
-
-
-なお,20140906.0以前のバージョンのように,
-Ryumin-Light, GothicBBB-Mediumという名前の非埋込フォントを用いる場合は
-\begin{lstlisting}
-\def\ltj@stdmcfont{psft:Ryumin-Light}
-\def\ltj@stdgtfont{psft:GothicBBB-Medium}
-\end{lstlisting}
-と記述すればよい.
-%</ja>
-
-
%<en>\section{Changing Internal Parameters}
%<ja>\section{パラメータの変更}
これらは以下のデータに基づいて決定している.
%</ja>
\begin{itemize}
-%<en>\item Blocks in Unicode~6.0.
-%<ja>\item Unicode~6.0のブロック.
+%<en>\item Blocks in Unicode~11.0.
+%<ja>\item Unicode~11.0のブロック.
%<en>\item The \texttt{Adobe-Japan1-UCS2} mapping between a CID Adobe-Japan1-6 and Unicode.
%<ja>\item Adobe-Japan1-6のCIDとUnicodeの間の対応表\texttt{Adobe-Japan1-UCS2}.
%<en>\item The \Pkg{PXbase} bundle for \upTeX\ by Takayuki Yato.
%<ja>\caption{文字範囲3に指定されているUnicodeブロック.}
\label{tab:rng3}
\catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
-\centering\small
+\centering\footnotesize
\begin{tabular}{llll}
"2000--"206F&General Punctuation&
"2070--"209F&Superscripts and Subscripts\\
"2600--"26FF&Miscellaneous Symbols\\
"2700--"27BF&Dingbats&
"2900--"297F&Supplemental Arrows-B\\
-"2980--"29FF&Misc.\ Mathematical Symbols-B&
-"2B00--"2BFF&Miscellaneous Symbols and Arrows
+"2980--"29FF&Misc.\ Math Symbols-B&
+"2B00--"2BFF&Misc.\ Symbols and Arrows
\end{tabular}
\end{table}
%<*en>
\begin{lstlisting}
\ltjdefcharrange{4}{%
"500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF,
- "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A82F, "A840-"ABFF, "FB00-"FE0F,
- "FE20-"FE2F, "FE70-"FEFF, "10000-"1FFFF, "E000-"F8FF} % non-Japanese
+ "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A95F, "A980-"ABFF, "E000-"F8FF,
+ "FB00-"FE0F, "FE20-"FE2F, "FE70-"FEFF, "10000-"1AFFF, "1B170-"1F0FF,
+ "1F300-"1FFFF
+} % non-Japanese
\end{lstlisting}
%<en>\item[Range~5${}^{\text{A}}$] Surrogates and Supplementary Private Use Areas.
%<ja>\item[範囲5${}^{\text{A}}$] 代用符号と補助私用領域.
%<ja>\caption{文字範囲6に指定されているUnicodeブロック.}
\label{tab:rng6}
\catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
-\centering\small
+\centering\footnotesize
\begin{tabular}{llll}
"2460--"24FF&Enclosed Alphanumerics&
"2E80--"2EFF&CJK Radicals Supplement\\
"31F0--"31FF&Katakana Phonetic Extensions&
"3200--"32FF&Enclosed CJK Letters and Months\\
"3300--"33FF&CJK Compatibility&
-"3400--"4DBF&CJK Unified Ideographs Extension A\\
+"3400--"4DBF&CJK Unified Ideographs Ext-A\\
"4E00--"9FFF&CJK Unified Ideographs&
"F900--"FAFF&CJK Compatibility Ideographs\\
"FE10--"FE1F&Vertical Forms&
"FE30--"FE4F&CJK Compatibility Forms\\
"FE50--"FE6F&Small Form Variants&
-"{20}000--"{2F}FFF&(Supplementary Ideographic Plane)\\
-"{E0}100--"{E0}1EF&Variation Selectors Supplement
+"FF00--"FFEF&Halfwidth and Fullwidth Forms\\
+"{1B}000--"{1B}0FF&Kana Supplement&
+"{1B}100--"{1B}12F&Kana Extended-A\\
+%"{1B}130--"{1B}16F&Small Kana Extension
+"{1F}100--"{1F}1FF&Enclosed Alphanumeric Supp.&
+"{1F}200--"{1F}2FF&Enclosed Ideographic Supp.\\
+"{20}000--"{2F}FFF&(Supp. Ideographic Plane)&
+"{E0}100--"{E0}1EF&Variation Selectors Supp.
\end{tabular}
\end{table}
%<*en>
"31C0--"31EF&CJK Strokes&
"A000--"A48F&Yi Syllables\\
"A490--"A4CF&Yi Radicals&
-"A830--"A83F&Common Indic Number Forms\\
+"A960--"A97F&Hangul Jamo Extended-A\\
"AC00--"D7AF&Hangul Syllables&
"D7B0--"D7FF&Hangul Jamo Extended-B
\end{tabular}
%<en>\medskip
\noindent\hfill
-\begin{tabular}{ccccc}
+\begin{tabular}{llccc}
\toprule
\bfseries \cs{kcatcode}&
%<*en>
{\large\char"#1#2#3#4}}\ (\texttt{U+#1#2#3#4})} %"
\leavevmode\hbox to 0pt{\hss\begin{tabular}{cccccc}
\toprule
-%<en>&\bf row&\bf col.&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
-%<ja>&\bf 区&\bf 点&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
+%<en>&\textbf{row}&\textbf{col.}&\textbf{\pTeX}&\textbf{\upTeX}&\textbf{\LuaTeX-ja}\\
+%<ja>&\emph{区}&\emph{点}&\emph{\pTeX}&\emph{\upTeX}&\emph{\LuaTeX-ja}\\
\midrule
%\D 3000&1&1&N&N&Y\\
\D 30FB&1&6&N&Y&N\\
\end{tabular}\qquad
\begin{tabular}{cccccc}
\toprule
-%<en>&\bf row&\bf col.&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
-%<ja>&\bf 区&\bf 点&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
+%<en>&\textbf{row}&\textbf{col.}&\textbf{\pTeX}&\textbf{\upTeX}&\textbf{\LuaTeX-ja}\\
+%<ja>&\emph{区}&\emph{点}&\emph{\pTeX}&\emph{\upTeX}&\emph{\LuaTeX-ja}\\
\midrule
\D FF5C&1&35&N&N&Y\\
\D FF0B&1&60&N&N&Y\\
ただし,現在のモードが非制限水平モードや(文中,別行立て問わず)数式モードであるときには
組方向を変更することは出来ない.
また,縦組中の数式内のボックスは\pTeX と同じように組方向が \cs{utod} となる.
+
+なお,\LaTeX の下で\LuaTeX-jaを使用する場合,組方向変更命令には
+「新たな組方向下での和文フォントを必要なら読み込み(・選択する)」という
+処理が付け加えられている(\ref{ssec:ltx-jfm}節参照).
%</ja>
%<*en>
ト・縦組用和文フォントの定義が可能であったが,\LuaTeX-jaではそうでないので注意.
%</ja>
+%<en>\subsection{Default Japanese fonts and JFMs}
+%<ja>\subsection{標準和文フォント・JFMの変更}
+\label{ssec:cfg}
+%<*en>
+If following commands are defined at loading \LuaTeX-ja package, these change
+default Japanese fonts and JFMs for them:
+%</en>
+%<*ja>
+\LuaTeX-jaが読み込まれる前に以下の命令が定義されていた場合は,
+それらが標準和文フォントやそれらに用いるJFMとして使われる.
+%</ja>
+
+\begin{cslist}[style=standard]
+ \item[\cs{ltj@stdmcfont}]
+%<en>The default Japanese font for the mincho family.
+%<ja>明朝体として用いるフォント.
+ \item[\cs{ltj@stdgtfont}]
+%<en>The default Japanese font for the gothic family.
+%<ja>ゴシック体として用いるフォント.
+ \item[\cs{ltj@stdyokojfm}]
+%<en>The default JFM for horizontal direction.
+%<ja>標準で用いる横組用JFM.
+ \item[\cs{ltj@stdyokojfm}]
+%<en>The default JFM for vertical direction.
+%<ja>標準で用いる縦組用JFM.
+\end{cslist}
+
+%<*en>
+For example,
+\begin{lstlisting}
+\def\ltj@stdmcfont{IPAMincho}
+\def\ltj@stdgtfont{IPAGothic}
+\end{lstlisting}
+makes that IPA~Mincho and IPA~Gothic will be used as default Japanese fonts, instead of
+IPAex~Mincho and IPAex~Gothic.
+
+This feature is intended for classes which use special JFMs
+\footnote{This is because commands has \texttt{@} in their names.}.
+It is recommended to use \cs{luatexja-preset}~or~\cs{luatexja-fontspec} package
+to select standard fonts in ordinary \LaTeX\ sources.
+%</en>
+%<*ja>
+例えば
+\begin{lstlisting}
+\def\ltj@stdmcfont{IPAMincho}
+\def\ltj@stdgtfont{IPAGothic}
+\end{lstlisting}
+と記述しておけば,標準和文フォントがIPA明朝・IPAゴシックへと変
+更される.
+
+この機能は,特別のJFMを用いるクラス
+\footnote{例えば阿部紀行氏によるjlreqがそれにあたる.}%
+などでの使用を意図しており,命令名に\texttt{@}が含まれることから
+通常の\TeX/\LaTeX 文書での使用は意図していない.
+通常の\LaTeX 文書では\Pkg{luatexja-preset}や\Pkg{luatexja-fontspec}などで
+使用フォントを選択することを推奨する.
+%</ja>
+
+%<*en>
+For compatibility with earlier versions,
+\LuaTeX-ja reads \texttt{luatexja.cfg} automatically if it is found by \LuaTeX.
+One should not overuse this \texttt{luatexja.cfg}; it will overwrite
+the definition of \cs{ltj@stdmcfont} and others.
+%</en>
+%<*ja>
+旧バージョンとの互換性のため,
+\LuaTeX から見える位置に\texttt{luatexja.cfg}があれば,\LuaTeX-jaはそれを読み込む.
+しかし,\texttt{luatexja.cfg}内で\cs{ltj@stdmcfont}等が定義されていた場合はそちらが
+優先されるので,もはや\texttt{luatexja.cfg}は使わないほうが良いだろう.
+%</ja>
+
%<en>\subsection{Prefix \texttt{psft}}
%<ja>\subsection{\texttt{psft}プリフィックス}
\label{ssec:psft}
%<*en>
The default font defined by using \texttt{psft:} prefix is for Japanese typesetting;
-it is Adobe-Japan1-6 CID-keyed font.
+it is Adobe-Japan1-7 CID-keyed font.
One can specify \texttt{cid} key to use other CID-keyed non-embedded fonts
for Chinese or Korean typesetting.
%</en>
%<*ja>
標準で\texttt{psft:}プリフィックスで定義されるフォントは日本語用のもので
-あり,Adobe-Japan1-6のCIDに対応したものとなる.しかし,\LuaTeX-jaは中国語
+あり,Adobe-Japan1-7のCIDに対応したものとなる.しかし,\LuaTeX-jaは中国語
の組版にも威力を発揮することが分かり,日本語フォントでない非埋込フォント
の対応も必要となった.そのために追加されたのが\texttt{cid}キーである.
\texttt{cid}キーに値を指定すると,そのCIDを持った非埋込フォントを定義することができる:
%</ja>
\begin{lstlisting}[numbers=left]
-\jfont\testJ={psft:Ryumin-Light:cid=Adobe-Japan1-6;jfm=jis} % Japanese
-\jfont\testD={psft:Ryumin-Light:jfm=jis} % default value is Adobe-Japan1-6
-\jfont\testC={psft:AdobeMingStd-Light:cid=Adobe-CNS1-6;jfm=jis} % Traditional Chinese
+\jfont\testJ={psft:Ryumin-Light:cid=Adobe-Japan1-7;jfm=jis} % Japanese
+\jfont\testD={psft:Ryumin-Light:jfm=jis} % default value is Adobe-Japan1-7
+\jfont\testC={psft:AdobeMingStd-Light:cid=Adobe-CNS1-7;jfm=jis} % Traditional Chinese
\jfont\testG={psft:SimSun:cid=Adobe-GB1-5;jfm=jis} % Simplified Chinese
\jfont\testK={psft:Batang:cid=Adobe-Korea1-2;jfm=jis} % Korean
+\jfont\testKR={psft:SourceHanSerifAKR9:cid=Adobe-KR-9;jfm=jis} % Korean
\end{lstlisting}
%<*en>
Note that the code above specifies \texttt{jfm-jis.lua}, which is for Japanese fonts,
%</ja>
%<*en>
-At present, \LuaTeX-ja supports only 4 values written in the sample code above.
+At present, \LuaTeX-ja supports only 5 values written in the sample code above.
Specifying other values, e.g.,
%</en>
%<*ja>
-今のところ,\LuaTeX-jaは上のサンプルコード中に書いた4つの値しかサポートしていない.
+今のところ,\LuaTeX-jaは上のサンプルコード中に書いた5つの値しかサポートしていない.
%</ja>
\begin{lstlisting}
\jfont\test={psft:Ryumin-Light:cid=Adobe-Japan2;jfm=jis}
\]
\end{description}
-
-
%<en>\section{Parameters}
%<ja>\section{パラメータ}
\subsection{\cs{ltjsetparameter}}
%<en>\section{Commands for \LaTeXe}
%<ja>\section{\LaTeXe 用の命令}
+%<*en>
+\subsection{Loading Japanese fonts in \LaTeXe}
+\label{ssec:ltx-jfm}
+From versoin~20190107,
+\emph{\LuaTeX-ja does not load Japanese fonts for horizontal direction and
+ that for vertical direction at same time},
+to reduce the number of loaded fonts.
+This will save time for typesetting and memory consumption of Lua side (\cite{tc18ltja}).
+
+\begin{itemize}
+ \item \cs{selectfont} loads (and chooses) only the Japanese font for current direction,
+ and does not load the Japanese font for other direction
+ (\LuaTeX-ja only detects its size and JFM, to calculate the amount of shifting the baseline).
+
+ \item Direction changing commands (\cs{yoko},~\cs{tate}, \cs{dtou},~\cs{utod}) are patched to
+ include the following process:
+ \begin{quote}
+ If the Japanese font for new direction is not loaded,
+ \LuaTeX-ja loads it automatically.
+ \end{quote}
+ Original commands are saved as \cs{ltj@@orig@yoko} etc.
+
+ \item Specifying Japanese font command which is
+ defined by \cs{jfont},~\cs{tfont}, or~\cs{DeclareFixedFont} directly
+ actually loads (and selects) the Japanese font.
+ For example, \textbf{JAchar}s in \cs{box0} will be typeset in \cs{HOGE},
+ in the following code:
+\begin{lstlisting}
+ % in horizontal direction (\yoko)
+ \DeclareFixedFont\HOGE{JT3}{gt}{m}{n}{12} % JT3: for vertical direction
+ \HOGE
+ \setbox0=\hbox{\tate あいう}
+\end{lstlisting}
+ \end{itemize}
+%</en>
+
+%<*ja>
+\subsection{\LaTeXe 下での和文フォントの読み込み}
+\label{ssec:ltx-jfm}
+バージョン20190107以降では,\LaTeXe の下で\LuaTeX-jaを使用した際に,
+\emph{横組用和文フォントと縦組み用和文フォントを両方一度に読み込み・選択せずに,
+ 実際にそれぞれを使う組方向になったときに行う}という方針にした.
+これは実際に読み込むフォント数を削減することで,
+タイプセットにかかる時間と(主にLuaの)メモリ消費を削減するためである(\cite{tc18ltja}).
+
+\begin{itemize}
+ \item \cs{selectfont}は横組用・縦組用和文フォントのうち,現在の組方向で使う方を
+ 実際に読み込み(・選択し),そうでない方は「フォントサイズとJFMのみ\LuaTeX-jaが把握している状態」
+ (以下,\emph{JFM把握状態})とする.
+
+ \item 組方向変更命令\cs{yoko},~\cs{tate}, \cs{dtou},~\cs{utod}には
+ \begin{quote}
+ 新たな組方向での和文フォントが読み込まれていない(JFM把握状態)ならば,
+ 現在のエンコーディング・ファミリ・シリーズ・シェイプから改めて読み込む(または選択する)
+ \end{quote}
+ 処理が付け加えられている.
+ もとの「組方向を変更するだけ」の命令は\cs{ltj@@orig@yoko}のように\texttt{ltj@@orig@}が前についた
+ 命令に保存されている.
+
+ \item \cs{jfont},~\cs{tfont},~\cs{DeclareFixedFont}で定義された和文フォントは
+ その時点で実際にフォントが読み込まれる.すなわち,以下のコードにおいて,
+ \cs{box0}中の\textbf{JAchar}は\cs{HOGE}でタイプセットされる.
+\begin{lstlisting}
+ % in horizontal direction (\yoko)
+ \DeclareFixedFont\HOGE{JT3}{gt}{m}{n}{12} % JT3: for vertical direction
+ \HOGE
+ \setbox0=\hbox{\tate あいう}
+\end{lstlisting}
+ \end{itemize}
+%</ja>
+
%<en>\subsection{Patch for NFSS2}
%<ja>\subsection{NFSS2へのパッチ}
\label{ssec:nfsspat}
\item[\cs{CID}\{<number>\}]
%<*en>
Typeset a glyph whose CID number is <number>.
-If the Japanese font is neither Adobe-Japan1,~Adobe-GB1, Adobe-CNS1,~nor~Adobe-Korea1 CID-keyed font,
+If the Japanese font is neither Adobe-Japan1,~Adobe-GB1, Adobe-CNS1,
+Adobe-Korea1,~nor~Adobe-KR CID-keyed font,
\LuaTeX-ja treats that <number> is a CID number of Adobe-Japan1 character collection,
and tries to typeset a ``most suitable glyph''.
%</en>
%<*ja>
CID番号が<number>の文字を出力する.
-もし現在の和文フォントがAdobe-Japan1,~Adobe-GB1, Adobe-CNS1,~Adobe-Korea1の
+もし現在の和文フォントがAdobe-Japan1,~Adobe-GB1, Adobe-CNS1, Adobe-Korea1,~Adobe-KRの
いずれのCID-keyed fontでもない場合,<number>はAdobe-Japan1のCID番号であると解釈し
「適切なグリフ」\footnote{%
例えばフォントにIVDコレクションAdobe-Japan1が含まれていれば,その情報を用いて
と同義.
\end{cslist}
-また,優先順位付きの行長調整のために,次の3パラメータが\cs{ltjsetparameter}内で
+また,次のパラメータが\cs{ltjsetparameter}内で
追加される.いずれもグローバルに効力を発揮する.
\begin{cslist}[style=standard]
\item[\DParam{stretch\_priority}\,=\{<list>\}]
\texttt{others}キーが「\textbf{JAglue}以外のグルー」を表す.
各キーの値は,JFMグルーにおける「優先度$i$」を$10i$に対応させた整数値であり,
大きい方が先に伸ばされることを意味している.
+ 初期値は
+\begin{lstlisting}
+{kanjiskip=-35,xkanjiskip=-25,others=50}
+\end{lstlisting}
+であり,「優先度$-4$」と指定されているJFMグルーが最も伸びにくいようになっている.
\item[\DParam{shrink\_priority}\,=\{<list>\}]
同様に,「行を自然長より縮める」場合の調整に用いる優先度を指定する.
-それ以外は\Param{stretch\_priority}と指定の形式は変わらない.
+ã\81\9dã\82\8c以å¤\96ã\81¯\Param{stretch\_priority}ã\81¨æ\8c\87å®\9aã\81®å½¢å¼\8fã\81¯å¤\89ã\82\8fã\82\89ã\81ªã\81\84ï¼\88å\88\9dæ\9c\9få\80¤ã\82\82å¤\89ã\82\8fã\82\89ã\81ªã\81\84ï¼\89ï¼\8e
\item[\DParam{linestep\_factor}\,=<float>]
- 段階的な行送り調整の際,\cs{baselineskip}の何倍単位で行送りを変えるかを指定する.
+ 段階的な行送り調整の際,\cs{baselineskip}の自然長の何倍単位で行送りを変えるかを指定する.
0を指定すると無効になるのと変わらない.また負数を指定すると,
その絶対値が指定されたかのように扱われる.
初期値は0.5(つまり半行単位)である.
+
+ \item[\DParam{profile\_hgap\_factor}\,=<float>]
+ 「中身まで見た」行送り計算の際,
+ 前の行にある深さが大きいものと次の行にある高さが大きいものが
+ 水平方向にどれだけ離れていないといけないかを
+ 「\cs{lineskip}の自然長の何倍か」で指定する.
+ 負数を指定すると,その絶対値が指定されたかのように扱われる.
+ 初期値は1(つまり\cs{lineskip}(の自然長))である.
\end{cslist}
-\Param{stretch\_priority}, \Param{shrink\_priority}の初期値はどちらも
-\begin{lstlisting}
-{kanjiskip=-35,xkanjiskip=-25,others=50}
-\end{lstlisting}
-であり,「優先度$-4$」と指定されているJFMグルーが最も伸び(縮み)にくいようになっている.
%</ja>
\subsection{\Pkg{luatexja-ruby}}
\label{sssec:ltjpreset-multi}
%<*en>
-Besides \texttt{morisawa-pro}~and~\texttt{morisawa-pr6n} presets,
+Besides \texttt{bizud}, \texttt{morisawa-pro},~and~\texttt{morisawa-pr6n} presets,
fonts are specified by font name, not by file name.
In following tables, starred fonts (e.g.~KozGo\dots-Regular) are used for medium series of \textit{gothic},
\emph{if and only if \texttt{deluxe} option is specified}.
%</en>
%<*ja>
-\texttt{morisawa-pro}, \texttt{morisawa-pr6n}以外はフォントの指定は
+\texttt{bizud}, \texttt{morisawa-pro}, \texttt{morisawa-pr6n}以外はフォントの指定は
(ファイル名でなく)フォント名で行われる.
以下の表において,*\,つきのフォント(e.g.,~KozGo\dots-Regular)は,\emph{\texttt{deluxe}オプション指定時に}
ゴシック体中字として用いられるものを示している.
\end{tabular}
\end{center}
-%<en>\newpage
\item[hiragino-pro] Hiragino Pro (Adobe-Japan1-5) fonts.
%<en> \\*[-\dimexpr\medskipamount+\baselineskip\relax]
\item[hiragino-pron] Hiragino ProN (Adobe-Japan1-5, JIS04-savvy) fonts.
\end{tabular}
\end{center}
+%<ja>\newpage
+\item[bizud] BIZ UD fonts (by Morisawa Inc.) bundled with
+ Windows~10 October 2018 Update.
+\begin{center}\small
+\begin{tabular}{ll>{\ttfamily}l}
+\toprule
+\textbf{family}&\textbf{series}\\
+\midrule
+%<en>\textit{mincho}
+%<ja>\textgt{明朝}%
+ &&BIZ-UDMinchoM.ttc\\
+\midrule
+ &medium&BIZ-UDGothicR.ttc\\
+\cmidrule(l){2-3}
+%<en>\textit{gothic}%
+%<ja>\gt ゴシック
+ &bold&BIZ-UDGothicB.ttc\\
+ &extra bold&BIZ-UDGothicB.ttc\\
+\midrule
+%<en>\textit{rounded gothic}
+%<ja>\gt 丸ゴシック
+&&BIZ-UDGothicB.ttc\\
+\bottomrule
+\end{tabular}
+\end{center}
+
+%<en>\newpage
+
\item[morisawa-pro] Morisawa Pro (Adobe-Japan1-4) fonts.
%<en> \\*[-\dimexpr\medskipamount+\baselineskip\relax]
\item[morisawa-pr6n] Morisawa Pr6N (Adobe-Japan1-6, JIS04-savvy) fonts.
\end{tabular}
\end{center}
+%<en>\newpage
\item[sourcehan] Source Han Serif and Source Han Sans fonts (Language-specific OTF \textit{or} OTC)
%<en> \\*[-\dimexpr\medskipamount+\baselineskip\relax]
\item[sourcehan-jp] Source Han Serif JP and Source Han Sans JP fonts (Region-specific Subset OTF)
\attr{ltj@curjfnt}
%<*en>
-The font index of current Japanese font for horizontal direction.
+If this attribute is a positive number, it stores the font number of current Japanese font for horizontal direction.
+If this attribute is negative, it means that the Japanese font for horizontal direction is
+not loaded---\LuaTeX-ja only knows its size and JFM.
%</en>
%<*ja>
-現在の横組用和文フォントのフォント番号.
+基本的には現在の横組用和文フォントのフォント番号を格納しているが,
+\LaTeX 下で使用する場合は($-2$以下の)負数となることがある.
+ 負数の場合は「横組用和文フォントは実際には読み込まれておらず,そのフォントサイズとJFMだけが
+ \LuaTeX-jaが把握している」状態を表す.
%</ja>
\attr{ltj@curtfnt}
%<*en>
-The font index of current Japanese font for vertical direction.
+Similar to \cs{ltj@curjfnt}, but with current Japanese font for vertical direction.
%</en>
%<*ja>
-ç\8f¾å\9c¨ã\81®ç¸¦çµ\84ç\94¨å\92\8cæ\96\87ã\83\95ã\82©ã\83³ã\83\88ã\81®ã\83\95ã\82©ã\83³ã\83\88ç\95ªå\8f·.
+縦çµ\84ç\94¨å\92\8cæ\96\87ã\83\95ã\82©ã\83³ã\83\88ã\81«é\96¢ã\81\99ã\82\8b\cs{ltj@curjfnt}ã\81¨å\90\8cæ§\98ã\81®å\80¤.
%</ja>
\attr{ltj@charclass}
直前が和文文字であるかを示すフラグ \verb+\lst@ifkanji+ を新たに導入した.
以降,説明のために以下のように文字を分類する:
%</ja>
+%<*ja>
\begin{center}
\small
-\begin{tabular}{lccccc}
+\begin{tabular}{llllll}
\toprule
-&Letter&Other&Kanji&Open&Close\\\midrule
+&\emph{Letter}&\emph{Other}&\emph{Kanji}&\emph{Open}&\emph{Close}\\\midrule
\verb+\lst@ifletter+&T&F&T&F&T\\
\verb+\lst@ifkanji+&F&F&T&T&F\\
-%<en>Meaning&char in an identifier&other alphabet&%
-%<en>most of Japanese char&opening brackets&closing brackets\\
-%<ja>意図&識別子中の文字&その他欧文文字&殆どの和文文字&開き括弧類&閉じ括弧類\\
+\emph{意図}&識別子中の文字&その他欧文文字&殆どの和文文字&開き括弧類&閉じ括弧類\\
\bottomrule
\end{tabular}
\end{center}
+%</ja>
+%<*en>
+\begin{center}
+\small
+\begin{tabular}{llll}
+\toprule
+&\textbf{Letter}&\textbf{Other}&\\\midrule
+\verb+\lst@ifletter+&T&F&\\
+\verb+\lst@ifkanji+&F&F&\\
+\textbf{Meaning}&char in an identifier&other alphabet&\\
+ \midrule
+&\textbf{Kanji}&\textbf{Open}&\textbf{Close}\\\midrule
+\verb+\lst@ifletter+&T&F&T\\
+\verb+\lst@ifkanji+&T&T&F\\
+\textbf{Meaning}&most of Japanese char&opening brackets&closing brackets\\
+\bottomrule
+\end{tabular}
+\end{center}
+%</en>
%<*en>
Note that \textit{digits} in the \Pkg{listings} package can be Letter or
Other according to circumstances.
%</ja>
\begin{center}
\small
-\begin{tabular}{llccccc}
+\begin{tabular}{lllllll}
\toprule
%<*en>
-&&\multicolumn{4}{c}{Next}\\\cmidrule(lr){3-7}
-&&\hbox to 4em{\hss Letter\hss}&\hbox to 4em{\hss Other\hss}
-&\hbox to 4em{\hss Kanji\hss}&\hbox to 4em{\hss Open\hss}&Close\\\midrule
+&&\multicolumn{4}{c}{\textbf{Next}}\\\cmidrule(lr){3-7}
+&&\hbox to 4em{Letter\hss}&\hbox to 4em{Other\hss}
+&\hbox to 4em{Kanji\hss}&\hbox to 4em{Open\hss}&Close\\\midrule
&Letter&collects&\multicolumn{3}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
&Other&outputs&collects&\multicolumn{2}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
-Prev&Kanji&\multicolumn{4}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
+\textbf{Prev}&Kanji&\multicolumn{4}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
&Open&\multicolumn{5}{c}{\hrulefill \ collects\ \hrulefill}\\
&Close&\multicolumn{4}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
%</en>
%<*ja>
-&&\multicolumn{4}{c}{後ろ側の文字}\\\cmidrule(lr){3-7}
-&&\hbox to 4em{\hss Letter\hss}&\hbox to 4em{\hss Other\hss}
-&\hbox to 4em{\hss Kanji\hss}&\hbox to 4em{\hss Open\hss}&Close\\\midrule
-直&Letter&収集&\multicolumn{3}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
-前&Other&出力&収集&\multicolumn{2}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
-文&Kanji&\multicolumn{4}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
-字&Open&\multicolumn{5}{c}{\hrulefill \ 収集\ \hrulefill}\\
-種&Close&\multicolumn{4}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
+&&\multicolumn{4}{c}{\textbf{後側文字種}}\\\cmidrule(lr){3-7}
+&&\hbox to 4em{Letter\hss}&\hbox to 4em{Other\hss}
+&\hbox to 4em{Kanji\hss}&\hbox to 4em{Open\hss}&Close\\\midrule
+\emph{直}&Letter&収集&\multicolumn{3}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
+\emph{前}&Other&出力&収集&\multicolumn{2}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
+\emph{文}&Kanji&\multicolumn{4}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
+\emph{字}&Open&\multicolumn{5}{c}{\hrulefill \ 収集\ \hrulefill}\\
+\emph{種}&Close&\multicolumn{4}{c}{\hrulefill \ 出力\ \hrulefill}&収集\\
%</ja>
\bottomrule
\end{tabular}
\midrule
Adobe-Japan1-*<j-cid-auto-adobe-japan1.lua&UniJIS2004-UTF32-*&Adobe-Japan1-UCS2\\
Adobe-Korea1-*<j-cid-auto-adobe-korea1.lua&UniKS-UTF32-*&Adobe-Korea1-UCS2\\
+Adobe-KR-*<j-cid-auto-adobe-kr.lua&UniAKR-UTF32-*&Adobe-KR-UCS2\\
Adobe-GB1-*<j-cid-auto-adobe-gb1.lua&UniGB-UTF32-*&Adobe-GB1-UCS2\\
Adobe-CNS1-*<j-cid-auto-adobe-cns1.lua&UniCNS-UTF32-*&Adobe-CNS1-UCS2\\
\bottomrule
Requirements for Japanese Text Layout (W3C Working Group Note), 2011, 2012. \newblock
\url{http://www.w3.org/TR/jlreq/}%
%<ja> \\日本語訳の書籍版:W3C日本語組版タスクフォース(編),『W3C技術ノート 日本語組版処理の要件』,東京電機大学出版局,2012.
-\bibitem{min10} 乙部厳己.min10フォントについて.\\\null\hfill
+\bibitem{min10} 乙部厳己.「min10フォントについて」\\\null\hfill
\url{http://argent.shinshu-u.ac.jp/~otobe/tex/files/min10.pdf}
-\bibitem{x4051} 日本工業規格(Japanese Industrial Standard). JIS~X~4051,
-日本語文書の組版方法(Formatting rules for Japanese documents), 1993, 1995, 2004.
-\bibitem{ptexdoc} 濱野尚人,田村明史,倉沢良一.\TeX の出版への応用—縦組み機能の組み込み—.
+\bibitem{x4051} 日本工業規格(Japanese Industrial Standard). 「JIS~X~4051,
+日本語文書の組版方法(Formatting rules for Japanese documents)」, 1993, 1995, 2004.
+\bibitem{ptexdoc} 濱野尚人,田村明史,倉沢良一.「\TeX の出版への応用—縦組み機能の組み込み—」.
\\\null\hfill\texttt{.../texmf-dist/doc/ptex/base/ptexdoc.pdf}
\bibitem{ptextug} Hisato Hamano. \newblock
\textit{Vertical Typesetting with \TeX}, TUGBoat~\textbf{11}(3), 346--352, 1990.
1.7}, 2008. \newblock
\\\null\hfill
\url{http://www.iso.org/iso/iso\_catalogue/catalogue_tc/catalogue\_detail.htm?csnumber=51502}
+\bibitem{tc18ltja} 北川弘典.「\LuaTeX-jaの近況」,\TeX Conf~2018.\\
+ \url{https://osdn.net/projects/luatex-ja/wiki/Documentation/attach/tc18ltja.pdf}
\end{thebibliography}
\end{document}