X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=7b73c3f3b1cbeb9e085b5bf404e4364e30b09ee3;hb=cd6c052eda6cf9534e1919ce5be10c90ed31b8b5;hp=84e383c6869ea6ea4569b2375b004067a0d028bd;hpb=0421dbb98350a890e5f3cdaa7c5bfb9903c3ec95;p=luatex-ja%2Fluatexja.git diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index 84e383c..7b73c3f 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -1,6 +1,11 @@ %<*!showexpl> %#! lualatex -shell-escape +% To typeset this manual, you need following two fonts: +% - KozMinPr6N-Regular.otf +% - KozGoPr6N-Medium.otf + + %\documentclass[a4paper,titlepage]{article} %\documentclass[a4paper,titlepage]{ltjsarticle} @@ -27,6 +32,10 @@ \usepackage[margin=25mm,footskip=6mm]{geometry} \usepackage{luatexja-adjust}\ltjdisableadjust \parskip=\smallskipamount +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries\raisebox{.2ex}{$\mdlgblksquare\mkern1mu$}}} % %<*ja> \usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry} @@ -80,12 +89,12 @@ %%%%%%%% fonts \usepackage{luatexja-otf} -\usepackage[jis2004]{luatexja-preset} +\usepackage[kozuka-pr6n]{luatexja-preset} %\usepackage{amssymb} %<*en> \usepackage{unicode-math} \setmainfont[Ligatures=TeX]{TeX Gyre Termes} -\setsansfont[Ligatures=TeX]{TeX Gyre Heros} +\setsansfont[Scale=0.95,Ligatures=TeX]{TeX Gyre Heros} \setmathfont{xits-math.otf} \frenchspacing % @@ -143,7 +152,7 @@ %<*en> \textbf{This documentation is far from complete. It may have many grammatical (and contextual) errors.} Also, several parts -(especially, Section~\ref{sec-jfmglue}) are written in Japanese only. +are written in Japanese only. % %<*ja> \textbf{\large 本ドキュメントはまだまだ未完成です.} @@ -223,6 +232,7 @@ scripts for appropriate callbacks. %\subsection{Major Changes from \pTeX} %\subsection{\pTeX からの主な変更点} +\label{ssec:chgptex} %<*en> The \LuaTeX-ja package is under much influence of \pTeX\ engine. The initial @@ -249,15 +259,13 @@ The followings are major changes from \pTeX: \begin{itemize} %<*en> \item A Japanese font is a tuple of a `real' font, a Japanese font - metric (\textbf{JFM}, for short), and an optional string called - `variation'. + metric (\textbf{JFM}, for short). % %<*ja> \item 和文フォントは(小塚明朝,IPA明朝などの)実際のフォント,和文フォン トメトリック(JFMと呼ぶ\footnote{混乱を防ぐため,p\TeX の意味での JFM (\texttt{min10.tfm}) などは本ドキュメントでは\textbf{和文用 - TFM}とよぶことにする.}),そして`variation'と呼ばれる文字列の組で - ある. + TFM}とよぶことにする.})の組である. % %<*en> @@ -316,7 +324,7 @@ The followings are major changes from \pTeX: 使われていたいくつかの方法は用いることができない.具体的には,次の方法はもはや無効である:} % \begin{verbatim} -  ちょ{}っと  ちょ\/っと +\hskip2\zw ちょ{}っと\hskip2\zw ちょ\/っと \end{verbatim} %<*en> If you want to do so, please put an empty hbox between it instead: @@ -325,16 +333,16 @@ The followings are major changes from \pTeX: もし同じことをやりたければ,空の水平ボックスを間に挟めばよい: % \begin{verbatim} -  ちょ\hbox{}っと +\hskip2\zw ちょ\hbox{}っと \end{verbatim} %<*en> \item In the process, two Japanese fonts which only differ in their `real' - fonts are identified. + fonts are identified. % %<*ja> -\item 処理中では,2つの和文フォントは,「実際の」フォントのみが異なる場合に同一視 +\item 処理中では,2つの和文フォントは,「実際の」フォントが異なるだけの場合には同一視 される. % \end{itemize} @@ -664,11 +672,11 @@ But only the contents in \texttt{src/} are needed to work \LuaTeX-ja. % \begin{itemize} %<*en> -\item It is widely accepted that the font `Ryumin-Light' and +\item It is widely accepted that fonts `Ryumin-Light' and `GothicBBB-Medium' aren't embedded into PDF files, and a PDF reader substitute them by some external Japanese fonts (\textit{e.g.}, - Kozuka Mincho is used for Ryumin-Light in Adobe Reader). We adopt this custom to - the default setting. + Ryumin-Light is substituted with Kozuka Mincho in Adobe Reader). + We adopt this custom to the default setting. % %<*ja> \item `Ryumin-Light'と`GothicBBB-Medium'はPDFファイルに埋め込まずに @@ -744,22 +752,46 @@ When vertical typesetting is supported by \LuaTeX-ja in the future, \texttt{JT3} % %<*en> -\item Two font families \texttt{mc} and \texttt{gt} are defined: +\item Traditionally, Japanese documents use two typeface category: \emph{mincho}~(明朝体) and + \emph{gothic}~(\textgt{ゴシック体}). \emph{mincho} is used in the main text, while \emph{gothic} + is used in the headings or for emphasis. +\begin{center}\small +\begin{tabular}{lllc} +\toprule +\textbf{classification}&&&\textbf{family name}\\\midrule +\emph{mincho} (明朝体)&\verb+\textmc{...}+&\verb+{\mcfamily ...}+&\verb+\mcdefault+\\ +\emph{gothic} (\textgt{ゴシック体})&\verb+\textgt{...}+&\verb+{\gtfamily ...}+&\verb+\gtdefault+\\ +\bottomrule +\end{tabular} +\end{center} +\item +By default, the following fonts are used for \emph{mincho} and \emph{gothic}: \begin{center}\small \begin{tabular}{ccccc} \toprule -\textbf{classification}&\textbf{family}&\verb+\mdseries+&\verb+\bfseries+&\textbf{scale}\\\midrule -\emph{mincho}&\tt mc&Ryumin-Light &GothicBBB-Medium&0.962216\\ -\emph{gothic}&\tt gt&GothicBBB-Medium&GothicBBB-Medium&0.962216\\ +\textbf{classification}&\textbf{family name}&\verb+\mdseries+&\verb+\bfseries+&\textbf{scale}\\\midrule +\emph{mincho} (明朝体)&\tt mc&Ryumin-Light &GothicBBB-Medium&0.962216\\ +\emph{gothic} (\textgt{ゴシック体})&\tt gt&GothicBBB-Medium&GothicBBB-Medium&0.962216\\ \bottomrule \end{tabular} \end{center} -Remark that the bold series in both family are same as the medium series of \emph{gothic} family. -This is a convention in \pLaTeX. This is a trace that there were only 2~fonts (these are Ryumin-Light -and GothicBBB-Medium) in early years of DTP. +Note that the bold series in both family are same as the medium series of \emph{gothic} family. +This is a convention in \pLaTeX. This is trace that there were only 2~fonts (these are Ryumin-Light +and GothicBBB-Medium) in early years of DTP. There is no italic nor slanted shape for + these \texttt{mc}~and~\texttt{gt}. % %<*ja> -\item 2つのフォントファミリ\texttt{mc}と\texttt{gt}が定義されている: +\item \pLaTeX と同様に,標準では「明朝体」「ゴシック体」の2種類を用いる: +\begin{center}\small +\begin{tabular}{cllc} +\toprule +\textbf{字体}&&&\textbf{ファミリ名}\\\midrule +明朝体&\verb+\textmc{...}+&\verb+{\mcfamily ...}+&\verb+\mcdefault+\\ +\textgt{ゴシック体}&\verb+\textgt{...}+&\verb+{\gtfamily ...}+&\verb+\gtdefault+\\ +\bottomrule +\end{tabular} +\end{center} +\item 標準では,次のフォントファミリが用いられる: \begin{center}\small \begin{tabular}{ccccc} \toprule @@ -769,14 +801,16 @@ and GothicBBB-Medium) in early years of DTP. \bottomrule \end{tabular} \end{center} -どちらのファミリにおいても,そのboldシリーズはゴシック体のmediumシリーズで -あることに注意.これは初期のDTPにおいて和文フォントが2つ(それがちょうど\ +どちらのファミリにおいても,そのboldシリーズで使われるフォントは +ゴシック体のmediumシリーズで使われるフォントと同じあることに注意. +これは初期のDTPにおいて和文フォントが2つ(それがちょうど\ Ryumin-Light, GothicBBB-Mediumだった)しか利用できなかった時の名残であり,\pLaTeX{} での標準設定とも同じである. % + %\item Japanese characters in math mode are typeset by the font family \texttt{mc}. -%\item 数式モード中の和文文字は\texttt{mc}ファミリで出力される. +%\item 数式モード中の和文文字は明朝体(\texttt{mc})で出力される. \end{itemize} %<*en> @@ -822,17 +856,6 @@ For \LaTeXe, \LuaTeX-ja adopted most of the font selection system of \pLaTeXe\ ( % \begin{itemize} %<*en> -\item Two control sequences \verb+\mcdefault+ and \verb+\gtdefault+ are - used to specify the default font families for \emph{mincho} and - \emph{gothic}, respectively. Default values: \texttt{mc} for - \verb+\mcdefault+ and \texttt{gt} for \verb+\gtdefault+. -% -%<*ja> -\item 2つのコントロールシーケンス \verb+\mcdefault+ と \verb+\gtdefault+ がそれぞ - れ明朝体とゴシック体のデフォルトのフォントファミリを指定するために用いられる. - 初期値:\verb+\mcdefault+ は\texttt{mc},\verb+\gtdefault+ は\texttt{gt}. -% -%<*en> \item Commands \verb+\fontfamily+, \verb+\fontseries+, \verb+\fontshape+ and \verb+\selectfont+ can be used to change attributes of Japanese fonts. @@ -1031,12 +1054,12 @@ alphabetic fonts \end{tabular} \end{center} % -\begin{LTXexample} +\begin{LTXexample}[width=0.4\textwidth] \fontspec[Numbers=OldStyle]{LMSans10-Regular} \jfontspec{IPAexMincho} JIS~X~0213:2004→辻 -\addjfontfeatures{CJKShape=JIS1990} +\jfontspec[CJKShape=JIS1990]{IPAexMincho} JIS~X~0208:1990→辻 \end{LTXexample} @@ -1074,14 +1097,27 @@ and loads \Pkg{luatexja-fontspec} internally. %\paragraph{General options} %\paragraph{一般的なオプション} \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw} +\item[nodeluxe] +%<*en> +Use one-weighted \textit{mincho} and \textit{gothic} font families. +This means that \verb+\mcfamily\bfseries+, \verb+\gtfamily\bfseries+ and +\verb+\gtfamily\mdseries+ use the same font. +\emph{This option is enabled by default.} +% +%<*ja> +\LaTeXe 環境下での標準設定のように,明朝体・ゴシック体を各1ウェイトで使用する. +より具体的に言うと,この設定の下では +\verb+\mcfamily\bfseries+, \verb+\gtfamily\bfseries+, \verb+\gtfamily\mdseries+は +みな同じフォントとなる.\emph{このオプションは標準で有効になっている.} +% \item[deluxe] %<*en> -Specifying this option enables us to use \textit{mincho} with two weights (medium~and~bold), +Use \textit{mincho} with two weights (medium~and~bold), \textit{gothic} with three weights (medium,~bold and~heavy), and \textit{rounded gothic}% \footnote{Provided by \texttt{\char92mgfamily}, because \textit{rounded gothic} is called \textit{maru gothic} (丸ゴシック) in Japanese.}. -The heavy weight of \textit{gothic} can be used by ``changing the family'' \verb+\gtebfamily+. -This is because \Pkg{fontspec} package can handle only medium (\verb+\mdseries+) and +The heavy weight of \textit{gothic} can be used by ``changing the family'' \verb+\gtebfamily+, +because \Pkg{fontspec} package can handle only medium (\verb+\mdseries+) and bold (\verb+\bfseries+). % %<*ja> @@ -1116,6 +1152,16 @@ Use the JFM \texttt{jfm-jis.lua}, instead of \texttt{jfm-ujis.lua}, which is the \LuaTeX-ja標準の\texttt{jfm-ujis.lua}が用いられる. % \end{list} +%<*en> +Note that \texttt{90jis} and \texttt{jis2004} only affect with \textit{mincho}, +\textit{gothic} (and possibly \textit{rounded gothic}) defined by this package. +We didn't taken accound of when both \texttt{90jis} and \texttt{jis2004} are specified. +% +%<*ja> +\texttt{90jis}と\texttt{jis2004}については本パッケージで定義された +明朝体・ゴシック体(・丸ゴシック体)にのみ有効である.両オプションが +同時に指定された場合に動作については全く考慮していない. +% %\paragraph{Kozuka fonts} %\paragraph{小塚フォント} @@ -1126,7 +1172,8 @@ as a substitute for \textit{rounded gothic}. %<*ja> 丸ゴシック体はないので便宜上小塚ゴシックHで代用している. % -\begin{center}\small +\par\nobreak\medskip +{\centering\small \begin{tabular}{llll} \toprule &\tt kozuka-pro&\tt kozuka-pr6&\tt kozuka-pr6n\\ @@ -1149,29 +1196,29 @@ as a substitute for \textit{rounded gothic}. &Kozuka Gothic Pro H&Kozuka Gothic ProVI H&Kozuka Gothic Pr6N H\\ % %<*ja> -\gt 明朝体細字&小塚明朝Pro~R&小塚明朝ProVI~R&小塚明朝Pr6N~R\\ -\gt 明朝体太字&小塚明朝Pro~B&小塚明朝ProVI~B&小塚明朝Pr6N~B\\ +\gtfamily 明朝体細字&小塚明朝Pro~R&小塚明朝ProVI~R&小塚明朝Pr6N~R\\ +\gtfamily 明朝体太字&小塚明朝Pro~B&小塚明朝ProVI~B&小塚明朝Pr6N~B\\ \midrule -\gt ゴシック体細字\\ +\gtfamily ゴシック体細字\\  単ウェイト時 &小塚ゴシックPro~M&小塚ゴシックProVI~M&小塚ゴシックPr6N~M\\  多ウェイト時 &小塚ゴシックPro~R&小塚ゴシックProVI~R&小塚ゴシックPr6N~R\\ \midrule -\gt ゴシック体太字 +\gtfamily ゴシック体太字 &小塚ゴシックPro~B&小塚ゴシックProVI~B&小塚ゴシックPr6N~B\\ -\gt ゴシック体極太 +\gtfamily ゴシック体極太 &小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\ \inhibitglue(丸ゴシック体)\inhibitglue &小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\ % \bottomrule -\end{tabular} -\end{center} +\end{tabular}\par\medskip} %\paragraph{Hiragino and Morisawa}\ %\paragraph{ヒラギノ・モリサワ}\ -\begin{center}\small +\par\nobreak\medskip +{\centering\small \begin{tabular}{lll} \toprule &\tt hiragino-pro&\tt hiragino-pron\\ @@ -1196,22 +1243,22 @@ Hiragino Kaku Gothic Std W8&Hiragino Kaku Gothic StdN W8\\ Hiragino Maru Gothic Pro W4&Hiragino Maru Gothic ProN W4\\ % %<*ja> -\gt 明朝体細字& +\gtfamily 明朝体細字& ヒラギノ明朝体Pro~W3&ヒラギノ明朝体Pr6N~W3\\ -\gt 明朝体太字& +\gtfamily 明朝体太字& ヒラギノ明朝体Pro~W6&ヒラギノ明朝体Pr6N~W6\\ \midrule -\gt ゴシック体細細字\\ +\gtfamily ゴシック体細細字\\  単ウェイト時 &ヒラギノ角ゴPro~W6&ヒラギノ角ゴProN~W6\\  多ウェイト時 &ヒラギノ角ゴPro~W3&ヒラギノ角ゴProN~W3\\ \midrule -\gt ゴシック体太字& +\gtfamily ゴシック体太字& ヒラギノ角ゴPro~W6&ヒラギノ角ゴProN~W6\\ -\gt ゴシック体極太& +\gtfamily ゴシック体極太& ヒラギノ角ゴStd~W8&ヒラギノ角ゴStdN~W8\\ -\gt 丸ゴシック体& +\gtfamily 丸ゴシック体& ヒラギノ丸ゴPro~W4&ヒラギノ丸ゴProN~W4\\ % \midrule @@ -1233,22 +1280,21 @@ Midashi Go Pro MB31&Midashi Go Pr6N MB31\\ Jun Pro 101&Jun Pr6N 101\\ % %<*ja> -\gt 明朝体細字& +\gtfamily 明朝体細字& リュウミンPro~L-KL&リュウミンPr6N~L-KL\\ -\gt 明朝体太字& +\gtfamily 明朝体太字& 太ミンA101~Pro~Bold&太ミンA101~Pr6N~Bold\\ -\gt ゴシック体細字& +\gtfamily ゴシック体細字& 中ゴシックBBB~Pro~Med&中ゴシックBBB~Pr6N~Med\\ -\gt ゴシック体太字& +\gtfamily ゴシック体太字& 太ゴB101~Pro~Bold&太ゴB101~Pr6N~Bold\\ -\gt ゴシック体極太& +\gtfamily ゴシック体極太& 見出ゴPro~MB31&見出ゴPr6N~MB31\\ -\gt 丸ゴシック体& +\gtfamily 丸ゴシック体& じゅんPro 101&じゅんPr6N 101\\ % \bottomrule -\end{tabular} -\end{center} +\end{tabular}\par\medskip} %\paragraph{Settings for single weight} %\paragraph{単ウェイト用設定} @@ -1256,13 +1302,14 @@ Jun Pro 101&Jun Pr6N 101\\ Next, we describe settings for using only single weight. In four settings below, we use same fonts for medium and bold (and heavy) weights. (Hence \verb+\mcfamily\bfseries+ and \verb+\mcfamily\mdseries+ yields same Japanese fonts, -if \texttt{deluxe} option is also specified). +even if \texttt{deluxe} option is also specified). % %<*ja> 次に,単ウェイト用の設定を述べる.この4設定では「細字」「太字」の区別はない. また,丸ゴシック体はゴシック体と同じフォントを用いる. % -\begin{center}\small +\par\nobreak\medskip +{\centering\small \begin{tabular}{lllll} \toprule &\tt noembed&\tt ipa&\tt ipaex&\tt ms\\ @@ -1274,14 +1321,13 @@ if \texttt{deluxe} option is also specified). &IPAGothic&IPAexGothic&MS Gothic\\ % %<*ja> -\gt 明朝体&Ryumin-Light(非埋込) +\gtfamily 明朝体&Ryumin-Light(非埋込) &IPA明朝&IPAex明朝&MS明朝\\ -\gt ゴシック体&GothicBBB-Medium(非埋込) +\gtfamily ゴシック体&GothicBBB-Medium(非埋込) &IPAゴシック&IPAexゴシック&MSゴシック\\ % \bottomrule -\end{tabular} -\end{center} +\end{tabular}\par\medskip} %\paragraph{Using HG fonts} %\paragraph{HGフォントの利用} @@ -1292,7 +1338,8 @@ We can use HG~fonts bundled with Microsoft Office for realizing multiple weights すぐ前に書いた単ウェイト用設定を,Microsoft Office等に付属するHGフォントを使って 多ウェイト化した設定もある. % -\begin{center}\small +\par\nobreak\medskip +{\centering\small \begin{tabular}{llll} \toprule &\tt ipa-hg&\tt ipaex-hg&\tt ms-hg\\ @@ -1318,11 +1365,11 @@ We can use HG~fonts bundled with Microsoft Office for realizing multiple weights \multicolumn{3}{c}{HG Maru Gothic PRO}\\ % %<*ja> -\gt 明朝体細字 +\gtfamily 明朝体細字 &IPA明朝&IPAex明朝&MS明朝\\\midrule -\gt 明朝体太字& +\gtfamily 明朝体太字& \multicolumn{3}{c}{HG明朝E}\\\midrule -\gt ゴシック体細字\\ +\gtfamily ゴシック体細字\\  単ウェイト時 &IPAゴシック&IPAexゴシック&MSゴシック\\  {\tt jis2004}指定時 @@ -1330,16 +1377,16 @@ We can use HG~fonts bundled with Microsoft Office for realizing multiple weights \cmidrule(lr){1-4}  それ以外の時& \multicolumn{3}{c}{HGゴシックM}\\\midrule -\gt ゴシック体太字& +\gtfamily ゴシック体太字& \multicolumn{3}{c}{HGゴシックE}\\\midrule -\gt ゴシック体極太& +\gtfamily ゴシック体極太& \multicolumn{3}{c}{HG創英角ゴシックUB}\\\midrule -\gt 丸ゴシック体& +\gtfamily 丸ゴシック体& \multicolumn{3}{c}{HG丸ゴシック体PRO}\\ % \bottomrule -\end{tabular} -\end{center} +\end{tabular}\par\medskip} + %<*en> Note that HG~Mincho~E, HG~Gothic~E, HG Soei Kaku Gothic UB and HG Maru Gothic PRO are internally specified by: @@ -1642,8 +1689,8 @@ This range consist of the following Unicode ranges, \emph{except characters in t \begin{lstlisting} \ltjdefcharrange{4}{% "500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF, - "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A82F, "A840-"ABFF, "FB50-"FE0F, - "FE20-"FE2F, "FE70-"FEFF, "FB00-"FB4F, "10000-"1FFFF, "E000-"F8FF} % non-Japanese + "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A82F, "A840-"ABFF, "FB00-"FE0F, + "FE20-"FE2F, "FE70-"FEFF, "10000-"1FFFF, "E000-"F8FF} % non-Japanese \end{lstlisting} %\item[Range~5${}^{\text{A}}$] Surrogates and Supplementary Private Use Areas. %\item[範囲5${}^{\text{A}}$] 代用符号と補助私用領域. @@ -1914,10 +1961,10 @@ so TrueType/OpenType fonts with features can be used for Japanese fonts: TrueType/OpenTypeフォントにfeatureを指定したものを和文フォントとして用いる ことができる: % -\begin{LTXexample} -\jfont\tradgt={file:ipaexg.ttf:script=latn;% +\begin{LTXexample}[width=0.3\textwidth] +\jfont\tradgt={file:KozMinPr6N-Regular.otf:script=latn;% +trad;-kern;jfm=ujis} at 14pt -\tradgt{}当/体/医/区 +\tradgt 当/体/医/区 \end{LTXexample} %<*en> @@ -1959,9 +2006,7 @@ The following JFMs are shipped with \LuaTeX-ja: % %<*ja> JFMの名前を指定する.もし以前に指定されたJFMが読み込まれていなければ, -\texttt{jfm-.lua}を読み込む. - -以下のJFMが\LuaTeX-jaには同梱されている: +\texttt{jfm-.lua}を読み込む.以下のJFMが\LuaTeX-jaには同梱されている: % \begin{description} %<*en> @@ -2001,7 +2046,24 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま % \end{description} +%<*en> \item[jfmvar=] Sometimes there is a need that \ldots. +% +%<*ja> +\item[jfmvar=] 標準では,JFMとサイズが同じで, + 実フォントだけが異なる2つの和文フォントは…… +% +\begin{LTXexample}[width=0.3\textwidth] +\ltjsetparameter{differentjfm=both} +\jfont\F=file:KozMinPr6N-Regular.otf:jfm=ujis +\jfont\G=file:KozGoPr6N-Medium.otf:jfm=ujis +\jfont\H=file:KozGoPr6N-Medium.otf:jfm=ujis;jfmvar=hoge + +\F ){\G 【】}( % halfwidth space + ){\H 『』}( % fullwidth space + +\ltjsetparameter{differentjfm=paverage} +\end{LTXexample} \end{list} \begin{table}[t] @@ -2010,13 +2072,13 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま \label{tab-difjfm} \ltjsetparameter{jacharrange={+3}} \begin{center}\small -\def\r#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g +\def\r#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g \setbox0=\vtop{\hsize=7\zw\noindent ◆◆◆◆◆◆◆ ある日モモちゃんがお使いで迷子になって泣きました.}\copy0 \vrule height 0pt depth \dp0}} -\def\s#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g +\def\s#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g \setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}} -\def\t#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 19.24432pt \g +\def\t#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 19.24432pt \g \setbox0=\hbox{漢}% \vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0 \kern-\wd0\vrule width\wd0height .2pt depth .2pt @@ -2080,6 +2142,40 @@ TODO: kanjiskip? \end{itemize} +%<*ja> +\paragraph{\texttt{extend}と\texttt{slant}} +OpenType font featureと見かけ上同じような形式で指定できるものに, +\begin{description} +\item[\texttt{extend=}] 横方向に倍拡大する. +\item[\texttt{slant=}] に指定された割合だけ傾ける. +\end{description} +の2つがある. +\texttt{extend}や\texttt{slant}を指定した場合は,それに応じたJFMを指定すべきである% +\footnote{\LuaTeX-jaでは,これらに対するJFMを特に提供することはしない予定である.}. +例えば,次の例では無理やり通常のJFMを使っているために,文字間隔やイタリック補正量が +正しくない: +% +%<*en> +\paragraph{\texttt{extend} and \texttt{slant}} +The following setting can be specified as OpenType font features: +\begin{description} +\item[\texttt{extend=}] expand the font horizontally by . +\item[\texttt{slant=}] slant the font. +\end{description} +Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant} +settings; you have to write new JFMs on purpose. +For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, hence +letter-spacing and the width of italic correction are not correct: +% +\begin{LTXexample}[width=0.3\textwidth] +\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis +\E あいうえお + +\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis +\S あいう\/ABC +\end{LTXexample} + + %\subsection{Prefix \texttt{psft}} %\subsection{\texttt{psft}プリフィックス} \label{ssec-psft} @@ -2090,9 +2186,12 @@ to specify a `name-only' Japanese font which will not be embedded to PDF. Typical use of this prefix is to specify the `standard' Japanese fonts, namely, `Ryumin-Light' and `GothicBBB-Medium'. + \emph{OpenType font features, such as `{\tt +jp90}', have no meaning in `name-only' fonts using this `{\tt psft:}'\ prefix. This is because we can't expect what fonts are actually used by the PDF reader.} +Note that \texttt{extend}~and~\texttt{slant} settings (see~above) are supported +with \texttt{psft} prefix, because they are only simple linear transformations. % %<*ja> \texttt{file:} と \texttt{name:} のプリフィックスに加えて, @@ -2101,8 +2200,13 @@ This is because we can't expect what fonts are actually used by the PDF reader.} このプリフィックスを用いることで,PDFには埋め込まれない「名前だけの」 和文フォントを指定することができる.「標準的な」和文フォント, つまり`Ryumin-Light'と`GothicBBB-Medium'の指定でこのプリフィックスが使われる. -\textbf{非埋込フォントをPDFに使用すると,実際にどのようなフォントが表示に用いられるか予測できない. -本プリフィックス指定時には,\texttt{+jp90} などのOpenType font featureの効力はない.} + +\textbf{\texttt{psft}プリフィックスの下では +\texttt{+jp90} などのOpenType font featureの効力はない. +非埋込フォントをPDFに使用すると,実際にどのようなフォントが +表示に用いられるか予測できないからである.} +\texttt{extend}と\texttt{slant}指定は単なる変形のため +\texttt{psft}プリフィックスでも使用可能である. % %\paragraph{\texttt{cid} key} @@ -2114,15 +2218,6 @@ The default font defined by using \texttt{psft:} prefix is for Japanese typesett it is Adobe-Japan1-6 CID-keyed font. One can specify \texttt{cid} key to use other CID-keyed non-embedded fonts for Chinese or Korean typesetting. -\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-5;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 -\end{lstlisting} -Note that the code above specifies \texttt{jfm-jis.lua}, which is for Japanese fonts, -as JFM for Chinese and Korean fonts. % %<*ja> 標準で\texttt{psft:}プリフィックスで定義されるフォントは日本語用のもので @@ -2131,13 +2226,19 @@ as JFM for Chinese and Korean fonts. の対応も必要となった.そのために追加されたのが\texttt{cid}キーである. \texttt{cid}キーに値を指定すると,そのCIDを持った非埋込フォントを定義することができる: +% \begin{lstlisting}[numbers=left] -\jfont\testJ={psft:Ryumin-Light:cid=Adobe-Japan1-6;jfm=jis} % 日本語 -\jfont\testD={psft:Ryumin-Light:jfm=jis} % 無指定時は Adobe-Japan1-6 -\jfont\testC={psft:AdobeMingStd-Light:cid=Adobe-CNS1-5;jfm=jis} % 中国語繁体字 -\jfont\testG={psft:SimSun:cid=Adobe-GB1-5;jfm=jis} % 中国語簡体字 -\jfont\testK={psft:Batang:cid=Adobe-Korea1-2;jfm=jis} % 韓国語 +\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\testG={psft:SimSun:cid=Adobe-GB1-5;jfm=jis} % Simplified Chinese +\jfont\testK={psft:Batang:cid=Adobe-Korea1-2;jfm=jis} % Korean \end{lstlisting} +%<*en> +Note that the code above specifies \texttt{jfm-jis.lua}, which is for Japanese fonts, +as JFM for Chinese and Korean fonts. +% +%<*ja> 上のコードでは中国語・韓国語用フォントに対してもJFMに 日本語用の\texttt{jfm-jis.lua}を指定しているので注意されたい. % @@ -2174,40 +2275,6 @@ Please contact the LuaTeX-ja project team. ? \end{lstlisting} -%<*ja> -\paragraph{\texttt{extend}と\texttt{slant}} -OpenType font featureと見かけ上同じような形式で指定できるものに, -\begin{description} -\item[\texttt{extend=}] 横方向に倍拡大する. -\item[\texttt{slant=}] に指定された割合だけ傾ける. -\end{description} -の2つがあり,これらだけは\texttt{psft}プリフィックスでも使用可能にしている. -\texttt{extend}や\texttt{slant}を指定した場合は,それに応じたJFMを指定すべきである% -\footnote{\LuaTeX-jaでは,これらに対するJFMを特に提供することはしない予定である.}. -例えば,次の例では無理やり通常のJFMを使っているために,文字間隔やイタリック補正量が -正しくない: -% -%<*en> -\paragraph{\texttt{extend} and \texttt{slant}} -The following setting can be specified as OpenType font features: -\begin{description} -\item[\texttt{extend=}] expand the font horizontally by . -\item[\texttt{slant=}] slant the font. -\end{description} -These two settings are also supported with \texttt{psft} prefix. -Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant} -settings; you have to write new JFMs on purpose. -For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, hence -letter-spacing and the width of italic correction are not correct: -% -\begin{LTXexample}[width=0.3\textwidth] -\jfont\E=psft:Ryumin-Light:extend=1.5;jfm=ujis -\E あいうえお - -\jfont\S=psft:Ryumin-Light:slant=1;jfm=ujis -\S あいう\/ABC -\end{LTXexample} - %\subsection{Structure of JFM file} %\subsection{JFMファイルの構造} @@ -2553,7 +2620,7 @@ Furthermore, the glyph is shifted according to values of fields \end{lstlisting} 句点「。」の幅は二分であるので \begin{LTXexample} -\jfont\a=psft:Ryumin-Light:jfm=test;+vert +\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+vert \setbox0\hbox{\a 。\inhibitglue 漢} \the\wd0 \end{LTXexample} @@ -2568,8 +2635,8 @@ Furthermore, the glyph is shifted according to values of fields 一方,「\texttt{'、*'}」のようにアスタリスクつきの指定があると, 状況は異なってくる. -\begin{LTXexample} -\jfont\a=psft:Ryumin-Light:jfm=test;+vert +\begin{LTXexample}[width=0.3\textwidth] +\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+vert \a 漢、\inhibitglue 漢 \end{LTXexample} ここで,読点「、」の文字クラスは,以下のようにして決まる. @@ -2582,8 +2649,8 @@ Furthermore, the glyph is shifted according to values of fields \end{enumerate} なお,置換後のグリフで判定した文字クラスの値が0でなければ,そちらをそのまま作用する. -\begin{LTXexample} -\jfont\a=psft:Ryumin-Light:jfm=test;+hwid +\begin{LTXexample}[width=0.3\textwidth] +\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+hwid \a 漢ヒひ \end{LTXexample} 上の例では, @@ -2672,7 +2739,7 @@ The following is the list of `imaginary characters': \texttt{'parbdd'}を入れれば全角下がりとなる. \begin{LTXexample} -\jfont\g=psft:Ryumin-Light:jfm=test \g +\jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g \parindent1\zw\noindent{}◆◆◆◆◆ \par 「◆◆←二分下がり \par 【◆◆←全角下がり @@ -3282,7 +3349,7 @@ the beginning of a box and `あ', and also between `あ' and `ウ'. % \begin{LTXexample} -\jfont\g=psft:Ryumin-Light:jfm=test \g +\jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g \fbox{\hbox{あウあ\inhibitglue ウ}} \inhibitglue\par\noindent あ1 \par\inhibitglue\noindent あ2 @@ -3517,9 +3584,10 @@ As closing this subsection, we shall introduce an example of 紹介しておこう.\verb+\userelfont+ の使用によって,「abc」の部分のフォントが Avant Garde (OT1/pag/m/n) に変わっていることがわかる. % -\begin{LTXexample} -\kanjifamily{gt}\selectfont あいうxyz -\SetRelationFont{JY3}{gt}{m}{n}{OT1}{pag}{m}{n} +\begin{LTXexample}[width=0.3\textwidth] +\makeatletter +\SetRelationFont{JY3}{\k@family}{m}{n}{OT1}{pag}{m}{n} + % \k@family: current Japanese font family \userelfont\selectfont あいうabc \end{LTXexample} @@ -5409,7 +5477,7 @@ Each character is printed as follows: 各文字は % \begin{center} -\tt\fboxsep=1pt\fbox{\hbox to \zw{\gt あ\hss}}\,\scriptsize LUP +\tt\fboxsep=1pt\fbox{\hbox to \zw{\gtfamily あ\hss}}\,\scriptsize LUP \end{center} %<*ja> のように表示しており,各文字は次の意味を持っている. @@ -5775,7 +5843,7 @@ JIS~X~0208にないため\pTeX では使用不能と考えて良いものであ \ifnum\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{\cntB}}=0 \def\@@@tmp{white}\else\def\@@@tmp{white!85!blue}\fi \fcolorbox{black}{\@@@tmp}{% - \hbox to \zw{\gt  \hskip-\zw\ltjjachar\cntB  \hss}}\,\scriptsize% + \hbox to \zw{\gtfamily  \hskip-\zw\ltjjachar\cntB  \hss}}\,\scriptsize% \ifnum\catcode\cntB=11 L\else\ \fi \chk@in@{\uplist}{\cntA}\ifnum\flag=1 U\else~\fi \chk@in@{\plist}{\cntA}\ifnum\flag=1 P\else~\fi @@ -5784,7 +5852,7 @@ JIS~X~0208にないため\pTeX では使用不能と考えて良いものであ \ifnum\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{\cntB}}=0 \def\@@@tmp{white}\else\def\@@@tmp{white!85!blue}\fi \fcolorbox{black}{\@@@tmp}{\color{red!50!black}% - \hbox to \zw{\gt  \hskip-\zw\ltjjachar\cntB  \hss}}\,\scriptsize% + \hbox to \zw{\gtfamily  \hskip-\zw\ltjjachar\cntB  \hss}}\,\scriptsize% \ifnum\catcode\cntB=11 L\else~\fi \chk@in@{\uplist}{\cntA}\ifnum\flag=1 U\else~\fi-% \fi\global\advance\cntA1 }