From f70b06da25c665c72900ba23f10ca1bc8dbadd79 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 24 Mar 2014 20:42:07 +0000 Subject: luatexja (24mar14) git-svn-id: svn://tug.org/texlive/trunk@33277 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/luatex/luatexja/README | 8 +- .../texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf | Bin 393290 -> 393817 bytes .../texmf-dist/doc/luatex/luatexja/luatexja-en.pdf | Bin 334710 -> 340132 bytes .../texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf | Bin 697966 -> 706092 bytes Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx | 286 ++++++++++++--------- .../source/luatex/luatexja/ltjsclasses.dtx | 26 +- .../luatex/luatexja/addons/luatexja-fontspec.sty | 7 +- .../tex/luatex/luatexja/addons/luatexja-preset.sty | 2 +- Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua | 13 +- .../texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua | 3 +- .../texmf-dist/tex/luatex/luatexja/ltj-jfont.lua | 4 +- .../tex/luatex/luatexja/ltj-setwidth.lua | 9 +- .../texmf-dist/tex/luatex/luatexja/ltjsarticle.cls | 22 +- Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls | 22 +- .../texmf-dist/tex/luatex/luatexja/ltjskiyou.cls | 22 +- Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls | 22 +- Master/texmf-dist/tex/luatex/luatexja/luatexja.lua | 15 +- .../tex/luatex/luatexja/patches/lltjdefs.sty | 2 +- .../tex/luatex/luatexja/patches/lltjfont.sty | 14 +- 19 files changed, 317 insertions(+), 160 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README index 902831eed65..8cd4cbe045a 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/README +++ b/Master/texmf-dist/doc/luatex/luatexja/README @@ -1,4 +1,4 @@ -The LuaTeX-ja Package 20140204.0 +The LuaTeX-ja Package 20140324.0 -------------------------------- Copyright (c) 2011--2014 The LuaTeX-ja project License: modified BSD (see COPYING) @@ -33,9 +33,9 @@ Installation 2. If you must/want to install manually: a. Download the source archive from CTAN, - or tagged as 20140204.0 in the Git repository by + or tagged as 20140324.0 in the Git repository by + ;a=snapshot;h=refs/tags/20140324.0;sf=tgz> b1. Extract the archive and process following three files by LuaLaTeX to generate classes for Japanese typesetting: @@ -80,4 +80,4 @@ Notes * src/*.{ins.dtx} and src/ltj-kinsoku_make.tex are not needed in regular use. -Last commit date: Tue Feb 4 08:12:20 2014 +0900 +Last commit date: Mon Mar 24 09:20:06 2014 +0900 diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf index 17ec56c6a02..24f1be48df1 100644 Binary files a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf and b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf differ diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf index 2bcf1145d47..3f87190f0ae 100644 Binary files a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf and b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf differ diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf index 3ead437f307..938ebdff1c6 100644 Binary files a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf and b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf differ diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx index fac07d2f26c..aa9e92dcc73 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx @@ -1040,7 +1040,7 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\ \item 和文フォントのシェイプを定義するには,通常の \verb+\DeclareFontShape+ を使えば良い: % \begin{verbatim} -\DeclareFontShape{JY3}{mc}{bx}{n}{<-> s*KozMinPr6N-Bold:jfm=ujis}{} +\DeclareFontShape{JY3}{mc}{bx}{n}{<-> s*KozMinPr6N-Bold:jfm=ujis;-kern}{} % Kozuka Mincho Pr6N Bold \end{verbatim} %<*ja> @@ -1184,15 +1184,17 @@ JIS~X~0208:1990→辻 %<*en> Note that there is no command named \verb+\setmonojfont+, since it is popular for Japanese fonts that nearly all Japanese glyphs have same -widths. Also note that the kerning feature is set off by default in -these seven commands, since this feature and \textbf{JAglue} will clash (see -\ref{para-kern}). +widths. Also note that kerning information in a font is not used +(that is, \texttt{kern} feature is set off) by default in these seven commands. +This is because of the compatibility with previous versions of \LuaTeX-ja +(see \ref{para-kern}). % %<*ja> 和文フォントについては全ての和文文字のグリフがほぼ等幅であるのが普通であるため, \verb+\setmonojfont+ コマンドは存在しないことに注意.また,これらの和文用の7つのコマ -ンドではKerning featureはデフォルトではoffとなっている.これはこの -featureが\textbf{JAglue}と衝突するためである(\ref{para-kern}節を参照). +ンドではフォント内のペアカーニング情報は標準では使用されない, +言い換えれば \texttt{kern} featureは標準では無効化となっている. +これは以前のバージョンの\LuaTeX-jaとの互換性のためである(\ref{para-kern}節を参照). % %\subsection{Presets} @@ -1423,7 +1425,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \midrule %\textit{rounded gothic} %\gt 丸ゴシック -&&A-OTF-Jun101Pro-Light.otf&A-OTF-Jun101Pr6N-Light.otf\\ +&&A-OTF-Jun101Pro-Light.otf&A-OTF-ShinMGoPr6N-Light.otf\\ \bottomrule \end{tabular} \end{center} @@ -1613,7 +1615,7 @@ If you want to use these functions, load \Pkg{luatexja-otf} package. これら3オプションについては, \Pkg{luatexja-preset} パッケージにプリセットを使う時に一緒に指定するか, -あるいは対応する内容を\ref{ssub-chgfnt}節 (NFSS2) や +あるいは対応する内容を\ref{ssub-chgfnt}節,\ref{ssub-nfsspat}節 (NFSS2) や \ref{ssec-fontspec}節 (\Pkg{fontspec}) の方法で手動で指定する必要がある. % @@ -2174,7 +2176,7 @@ For the detail, see Table~\ref{table-kcat}. \small \caption{\texttt{\textbackslash kcatcode} in \upTeX} \label{table-kcat} -\medskip +%\medskip \noindent\hfill \begin{tabular}{ccccc} @@ -2321,6 +2323,7 @@ for \LuaTeX, \emph{to match the \texttt{\textbackslash catcode} setting with tha \centering\small %\caption{Difference of the set of non-kanji JIS~X~0208 characters which can be used in a control word} %\caption{制御綴中に使用出来るJIS~X~0208非漢字の違い} +%\medskip \label{table-kcat-diff} \def\D#1#2#3#4{% {\fboxsep0pt\fcolorbox{cyan}{white}% @@ -2467,6 +2470,44 @@ which JFM will be used for this font by the following keys: 指定する必要がある: % + +\begin{table}[t] +%\caption{Differences between JFMs shipped with \LuaTeX-ja} +%\caption{\LuaTeX-ja に同梱されている JFM の違い} +%\medskip +\label{tab-difjfm} +\ltjsetparameter{jacharrange={+3}} +\centering\small +\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=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g +\setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}} +\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 +\kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}% +\kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}% +\kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}} +\begin{tabular}{rccc} +\toprule +&\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\ +\midrule +%Example~1\cite{min10} +%例1\cite{min10} +&\r{ujis}&\r{jis}&\r{min}\\ +%Example~2 +%例2 +&\s{ujis}&\s{jis}&\s{min}\\ +Bounding Box&\t{ujis}&\t{jis}&\t{min}\\ +\bottomrule +\end{tabular} +\ltjsetparameter{jacharrange={-3}} +\end{table} + + \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw} \item[jfm=] %<*en> @@ -2500,122 +2541,116 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま % %<*ja> \item[\tt jfm-jis.lua] \pTeX で広く用いられている「JISフォントメトリック」 - \verb+jis.tfm+ に相当するJFMである.\texttt{jfm-ujis.lua}とこの - \texttt{jfm-jis.lua}の主な違いは,\texttt{jfm-ujis.lua}ではほとんどの文字が - 正方形状であるのに対し,\texttt{jfm-jis.lua}では横長の長方形状である. + \verb+jis.tfm+ に相当するJFMである.\texttt{jfm-ujis.lua} とこの + \texttt{jfm-jis.lua} の主な違いは,\texttt{jfm-ujis.lua} ではほとんどの文字が + 正方形状であるのに対し,\texttt{jfm-jis.lua} では横長の長方形状であることと, + \texttt{jfm-ujis.lua} では「?」「!」の直後に半角空白が挿入されることである. % %<*en> \item[\tt jfm-min.lua] A counterpart for \verb+min10.tfm+, which is one - of the default Japanese font metric shipped with \pTeX. There - are notable difference between this JFM and other 2~JFMs, as - shown in Table~\ref{tab-difjfm}. + of the default Japanese font metric shipped with \pTeX. % -%<*ja> +%<*ja> \item[\tt jfm-min.lua] \pTeX に同梱されているデフォルトの和文用TFM - である \verb+min10.tfm+ に相当するJFMである.このJFMと他の2つのJFMの間には - 表\ref{tab-difjfm}に示すような特筆すべき違いがある. + である \verb+min10.tfm+ に相当する. % \end{description} - %<*en> -\item[jfmvar=] Sometimes there is a need that \ldots. +The difference among these three~JFMs is shown in Table~\ref{tab-difjfm}. % %<*ja> -\item[jfmvar=] 標準では,JFMとサイズが同じで, - 実フォントだけが異なる2つの和文フォントは「区別されない」.例えば -下の例において,最初の「)」と「【」の実フォントは異なるが, -JFMもサイズも同じなので,普通に「)【」と入力した時と同じように半角空きとなる. - -しかし,時には…… - +これら3つのJFMの違いは表\ref{tab-difjfm}に示した. % + +\begin{figure} \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 +ほげ,{\G 「ほげ」}(ほげ)\par +ほげ,{\H 「ほげ」}(ほげ)% pTeX-like + \ltjsetparameter{differentjfm=paverage} \end{LTXexample} -\end{list} - -\begin{table}[t] -%\caption{Differences between JFMs shipped with \LuaTeX-ja} -%\caption{\LuaTeX-ja に同梱されている JFM の違い} -\label{tab-difjfm} -\ltjsetparameter{jacharrange={+3}} -\centering\small -\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=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g -\setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}} -\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 -\kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}% -\kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}% -\kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}} -\begin{tabular}{rccc} -\toprule -&\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\ -\midrule -%Example~1\cite{min10} -%例1\cite{min10} -&\r{ujis}&\r{jis}&\r{min}\\ -%Example~2 -%例2 -&\s{ujis}&\s{jis}&\s{min}\\ -Bounding Box&\t{ujis}&\t{jis}&\t{min}\\ -\bottomrule -\end{tabular} -\ltjsetparameter{jacharrange={-3}} -\end{table} +\caption{Example of \texttt{jfmvar} key} +\label{fig:jfmvar} +\end{figure} -%\paragraph{Note: \texttt{kern} feature} -%\paragraph{注意:\texttt{kern} feature} -\label{para-kern} -%<*en> -Some fonts have information for inter-glyph spacing. However, this -information is not well-compatible with \LuaTeX-ja. More concretely, -this kerning space from this information are inserted \emph{before} the -insertion process of \textbf{JAglue}, and this causes incorrect spacing -between two characters when both a glue/kern from the data in the font -and it from JFM are present. -% -%<*ja> -いくつかのフォントはグリフ間のスペースについての情報を持っている.しかし, -この情報は\LuaTeX-ja とはあまり相性がよくない.具体的には,この情報に基づいて挿入 -されるカーニングスペースは\textbf{JAglue}の挿入過程の\textbf{前に}挿入され, -JFMに基づくグルー/カーンも挿入される場合には2文字間の意図しないスペースの原因と -なる. -% -\begin{itemize} %<*en> -\item You should specify \texttt{-kern} in - \verb+jfont+ when you want to use other font features, - such as \texttt{script=...}\,. +\item[jfmvar=] Sometimes there is a need that \ldots. % %<*ja> -\item \texttt{script=...}といったfeatureを使いたい場合には,\verb+\jfont+ - に\texttt{-kern}を指定するべきである. +\item[jfmvar=] 標準では,JFMとサイズが同じで, + 実フォントだけが異なる2つの和文フォントは「区別されない」.例えば +図\ref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが, +JFMもサイズも同じなので,普通に「)【」と入力した時と同じように半角空きとなる. + +しかし,JFMとサイズが同じであっても,\texttt{jfmvar} キーの異なる +2つの和文フォント,例えば図\ref{fig:jfmvar}で言う \verb+\F+ と \verb+\H+, +は「区別される」.異なる和文フォントに異なる \texttt{jfmvar} キーを割り当て, +かつ\Param{differentjfm}パラメータを \texttt{both} に設定すれば, +\pTeX と似た状況で組版されることになる. % +\end{list} + +\begin{figure} +\begin{LTXexample}[pos=t] +\newcommand\test{\vrule ダイナミックダイクマ\vrule\\} +\jfont\KMFW = KozMinPr6N-Regular:jfm=prop;-kern at 17pt +\jfont\KMFK = KozMinPr6N-Regular:jfm=prop at 17pt % kern is activated +\jfont\KMPW = KozMinPr6N-Regular:jfm=prop;script=dflt;+pwid;-kern at 17pt +\jfont\KMPK = KozMinPr6N-Regular:jfm=prop;script=dflt;+pwid;+kern at 17pt +\begin{multicols}{2} +\ltjsetparameter{kanjiskip=0pt} +{\KMFW\test \KMFK\test \KMPW\test \KMPK\test} + +\ltjsetparameter{kanjiskip=3pt} +{\KMFW\test \KMFK\test \KMPW\test \KMPK\test} +\end{multicols} +\end{LTXexample} +\caption{Kerning information and \Param{kanjiskip}} +\label{fig:kern-jfm} +\end{figure} + +%\paragraph{Using kerning information in a font} +%\paragraph{ペアカーニング情報の使用} +\label{para-kern} %<*en> -\item If you want to use Japanese fonts in proportional width, and use - information from this font, use \texttt{jfm-prop.lua} for its JFM, and\,\ldots. +Some fonts have information for inter-glyph spacing. +This version of \LuaTeX-ja treats kerning spaces like an italic correction; +any glue and/or kern from the JFM and a kerning space can coexist. +See Figure~\ref{fig:kern-jfm} for detail. + +Note that in \verb+\setmainjfont+ etc.\ which are provided by \Pkg{luatexja-fontspec} +package, kerning option is set \emph{off} (\texttt{Kerning=Off}) by default, +because of the compatibility with previous versions of \LuaTeX-ja. % %<*ja> -\item もしプロポーショナル幅の和文フォントをそのフォントの情報に基づいて使いたい - ならば,\texttt{jfm-prop.lua}をJFMとして指定し,…… -% -TODO: kanjiskip? +いくつかのフォントはグリフ間のスペースについての情報を持っている. +このカーニング情報は以前の\LuaTeX-ja とはあまり相性が良くなかったが, +本バージョンではカーニングによる空白はイタリック補正と同様に扱うことになっている. +つまり,カーニング由来の空白とJFM由来のグルー・カーンは同時に入りうる. +図\ref{fig:kern-jfm}を参照. +\begin{itemize} + \item \emph{\texttt{\textbackslash jfont} や, +NFSS2用の命令(\ref{ssub-chgfnt}節,\ref{ssub-nfsspat}節)における指定では +カーニング情報は標準で使用する}ことになっているようである. +言い換えれば,カーニング情報を使用しない設定にするには,面倒でも +\begin{verbatim} +\jfont\hoge=KozMinPr6N-Regular:jfm=ujis;-kern at 3.5mm +\DeclareFontShape{JY3}{fuga}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis;-kern}{} +\end{verbatim} +のように,\texttt{-kern} という指定を自分で追架しなければいけない. + \item +一方,\emph{\Pkg{luatexja-fontspec} の提供する \texttt{\textbackslash setmainjfont}\ +などの命令の標準設定ではカーニング情報は使用しない}(\texttt{Kerning=Off}) +ことになっている.これは以前のバージョンの\LuaTeX-jaとの互換性のためである. \end{itemize} - +% %<*ja> \paragraph{\texttt{extend}と\texttt{slant}} @@ -2643,10 +2678,10 @@ For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, 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 +\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis;-kern \E あいうえお -\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis +\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis;-kern \S あいう\/ABC \end{LTXexample} @@ -2885,14 +2920,18 @@ This field is a list of characters which are in this character Specifythe width of characters in character class~$i$, the height, the depth and the amount of italic correction. All characters in character class~$i$ are regarded that its width, height, and depth are as values of these fields. -But there is one exception: if \texttt{'prop'} is specified in \texttt{width} field, width of a character becomes that of its ``real'' glyph. + +But there is one exception: \texttt{width} field can be \texttt{'prop'}. +This means that width of a character becomes that of its ``real'' glyph. % %<*ja> 文字クラス$i$に属する文字の幅,高さ,深さ,イタリック補正の量を指定する. 文字クラス$i$に属する全ての文字は,その幅,高さ,深さがこのフィールドで指定した 値であるものとして扱われる. -しかし,例外が一つある:もし \texttt{'prop'} が \texttt{width} フィールドに -指定された場合,文字の幅はその「実際の」グリフの幅となる. + +例外として,\emph{\texttt{width} フィールドには数値以外に \texttt{'prop'} が指定可能である}. +この場合,文字の幅はその「実際の」グリフの幅となる.OpenTypeの \texttt{prop} featureと併用 + すれば,これによってプロポーショナル組を行うことができる. % \item[left=, down=, align=]\ @@ -3025,8 +3064,8 @@ Furthermore, the glyph is shifted according to values of fields \medskip \caption{% -%The position of the real glyph. -%「実際の」グリフの位置. +%The position of the real glyph +%「実際の」グリフの位置 } \label{fig-pos} \end{figure} @@ -3332,6 +3371,7 @@ you can set both \verb+\fam+ and \verb+\jfam+ to the same value. %\caption{Commands for Japanese math fonts} %\caption{和文数式フォントに対する命令} \label{tab-math} +%\medskip \centering \def\{{\char`\{}\def\}{\char`\}}\small \begin{tabular}{ll} @@ -4230,9 +4270,9 @@ are typeset by \verb+\piyo+. \begin{figure}[!tb] \begin{lstlisting}[numberstyle=\tiny, numbers=left, numbersep=1em] \DeclareKanjiFamily{JY3}{edm}{} -\DeclareFontShape{JY3}{edm}{m}{n} {<-> s*IPAexMincho:jfm=ujis}{} -\DeclareFontShape{JY3}{edm}{m}{green}{<-> s*IPAexMincho:jfm=ujis;color=007F00}{} -\DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*IPAexMincho:jfm=ujis;color=0000FF}{} +\DeclareFontShape{JY3}{edm}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis;-kern}{} +\DeclareFontShape{JY3}{edm}{m}{green}{<-> s*KozMinPr6N-Regular:jfm=ujis;-kern;color=007F00}{} +\DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*KozMinPr6N-Regular:jfm=ujis;-kern;color=0000FF}{} \DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{green}{"4E00-"67FF,{-2}-{-2}} \DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{blue}{ "6800-"9FFF} {\kanjifamily{edm}\selectfont @@ -4240,9 +4280,9 @@ are typeset by \verb+\piyo+. \end{lstlisting} \begin{quote} \DeclareKanjiFamily{JY3}{edm}{} -\DeclareFontShape{JY3}{edm}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis}{} -\DeclareFontShape{JY3}{edm}{m}{green}{<-> s*KozMinPr6N-Regular:jfm=ujis;color=007F00}{} -\DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*KozMinPr6N-Regular:jfm=ujis;color=0000FF}{} +\DeclareFontShape{JY3}{edm}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis;-kern}{} +\DeclareFontShape{JY3}{edm}{m}{green}{<-> s*KozMinPr6N-Regular:jfm=ujis;-kern;color=007F00}{} +\DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*KozMinPr6N-Regular:jfm=ujis;-kern;color=0000FF}{} \DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{green}{"4E00-"67FF,{-2}-{-2}} \DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{blue}{ "6800-"9FFF} @@ -5028,15 +5068,15 @@ assigned to this attribute: \begin{description} \item[\textit{italic} (1)] %<*en> -Glues from an italic correction - (\verb+\/+). This distinction of origins of glues - (from explicit \verb+\kern+, or from \verb+\/+) - is needed in the insertion process of \Param{\hyperlink{fld:xks}{xkanjiskip}}. +Kerns from italic correction (\verb+\/+), or from kerning information of a Japanese font. +These kerns are ``ignored'' in the insertion process of \textbf{JAglue}, +unlike explicit \verb+\kern+. % %<*ja> -イタリック補正(\verb+\/+)によるグルー.このグルーの由来の区別(\verb+\kern+ か -\hskip\ltjgetparameter{xkanjiskip} -\verb+\/+ か)は\Param{\hyperlink{fld:xks}{xkanjiskip}}の挿入過程において必要になる. +イタリック補正(\verb+\/+)によるカーン, +または \Pkg{luaotfload} によって挿入されたフォントのカーニング情報由来のカーン. +これらのカーンは通常の \verb+\kern+ とは異なり, +\textbf{JAglue}の挿入処理においては透過する. % \item[\textit{packed} (2)] @@ -6131,9 +6171,9 @@ x+y&\text{if\ }\Param{\hyperlink{fld:diffjfm}{diffrentjfm}}=\texttt{both}; 例えば, \begin{verbatim} -\jfont\foo=psft:Ryumin-Light:jfm=ujis -\jfont\bar=psft:GothicBBB-Medium:jfm=ujis -\jfont\baz=psft:GothicBBB-Medium:jfm=ujis;jfmvar=piyo +\jfont\foo=psft:Ryumin-Light:jfm=ujis;-kern +\jfont\bar=psft:GothicBBB-Medium:jfm=ujis;-kern +\jfont\baz=psft:GothicBBB-Medium:jfm=ujis;jfmvar=piyo;-kern \end{verbatim} という3フォントを考え, \[ @@ -6201,6 +6241,7 @@ $a$は禁則処理用に\textit{Nq}と\textit{Np}の間に加えられるべき %\caption{Summary of JFM glues} %\caption{JFM グルーの概要} \label{tab-jfmglue} +%\medskip \begin{center} \small \begin{tabular}{c|cccccc} @@ -6557,7 +6598,7 @@ instead of ``\verb+\ほげ+''. しかし,\Pkg{lltjp-listings} が実際にロードされるのは \verb+\begin{document}+\ のところであるので,プリアンブル内ではこれらの追加キーは使用できない. -\texttt{ivsraw}は,ブール値の値をとるキーであり,標準ではfalseである. +\texttt{vsraw}は,ブール値の値をとるキーであり,標準ではfalseである. \begin{itemize} \item trueの場合は,異体字セレクタは「直前の文字に続けて」出力される. もしもIVSサポート(\ref{ssec-ltjotf}節)が有効になっていた場合は, @@ -6589,7 +6630,9 @@ instead of ``\verb+\ほげ+''. }}} \lstset{vscmd=\IVSB} \end{lstlisting} -\end{itemize} +\end{itemize} +既定の出力命令を復活させたい場合は\ \verb+vsraw=\ltjlistingsvsstdcmd+\ +とすれば良い. % %\subsection{Class of Characters} @@ -6890,7 +6933,7 @@ JFM中にある文字クラス$n$の定義の % %<*ja> -\section{IVS対応(未完)} +\section{IVS対応} \verb+luatexja.otf.enable_ivs()+ を実行し,IVS対応を有効にした状態では, \verb+pre_linebreak_filter+ や \verb+hpack_filter+ コールバックには 次の4つが順に実行される状態となっている: @@ -6934,6 +6977,7 @@ OpenTypeフォントでもTrueTypeフォントでもIVS情報が格納されて %%% to_table を使わなくしたことで,メモリ使用量は減った IVS情報をキャッシュに保存することで2回目以降の実行時間を節約している. + \section{複数フォントの「合成」(未完)} \section{\LuaTeX-jaにおけるキャッシュ} diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx index ed6ef86ee64..f8acc836ddf 100644 --- a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx +++ b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx @@ -22,7 +22,7 @@ % ----------------------------------------- % % \fi -% \CheckSum{5163} +% \CheckSum{5199} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -50,7 +50,7 @@ %<*driver> \ProvidesFile{ltjsclasses.dtx} % - [2014/01/13 ] + [2014/02/07 ] %<*driver> \documentclass{ltjsarticle} \usepackage{doc} @@ -130,7 +130,7 @@ % これがあると |grfext.sty| を読み込んだ際にエラーを引き起こすので削除しました。 % \end{itemize} % -% [2014-01-13] jsclasses 2014-01-02 ベースにしました. +% [2014-02-07] jsclasses 2014-02-07 ベースにしました. % % \StopEventually{} % @@ -321,6 +321,10 @@ \DeclareOption{43pt}{\renewcommand{\@ptsize}{33}} \DeclareOption{12Q}{\renewcommand{\@ptsize}{1200}} \DeclareOption{14Q}{\renewcommand{\@ptsize}{1400}} +\DeclareOption{10ptj}{\renewcommand{\@ptsize}{1001}} +\DeclareOption{10.5ptj}{\renewcommand{\@ptsize}{1051}} +\DeclareOption{11ptj}{\renewcommand{\@ptsize}{1101}} +\DeclareOption{12ptj}{\renewcommand{\@ptsize}{1201}} % \end{macrocode} % % \paragraph{トンボオプション} @@ -675,6 +679,22 @@ \mag 1077 \def\inv@mag{0.928505} \fi +\ifnum\@ptsize=1001 + \mag 1085 + \def\inv@mag{0.921659} +\fi +\ifnum\@ptsize=1051 + \mag 1139 + \def\inv@mag{0.877963} +\fi +\ifnum\@ptsize=1101 + \mag 1194 + \def\inv@mag{0.837521} +\fi +\ifnum\@ptsize=1201 + \mag 1302 + \def\inv@mag{0.768049} +\fi %<*kiyou> \mag 977 \def\inv@mag{1.02354} diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty index 597e53303ff..9fa1ec4867e 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty @@ -187,9 +187,10 @@ \ifin@\edef\k@family{#1}\else% \directlua{luatexja.jfont.is_Nffam(\tmp@enc, \tmp@item)}% \ifin@\@notffamtrue\else% - \def\@temp##1+{\lowercase{\def\@@temp{##1#1.fd}}}\expandafter\@temp\f@encoding+% - \message{(I search kanjifont definition file: \@@temp)}% - \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% + % filename of font definition file is always lowercase + \edef\@temp{\lowercase{\noexpand\IfFileExists{\f@encoding#1.fd}}}% + \message{(I search font definition file)}% + \@temp{\@tempswztrue}{\@tempswzfalse}% \if@tempswz \directlua{luatexja.jfont.add_ffam_list(\tmp@enc, \tmp@item)}% \edef\f@family{#1}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty index 7bf54a2081e..6f8ad23509a 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty @@ -140,7 +140,7 @@ A-OTF-RyuminPr6N-Light.otf , A-OTF-FutoMinA101Pr6N-Bold.otf , % mc/m, mc/bx A-OTF-GothicBBBPr6N-Medium.otf , A-OTF-FutoGoB101Pr6N-Bold.otf , % gt/m, gt/bx (multiweight)) A-OTF-GothicBBBPr6N-Medium.otf , A-OTF-MidashiGoPr6N-MB31.otf , % gt/m (uni), gt/eb - A-OTF-Jun101Pr6N-Light.otf % mg/m + A-OTF-ShinMGoPr6N-Light.otf % mg/m } } diff --git a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua index f64080e02ed..d957a2d61c6 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua @@ -3,19 +3,20 @@ -- based on upnmlminr-h.tfm (a metric in UTF/OTF package used by upTeX). -- JIS X 4051:2004 では,行末の句読点や中点はベタなのでそれに従う --- kanjiskip: 0pt plus .25zw minus 0pt +-- kanjiskip: 0pt plus .25zw minus 0pt -- xkanjiskip: .25zw plus .25zw (or .0833zw) minus .125zw luatexja.jfont.define_jfm { dir = 'yoko', zw = 1.0, zh = 1.0, - kanjiskip = {0.0, 0.05, 0}, + kanjiskip = {0.0, 0.25, 0}, xkanjiskip = {0.25, 0.25, .125}, [0] = { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.88, depth = 0.12, italic=0.0, glue = { + -- [index] = { width, stretch, shrink, [priority, [ratio]] } [1] = { 0.5 , 0.0, 0.5, 0, 1 }, [2] = {0, 0, 0}, [3] = { 0.25, 0.0, 0.25, 1, 1 }, @@ -130,13 +131,13 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.88, depth = 0.12, italic=0.0, glue = { - [0] = {0, 0, 0}, + [0] = { 0.5 , 0.0, 0.5, 0, 1 }, [1] = { 0.5 , 0.0, 0.5, 0, 1 }, [2] = {0, 0, 0}, - [3] = { 0.25, 0.0, 0.25, 1, 1 }, + [3] = { 0.75, 0.0, 0.25, 1, 1 }, [4] = {0, 0, 0}, [6] = {0, 0, 0}, - [7] = {0, 0, 0}, + [7] = { 0.5 , 0.0, 0.5, 0, 1 }, [8] = {0, 0, 0}, [9] = {0, 0, 0}, }, @@ -243,4 +244,4 @@ luatexja.jfont.define_jfm { } }, -} \ No newline at end of file +} diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua index 3678027dafc..99fcd66069f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua @@ -420,7 +420,8 @@ local calc_np = calc_np -- We think that "Np is a Japanese character" if Np.met~=nil, -- "Np is an alphabetic character" if Np.pre~=nil, -- "Np is not a character" otherwise. -local after_hlist, after_alchar, extract_np +after_hlist = nil -- global +local after_alchar, extract_np do local PRE = luatexja.stack_table_index.PRE local POST = luatexja.stack_table_index.POST diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua index c3ffb6a57e4..45bf490b1c5 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua @@ -383,7 +383,7 @@ function set_alt_font(b,e,ind,bfnt) -- ind: 新フォント, bfnt: 基底フォント if b>e then b, e = e, b end if b*e<=0 then - ltjb.package_eror('luatexja', + ltjb.package_error('luatexja', 'bad character range ([' .. b .. ',' .. e .. ']). ' .. 'I take the intersection with [0x80, 0x10ffff].') b, e = math.max(0x80,b),math.min(ucs_out-1,e) @@ -443,7 +443,7 @@ function set_alt_font_latex(b,e,ind,bbase) -- ind: Alt font の enc/fam/ser/shape, bbase: 基底フォントの enc/fam/ser/shape if b>e then b, e = e, b end if b*e<=0 then - ltjb.package_eror('luatexja', + ltjb.package_error('luatexja', 'bad character range ([' .. b .. ',' .. e .. ']). ' .. 'I take the intersection with [0x80, 0x10ffff].') b, e = math.max(0x80,b),math.min(ucs_out-1,e) diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua index 30389e21212..7fd68043adf 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua @@ -81,7 +81,7 @@ local function capsule_glyph(p, met, class) local q head, q = node_remove(head, p) setfield(p, 'yoffset', -fshift.down); setfield(p, 'next', nil) - setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth)) + setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth) - fshift.left) local box = node_new(id_hlist) setfield(box, 'width', fwidth) setfield(box, 'height', fheight) @@ -114,12 +114,7 @@ local function capsule_glyph_math(p, met, class) local y_shift, ca = - getfield(p, 'yoffset') + (has_attr(p,attr_ykblshift) or 0), char_data.align setfield(p, 'yoffset', -fshift.down) - if ca~='left' then - setfield(p, 'xoffset', getfield(p, 'xoffset') - fshift.left - + (((ca=='right') and fwidth - pwidth) or round((fwidth - pwidth)*0.5))) - else - setfield(p, 'xoffset', getfield(p, 'xoffset') - fshift.left) - end + setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth) - fshift.left) local box = node_new(id_hlist); setfield(box, 'width', fwidth) setfield(box, 'height', fheight) diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls index a543e713dc4..518f152b870 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls @@ -38,7 +38,7 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjsarticle} - [2014/01/13 ] + [2014/02/07 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -113,6 +113,10 @@ \DeclareOption{43pt}{\renewcommand{\@ptsize}{33}} \DeclareOption{12Q}{\renewcommand{\@ptsize}{1200}} \DeclareOption{14Q}{\renewcommand{\@ptsize}{1400}} +\DeclareOption{10ptj}{\renewcommand{\@ptsize}{1001}} +\DeclareOption{10.5ptj}{\renewcommand{\@ptsize}{1051}} +\DeclareOption{11ptj}{\renewcommand{\@ptsize}{1101}} +\DeclareOption{12ptj}{\renewcommand{\@ptsize}{1201}} \hour\time \divide\hour by 60\relax \@tempcnta\hour \multiply\@tempcnta 60\relax \minute\time \advance\minute-\@tempcnta @@ -273,6 +277,22 @@ \mag 1077 \def\inv@mag{0.928505} \fi +\ifnum\@ptsize=1001 + \mag 1085 + \def\inv@mag{0.921659} +\fi +\ifnum\@ptsize=1051 + \mag 1139 + \def\inv@mag{0.877963} +\fi +\ifnum\@ptsize=1101 + \mag 1194 + \def\inv@mag{0.837521} +\fi +\ifnum\@ptsize=1201 + \mag 1302 + \def\inv@mag{0.768049} +\fi \setlength\paperwidth{\inv@mag\paperwidth}% \setlength\paperheight{\inv@mag\paperheight}% \setlength{\@tempdima}{\paperwidth} diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls index 9721f05290c..9910bae1108 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls @@ -38,7 +38,7 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjsbook} - [2014/01/13 ] + [2014/02/07 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -115,6 +115,10 @@ \DeclareOption{43pt}{\renewcommand{\@ptsize}{33}} \DeclareOption{12Q}{\renewcommand{\@ptsize}{1200}} \DeclareOption{14Q}{\renewcommand{\@ptsize}{1400}} +\DeclareOption{10ptj}{\renewcommand{\@ptsize}{1001}} +\DeclareOption{10.5ptj}{\renewcommand{\@ptsize}{1051}} +\DeclareOption{11ptj}{\renewcommand{\@ptsize}{1101}} +\DeclareOption{12ptj}{\renewcommand{\@ptsize}{1201}} \hour\time \divide\hour by 60\relax \@tempcnta\hour \multiply\@tempcnta 60\relax \minute\time \advance\minute-\@tempcnta @@ -280,6 +284,22 @@ \mag 1077 \def\inv@mag{0.928505} \fi +\ifnum\@ptsize=1001 + \mag 1085 + \def\inv@mag{0.921659} +\fi +\ifnum\@ptsize=1051 + \mag 1139 + \def\inv@mag{0.877963} +\fi +\ifnum\@ptsize=1101 + \mag 1194 + \def\inv@mag{0.837521} +\fi +\ifnum\@ptsize=1201 + \mag 1302 + \def\inv@mag{0.768049} +\fi \setlength\paperwidth{\inv@mag\paperwidth}% \setlength\paperheight{\inv@mag\paperheight}% \setlength{\@tempdima}{\paperwidth} diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls index 7de97f1c800..c33b1415276 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls @@ -38,7 +38,7 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjskiyou} - [2014/01/13 ] + [2014/02/07 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -113,6 +113,10 @@ \DeclareOption{43pt}{\renewcommand{\@ptsize}{33}} \DeclareOption{12Q}{\renewcommand{\@ptsize}{1200}} \DeclareOption{14Q}{\renewcommand{\@ptsize}{1400}} +\DeclareOption{10ptj}{\renewcommand{\@ptsize}{1001}} +\DeclareOption{10.5ptj}{\renewcommand{\@ptsize}{1051}} +\DeclareOption{11ptj}{\renewcommand{\@ptsize}{1101}} +\DeclareOption{12ptj}{\renewcommand{\@ptsize}{1201}} \hour\time \divide\hour by 60\relax \@tempcnta\hour \multiply\@tempcnta 60\relax \minute\time \advance\minute-\@tempcnta @@ -273,6 +277,22 @@ \mag 1077 \def\inv@mag{0.928505} \fi +\ifnum\@ptsize=1001 + \mag 1085 + \def\inv@mag{0.921659} +\fi +\ifnum\@ptsize=1051 + \mag 1139 + \def\inv@mag{0.877963} +\fi +\ifnum\@ptsize=1101 + \mag 1194 + \def\inv@mag{0.837521} +\fi +\ifnum\@ptsize=1201 + \mag 1302 + \def\inv@mag{0.768049} +\fi \mag 977 \def\inv@mag{1.02354} \setlength\paperwidth{\inv@mag\paperwidth}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls index 829dc6e13ef..251d916f69c 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls @@ -38,7 +38,7 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjspf} - [2014/01/13 ] + [2014/02/07 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -113,6 +113,10 @@ \DeclareOption{43pt}{\renewcommand{\@ptsize}{33}} \DeclareOption{12Q}{\renewcommand{\@ptsize}{1200}} \DeclareOption{14Q}{\renewcommand{\@ptsize}{1400}} +\DeclareOption{10ptj}{\renewcommand{\@ptsize}{1001}} +\DeclareOption{10.5ptj}{\renewcommand{\@ptsize}{1051}} +\DeclareOption{11ptj}{\renewcommand{\@ptsize}{1101}} +\DeclareOption{12ptj}{\renewcommand{\@ptsize}{1201}} \hour\time \divide\hour by 60\relax \@tempcnta\hour \multiply\@tempcnta 60\relax \minute\time \advance\minute-\@tempcnta @@ -273,6 +277,22 @@ \mag 1077 \def\inv@mag{0.928505} \fi +\ifnum\@ptsize=1001 + \mag 1085 + \def\inv@mag{0.921659} +\fi +\ifnum\@ptsize=1051 + \mag 1139 + \def\inv@mag{0.877963} +\fi +\ifnum\@ptsize=1101 + \mag 1194 + \def\inv@mag{0.837521} +\fi +\ifnum\@ptsize=1201 + \mag 1302 + \def\inv@mag{0.768049} +\fi \setlength\paperwidth{\inv@mag\paperwidth}% \setlength\paperheight{\inv@mag\paperheight}% \setlength{\@tempdima}{\paperwidth} diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua index cfa499ae0e9..0e9f64ee310 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua @@ -43,6 +43,8 @@ stack_table_index.PRE = 0x200000 -- characterごと stack_table_index.POST = 0x400000 -- characterごと stack_table_index.KCAT = 0x600000 -- characterごと stack_table_index.XSP = 0x800000 -- characterごと +stack_table_index.RIPRE = 0xA00000 -- characterごと,ruby pre +stack_table_index.RIPOST = 0xC00000 -- characterごと,ruby post stack_table_index.JWP = 0 -- これだけ stack_table_index.KSK = 1 -- これだけ stack_table_index.XSK = 2 -- これだけ @@ -275,12 +277,20 @@ do local to_direct = (Dnode ~= node) and Dnode.todirect or nullfunc -- mode = true iff main_process is called from pre_linebreak_filter local function main_process(head, mode, dir) + tex.setattribute('global', attr_icflag, 0) local p = to_direct(head) p = ltjj.main(p,mode) if p then p = ltjw.set_ja_width(p, dir) end return to_node(p) end - + + local function adjust_icflag(h) + -- kern from luaotfload will have icflag = 1 + -- (same as italic correction) + tex.setattribute('global', attr_icflag, 1) + return h + end + -- callbacks luatexbase.add_to_callback( @@ -297,6 +307,9 @@ do end,'ltj.hpack_filter', luatexbase.priority_in_callback('hpack_filter', 'luaotfload.node_processor') + 1) + luatexbase.add_to_callback('pre_linebreak_filter', adjust_icflag, 'adjust_icflag', 1) + luatexbase.add_to_callback('hpack_filter', adjust_icflag, 'adjust_icflag', 1) + end -- define_font diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty index 3fbc35372c9..9d04afe9641 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty @@ -31,7 +31,7 @@ \DeclareFontShape{JY3}{gt}{bx}{n}{<-> ssub*gt/m/n}{} %fontencoding{JT3}\selectfont -\fontencoding{JY3}\selectfont\adjustbaseline +\kanjiencoding{JY3}\selectfont\adjustbaseline \DeclareTextFontCommand{\textmc}{\mcfamily} \DeclareTextFontCommand{\textgt}{\gtfamily} diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty index 6c9529f0eaa..5157a1e9a59 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty @@ -429,9 +429,10 @@ \ifin@\edef\k@family{#1}\else% \directlua{luatexja.jfont.is_Nkfam(\tmp@enc, \tmp@item)}% \ifin@\@notkfamtrue\else% - \def\@temp##1+{\lowercase{\def\@@temp{##1#1.fd}}}\expandafter\@temp\k@encoding+% - \message{(I search kanjifont definition file: \@@temp)}% - \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% + % filename of font definition file is always lowercase + \edef\@temp{\lowercase{\noexpand\IfFileExists{\k@encoding#1.fd}}}% + \message{(I search kanjifont definition file)}% + \@temp{\@tempswztrue}{\@tempswzfalse}% \if@tempswz \directlua{luatexja.jfont.add_kfam_list(\tmp@enc, \tmp@item)}% \edef\k@family{#1}% @@ -450,9 +451,10 @@ \ifin@\edef\f@family{#1}\else \directlua{luatexja.jfont.is_Nffam(\tmp@enc, \tmp@item)}% \ifin@\@notffamtrue\else - \def\@temp##1+{\lowercase{\def\@@temp{##1#1.fd}}}\expandafter\@temp\f@encoding+% - \message{(I search font definition file: \@@temp)}% - \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% + % filename of font definition file is always lowercase + \edef\@temp{\lowercase{\noexpand\IfFileExists{\f@encoding#1.fd}}}% + \message{(I search font definition file)}% + \@temp{\@tempswztrue}{\@tempswzfalse}% \if@tempswz \directlua{luatexja.jfont.add_ffam_list(\tmp@enc, \tmp@item)}% \edef\f@family{#1}% -- cgit v1.2.3