X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=c7a853059c0ac0a2bb986c839c13d45aac6acd0d;hb=779caaf35d98cd40d0831ce8f1be65e4405b9c70;hp=8f9c26b746126d6a38b71cf23abb8489529a54d7;hpb=f81d59a9a5e7c76156371ae44543ec4002a8540a;p=luatex-ja%2Fluatexja.git diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index 8f9c26b..c7a8530 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -572,10 +572,10 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}. % %<*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. % %<*ja> -\item 本ドキュメントでは,自然数は0から始まる.自然数全体の集合は$\omega$と表記する. +\item 本ドキュメントでは,自然数は0から始まる.(\TeX で扱える)自然数全体の集合は$\omega$と表記する. % \end{itemize} @@ -1432,22 +1432,19 @@ alphabetic fonts % %<*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: %として読み込み,小塚書体(Pr6N)を使うことを指定している. % 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}オプションとの相性があまり良くないので推奨はしない. +% +%<*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 extra bold + 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> \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. % %<*ja> @@ -6437,6 +6485,7 @@ A demonstrarion is shown in \autoref{fig:altkanji-fontspec}. %<*en> \paragraph{Remark on \texttt{AltFont}, \texttt{YokoFeatures}, \texttt{TateFeatures} keys} +\leavevmode\par In \texttt{AltFont},~\texttt{YokoFeatures},~\texttt{TateFeatures} keys, one cannot specify per-shape settings such as \texttt{BoldFeatures}. For example, @@ -7194,10 +7243,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 extra~bold), 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 +Mincho light and gothic extra~bold can be by \cs{mcfamily}\cs{ltseries}~and~\cs{gtfamily}\cs{ebseries}, respectively. \begin{itemize} @@ -7319,7 +7368,7 @@ There is not rounded gothic family in Kozuka fonts. 「小塚丸ゴシック」は存在しないので,便宜的に小塚ゴシックHによって代用している. % \begin{center}\small -\begin{tabular}{cllll} +\begin{tabular}{lllll} \toprule \bfseries family&\bfseries series&\ttfamily kozuka-pro&\ttfamily kozuka-pr6&\ttfamily kozuka-pr6n\\ \midrule @@ -7336,7 +7385,7 @@ There is not rounded gothic family in Kozuka fonts. %\smash{\raisebox{2ex}{\textit{gothic}}}% %\smash{\raisebox{2ex}{\gt ゴシック}}% &bold&KozGoPro-Bold&KozGoProVI-Bold&KozGoPr6N-Bold\\ - &heavy&KozGoPro-Heavy&KozGoProVI-Heavy&KozGoPr6N-Heavy\\ + &extra bold&KozGoPro-Heavy&KozGoProVI-Heavy&KozGoPr6N-Heavy\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7353,8 +7402,8 @@ 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 -Adobe-Japan1-3 character collection (Std/StdN), while others supports +Note that fonts for gothic extra~bold (HiraKakuStd[N]-W8) only contains characters in +Adobe-Japan1-3 character collection, while others contains those in Adobe-Japan1-5 character collection. % %<*ja> @@ -7366,7 +7415,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. 別途購入する必要がある. % \begin{center}\small -\begin{tabular}{clll} +\begin{tabular}{llll} \toprule \bf family&\bf series&\tt hiragino-pro&\tt hiragino-pron\\ \midrule @@ -7383,7 +7432,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\smash{\raisebox{2ex}{\textit{gothic}}}% %\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\\ + &extra bold&Hiragino~Kaku~Gothic~Std~W8&Hiragino~Kaku~Gothic~StdN~W8\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7396,7 +7445,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. % \\*[-\dimexpr\medskipamount+\baselineskip\relax] \item[morisawa-pr6n] Morisawa Pr6N (Adobe-Japan1-6, JIS04-savvy) fonts. \begin{center}\small -\begin{tabular}{cl>{\tt}l>{\tt}l} +\begin{tabular}{ll>{\tt}l>{\tt}l} \toprule \bf family&\bf series&morisawa-pro&morisawa-pr6n\\ \midrule @@ -7410,7 +7459,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\textit{gothic}% %\gt ゴシック &bold&A-OTF-FutoGoB101Pro-Bold.otf&A-OTF-FutoGoB101Pr6N-Bold.otf\\ - &heavy&A-OTF-MidashiGoPro-MB31.otf&A-OTF-MidashiGoPr6N-MB31.otf\\ + &extra bold&A-OTF-MidashiGoPro-MB31.otf&A-OTF-MidashiGoPr6N-MB31.otf\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7426,7 +7475,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. % \\*[-\dimexpr\medskipamount+\baselineskip\relax] \item[yu-osx] Yu fonts bundled with OSX~Mavericks. \begin{center}\small -\begin{tabular}{cllll} +\begin{tabular}{lllll} \toprule \bf family&\bf series&\texttt{yu-win}&\texttt{yu-win10}&\texttt{yu-osx}\\ \midrule @@ -7443,7 +7492,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\textit{gothic}% %\gt ゴシック &bold&YuGothic-Bold&YuGothic-Bold&YuGothic~Bold\\ - &heavy&YuGothic-Bold&YuGothic-Bold&YuGothic~Bold\\ + &extra bold&YuGothic-Bold&YuGothic-Bold&YuGothic~Bold\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7458,7 +7507,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\par These fonts can be downloaded from \url{http://yozvox.web.fc2.com/}. %これらのフォントは \url{http://yozvox.web.fc2.com/} からダウンロードできる. \begin{center}\small -\begin{tabular}{clll} +\begin{tabular}{llll} \toprule \bf family&\bf series&\bf default, \texttt{90jis}~option&\bf \texttt{jis2004} option\\ \midrule @@ -7471,7 +7520,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\textit{gothic}% %\gt ゴシック &bold&Moga90Gothic Bold&MogaGothic Bold\\ - &heavy&Moga90Gothic Bold&MogaGothic Bold\\ + &extra bold&Moga90Gothic Bold&MogaGothic Bold\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7486,7 +7535,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\par These fonts can be downloaded from\\\hfill \url{https://ja.osdn.net/projects/ume-font/wiki/FrontPage}. %これらのフォントは \url{https://ja.osdn.net/projects/ume-font/wiki/FrontPage} からダウンロードできる. \begin{center}\small -\begin{tabular}{cll} +\begin{tabular}{lll} \toprule \bf family&\bf series&\bf default\\ \midrule @@ -7501,7 +7550,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\textit{gothic}% %\gt ゴシック &bold&Ume Gothic O5\\ - &heavy&Ume Gothic O5\\ + &extra bold&Ume Gothic O5\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7515,7 +7564,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \item[sourcehan-jp] Source Han Serif JP and Source Han Sans JP fonts (Region-specific Subset OTF) \begin{center}\small \def\AD#1#2{Source Han #1 #2&Source Han #1 JP #2}% -\begin{tabular}{cllll} +\begin{tabular}{lllll} \toprule \bf family&\bf series&\texttt{sourcehan}&\texttt{sourcehan-jp}\\ \midrule @@ -7532,7 +7581,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\smash{\raisebox{2ex}{\textit{gothic}}}% %\smash{\raisebox{2ex}{\gt ゴシック}}% &bold&\AD{Sans}{Bold}\\ - &heavy&\AD{Sans}{Heavy}\\ + &extra bold&\AD{Sans}{Heavy}\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7547,7 +7596,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \item[noto-otf] Noto Serif CJK and Noto Sans CJK fonts (Language-specific OTF) \begin{center}\small \def\AD#1#2{Noto #1 CJK #2&Noto #1 CJK JP #2}% -\begin{tabular}{cllll} +\begin{tabular}{lllll} \toprule \bf family&\bf series&\texttt{noto-otc}&\texttt{noto-otf}\\ \midrule @@ -7564,7 +7613,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. %\smash{\raisebox{2ex}{\textit{gothic}}}% %\smash{\raisebox{2ex}{\gt ゴシック}}% &bold&\AD{Sans}{Bold}\\ - &heavy&\AD{Sans}{Black}\\ + &extra bold&\AD{Sans}{Black}\\ \midrule %\textit{rounded gothic} %\gt 丸ゴシック @@ -7610,56 +7659,43 @@ Next, we describe settings for using only single weight. %\paragraph{HGフォントの利用} %<*en> We can use HG~fonts bundled with Microsoft~Office for realizing multiple weights. +In the table below, starred fonts (e.g., IPA~Gothic*) are used +only if \texttt{jis2004} or \texttt{nodeluxe} option is spefified. % %<*ja> すぐ前に書いた単ウェイト用設定を,Microsoft Office等に付属するHGフォントを使って -多ウェイト化した設定もある. +多ウェイト化した設定もある.以下の表では,*~付きのフォント(例:IPAゴシック*)は +\texttt{jis2004}と\texttt{nodeluxe}のいずれかのオプションが有効になっているときに使われる. % \par\nobreak\medskip {\centering\small -\begin{tabular}{llll} +\begin{tabular}{lllll} \toprule -&\tt ipa-hg&\tt ipaex-hg&\tt ms-hg\\ +\textbf{family}&\textbf{series}&\tt ipa-hg&\tt ipaex-hg&\tt ms-hg\\ \midrule %<*en> -\bf mincho medium -&IPA Mincho&IPAex Mincho&MS Mincho\\\midrule -\bf mincho bold& -\multicolumn{3}{c}{HG Mincho E}\\\midrule -\bf Gothic medium\\ -~~without \texttt{deluxe} -&IPA Gothic&IPAex Gothic&MS Gothic\\ -~~with {\tt jis2004} -&IPA Gothic&IPAex Gothic&MS Gothic\\ -\cmidrule(lr){1-4} -~~otherwise& -\multicolumn{3}{c}{HG Gothic M}\\\midrule -\bf gothic bold& -\multicolumn{3}{c}{HG Gothic E}\\\midrule -\bf gothic heavy& -\multicolumn{3}{c}{HG Soei Kaku Gothic UB}\\\midrule -\bf rounded gothic& -\multicolumn{3}{c}{HG Maru Gothic PRO}\\ -% -%<*ja> -\gtfamily 明朝体中字 -&IPA明朝&IPAex明朝&MS明朝\\\midrule -\gtfamily 明朝体太字& -\multicolumn{3}{c}{HG明朝E}\\\midrule -\gtfamily ゴシック体中字\\ - 単ウェイト時 -&IPAゴシック&IPAexゴシック&MSゴシック\\ - {\tt jis2004}指定時 -&IPAゴシック&IPAexゴシック&MSゴシック\\ -\cmidrule(lr){1-4} - それ以外の時& -\multicolumn{3}{c}{HGゴシックM}\\\midrule -\gtfamily ゴシック体太字& -\multicolumn{3}{c}{HGゴシックE}\\\midrule -\gtfamily ゴシック体極太& -\multicolumn{3}{c}{HG創英角ゴシックUB}\\\midrule -\gtfamily 丸ゴシック体& -\multicolumn{3}{c}{HG丸ゴシック体PRO}\\ +&medium&IPA Mincho&IPAex Mincho&MS Mincho\\ +\smash{\raisebox{1.5ex}{\textit{mincho}}}% +&bold&HG Mincho E&HG Mincho E&HG Mincho E\\\midrule +&&IPA Gothic*&IPAex Gothic*&MS Gothic*\\ +&\smash{\raisebox{1.5ex}{medium}}% +&HG Gothic M&HG Gothic M&HG Gothic M\\\cmidrule{2-5} +\textit{gothic}&bold&HG Gothic E&HG Gothic E&HG Gothic E\\\cmidrule{2-5} +&extra bold&HG Soei Kaku Gothic UB&HG Soei Kaku Gothic UB&HG Soei Kaku Gothic UB\\\midrule +\textit{rounded gothic}&& +HG Maru Gothic PRO&HG Maru Gothic PRO&HG Maru Gothic PRO\\ +% +%<*ja> +&medium&IPA明朝&IPAex明朝&MS明朝\\ +\smash{\raisebox{1.5ex}{\textgt{明朝体}}}% +&bold&HG明朝E&HG明朝E&HG明朝E\\\midrule +&&IPAゴシック*&IPAexゴシック*&MSゴシック*\\ +&\smash{\raisebox{1.5ex}{medium}}% +&HGゴシックM&HGゴシックM&HGゴシックM\\\cmidrule{2-5} +\textgt{ゴシック体}&bold&HGゴシックE&HGゴシックE&HGゴシックE\\\cmidrule{2-5} +&extra bold&HG創英角ゴシックUB&HG創英角ゴシックUB&HG創英角ゴシックUB\\\midrule +\textgt{丸ゴシック体}&& +HG丸ゴシック体PRO&HG丸ゴシック体PRO&HG丸ゴシック体PRO\\ % \bottomrule \end{tabular}\par\medskip} @@ -7685,7 +7721,6 @@ are internally specified by: として指定を行っているので注意すること. % - \clearpage %\part{Implementations} %\part{実装}