OSDN Git Service

manual: more description of custom option of luatexja-preset
[luatex-ja/luatexja.git] / doc / luatexja.dtx
index 8f9c26b..303d42c 100644 (file)
@@ -572,10 +572,10 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}.
 %</ja>
 %<*en>
 \item In this document, natural numbers start from~zero.
-  $\omega$ denotes the set of all natural numbers.
+  $\omega$ denotes the set of all natural numbers which can be used in \TeX.
 %</en>
 %<*ja>
-\item 本ドキュメントでは,自然数は0から始まる.自然数全体の集合は$\omega$と表記する.
+\item 本ドキュメントでは,自然数は0から始まる.(\TeX で扱える)自然数全体の集合は$\omega$と表記する.
 %</ja>
 \end{itemize}
 
@@ -1432,22 +1432,19 @@ alphabetic fonts
 %</en>
 %<*ja>
 \begin{center}\small
-\begin{tabular}{cccc}
+\begin{tabular}{ccccc}
 \toprule
 和文
-&\cs{jfontspec}&\cs{setmainjfont}&\cs{setsansjfont}\\
-欧文
-&\cs{fontspec}&\cs{setmainfont}&\cs{setsansfont}\\
-\midrule
-和文
-&\cs{newjfontfamily}&\cs{newjfontface}&\cs{defaultjfontfeatures}\\
+&\cs{jfontspec}&\cs{setmainjfont}&\cs{setsansjfont}&\cs{setmonojfont}$^*$\\
 欧文
-&\cs{newfontfamily}&\cs{newfontface}&\cs{defaultfontfeatures}\\
+&\cs{fontspec}&\cs{setmainfont}&\cs{setsansfont}&\cs{setmonofont}\\
 \midrule
 和文
-&\cs{addjfontfeatures}\\
+&\cs{newjfontfamily}&\cs{newjfontface}
+&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\
 欧文
-&\cs{addfontfeatures}\\
+&\cs{newfontfamily}&\cs{newfontface}
+&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\
 \bottomrule
 \end{tabular}
 \end{center}
@@ -1565,6 +1562,57 @@ The following presets are defined:
 %<ja>として読み込み,小塚書体(Pr6N)を使うことを指定している.
 %<en> which means that Kozuka~Pr6N fonts will be used in this document.
 
+%<*ja>
+上記のプリセット以外の和文フォント設定を使いたい場合,本来は
+\Pkg{luatexja-fontspec}パッケージの提供する
+\cs{setmainjfont}, \cs{setsansjfont}を使って自分で指定するべきである.
+\texttt{custom}オプションを使うことで,\Pkg{luatexja-preset}パッケージの内部に直接アクセスして
+\begin{lstlisting}
+\usepackage[kozuka-pr6n,          % kozuka-pr6n プリセットを基礎にして,
+  custom={
+    mc=SourceHanSerif-Regular,    % 明朝体(全ウェイト)
+    mc-l=SourceHanSerif-Bold,     % 明朝体細字
+    mc-m=KozMinPr6N-Regular,      % 明朝体中字
+  % mc-bx=KozMinPr6N-Bold,        % 明朝体太字
+  % gt=HirakakuProN-W3,           % ゴシック体(全ウェイト)
+  % gt-m=SourceHanSans-Regular,   % ゴシック体中字(deluxe オプション指定時)
+  % gt-bx=HiraKakuProN-W6,ular,   % ゴシック体太字
+  % gt-eb=HiraKakuProN-W6,ular,   % ゴシック体極太
+    mg-m=HG Maru Gothic PRO,      % 丸ゴシック体
+  },
+  deluxe,expert,jis2004,match,nfssonly
+]{luatexja-preset}
+\end{lstlisting}
+のようにすることもできるが,\texttt{custom}オプションの書式は予告なく変更されることがある
+上,\texttt{90jis}や\texttt{JIS2004}オプションとの相性があまり良くないので推奨はしない.
+%</ja>
+%<*en>
+To use a Japanese font setting which does not match with any presets,
+the legitimate method is to use \cs{setmainjfont}~and~\cs{setsansjfont}
+which are provided by the \Pkg{luatexja-fontspec} package.
+
+One can use the \texttt{custom} option, such as
+\begin{lstlisting}
+\usepackage[kozuka-pr6n,          % based on the kozuka-pr6n preset (Kozuka Pr6N),
+  custom={
+    mc=SourceHanSerif-Regular,    % mincho family (all weights)
+    mc-l=SourceHanSerif-Bold,     % mincho light
+    mc-m=KozMinPr6N-Regular,      % mincho medium
+  % mc-bx=KozMinPr6N-Bold,        % mincho bold
+  % gt=HirakakuProN-W3,           % gothic family (all weights)
+  % gt-m=SourceHanSans-Regular,   % gothic medium (with deluxe option)
+  % gt-bx=HiraKakuProN-W6,ular,   % gothic bold
+  % gt-eb=HiraKakuProN-W6,ular,   % gothic extrabold
+    mg-m=HG Maru Gothic PRO,      % rounded gothic
+  },
+  deluxe,expert,jis2004,match,nfssonly
+]{luatexja-preset}
+\end{lstlisting}
+However, we do not recommend this \cs{custom} option;
+the format might change, and this \cs{custom} option is not well-compatible with
+\texttt{90jis}~nor~\cs{jis2004} options.
+%</en>
+
 %<*en>
 \subsection{\cs{CID}, \cs{UTF}, and macros in \Pkg{japanese-otf} package}
 Under \pLaTeX, \Pkg{japanese-otf} package (developed by Shuzaburo Saito) is
@@ -1705,7 +1753,7 @@ and the character ``漢'' to the character range~100.
 %<*en>
 A character can belong to only one character range.
 For example, whole SIP belong to the range~4 in the default setting of \LuaTeX-ja,
-and if you execute the above line, then SIP will belong to the range~100 and be
+and if one executes the above line, then SIP will belong to the range~100 and be
 removed from the range~4.
 %</en>
 %<*ja>
@@ -7194,10 +7242,10 @@ This means that \verb+\mcfamily\bfseries+, \verb+\gtfamily\bfseries+ and
 \item[deluxe]
 %<*en>
 Use the mincho family with three weights (light, medium, and~bold),
-the gothic family with three weights (medium, bold, and~heavy), and \textit{rounded gothic}%
+the gothic family with three weights (medium, bold, and~extrabold), and \textit{rounded gothic}%
 \footnote{Provided by \cs{mgfamily} and \cs{textmg},
 because ``rounded gothic'' is called \textit{maru gothic} (丸ゴシック) in Japanese.}.
-The light weight of mincho and the heavy weight of gothic can be used by
+The light weight of mincho and the extrabold weight of gothic can be used by
 \cs{mcfamily}\cs{ltseries}~and~\cs{gtfamily}\cs{ebseries}, respectively.
 
 \begin{itemize}
@@ -7336,7 +7384,7 @@ There is not rounded gothic family in Kozuka fonts.
 %<en>\smash{\raisebox{2ex}{\textit{gothic}}}%
 %<ja>\smash{\raisebox{2ex}{\gt ゴシック}}%
  &bold&KozGoPro-Bold&KozGoProVI-Bold&KozGoPr6N-Bold\\
- &heavy&KozGoPro-Heavy&KozGoProVI-Heavy&KozGoPr6N-Heavy\\
+ &extrabold&KozGoPro-Heavy&KozGoProVI-Heavy&KozGoPr6N-Heavy\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7353,7 +7401,7 @@ There is not rounded gothic family in Kozuka fonts.
 %<*en>
 Hiragino fonts (except Hiragino~Mincho~W2) are bundled with Mac OS~X 10.5 or later.
 Some editions of a Japanese word-processor ``一太郎2012'' includes Hiragino ProN fonts.
-Note that the heavy weight of gothic family only supports
+Note that the extrabold weight of gothic family only supports
 Adobe-Japan1-3 character collection (Std/StdN), while others supports
 Adobe-Japan1-5 character collection.
 %</en>
@@ -7383,7 +7431,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<en>\smash{\raisebox{2ex}{\textit{gothic}}}%
 %<ja>\smash{\raisebox{2ex}{\gt ゴシック}}%
  &bold&Hiragino~Kaku~Gothic~Pro~W6&Hiragino~Kaku~Gothic~ProN~W6\\
- &heavy&Hiragino~Kaku~Gothic~Std~W8&Hiragino~Kaku~Gothic~StdN~W8\\
+ &extrabold&Hiragino~Kaku~Gothic~Std~W8&Hiragino~Kaku~Gothic~StdN~W8\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7410,7 +7458,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<en>\textit{gothic}%
 %<ja>\gt ゴシック
  &bold&A-OTF-FutoGoB101Pro-Bold.otf&A-OTF-FutoGoB101Pr6N-Bold.otf\\
- &heavy&A-OTF-MidashiGoPro-MB31.otf&A-OTF-MidashiGoPr6N-MB31.otf\\
+ &extrabold&A-OTF-MidashiGoPro-MB31.otf&A-OTF-MidashiGoPr6N-MB31.otf\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7443,7 +7491,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<en>\textit{gothic}%
 %<ja>\gt ゴシック
  &bold&YuGothic-Bold&YuGothic-Bold&YuGothic~Bold\\
- &heavy&YuGothic-Bold&YuGothic-Bold&YuGothic~Bold\\
+ &extrabold&YuGothic-Bold&YuGothic-Bold&YuGothic~Bold\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7471,7 +7519,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<en>\textit{gothic}%
 %<ja>\gt ゴシック
  &bold&Moga90Gothic Bold&MogaGothic Bold\\
- &heavy&Moga90Gothic Bold&MogaGothic Bold\\
+ &extrabold&Moga90Gothic Bold&MogaGothic Bold\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7501,7 +7549,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<en>\textit{gothic}%
 %<ja>\gt ゴシック
  &bold&Ume Gothic O5\\
- &heavy&Ume Gothic O5\\
+ &extrabold&Ume Gothic O5\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7532,7 +7580,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<en>\smash{\raisebox{2ex}{\textit{gothic}}}%
 %<ja>\smash{\raisebox{2ex}{\gt ゴシック}}%
  &bold&\AD{Sans}{Bold}\\
- &heavy&\AD{Sans}{Heavy}\\
+ &extrabold&\AD{Sans}{Heavy}\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7564,7 +7612,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<en>\smash{\raisebox{2ex}{\textit{gothic}}}%
 %<ja>\smash{\raisebox{2ex}{\gt ゴシック}}%
  &bold&\AD{Sans}{Bold}\\
- &heavy&\AD{Sans}{Black}\\
+ &extrabold&\AD{Sans}{Black}\\
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
@@ -7636,7 +7684,7 @@ We can use HG~fonts bundled with Microsoft~Office for realizing multiple weights
 \multicolumn{3}{c}{HG Gothic M}\\\midrule
 \bf gothic bold&
 \multicolumn{3}{c}{HG Gothic E}\\\midrule
-\bf gothic heavy&
+\bf gothic extrabold&
 \multicolumn{3}{c}{HG Soei Kaku Gothic UB}\\\midrule
 \bf rounded gothic&
 \multicolumn{3}{c}{HG Maru Gothic PRO}\\
@@ -7685,7 +7733,6 @@ are internally specified by:
 として指定を行っているので注意すること.
 %</ja>
 
-
 \clearpage
 %<en>\part{Implementations}
 %<ja>\part{実装}