From 5112bfa157654c21370044635eb59293b8c8d895 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 1 Apr 2017 20:57:19 +0000 Subject: luatexja (1apr17) git-svn-id: svn://tug.org/texlive/trunk@43671 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/luatex/luatexja/README | 20 +- .../texmf-dist/doc/luatex/luatexja/ltjclasses.pdf | Bin 758610 -> 768214 bytes .../texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf | Bin 865485 -> 874230 bytes .../texmf-dist/doc/luatex/luatexja/luatexja-en.pdf | Bin 448667 -> 450665 bytes .../texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf | Bin 845085 -> 848211 bytes Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx | 209 +++++++++++++-------- .../source/luatex/luatexja/ltjclasses.dtx | 44 +++-- .../source/luatex/luatexja/ltjsclasses.dtx | 146 +++++++++++--- .../tex/luatex/luatexja/addons/luatexja-preset.sty | 110 +++++------ Master/texmf-dist/tex/luatex/luatexja/lltjext.sty | 123 +++++++++--- .../texmf-dist/tex/luatex/luatexja/ltj-latex.sty | 10 +- Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua | 4 +- .../texmf-dist/tex/luatex/luatexja/ltjarticle.cls | 6 +- Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo | 2 +- Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo | 2 +- Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo | 2 +- Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls | 12 +- .../texmf-dist/tex/luatex/luatexja/ltjreport.cls | 6 +- .../texmf-dist/tex/luatex/luatexja/ltjsarticle.cls | 24 ++- Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls | 70 ++++--- .../texmf-dist/tex/luatex/luatexja/ltjsize10.clo | 2 +- .../texmf-dist/tex/luatex/luatexja/ltjsize11.clo | 2 +- .../texmf-dist/tex/luatex/luatexja/ltjsize12.clo | 2 +- .../texmf-dist/tex/luatex/luatexja/ltjskiyou.cls | 4 +- Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls | 4 +- .../texmf-dist/tex/luatex/luatexja/ltjsreport.cls | 54 ++++-- .../texmf-dist/tex/luatex/luatexja/ltjtarticle.cls | 6 +- Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo | 2 +- Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo | 2 +- Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo | 2 +- Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls | 12 +- .../texmf-dist/tex/luatex/luatexja/ltjtreport.cls | 6 +- .../texmf-dist/tex/luatex/luatexja/ltjtsize10.clo | 2 +- .../texmf-dist/tex/luatex/luatexja/ltjtsize11.clo | 2 +- .../texmf-dist/tex/luatex/luatexja/ltjtsize12.clo | 2 +- .../tex/luatex/luatexja/patches/lltjcore.sty | 9 +- .../tex/luatex/luatexja/patches/lltjfont.sty | 32 +++- 37 files changed, 640 insertions(+), 295 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README index 46cd7a07cd7..66d63e1f369 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 20170221.0 +The LuaTeX-ja Package 20170401.0 -------------------------------- Copyright (c) 2011--2017 The LuaTeX-ja project License: modified BSD (see COPYING) @@ -26,17 +26,23 @@ Installation - luaotfload v2.6 - adobemapping (Adobe CMap files) - everysel package + - etoolbox package + - ltxcmds package + - pdftexcmds package + - atbegshi package + - filehook package + - stfloats package - IPAex fonts (http://ipafont.ipa.go.jp/) - Hence this version does not work in TeX Live 2014 (or earlier). + Hence this version does not work in TeX Live 2015 (or earlier). -1. If you are using TeX Live 2015 or later, you can install LuaTeX-ja via tlmgr. +1. If you are using TeX Live 2016 or later, you can install LuaTeX-ja via tlmgr. 2. If you must/want to install manually: a. Download the source archive from CTAN, - or tagged as 20170221.0 in the Git repository by + or tagged as 20170401.0 in the Git repository by + ;a=snapshot;h=refs/tags/20170401.0;sf=tgz> b. Extract the archive and process following three files by LuaLaTeX to generate classes for Japanese typesetting: @@ -63,7 +69,7 @@ LuaTeX-ja supports both the plain format and LaTeX2e. Simply loading luatexja.sty by \input or \usepackage does the minimal setting. - If you want to create Japanese-based documents, you can consider the use of - ltj{article,book,report}.cls or ltjs{article,book}.cls. + ltj{article,book,report}.cls or ltjs{article,book,report}.cls. - If you want to use functionality of the fontspec package with Japanese fonts, load luatexja-fontspec.sty. It defines control sequences such as \setmainjfont, \setsansjfont and \jfontspec, which can be used for specifying Japanese fonts. @@ -81,4 +87,4 @@ Notes * src/*.{ins.dtx} and src/ltj-kinsoku_make.tex are not needed in regular use. -Last commit date: Tue Feb 21 16:52:59 2017 +0900 +Last commit date: Sat Apr 1 16:02:29 2017 +0900 diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf index 047f13b983a..ea89bd1d8eb 100644 Binary files a/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf and b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf differ diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf index 687834daa6c..8e6398b1da2 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 22e72fe5458..4033e4d01ab 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 be0b2f76dc9..9584b679b9c 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 faafe48ceb1..56442a4ad22 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx @@ -136,6 +136,16 @@ pdftitle={LuaTeX-jaパッケージ} % } +%<*ja> +\def\HyRef@autoref#1#2{% + \begingroup + \Hy@safe@activestrue + \expandafter\HyRef@autosetref\csname r@#2\endcsname{#2}{#1}% + \endgroup\ltjalchar"200C %" 欧文ゴースト +} +\def\figureautorefname{図} +\def\tableautorefname{表} +% %%%%%%%% definition env. \usepackage{amsthm} @@ -625,8 +635,8 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}. \item \LuaTeX\ beta-0.85.0 (or later) \item \Pkg{luaotfload} v2.6 (or later) \item \Pkg{adobemapping} (Adobe cmap and pdfmapping files) -\item \Pkg{everysel} (if you want to use \LuaTeX-ja with \LaTeXe) -\item \Pkg{ltxcmds}, \Pkg{pdftexcmds}, \Pkg{atbegshi} +\item \Pkg{etoolbox}, \Pkg{everysel} (if you want to use \LuaTeX-ja with \LaTeXe) +\item \Pkg{ltxcmds}, \Pkg{pdftexcmds}, \Pkg{filehook}, \Pkg{atbegshi} \item \Pkg{fontspec} v2.4 (or later) %\item \emph{IPAex fonts} (\url{http://ipafont.ipa.go.jp/}) %\item \emph{IPAexフォント(\url{http://ipafont.ipa.go.jp/})} @@ -1087,9 +1097,9 @@ classes in \pLaTeX) and \Pkg{jsclasses} (classes by Haruhiko Okumura), namely, \Pkg{ltjclasses}\footnote{% \texttt{ltjarticle.cls},~\texttt{ltjbook.cls}, \texttt{ltjreport.cls}, \texttt{ltjtarticle.cls}, \texttt{ltjtbook.cls}, \texttt{ltjtreport.cls}. - The latter \texttt{ltjt*.cls} are for vertically writtened Japanese documents. + The latter \texttt{ltjt*.cls} are for vertically written Japanese documents. } and \Pkg{ltjsclasses}\footnote{% - \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls},~\texttt{ltjskiyou.cls}.}. + \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls}, \texttt{ltjsreport.cls},~\texttt{ltjskiyou.cls}.}. Original \Pkg{jsclasses} use \cs{mag}~primitive to set the main document font size. However, \LuaTeX\ beta-0.87.0~or~later does not support \cs{mag} in PDF~output, @@ -1108,7 +1118,7 @@ to set the main document font size. 縦組用は \texttt{ltjtarticle.cls}, \texttt{ltjtbook.cls}, \texttt{ltjtreport.cls} である. }, \Pkg{ltjsclasses}\footnote{% - \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls},~\texttt{ltjskiyou.cls}.}% + \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls}, \texttt{ltjsreport.cls},~\texttt{ltjskiyou.cls}.}% がそれぞれ用意されている. 元々の\Pkg{ltjsclasses}ではフォントサイズを指定するのに\cs{mag}プリミティブが使われていたが, @@ -1705,16 +1715,27 @@ since we use same font for both series of \textit{gothic}. \item[jis2004] %Use JIS2004 glyph variants if possible. %出来る限りJIS2004の字形を使う. -\item[jis] +\item[jfm\_yoko=] %<*en> -Use the JFM \texttt{jfm-jis.lua}, instead of \texttt{jfm-ujis.lua}, which is the default JFM of -\LuaTeX-ja. +Use the JFM \texttt{jfm-.lua} for horizontal direction, instead of \texttt{jfm-ujis.lua}~(default JFM). % %<*ja> -用いるJFMを(JISフォントメトリック類似の)\texttt{jfm-jis.lua}にする.このオプションがない時は -\LuaTeX-ja標準の\texttt{jfm-ujis.lua}が用いられる. +横組用和文フォントで用いるJFMを\texttt{jfm-.lua}にする.このオプションがない時は +\LuaTeX\nobreakdash -ja標準の\texttt{jfm-ujis.lua}が用いられる. +% +\item[jfm\_tate=] +%<*en> +Use the JFM \texttt{jfm-.lua} for vertical direction, instead of \texttt{jfm-ujisv.lua}~(default JFM). +% +%<*ja> +縦用和文フォントで用いるJFMを\texttt{jfm-.lua}にする.このオプションがない時は +\LuaTeX-ja標準の\texttt{jfm-ujisv.lua}が用いられる. % +\item[jis] +%Same as \texttt{jfm\_yoko=jis}. +%\texttt{jfm\_yoko=jis}と同じ.ここで用いるJFM\texttt{jfm-jis.lua}はJISフォントメトリックを元にしたものである. + \end{cslist} %<*en> Note that \texttt{90jis} and \texttt{jis2004} only affect with \textit{mincho}, @@ -1850,7 +1871,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \end{tabular} \end{center} -%\newpage +\newpage \item[yu-win] Yu fonts bundled with Windows~8.1. % \\*[-\dimexpr\medskipamount+\baselineskip\relax] \item[yu-win10] Yu fonts bundled with Windows~10. @@ -1882,7 +1903,6 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \end{tabular} \end{center} -%\newpage \item[moga-mobo] MogaMincho, MogaGothic, and MoboGothic. \item[moga-mobo-ex] MogaExMincho, MogaExGothic, and MoboExGothic. %These fonts can be downloaded from\\\hfill \url{http://yozvox.web.fc2.com/}. @@ -2344,16 +2364,16 @@ This range consists of the following Unicode ranges, \emph{except characters in \end{multicols} %<*en> \item[Range~3${}^{\text{\kern.1emJ}}$] Punctuations and Miscellaneous symbols. The block list is - indicated in Table~\ref{table-rng3}. + indicated in \autoref{tab:rng3}. % %<*ja> -\item[範囲3${}^{\text{\kern.1emJ}}$] 句読点と記号類.ブロックのリストは表\ref{table-rng3}% +\item[範囲3${}^{\text{\kern.1emJ}}$] 句読点と記号類.ブロックのリストは\autoref{tab:rng3}% に示してある. % \begin{table}[!tb] %\caption{Unicode blocks in predefined character range~3.}\medskip %\caption{文字範囲3に指定されているUnicodeブロック.} -\label{table-rng3} +\label{tab:rng3} \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%" \centering\small \begin{tabular}{llll} @@ -2397,12 +2417,12 @@ This range consists of the following Unicode ranges, \emph{except characters in \end{lstlisting} %\item[Range~5${}^{\text{A}}$] Surrogates and Supplementary Private Use Areas. %\item[範囲5${}^{\text{A}}$] 代用符号と補助私用領域. -%\item[Range~6${}^{\text{\kern.1emJ}}$] Characters used in Japanese. The block list is indicated in Table~\ref{table-rng6}. -%\item[範囲6${}^{\text{\kern.1emJ}}$] 日本語で用いられる文字.ブロックのリストは表\ref{table-rng6}に示す. +%\item[Range~6${}^{\text{\kern.1emJ}}$] Characters used in Japanese. The block list is indicated in \autoref{tab:rng6}. +%\item[範囲6${}^{\text{\kern.1emJ}}$] 日本語で用いられる文字.ブロックのリストは\autoref{tab:rng6}に示す. \begin{table}[!tb] %\caption{Unicode blocks in predefined character range~6.}\medskip %\caption{文字範囲6に指定されているUnicodeブロック.} -\label{table-rng6} +\label{tab:rng6} \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%" \centering\small \begin{tabular}{llll} @@ -2427,17 +2447,17 @@ This range consists of the following Unicode ranges, \emph{except characters in \end{table} %<*en> \item[Range~7${}^{\text{\kern.1emJ}}$] Characters used in CJK languages, but not included in Adobe-Japan1-6. -The block list is indicated in Table~\ref{table-rng7}. +The block list is indicated in \autoref{tab:rng7}. % %<*ja> \item[範囲7${}^{\text{\kern.1emJ}}$] CJK言語で用いられる文字のうち,Adobe-Japan1-6に 含まれていないもの. - ブロックのリストは表\ref{table-rng7}に示す. + ブロックのリストは\autoref{tab:rng7}に示す. % \begin{table}[!tb] %\caption{Unicode blocks in predefined character range~7.}\medskip %\caption{文字範囲7に指定されているUnicodeブロック.} -\label{table-rng7} +\label{tab:rng7} \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%" \centering\small \begin{tabular}{llll} @@ -2763,24 +2783,29 @@ becuse a \emph{JAchar} is encapsulated by a horizontal box if needed. %<*ja> \paragraph{数式における挙動:\pTeX との違い} -\textbf{ALchar}のベースラインを補正する \Param{yalbaselineshift} パラメータは -ほぼ\pTeX における \cs{ybaselineshift} に対応しているものであるが, +\textbf{ALchar}のベースラインを補正する\Param{yalbaselineshift}, \Param{talbaselineshift}パラメータは +ほぼ\pTeX における \cs{ybaselineshift}, \cs{tbaselineshift} に対応しているものであるが, 数式中の挙動は異なっているので注意が必要である. -例えば,表\ref{tab:math_bsa}のように,数式中に明示的に現れた \cs{hbox} は, +例えば,\autoref{tab:math_bsa}のように,数式中に明示的に現れた \cs{hbox},~\cs{vbox} は,横組において \begin{itemize} \item 2015年以前の\pTeX では,ボックス全体が \cs{ybaselineshift} だとシフトされるので, - 表\ref{tab:math_bsa}中の``い''のように,ボックス中の和文文字は + \autoref{tab:math_bsa}中の``い''のように,ボックス中の和文文字は \ \cs{ybaselineshift} だけシフトされ,一方,``for all''のように, ボックス内の欧文文字は2重にシフトされることになる. \item 一方,\LuaTeX-jaではそのようなことはおこらず, - 数式中に明示的に現れた \cs{hbox} はシフトしない.そのため, - 表\ref{tab:math_bsa}中の``い''も``for all''も,それぞれ本文中に + 数式中に明示的に現れた \cs{hbox},~\cs{vbox} はシフトしない.そのため, + \autoref{tab:math_bsa}中の``い''も``for all''も,それぞれ本文中に 書かれたときと同じ上下位置に組まれる. なお,\TeX~Live~2016以降の\pTeX では改修がなされ,\LuaTeX-jaと 近い挙動になるようにしているが,数式中に直に書かれた``あ''のベースラインについては まだ違いが見られる. \end{itemize} + +なお,20170401.0版以降の\LuaTeX-jaでは,\cs{vcenter} によるボックスには +全体が\Param{yalbaselineshift}, \Param{talbaselineshift} パラメータが反映されるようにしている. +その方が結果が自然であることによる変更なのだが,結果的に\cs{vcenter} については\pTeX と同じ挙動となった. + \begin{table} \small\centering \caption{数式関係のベースライン補正($\Param{yalbaselineshift}=10\,\textrm{pt}$)} @@ -2872,7 +2897,7 @@ However, the penalty inserted after it is 10 which is the \Param{postbreakpenalt \subsection{予備知識:\pTeX と\upTeX における \cs{kcatcode}} \pTeX,\upTeX においては,和文文字が制御綴内で利用できるかどうか は \cs{kcatcode} の値によって決定されるのであった. -詳細は表\ref{table-kcat}を参照されたい. +詳細は\autoref{tab:kcat}を参照されたい. % %<*en> \section{\cs{catcode} in \LuaTeX-ja} @@ -2880,13 +2905,13 @@ However, the penalty inserted after it is 10 which is the \Param{postbreakpenalt \subsection{Preliminaries: \cs{kcatcode} in \pTeX\ and \upTeX} In \pTeX~and~\upTeX, the value of \cs{kcatcode} determines whether a Japanese character can be used in a control word. -For the detail, see Table~\ref{table-kcat}. +For the detail, see \autoref{tab:kcat}. % \begin{table}[t] \small \caption{\cs{kcatcode} in \upTeX} -\label{table-kcat} +\label{tab:kcat} %\medskip \noindent\hfill @@ -3048,7 +3073,7 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.} %\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} +\label{tab:kcat-diff} \def\D#1#2#3#4{% {\fboxsep0pt\fcolorbox{cyan}{white}% {\large\char"#1#2#3#4}}\ (\texttt{U+#1#2#3#4})} %" @@ -3109,7 +3134,7 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.} \subsection{Non-kanji characters in a control word} Because the engine differ, so non-kanji JIS~X~0208 characters which can be used in a control word differ in \pTeX, in \upTeX,~and~in \LuaTeX-ja. -Table~\ref{table-kcat-diff} shows the difference. +\autoref{tab:kcat-diff} shows the difference. Except for four characters ``・'',~``゛'', ``゜'',~``゠'', \LuaTeX-ja admits more characters in a control word than \upTeX. @@ -3122,7 +3147,7 @@ For the detail, see \url{https://github.com/h-kitagawa/kct}. エンジンが異なるので,\pTeX, \upTeX, \LuaTeX-ja において制御綴中に使用可能なJIS~X~0208の文字は異なる. -異なっているところだけを載せると,表\ref{table-kcat-diff}のようになる. +異なっているところだけを載せると,\autoref{tab:kcat-diff}のようになる. 「・」「゛」「゜」「゠」を除けば,\LuaTeX-jaでは\upTeX より多くの文字が 制御綴に使用可能になっている. @@ -3226,7 +3251,7 @@ Example&\obox{\yoko}&\obox{\tate}&\obox{\dtou}&\obox{\utod}\\ \end{table} %<*en> -\LuaTeX-ja supports four directions, as shown in Table~\ref{tab-dir}. +\LuaTeX-ja supports four directions, as shown in \autoref{tab-dir}. The second column (\emph{yoko} direction) is just horizontal writing, and the third column (\emph{tate} direction) is vertical writing. The fourth column (\emph{dtou} direction) is actually a hidden feature of \pTeX. @@ -3239,7 +3264,7 @@ only when the current list is null. Also, the direction of a math formula is cha % %<*ja> -\LuaTeX-jaがサポートする組方向は表\ref{tab-dir}に示す4つである. +\LuaTeX-jaがサポートする組方向は\autoref{tab-dir}に示す4つである. 4列目の \cs{dtou} は聞き慣れない命令だと思うが, 実は\pTeX に同名の命令が(ドキュメントには書かれていないが)存在する. Down-TO-Upの意味なのだろう.\cs{dtou} を使用する機会はないだろうが, @@ -3267,7 +3292,7 @@ The below is an example. また横組に戻る% yoko \end{LTXexample} -Table~\ref{tab-diffdir} shows how a box is arranged when +\autoref{tab-diffdir} shows how a box is arranged when the direction inside the box and that outside the box differ. % %<*ja> @@ -3288,7 +3313,7 @@ the direction inside the box and that outside the box differ. \end{LTXexample} 異なる組方向のボックスを配置した場合にどう組まれるかの仕様も,\pTeX を -踏襲している.表\ref{tab-diffdir}に示す. +踏襲している.\autoref{tab-diffdir}に示す. % \begin{table}[t] @@ -3601,7 +3626,7 @@ These commands set the dimension of \cs{box}. One does not need \ltjsetwd42 20pt, \ltjsetwd42=20pt, \ltjsetwd=42 20pt, \ltjsetwd=42=20pt \end{lstlisting} -設定値は「横組」「縦組及び \cs{utod} 方向」「\cs{dtou} 方向」 +設定値は「横組」「縦組及びutod方向」「dtou方向」 の3種ごとに独立して記録される.参考として,Gitリポジトリ内の \verb+test/test55-boxdim_diffdir.{tex,pdf}+ を挙げておく. @@ -3875,10 +3900,10 @@ The following JFMs are shipped with \LuaTeX-ja: % \end{description} %<*en> -The difference among these three~JFMs is shown in Table~\ref{tab-difjfm}. +The difference among these three~JFMs is shown in \autoref{tab-difjfm}. % %<*ja> -これら3つのJFMの違いは表\ref{tab-difjfm}に示した.表中の文例の一部には, +これら3つのJFMの違いは\autoref{tab-difjfm}に示した.表中の文例の一部には, \cite{min10}の図3,~4のものを用いた. % @@ -3908,11 +3933,11 @@ Sometimes there is a need that \ldots. \item[jfmvar=] 標準では,JFMとサイズが同じで, 実フォントだけが異なる2つの和文フォントは「区別されない」.例えば -図\ref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが, +\autoref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが, JFMもサイズも同じなので,普通に「)【」と入力した時と同じように半角空きとなる. しかし,JFMとサイズが同じであっても,\texttt{jfmvar} キーの異なる -2つの和文フォント,例えば図\ref{fig:jfmvar}で言う \cs{F} と \cs{H}, +2つの和文フォント,例えば\autoref{fig:jfmvar}で言う \cs{F} と \cs{H}, は「区別される」.異なる和文フォントに異なる \texttt{jfmvar} キーを割り当て, かつ\Param{differentjfm}パラメータを \texttt{both} に設定すれば, \pTeX と似た状況で組版されることになる. @@ -3945,7 +3970,7 @@ JFMもサイズも同じなので,普通に「)【」と入力した時と 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. +See \autoref{fig:kern-jfm} for detail. Note that in \cs{setmainjfont} etc.\ which are provided by \Pkg{luatexja-fontspec} package, kerning option is set \emph{off} (\texttt{Kerning=Off}) by default, @@ -3956,7 +3981,7 @@ because of the compatibility with previous versions of \LuaTeX-ja. このカーニング情報は以前の\LuaTeX-ja とはあまり相性が良くなかったが, 本バージョンではカーニングによる空白はイタリック補正と同様に扱うことになっている. つまり,カーニング由来の空白とJFM由来のグルー・カーンは同時に入りうる. -図\ref{fig:kern-jfm}を参照. +\autoref{fig:kern-jfm}を参照. \begin{itemize} \item \emph{\cs{jfont} や, NFSS2用の命令(\ref{ssec-chgfnt}節,\ref{ssec-nfsspat}節)における指定では @@ -4103,7 +4128,7 @@ JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\ \end{lstlisting} \item \ref{ssec-math}節で述べる,数式中の和文フォントには縦組用和文フォントは指定できない. \item \texttt{jfm=}\ の部分には縦組用JFMを指定する. -以下の縦組用JFMが\LuaTeX-jaには同梱されており,違いを表\ref{tab-difjfm-tate}に示した. +以下の縦組用JFMが\LuaTeX-jaには同梱されており,違いを\autoref{tab-difjfm-tate}に示した. \begin{description} \item[\tt jfm-ujisv.lua] \LuaTeX-jaの標準縦組用JFMである.このJFMは\upTeX で 用いられるUTF/OTFパッケージ用の和文用TFMである \verb+upnmlminr-v.tfm+ を @@ -4394,7 +4419,7 @@ Direction of JFM&\textbf{\texttt{'yoko'} (horizontal)}&\multicolumn{1}{l}{\textb \end{table} Specify the 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. The default values are shown in Table~\ref{tab-wid}. +as values of these fields. The default values are shown in \autoref{tab-wid}. % %<*ja> \begin{table}[t] @@ -4431,7 +4456,7 @@ These fields are for adjusting the position of the ``real'' glyph. Legal treated as~0, and \texttt{align} field is treated as \texttt{'left'}. The effects of these 3~fields are indicated in -Figures \ref{fig-pos}~and~\ref{fig-pos-tate}. +\autoref{fig:pos}~and~\autoref{fig:pos-tate}. % %<*ja> これらのフィールドは実際のグリフの位置を調整するためにある. @@ -4439,8 +4464,8 @@ Figures \ref{fig-pos}~and~\ref{fig-pos-tate}. \texttt{'right'} のいずれかである.もしこれら3つのフィールドのうちの1つが省かれた 場合,\texttt{left} と \texttt{down} は0,\texttt{align} フィールドは \ \texttt{'left'} であるものとして扱われる. -これら3つのフィールドの意味については図\ref{fig-pos}(横組用和文フォント), -図\ref{fig-pos-tate}(縦組用和文フォント)で説明する. +これら3つのフィールドの意味については\autoref{fig:pos}(横組用和文フォント), +\autoref{fig:pos-tate}(縦組用和文フォント)で説明する. % %<*en> @@ -4557,7 +4582,7 @@ Furthermore, the glyph is shifted according to values of fields %The position of the real glyph (horizontal Japanese fonts) %横組和文フォントにおける「実際の」グリフの位置 } -\label{fig-pos} +\label{fig:pos} \end{figure} \begin{figure}[!tb] \begin{minipage}{0.4\textwidth}% @@ -4638,7 +4663,7 @@ Furthermore, the glyph is shifted according to values of fields %The position of the real glyph (vertical Japanese fonts) %縦組和文フォントにおける「実際の」グリフの位置 } -\label{fig-pos-tate} +\label{fig:pos-tate} \end{figure} \item[kern={\{[$j$]=, [$j'$]=\{, [ratio=]\}, ...\}}] @@ -5004,7 +5029,7 @@ an external package is needed to support this in plain \TeX\ and %<*en> \LuaTeX-ja's handling of Japanese fonts in math formulas is similar; -Table~\ref{tab-math} shows counterparts to \TeX's primitives for math +\autoref{tab-math} shows counterparts to \TeX's primitives for math font families. There is no relation between the value of \cs{fam} and that of \cs{jfam}; with appropriate settings, you can set both \cs{fam} and \cs{jfam} to the same value. @@ -5014,7 +5039,7 @@ a \emph{horizontal} Japanese font. % %<*ja> \LuaTeX-jaの数式中での和文フォントの扱いも同様である. -表\ref{tab-math}は数式フォントファミリに対する \TeX のプリミティブと対応する +\autoref{tab-math}は数式フォントファミリに対する \TeX のプリミティブと対応する ものを示している.\cs{fam} と \cs{jfam} の値の間には関係はなく, 適切な設定の下では \cs{fam} と \cs{jfam} の両方に同じ値を設定することができる. \Param{jatextfont} 他の第2引数は,\cs{jfont} で定義された @@ -6373,7 +6398,7 @@ characters in of the Japanese font (we say the \emph{base font}) which specified by first 4 arguments are typeset by the Japanese font which specified by fifth to eighth arguments (we say the \emph{alternate font}). -An example is shown in Figure~\ref{fig:altkanji}. +An example is shown in \autoref{fig:altkanji}. \begin{itemize} \item @@ -6593,6 +6618,40 @@ for example, the meaning of \cs{TU\cs{textquotedblleft}} is \cs{ltjalchar8220\lt \cs{TU\cs{textquotedblleft}}は \cs{ltjalchar8220\ltjalchar"2423 } という定義になっている.%" % +\begin{table}[t] + \centering\small + \caption{strut}\label{tab:strutbox} + \begin{tabular}{llcccl} + \toprule + \textbf{box}&\textbf{direction}&\textbf{width}&\textbf{height}&\textbf{depth} + &\textbf{user command}\\ + \midrule + \cs{ystrutbox}&yoko&0&0.7\cs{baselineskip}&0.3\cs{baselineskip}&\cs{ystrut}\\\midrule + \cs{tstrutbox}&tate, utod&0&0.5\cs{baselineskip}&0.5\cs{baselineskip}&\cs{tstrut}\\\midrule + \cs{dstrutbox}&dtou&0&0.7\cs{baselineskip}&0.3\cs{baselineskip}&\cs{dstrut}\\\midrule + \cs{zstrutbox}&---&0&0.7\cs{baselineskip}&0.3\cs{baselineskip}&\cs{zstrut}\\\bottomrule + \end{tabular} +\end{table} +%<*en> +\subsection{\cs{strutbox}} +As \pLaTeX~(2017/04/08 or later), \cs{strutbox} is \emph{a macro} which is expanded to one of +\cs{ystrutbox},~\cs{tstrutbox},~and~\cs{dstrutbox} +(all of them are shown in \autoref{tab:strutbox}), according to the current direction. +Similarly, \cs{strut} now uses one of these boxes. +% +%<*ja> +\subsection{\cs{strutbox}} +\pLaTeX~2017/04/08以降と同じように, +\cs{strutbox}は現在の組方向によって\cs{ystrutbox}, \cs{tstrutbox}, \cs{dstrutbox}の +いずれかに展開される\emph{マクロ}となっている(これらについては\autoref{tab:strutbox}参照). +同様に\cs{strut}もこの3\nobreak ボックスのいずれかを組方向によって使い分けるようになっている. + +\cs{zstrutbox}はutod方向(\pTeX でいう縦数式ディレクション)で使われる支柱ボックスであるが, +実際に使われるのは\cs{zstrut}が明示的に発行された時,そして +\Pkg{lltjext}パッケージで追加される組方向指定で \texttt{} を指定した時,および +周囲が縦組の状況で \texttt{} を指定した時に限られている. +% + %<*en> \section{Addon packages} \LuaTeX-ja has several addon packages. @@ -6693,22 +6752,22 @@ The \texttt{TateFeatures} key specifies font features which are only turned~on i vertical writing, such as \texttt{Style=VerticalKana}~(\texttt{vkna} feature). Similarly, the \texttt{TateFont} key specifies the Japanese font which will be used only in vertical writing. -A demonstrarion is shown in Figure~\ref{fig:yokotate-fontspec}. +A demonstrarion is shown in \autoref{fig:yokotate-fontspec}. % %<*ja> 縦組において使用されるフォントや,縦組においてのみ適用されるフォント機能達を -指定する.使用例は図\ref{fig:yokotate-fontspec}参照. +指定する.使用例は\autoref{fig:yokotate-fontspec}参照. % \item[YokoFeatures=\{\}] %<*en> The \texttt{YokoFeatures} key specifies font features which are only turned~on in horizontal writing,. -A demonstrarion is shown in Figure~\ref{fig:yokotate-fontspec}. +A demonstrarion is shown in \autoref{fig:yokotate-fontspec}. % %<*ja> 同様に,横組においてのみ適用されるフォント機能達を -指定する.使用例は図\ref{fig:yokotate-fontspec}参照. +指定する.使用例は\autoref{fig:yokotate-fontspec}参照. % @@ -6757,11 +6816,11 @@ AltFont = { %<*en> Each sublist should have the \texttt{Range} key (sublist which does not contain \texttt{Range} key is simply ignored). -A demonstrarion is shown in Figure~\ref{fig:altkanji-fontspec}. +A demonstrarion is shown in \autoref{fig:altkanji-fontspec}. % %<*ja> 各部分リストには \texttt{Range} キーが必須である(含まれない部分リストは -単純に無視される).指定例は図\ref{fig:altkanji-fontspec}に示した. +単純に無視される).指定例は\autoref{fig:altkanji-fontspec}に示した. % \end{cslist} @@ -6798,7 +6857,7 @@ one can specify \texttt{AltFont} inside \texttt{YokoFeatures},~\texttt{TateFeatu Note that features which are specified in \texttt{YokoFeatures}~and~\texttt{TateFeatures} are always interpreted \emph{after} other ``direction-independent'' features. -This explains why \cs{addjfontfeatures} at~line~6 in~Figure~\ref{fig:yokotate-fontspec} +This explains why \cs{addjfontfeatures} at~line~6 in~\autoref{fig:yokotate-fontspec} has no effect, because a color specification is already done in \texttt{YokoFeatures}~and~\texttt{TateFeatures} keys. % @@ -6830,7 +6889,7 @@ BoldFeatures = { 指定することは可能であり.また\ \texttt{YokoFeatures},~\texttt{TateFeatures} キーの 中身に \texttt{AltFont} を指定することができる. -また,図\ref{fig:yokotate-fontspec}後半部では6行目の色の指定が効かず, +また,\autoref{fig:yokotate-fontspec}後半部では6行目の色の指定が効かず, 2行目で指定した\ \texttt{YokoFeatures},~\texttt{TateFeatures}\ による色の指定が有効になっ たままである.これは\emph{\ \texttt{YokoFeatures},~\texttt{TateFeatures}\ による OpenType機能指定は @@ -7003,8 +7062,8 @@ with priority&% Note: the value of \Param{kanjiskip} is 0\,pt${}^{+1/5\,\mathrm{em}}_{-1/5\,\mathrm{em}}$ in this figure, for making the difference obvious. -%\caption{行長調整}\label{fig-adj} -%\caption{Line adjustment}\label{fig-adj} +%\caption{行長調整}\label{fig:adj} +%\caption{Line adjustment}\label{fig:adj} \end{figure} @@ -7037,11 +7096,11 @@ for making the difference obvious. \item[優先順位付きの行長調整] \pTeX では,行長調整において優先度の概念が存在しなかったため,図 -\ref{fig-adj}上段における半角分の半端は,図\ref{fig-adj}中段のように,鍵 +\ref{fig:adj}上段における半角分の半端は,\autoref{fig:adj}中段のように,鍵 括弧周辺の空白と和文間空白(\Param{kanjiskip})の両方によって負担される.し かし,「日本語組版処理の要件」\cite{jlreq}やJIS~X~4051~\cite{x4051}におい ては,このような状況では半端は鍵括弧周辺の空白のみで負担し,その他の和文 -文字はベタ組で組まれる(図\ref{fig-adj}下段)ことになっている. +文字はベタ組で組まれる(\autoref{fig:adj}下段)ことになっている. \Pkg{luatexja-adjust}パッケージの提供する第2の機能は, \cite{jlreq}や\cite{x4051}における規定のような,優先順位付き の行長調整である. @@ -7949,7 +8008,7 @@ as in \Pkg{luatexja-adjust}. %<*en> \paragraph{Setting parameters} -Figure~\ref{fig:setpar-def} shows the \emph{most outer} definition of +\autoref{fig:setpar-def} shows the \emph{most outer} definition of two commands, \cs{ltjsetparameter} and \cs{ltjglobalsetparameter}. Most important part is the last \cs{setkeys}, @@ -7976,7 +8035,7 @@ but also by the value of \cs{globaldefs}. % %<*ja> \paragraph{パラメータの設定} -\cs{ltjsetparameter} と,\cs{ltjglobalsetparameter} の定義は図\ref{fig:setpar-def}の +\cs{ltjsetparameter} と,\cs{ltjglobalsetparameter} の定義は\autoref{fig:setpar-def}の のようになっている. 本質的なのは最後の \cs{setkeys} で,これは\Pkg{xkeyval}パッケージの提供する命令である. @@ -8089,7 +8148,7 @@ internal states are as follows: The first three states---$N$,~$S$, and~$M$---are as same as \TeX's input processor. State~$K$ is similar to state~$M$, and is entered after Japanese characters. The diagram of state transitions are indicated in -Figure~\ref{fig-ptexipro}. Note that \pTeX\ doesn't leave state~$K$ +\autoref{fig:ptexipro}. Note that \pTeX\ doesn't leave state~$K$ after ``beginning/ending of a group'' characters. % @@ -8108,7 +8167,7 @@ after ``beginning/ending of a group'' characters. \item State~$M$: 行中. \item State~$K$: 行中(和文文字の後). \end{itemize} -また,状態遷移は,図\ref{fig-ptexipro}のようになっており,図中の数字は +また,状態遷移は,\autoref{fig:ptexipro}のようになっており,図中の数字は カテゴリーコードを表している.最初の3状態は\TeX の入力処理部と同じであり, 図中から状態$K$と「$j$」と書かれた矢印を取り除けば,\TeX の入力処理部と同 じものになる. @@ -8190,7 +8249,7 @@ to State~$M$ (middle of line) sometimes. \end{itemize} %\caption{State transitions of \pTeX's input processor} %\caption{\pTeX の入力処理部の状態遷移} -\label{fig-ptexipro} +\label{fig:ptexipro} \end{figure} @@ -8826,7 +8885,7 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K] \end{table} \subsection{その他の場合} -本節の内容は表\ref{tab-jfmglue}にまとめてある. +本節の内容は\autoref{tab-jfmglue}にまとめてある. \paragraph{和文Aと欧文の間} \textit{Nq}が\textsf{和文A}で,\textit{Np}が\textsf{欧文}の場合,JFMグルー挿入処理は次のようにして行われる. @@ -9016,7 +9075,7 @@ $d = \max(\texttt{depth} - \texttt{yoffset}, 0)$, $h = \max(\texttt{height} + \texttt{yoffset}, 0)$, $d=\texttt{depth}$. \end{description} という仕様になっている.つまり,\texttt{yoffset} が負(グリフを下ける)の場合に深さは増加しな -い(表\ref{tab:yoffset_and_im}参照). +い(\autoref{tab:yoffset_and_im}参照). \begin{table}[t] \caption{\texttt{yoffset} and imaginary body} @@ -9722,7 +9781,7 @@ CMapが必要である. \pageref{para-cid}ページで述べたように,\texttt{cid}キーを使って 非埋め込みの中国語・韓国語フォントを定義する場合,同様のキャッシュが生成される. -キャッシュの名称,必要となるCMapについては表\ref{tab:cid-cache}を参照して欲しい. +キャッシュの名称,必要となるCMapについては\autoref{tab:cid-cache}を参照して欲しい. \item[extra\_***.lua] フォント``\texttt{***}''における異体字セレクタの情報,縦組用字形への変換テーブル,そして @@ -9740,7 +9799,7 @@ It is created from three CMaps, \texttt{UniJIS2004-UTF32-\{H,V\}} and \texttt{Adobe-Japan1-UCS2}, and this is why these two CMaps are needed in the first run of \LuaTeX-ja. -Similar caches are created as Table~\ref{tab:cid-cache}, +Similar caches are created as \autoref{tab:cid-cache}, if you specified \texttt{cid} key in \cs{jfont} to use other CID-keyed non-embedded fonts for Chinese or Korean, as in Page~\pageref{para-cid}. diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx index 18ac8f36fae..962223e004a 100644 --- a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx +++ b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx @@ -107,6 +107,9 @@ % 脚注番号が上書きされ横に寝てしまう問題を修正(aminophenさん,ありがとうございます).} % \changes{v1.7d-ltj-14}{2017/02/20}{openleftオプションの処理で\cs{iftdir}, \cs{ifydir}を % 誤って使っている問題を修正(aminophenさん,ありがとうございます).} +% \changes{v1.7e}{2017/03/05}{トンボに表示するジョブ情報の書式を変更} +% \changes{v1.7e}{2017/03/05}{\cs{frontmatter}と\cs{mainmatter}を +% 奇数ページに送るように変更} % \fi % % \iffalse @@ -136,7 +139,7 @@ %<11pt&bk>\ProvidesFile{ltjtbk11.clo} %<12pt&bk>\ProvidesFile{ltjtbk12.clo} % - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 % Standard LuaLaTeX-ja class] %<10pt|11pt|12pt> Standard LuaLaTeX-ja file (size option)] %<*driver> @@ -383,15 +386,19 @@ % |tombow|オプションが指定されると、用紙サイズに合わせてトンボを出力します。 % このとき、トンボの脇にPDFを作成した日付が出力されます。 % 作成日付の出力を抑制するには、|tombow|ではなく、|tombo|と指定をします。 +% +% ジョブ情報の書式は元々|filename : 2017/3/5(13:3)|のような書式でしたが、 +% jsclassesにあわせて桁数固定の|filename (2017-03-05 13:03)|に直しました。 % \changes{v1.0g}{1996/09/03}{Add to \cs{@bannertoken}.} % \changes{v1.1a}{1997/01/23}{日付出力オプション} +% \changes{v1.7e}{2017/03/05}{トンボに表示するジョブ情報の書式を変更} % \begin{macrocode} \DeclareOption{tombow}{% \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse @@ -2652,20 +2659,35 @@ % これらの命令を|openany|オプションに応じて切り替え、二回目はそれを % 元に戻しています。アスキーによるjclasses.dtxは、1997/01/15に % 一回目の修正に追随しましたが、二回目の修正には追随していません。 -% コミュニティ版では、アスキーによる仕様を維持することとし、 -% |openany|オプションの場合は|\cleardoublepage|ではなく|\clearpage|が -% 発行されます。もし|\cleardoublepage|が起きてほしい場合には、 -% 明示的に挿入してください。(参考:latex/2754) +% コミュニティ版では、一旦はアスキーによる仕様を維持しようと考え +% ました(2016/11/22)が、以下の理由により二回目の修正にも追随する +% ことにしました(2017/03/05)。 +% +% アスキー版での|\frontmatter|と|\mainmatter|の改ページ挙動は +%\begin{quote} +% |openright|なら|\cleardoublepage|、|openany|なら|\clearpage|を実行 +%\end{quote} +% というものでした。しかし、|\frontmatter|及び|\mainmatter|はノンブルを +% 1にリセットしますから、改ページの結果が偶数ページ目になる場合 +% \footnote{縦tbookのデフォルト(openright)が該当するほか、横jbookと +% 縦tbookのopenanyのときには成り行き次第で該当する可能性があります。}に +% ノンブルが偶奇逆転してしまいました。このままでは|openany|の場合に両面 +% 印刷がうまくいかないため、新しいコミュニティ版では +%\begin{quote} +% 必ず|\pltx@cleartooddpage|を実行 +%\end{quote} +% としました。これは両面印刷(twoside)の場合は奇数ページに送り、 +% 片面印刷(oneside)の場合は単に改ページとなります。(参考:latex/2754) % \changes{v1.7b}{2016/11/22}{補足ドキュメントを追加} +% \changes{v1.7e}{2017/03/05}{\cs{frontmatter}と\cs{mainmatter}を +% 奇数ページに送るように変更} % \begin{macrocode} %<*book> \newcommand{\frontmatter}{% - \if@openleft \cleardoublepage \else - \if@openright \cleardoublepage \else \clearpage \fi \fi + \pltx@cleartooddpage \@mainmatterfalse\pagenumbering{roman}} \newcommand{\mainmatter}{% - \if@openleft \cleardoublepage \else - \if@openright \cleardoublepage \else \clearpage \fi \fi + \pltx@cleartooddpage \@mainmattertrue\pagenumbering{arabic}} \newcommand{\backmatter}{% \if@openleft \cleardoublepage \else diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx index f64e93066c6..dbab715b5c9 100644 --- a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx +++ b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx @@ -57,7 +57,7 @@ %<*driver> \ProvidesFile{ltjsclasses.dtx} % - [2017/02/19 ltjsclasses ] + [2017/03/06 ltjsclasses ] %<*driver> \IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{} \documentclass{ltjsarticle} @@ -227,14 +227,23 @@ % % \begin{macro}{\if@openright} % -% |\chapter|,|\part| を奇数ページ起こしにするかどうかです。 -% 書籍では真が標準です。 +% |\chapter|,|\part| を右ページ起こしにするかどうかです。 +% 横組の書籍では真が標準で,要するに片起こし,奇数ページ起こしになります。 % % \begin{macrocode} %\newif\if@openright % \end{macrocode} % \end{macro} % +% \begin{macro}{\if@openleft} +% +% [2017-02-24] |\chapter|,|\part| を左ページ起こしにするかどうかです。 +% +% \begin{macrocode} +%\newif\if@openleft +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\if@mainmatter} % % 真なら本文,偽なら前付け・後付けです。 @@ -495,12 +504,20 @@ % % \paragraph{右左起こし} % -% 書籍では章は通常は奇数ページ起こしになりますが, +% 書籍では章は通常は奇数ページ起こしになりますが,横組ではこれを +% \texttt{openright} と表すことにしてあります。 % \texttt{openany} で偶数ページからでも始まるようになります。 % +% [2017-02-24] \texttt{openright} は横組では奇数ページ起こし,縦組では +% 偶数ページ起こしを表します。ややこしいですが,これは\LaTeX の標準クラスが +% 西欧の横組事情しか考慮せずに,奇数ページ起こしと右起こしを一緒にしてしまっ +% たせいです。縦組での奇数ページ起こしと横組での偶数ページ起こしも表現したい +% ので,ltjsclassesでは新たに \texttt{openleft} も追加しました。 +% % \begin{macrocode} -%\DeclareOption{openright}{\@openrighttrue} -%\DeclareOption{openany}{\@openrightfalse} +%\DeclareOption{openright}{\@openrighttrue\@openleftfalse} +%\DeclareOption{openleft}{\@openlefttrue\@openrightfalse} +%\DeclareOption{openany}{\@openrightfalse\@openleftfalse} % \end{macrocode} % % \paragraph{eqnarray環境と数式の位置} @@ -2136,6 +2153,65 @@ % \end{macro} % \end{macro} % +% \section{改ページ(日本語\TeX{}開発コミュニティ版のみ)}\label{sec:cleardoublepage} +% +% \begin{macro}{\pltx@cleartorightpage} +% \begin{macro}{\pltx@cleartoleftpage} +% \begin{macro}{\pltx@cleartooddpage} +% \begin{macro}{\pltx@cleartoevenpage} +% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて, +% 同じ命令を追加しました。 +% \begin{enumerate} +% \item|\pltx@cleartorightpage|:右ページになるまでページを繰る命令 +% \item|\pltx@cleartoleftpage|:左ページになるまでページを繰る命令 +% \item|\pltx@cleartooddpage|:奇数ページになるまでページを繰る命令 +% \item|\pltx@cleartoevenpage|:偶数ページになるまでページを繰る命令 +% \end{enumerate} +% となっています。 +% +% \begin{macrocode} +%<*article|book|report> +\def\pltx@cleartorightpage{\clearpage\if@twoside + \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoleftpage{\clearpage\if@twoside + \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartooddpage{\clearpage\if@twoside + \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoevenpage{\clearpage\if@twoside + \ifodd\c@page + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\cleardoublepage} +% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて, +% reportとbookクラスの場合に|\cleardoublepage|を再定義します。 +% \begin{macrocode} +%<*book|report> +\if@openleft + \let\cleardoublepage\pltx@cleartoleftpage +\else\if@openright + \let\cleardoublepage\pltx@cleartorightpage +\fi\fi +% +% \end{macrocode} +% \end{macro} +% % \section{ページスタイル}\label{sec:pagestyle} % % ページスタイルとして,\LaTeXe (欧文版)の標準クラス @@ -2917,11 +2993,7 @@ % \begin{macrocode} %<*book> \newcommand\frontmatter{% - \if@openright - \cleardoublepage - \else - \clearpage - \fi + \pltx@cleartooddpage \@mainmatterfalse \pagenumbering{roman}} % \end{macrocode} @@ -2931,13 +3003,18 @@ % % ページ番号を算用数字にし,章番号を付けるようにします。 % +% [2017-03-05] |\frontmatter| と |\mainmatter| の2つの命令は, +% 改丁または改ページした後で |\pagenumbering{...}| でノンブルを1に +% リセットします。長い間 |\frontmatter| は \texttt{openany} のときに +% 単なる改ページとしていましたが,これではノンブルをリセットする際に +% 偶奇逆転が起こる場合がありました。\texttt{openany} かどうかに依らず +% 奇数ページまで繰るように修正することで,問題を解消しました。 +% 実は,\LaTeX の標準クラスでは1998年に修正されていた問題です +% (コミュニティ版\pLaTeX の標準クラス2017/03/05も参照)。 +% % \begin{macrocode} \newcommand\mainmatter{% -% \if@openright - \cleardoublepage -% \else -% \clearpage -% \fi + \pltx@cleartooddpage \@mainmattertrue \pagenumbering{arabic}} % \end{macrocode} @@ -2949,11 +3026,13 @@ % % \begin{macrocode} \newcommand\backmatter{% - \if@openright + \if@openleft + \cleardoublepage + \else\if@openright \cleardoublepage \else \clearpage - \fi + \fi\fi \@mainmatterfalse} % % \end{macrocode} @@ -3003,11 +3082,13 @@ % \begin{macrocode} %<*book|report> \newcommand\part{% - \if@openright + \if@openleft + \cleardoublepage + \else\if@openright \cleardoublepage \else \clearpage - \fi + \fi\fi \thispagestyle{empty}% 欧文用標準スタイルでは plain \if@twocolumn \onecolumn @@ -3123,11 +3204,11 @@ %<*book|report> \def\@endpart{\vfil\newpage \if@twoside - \if@openright %% added (2016/12/13) - \null - \thispagestyle{empty}% - \newpage - \fi %% added (2016/12/13) + \if@openleft %% added (2017/02/24) + \null\thispagestyle{empty}\newpage + \else\if@openright %% added (2016/12/13) + \null\thispagestyle{empty}\newpage + \fi\fi %% added (2016/12/13, 2017/02/24) \fi \if@restonecol \twocolumn @@ -3148,7 +3229,8 @@ % \begin{macrocode} %<*book|report> \newcommand{\chapter}{% - \if@openright\cleardoublepage\else\clearpage\fi + \if@openleft\cleardoublepage\else + \if@openright\cleardoublepage\else\clearpage\fi\fi \plainifnotempty % 元: \thispagestyle{plain} \global\@topnum\z@ \if@english \@afterindentfalse \else \@afterindenttrue \fi @@ -3826,16 +3908,24 @@ % % タイトルを独立のページに出力するのに使われます。 % +% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて, +% bookクラスでタイトルを必ず奇数ページに送るようにしました。といっても, +% 横組クラスしかありませんでしたので,従来の挙動は何も変わっていません。 +% また,book以外の場合のページ番号のリセットもコミュニティ版\pLaTeX の +% 標準クラス2017/02/15に合わせましたが,こちらも片面印刷あるいは +% 独立のタイトルページを作らないクラスばかりでしたので,従来の挙動は +% 何も変わらずに済みました。 +% % \begin{macrocode} \newenvironment{titlepage}{% -% \cleardoublepage +% \pltx@cleartooddpage %% 2017-02-24 \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else 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 d6354dd5326..41ba2361467 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty @@ -1,5 +1,5 @@ % luatexja-preset.sty -\ProvidesPackage{luatexja-preset}[2017/01/24 Japanese font presets] +\ProvidesPackage{luatexja-preset}[2017/03/21 Japanese font presets] \RequirePackage{expl3,l3keys2e} \RequirePackage{luatexja} @@ -11,7 +11,7 @@ \fp_gset:Nn \l_ltjpreset_scale_fp {\zw / 10} \group_end: -\keys_define:nn { luatexja-preset }{ +\keys_define:nn { luatexja-preset }{ unknown .code:n = \PassOptionsToPackage { \l_keys_key_tl } { luatexja-fontspec }, scale .fp_gset:N = \l_ltjpreset_scale_fp, match .code: n = @@ -43,11 +43,12 @@ \ltjpreset_declare_bool_option:nn { deluxe }{ nodeluxe } % JFM -\cs_set:Npn \ltjpreset_use_jfm: {ujis} % 使用する JFM -%%% \ltjpreset_declare_option:nn{min}{\cs_set:Npn \ltjpreset_use_jfm: {min}} % min -%%% ↑jfm-min.lua が横組み・縦組み専用仮名に追いついていないので使用禁止 -\ltjpreset_declare_option:nn{jis}{\cs_set:Npn \ltjpreset_use_jfm: {jis}} % jis -\ltjpreset_declare_option:nn{ujis}{\cs_set:Npn \ltjpreset_use_jfm: {ujis}} % ujis +\tl_new:N \ltjpreset_use_jfm_yoko_tl % 使用する JFM(横) +\tl_set:Nn \ltjpreset_use_jfm_yoko_tl {ujis} +\tl_new:N \ltjpreset_use_jfm_tate_tl % 使用する JFM(縦) +\tl_set:Nn \ltjpreset_use_jfm_tate_tl {ujisv} +\ltjpreset_declare_option:nn{jis}{\tl_set:Nn \ltjpreset_use_jfm_yoko_tl {jis}} % jis +\ltjpreset_declare_option:nn{ujis}{\tl_set:Nn \ltjpreset_use_jfm_yoko_tl {ujis}} % ujis % 漢字字形 \tl_new:N \l_ltjpreset_kanji_shape_tl @@ -83,7 +84,9 @@ % カスタム指定 \keys_define:nn { luatexja-preset }{ custom .code:n = \ltjpreset_set_multi:n { #1 }, - custom .value_required:n = true + custom .value_required:n = true, + jfm_yoko .tl_set:N = \ltjpreset_use_jfm_yoko_tl, + jfm_tate .tl_set:N = \ltjpreset_use_jfm_tate_tl, } % 小塚 (Adobe) @@ -127,24 +130,24 @@ % ヒラギノ (OSX) \ltjpreset_declare_option:nn{hiragino-pro}{ \ltjpreset_set_multi:n { - HiraMinPro-W3 , - HiraMinPro-W6 , + HiraMinPro-W3 , + HiraMinPro-W6 , HiraKakuPro-W3 , % gt/m (multi) - HiraKakuPro-W6 , + HiraKakuPro-W6 , HiraKakuPro-W6 , % gt/m (uni) - HiraKakuStd-W8 , - HiraMaruPro-W4 , + HiraKakuStd-W8 , + HiraMaruPro-W4 , } } \ltjpreset_declare_option:nn{hiragino-pron}{ \ltjpreset_set_multi:n { - HiraMinProN-W3 , - HiraMinProN-W6 , + HiraMinProN-W3 , + HiraMinProN-W6 , HiraKakuProN-W3 , % gt/m (multi) - HiraKakuProN-W6 , + HiraKakuProN-W6 , HiraKakuProN-W6 , % gt/m (uni) - HiraKakuStdN-W8 , - HiraMaruProN-W4 , + HiraKakuStdN-W8 , + HiraMaruProN-W4 , } } @@ -278,13 +281,13 @@ \clist_if_in:NnT \l_ltjpreset_font_list { HiraMinProN-W3 } { \bool_set_true:N \l_ltjpreset_shape_nlck_bool } \clist_if_in:NnT \l_ltjpreset_font_list { Moga90Mincho } - { - \tl_remove_all:Nn \l_ltjpreset_font_list {90} + { + \tl_remove_all:Nn \l_ltjpreset_font_list {90} \tl_clear:N \l_ltjpreset_kanji_shape_tl } \clist_if_in:NnT \l_ltjpreset_font_list { MogaEx90Mincho } - { - \tl_remove_all:Nn \l_ltjpreset_font_list {90} + { + \tl_remove_all:Nn \l_ltjpreset_font_list {90} \tl_clear:N \l_ltjpreset_kanji_shape_tl } }{ @@ -327,7 +330,7 @@ %% HG 系フォント + JIS2004/90JIS のときはフォント名を置換 \bool_if:NT \l_ltjpreset_office_bool { \tl_set:Nn \l_tmpa_tl {, CJKShape=JIS2004 } - \tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { + \tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { \cs_set:Nx \ltjpreset_font_mc_bx: { hgrme04.ttc } \cs_set:Nx \ltjpreset_font_gt_bx: { hgrge04.ttc } \cs_set:Nx \ltjpreset_font_gt_eb: { hgrsgu04.ttc } @@ -336,7 +339,7 @@ % HG ゴシックM のときはそうはいかないので 1 ウェイト時のゴシック体を使う } \tl_set:Nn \l_tmpa_tl {, CJKShape=JIS1990 } - \tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { + \tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { \cs_set:Nx \ltjpreset_font_mc_bx: { hgrme.ttc } \cs_set:Nx \ltjpreset_font_gt_bx: { hgrge.ttc } \cs_set:Nx \ltjpreset_font_gt_eb: { hgrsgu.ttc } @@ -352,14 +355,14 @@ } \tl_set:Nn \l_tmpa_tl {, CJKShape=JIS2004 } \tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { - \bool_if:NTF \l_ltjpreset_shape_nlck_bool + \bool_if:NTF \l_ltjpreset_shape_nlck_bool { \tl_set:Nn \l_ltjpreset_kanji_shape_tl { +nlck } } { \tl_set:Nn \l_ltjpreset_kanji_shape_tl { +jp04 } } } } { \tl_set:Nn \l_tmpa_tl {, CJKShape=JIS2004 } \tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { - \bool_if:NT \l_ltjpreset_shape_nlck_bool + \bool_if:NT \l_ltjpreset_shape_nlck_bool { \tl_set:Nn \l_ltjpreset_kanji_shape_tl { , CJKShape=NLC } } } } @@ -373,25 +376,25 @@ \msg_warning:nn { luatexja-preset }{ scale } \cs_new:Nn \ltj_preset_define_family:nnn { - \DeclareFontShape{JY3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] + \DeclareFontShape{JY3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] {\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3" - : jfm=\ltjpreset_use_jfm: ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl + : jfm=\tl_use:N \ltjpreset_use_jfm_yoko_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ; script=latn \bool_if:NT \l_ltjpreset_expert_bool { ;+hkna }} } {} - \DeclareFontShape{JT3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] + \DeclareFontShape{JT3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] {\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3" - : jfm=ujisv ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl; + : jfm=\tl_use:N \ltjpreset_use_jfm_tate_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl; ; script=latn \bool_if:NT \l_ltjpreset_expert_bool { ;+vkna }} } {} - \bool_if:NT \l_ltjpreset_expert_bool { - \DeclareFontShape{JY3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] + \bool_if:NT \l_ltjpreset_expert_bool { + \DeclareFontShape{JY3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] {\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3" - : jfm=\ltjpreset_use_jfm: ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby + : jfm=\tl_use:N \ltjpreset_use_jfm_yoko_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby ; script=kana} } {} - \DeclareFontShape{JT3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] + \DeclareFontShape{JT3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] {\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3" - : jfm=ujisv ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby + : jfm=\tl_use:N \ltjpreset_use_jfm_tate_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby ; script=kana} } {} } @@ -414,9 +417,9 @@ \cs_set_eq:NN \ltjpreset_font_mc_bx: \ltjpreset_font_gt_m: } -\ltj_preset_define_family:nnn {ltjpm} {m} {\ltjpreset_font_mc_m:} +\ltj_preset_define_family:nnn {ltjpm} {m} {\ltjpreset_font_mc_m:} \ltj_preset_define_family:nnn {ltjpm} {bx} {\ltjpreset_font_mc_bx:} -\ltj_preset_define_family:nnn {ltjpg} {m} {\ltjpreset_font_gt_m:} +\ltj_preset_define_family:nnn {ltjpg} {m} {\ltjpreset_font_gt_m:} \ltj_preset_define_family:nnn {ltjpg} {bx} {\ltjpreset_font_gt_bx:} \def\mcdefault{ltjpm}\def\gtdefault{ltjpg} @@ -426,13 +429,13 @@ \SetSymbolFont{mincho}{bold}{JY3}{ltjpm}{bx}{n} \DeclareMathAlphabet{\mathgt}{JY3}{ltjpg}{m}{n} -\bool_if:NT \l_ltjpreset_expert_bool { +\bool_if:NT \l_ltjpreset_expert_bool { \DeclareRobustCommand\rubyfamily { \kanjishape{rb}\selectfont } } \bool_if:NTF \l_ltjpreset_deluxe_bool { \DeclareKanjiFamily{JY3}{ltjpmg}{}\DeclareKanjiFamily{JT3}{ltjpmg}{} - \ltj_preset_define_family:nnn {ltjpmg} {m} {\ltjpreset_font_mg:} + \ltj_preset_define_family:nnn {ltjpmg} {m} {\ltjpreset_font_mg:} \ltj_preset_define_family:nnn {ltjpg} {eb} {\ltjpreset_font_gt_eb:} \def\ebdefault{eb} \DeclareRobustCommand\ebseries { \not@math@alphabet\ebseries\relaxfontseries\ebdefault\selectfont } @@ -458,16 +461,17 @@ \tl_set:Nx \l_ltjpreset_add_features_tl { \tl_use:N \l_ltjpreset_kanji_shape_tl, - YokoFeatures = { JFM = \ltjpreset_use_jfm: }, + YokoFeatures = { JFM = \tl_use:N \ltjpreset_use_jfm_yoko_tl }, + TateFeatures = { JFM = \tl_use:N \ltjpreset_use_jfm_tate_tl }, } \bool_if:NT \l_ltjpreset_expert_bool { - \cs_set:Npn \rubyfamily { \addjfontfeatures { + \cs_set:Npn \rubyfamily { \addjfontfeatures { Style=Ruby , YokoFeatures={RawFeature=-hkna} , TateFeatures={RawFeature=-vkna} } } - \tl_put_left:Nn \l_ltjpreset_add_features_tl { - YokoFeatures = {Style = HorizontalKana}, - TateFeatures = {Style = VerticalKana}, + \tl_put_left:Nn \l_ltjpreset_add_features_tl { + YokoFeatures = {Style = HorizontalKana}, + TateFeatures = {Style = VerticalKana}, } } @@ -477,7 +481,7 @@ \newjfontfamily \mgfamily [ BoldFont = \ltjpreset_font_mg:, \bool_if:NT \l_ltjpreset_noembed_bool { NoEmbed, } - \tl_use:N \l_ltjpreset_add_features_tl + \tl_use:N \l_ltjpreset_add_features_tl ] { \ltjpreset_font_mg: } \DeclareTextFontCommand{\textmg}{\mgfamily} %% gt/eb @@ -486,7 +490,7 @@ \newjfontfamily \gtebfamily [ BoldFont = \ltjpreset_font_gt_eb:, \bool_if:NT \l_ltjpreset_noembed_bool { NoEmbed, } - \tl_use:N \l_ltjpreset_add_features_tl + \tl_use:N \l_ltjpreset_add_features_tl ] { \ltjpreset_font_gt_eb: } \DeclareTextFontCommand{\textgteb}{\gtebfamily} \bool_if:NT \l_ltjpreset_bold_bool { @@ -507,15 +511,15 @@ \addjfontfeature{ Kerning=Off } -\setmainjfont [ +\setmainjfont [ BoldFont = \ltjpreset_font_mc_bx: - \bool_if:NT \l_ltjpreset_noembed_bool { , NoEmbed }, - \tl_use:N \l_ltjpreset_add_features_tl + \bool_if:NT \l_ltjpreset_noembed_bool { , NoEmbed }, + \tl_use:N \l_ltjpreset_add_features_tl ] { \ltjpreset_font_mc_m: } -\setsansjfont [ - BoldFont = \ltjpreset_font_gt_bx: - \bool_if:NT \l_ltjpreset_noembed_bool { , NoEmbed }, - \tl_use:N \l_ltjpreset_add_features_tl +\setsansjfont [ + BoldFont = \ltjpreset_font_gt_bx: + \bool_if:NT \l_ltjpreset_noembed_bool { , NoEmbed }, + \tl_use:N \l_ltjpreset_add_features_tl ] { \ltjpreset_font_gt_m: } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty b/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty index 7a445f5d7d5..2e48f319973 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjext}[2016/12/16 v1.2c-ltj-5 Macros for vertical writing] +\ProvidesPackage{lltjext}[2017/03/28 v1.2f-ltj-5 Macros for vertical writing] \RequirePackage{luatexja} {\catcode`\*=11 @@ -41,7 +41,7 @@ \fi \else \if #1y\relax - \let\box@dir\yoko\@tempcnta=\strutbox + \let\box@dir\yoko\@tempcnta=\ystrutbox \else\if #1t\relax \let\box@dir\tate\@tempcnta=\tstrutbox \else\if #1d\relax @@ -54,7 +54,7 @@ \ifcase\count@ \or \let\box@dir\dtou\@tempcnta=\dstrutbox% dtou \or\or\let\box@dir\tate\@tempcnta=\tstrutbox% tate - \or \let\box@dir\yoko\@tempcnta=\strutbox% yoko + \or \let\box@dir\yoko\@tempcnta=\ystrutbox% yoko \else \let\box@dir\utod\@tempcnta=\zstrutbox% utod \fi \fi @@ -73,6 +73,41 @@ \def\endarray{\crcr\egroup\egroup\@end@alignbox} \def\endtabular{\endarray$\egroup} \expandafter \let \csname endtabular*\endcsname = \endtabular +% コミュニティ版では、アスキー版で不自然だった表組(array環境およびtabular環境)と +% 周囲の本文との揃え位置を修正し、以下のように設計しました。 +% \begin{itemize} +% \item 周囲の組方向が横組かつ組方向が||, ||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき、\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき、\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \end{itemize} +% \item 周囲の組方向が横組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき、\\表組の上端が周囲の和文ベースラインと一致 +% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき、\\表組の下端が周囲の和文ベースラインと一致 +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき、\\表組の上端が周囲の和文ベースラインと一致 +% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき、\\表組の下端が周囲の和文ベースラインと一致 +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき、\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき、\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% [TODO] 未定! +%^^A \begin{itemize} +%^^A \item |[t]|指定のとき、\\表組の上端が周囲の和文ベースラインと一致 +%^^A \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +%^^A \item |[b]|指定のとき、\\表組の下端が周囲の和文ベースラインと一致 +%^^A \end{itemize} +% \end{itemize} \def\fork@array@option<#1>[#2]{% \ifnum\ltjgetparameter{direction}=4 % yoko \ifx\box@dir\yoko @@ -89,7 +124,7 @@ \else \if #2t\relax \def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}% - \def\@end@alignbox{\egroup}% + \let\@end@alignbox\egroup% \else\if #2b\relax \let\@begin@alignbox\vbox \let\@end@alignbox\relax @@ -262,7 +297,7 @@ \csname \@captype @layoutcaption\endcsname \fi \@tempswafalse - % tempswa\hline 基本組の組方向とキャプションの組方向が直交するか? + % \@tempswa: 基本組の組方向とキャプションの組方向が直交するか? \if y\caption@dir \let\captiondir\yoko \ifodd\ltjgetparameter{direction}\relax\@tempswatrue\fi \else\if z\caption@dir \let\captiondir\relax @@ -358,7 +393,7 @@ \color@endgroup \egroup \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}\egroup} -\def\parbox{\@ifnextchar<%> +\DeclareRobustCommand\parbox{\@ifnextchar<%> {\X@parbox}{\X@parbox}} \def\X@parbox<#1>{\@ifnextchar[%] {\@iparbox<#1>}{\@iiiparbox<#1>{c}\relax[s]}} @@ -367,19 +402,19 @@ \def\@iiparbox<#1>#2[#3]{\@ifnextchar[%]% {\@iiiparbox<#1>{#2}{#3}}{\@iiiparbox<#1>{#2}{#3}[#2]}} \long\def\@iiiparbox<#1>#2#3[#4]#5#6{% - \leavevmode\bgroup + \leavevmode \setlength\@tempdima{#5}% \fork@parbox@option<#1>[#2]% \@begin@tempboxa\vbox{\box@dir \hsize\@tempdima\@parboxrestore\adjustbaseline#6\@@par}% - \ifx\relax#3\relax\else + \ifx\relax#3\else \setlength\@tempdimb{#3}% \edef\@parboxto{to\the\@tempdimb}% \fi \@begin@parbox\@parboxto{\box@dir\adjustbaseline \let\hss\vss\let\unhbox\unvbox \csname bm@#4\endcsname}\@end@parbox - \@end@tempboxa\egroup} + \@end@tempboxa} \def\fork@parbox@option<#1>[#2]{% \let\box@dir\relax \if #1z\relax @@ -411,8 +446,12 @@ \let\@begin@parbox\vbox \let\@end@parbox\relax \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \else \if #2t\relax @@ -422,8 +461,12 @@ \let\@begin@parbox\vbox \let\@end@parbox\relax \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \fi \else\ifnum\ltjgetparameter{direction}=1 % dtou @@ -435,8 +478,12 @@ \let\@begin@parbox\vbox \let\@end@parbox\relax \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \else\ifx\box@dir\dtou \if #2t\relax @@ -446,8 +493,12 @@ \let\@begin@parbox\vbox \let\@end@parbox\relax \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \else % 180 度回転→vtop, vbox を入れ替える \if #2t\relax @@ -457,8 +508,12 @@ \let\@begin@parbox\vtop %%% !!! \let\@end@parbox\relax \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \fi\fi \else % tate, utod @@ -470,8 +525,12 @@ \def\@begin@parbox{\vbox\bgroup\vbox}% \def\@end@parbox{\kern\z@\egroup}% \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \else\ifx\box@dir\dtou % 180 度回転→vtop, vbox を入れ替える \if #2t\relax @@ -481,8 +540,12 @@ \let\@begin@parbox\vtop %%% !!! \let\@end@parbox\relax \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \else \if #2t\relax @@ -492,8 +555,12 @@ \let\@begin@parbox\vbox \let\@end@parbox\relax \else - \def\@begin@parbox{$\vcenter}% - \def\@end@parbox{\m@th$}% + \ifmmode + \let\@begin@parbox\vcenter\let\@end@parbox\relax + \else + \def\@begin@parbox{\null$\vcenter}% + \def\@end@parbox{\m@th$\null}% + \fi \fi\fi \fi\fi \fi\fi% @@ -714,7 +781,7 @@ \fi \else \if ##1y\relax - \let\box@dir\yoko\@tempcnta=\strutbox + \let\box@dir\yoko\@tempcnta=\ystrutbox \else\if ##1t\relax \let\box@dir\tate\@tempcnta=\tstrutbox \else\if ##1d\relax @@ -725,9 +792,9 @@ \fi \ifx\box@dir\relax \ifcase\count@ - \or \let\box@dir\dtou\@tempcnta=\tabskip \z@\tabskip \z@\dstrutbox% dtou + \or \let\box@dir\dtou\@tempcnta=\dstrutbox% dtou \or\or\let\box@dir\tate\@tempcnta=\tstrutbox% tate - \or \let\box@dir\yoko\@tempcnta=\strutbox% yoko + \or \let\box@dir\yoko\@tempcnta=\ystrutbox% yoko \else \let\box@dir\utod\@tempcnta=\zstrutbox% utod \fi \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty index 1a3c54a0553..c66c208a036 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty @@ -12,7 +12,15 @@ \def\luatexjalatexLoaded{\endinput} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ltj-latex}[2017/01/28 LaTeX support of LuaTeX-ja] +\ProvidesPackage{ltj-latex}[2017/03/12 LaTeX support of LuaTeX-ja] + +% LaTeX2e 2017/05/01 で行われる対策 +\ifx\document@default@language \@undefined + \let\document@default@language\m@ne +\fi +\ifx\l@nohyphenation \@undefined + \newlanguage\l@nohyphenation +\fi % cleanup at end of the document %\let\ltj@@orig@end=\@@end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua index abb50ece53b..e85e5f79d53 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua @@ -64,6 +64,7 @@ local ltjd_make_dir_whatsit = ltjd.make_dir_whatsit local is_math_letters = {} local list_dir +-- vcenter noad は軸に揃えるため,欧文ベースライン補正がかかる local function conv_vcenter(sb) local h = getfield(sb, 'head');local hd = getlist(h) if getid(hd)==id_whatsit and @@ -71,10 +72,9 @@ local function conv_vcenter(sb) local d = node_next(hd) if getid(d)==id_vlist and has_attr(d, attr_dir)>=dir_node_auto then node_free(hd); setfield(h, 'head', nil); node_free(h) - setfield(sb, 'head', d); h = d + setfield(sb, 'head', d); set_attr(d, attr_icflag, 0) end end - set_attr(h, attr_icflag, PROCESSED) return sb end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls index 3e1f0d53350..5e6744c4d38 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjarticle} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -88,8 +88,8 @@ \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo index 5e8258bc0ab..8f28fec28a7 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjbk10.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xpt{15}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo index adb5c1a7876..a3398b6f882 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjbk11.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xipt{15.5}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo index 73424e5faf7..4f2185cb459 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjbk12.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xiipt{16.5}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls index 52c5b2ca9f9..9d162aa0a70 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjbook} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -91,8 +91,8 @@ \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse @@ -447,12 +447,10 @@ \newcommand{\@chapapp}{\prechaptername} \newcommand{\@chappos}{\postchaptername} \newcommand{\frontmatter}{% - \if@openleft \cleardoublepage \else - \if@openright \cleardoublepage \else \clearpage \fi \fi + \pltx@cleartooddpage \@mainmatterfalse\pagenumbering{roman}} \newcommand{\mainmatter}{% - \if@openleft \cleardoublepage \else - \if@openright \cleardoublepage \else \clearpage \fi \fi + \pltx@cleartooddpage \@mainmattertrue\pagenumbering{arabic}} \newcommand{\backmatter}{% \if@openleft \cleardoublepage \else diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls index f2ec93da18b..ccd3155ebe8 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjreport} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -90,8 +90,8 @@ \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls index bf867d9bdc9..6238240d23e 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} - [2017/02/19 ltjsclasses ] + [2017/03/06 ltjsclasses ] \def\jsc@clsname{ltjsarticle} \RequirePackage{luatexja} \newif\if@restonecol @@ -578,6 +578,26 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \setlength\@dblfptop{0\jsc@mpt \@plus 1fil} \setlength\@dblfpsep{8\jsc@mpt \@plus 2fil} \setlength\@dblfpbot{0\jsc@mpt \@plus 1fil} +\def\pltx@cleartorightpage{\clearpage\if@twoside + \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoleftpage{\clearpage\if@twoside + \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartooddpage{\clearpage\if@twoside + \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoevenpage{\clearpage\if@twoside + \ifodd\c@page + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} \def\ps@plainfoot{% \let\@mkboth\@gobbletwo \let\@oddhead\@empty @@ -1105,7 +1125,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls index e48ebfa2637..35222362cf2 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls @@ -38,12 +38,13 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjsbook} - [2017/02/19 ltjsclasses ] + [2017/03/06 ltjsclasses ] \def\jsc@clsname{ltjsbook} \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage \newif\if@openright +\newif\if@openleft \newif\if@mainmatter \@mainmattertrue \newif\if@enablejfam \@enablejfamtrue \DeclareOption{a3paper}{% @@ -164,8 +165,9 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{titlepage}{\@titlepagetrue} \DeclareOption{notitlepage}{\@titlepagefalse} -\DeclareOption{openright}{\@openrighttrue} -\DeclareOption{openany}{\@openrightfalse} +\DeclareOption{openright}{\@openrighttrue\@openleftfalse} +\DeclareOption{openleft}{\@openlefttrue\@openrightfalse} +\DeclareOption{openany}{\@openrightfalse\@openleftfalse} \def\eqnarray{% \stepcounter{equation}% \def\@currentlabel{\p@equation\theequation}% @@ -592,6 +594,31 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \setlength\@dblfptop{0\jsc@mpt \@plus 1fil} \setlength\@dblfpsep{8\jsc@mpt \@plus 2fil} \setlength\@dblfpbot{0\jsc@mpt \@plus 1fil} +\def\pltx@cleartorightpage{\clearpage\if@twoside + \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoleftpage{\clearpage\if@twoside + \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartooddpage{\clearpage\if@twoside + \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoevenpage{\clearpage\if@twoside + \ifodd\c@page + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\if@openleft + \let\cleardoublepage\pltx@cleartoleftpage +\else\if@openright + \let\cleardoublepage\pltx@cleartorightpage +\fi\fi \def\ps@plainfoot{% \let\@mkboth\@gobbletwo \let\@oddhead\@empty @@ -876,30 +903,30 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \newcommand{\@chapapp}{\prechaptername} \newcommand{\@chappos}{\postchaptername} \newcommand\frontmatter{% - \if@openright - \cleardoublepage - \else - \clearpage - \fi + \pltx@cleartooddpage \@mainmatterfalse \pagenumbering{roman}} \newcommand\mainmatter{% - \cleardoublepage + \pltx@cleartooddpage \@mainmattertrue \pagenumbering{arabic}} \newcommand\backmatter{% - \if@openright + \if@openleft +\cleardoublepage + \else\if@openright \cleardoublepage \else \clearpage - \fi + \fi\fi \@mainmatterfalse} \newcommand\part{% - \if@openright + \if@openleft +\cleardoublepage + \else\if@openright \cleardoublepage \else \clearpage - \fi + \fi\fi \thispagestyle{empty}% 欧文用標準スタイルでは plain \if@twocolumn \onecolumn @@ -935,17 +962,18 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \@endpart} \def\@endpart{\vfil\newpage \if@twoside - \if@openright %% added (2016/12/13) - \null - \thispagestyle{empty}% - \newpage - \fi %% added (2016/12/13) + \if@openleft %% added (2017/02/24) + \null\thispagestyle{empty}\newpage + \else\if@openright %% added (2016/12/13) + \null\thispagestyle{empty}\newpage + \fi\fi %% added (2016/12/13, 2017/02/24) \fi \if@restonecol \twocolumn \fi} \newcommand{\chapter}{% - \if@openright\cleardoublepage\else\clearpage\fi + \if@openleft\cleardoublepage\else + \if@openright\cleardoublepage\else\clearpage\fi\fi \plainifnotempty % 元: \thispagestyle{plain} \global\@topnum\z@ \if@english \@afterindentfalse \else \@afterindenttrue \fi @@ -1159,14 +1187,14 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \def\@opargbegintheorem#1#2#3{\trivlist\labelsep=1\zw \item[\hskip \labelsep{\headfont #1\ #2(#3)}]} \newenvironment{titlepage}{% - \cleardoublepage + \pltx@cleartooddpage %% 2017-02-24 \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo index dc09458301a..fdaf668bf26 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjsize10.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xpt{15}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo index 71ba0bd9513..f029a1b081a 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjsize11.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xipt{15.5}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo index 08febe4afec..2e4c45892bb 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjsize12.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xiipt{16.5}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls index 4063966c3fa..a05f882104d 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} - [2017/02/19 ltjsclasses ] + [2017/03/06 ltjsclasses ] \def\jsc@clsname{ltjskiyou} \RequirePackage{luatexja} \newif\if@restonecol @@ -1087,7 +1087,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls index 42e05eafe43..37a1c4dfd11 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} - [2017/02/19 ltjsclasses ] + [2017/03/06 ltjsclasses ] \def\jsc@clsname{ltjspf} \RequirePackage{luatexja} \newif\if@restonecol @@ -974,7 +974,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls index 2e96771707e..1ab34dd5d6c 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls @@ -38,12 +38,13 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjsreport} - [2017/02/19 ltjsclasses ] + [2017/03/06 ltjsclasses ] \def\jsc@clsname{ltjsreport} \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage \newif\if@openright +\newif\if@openleft \newif\if@enablejfam \@enablejfamtrue \DeclareOption{a3paper}{% \setlength\paperheight {420mm}% @@ -163,8 +164,9 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{titlepage}{\@titlepagetrue} \DeclareOption{notitlepage}{\@titlepagefalse} -\DeclareOption{openright}{\@openrighttrue} -\DeclareOption{openany}{\@openrightfalse} +\DeclareOption{openright}{\@openrighttrue\@openleftfalse} +\DeclareOption{openleft}{\@openlefttrue\@openrightfalse} +\DeclareOption{openany}{\@openrightfalse\@openleftfalse} \def\eqnarray{% \stepcounter{equation}% \def\@currentlabel{\p@equation\theequation}% @@ -566,6 +568,31 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \setlength\@dblfptop{0\jsc@mpt \@plus 1fil} \setlength\@dblfpsep{8\jsc@mpt \@plus 2fil} \setlength\@dblfpbot{0\jsc@mpt \@plus 1fil} +\def\pltx@cleartorightpage{\clearpage\if@twoside + \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoleftpage{\clearpage\if@twoside + \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartooddpage{\clearpage\if@twoside + \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoevenpage{\clearpage\if@twoside + \ifodd\c@page + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\if@openleft + \let\cleardoublepage\pltx@cleartoleftpage +\else\if@openright + \let\cleardoublepage\pltx@cleartorightpage +\fi\fi \def\ps@plainfoot{% \let\@mkboth\@gobbletwo \let\@oddhead\@empty @@ -849,11 +876,13 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \newcommand{\@chapapp}{\prechaptername} \newcommand{\@chappos}{\postchaptername} \newcommand\part{% - \if@openright + \if@openleft +\cleardoublepage + \else\if@openright \cleardoublepage \else \clearpage - \fi + \fi\fi \thispagestyle{empty}% 欧文用標準スタイルでは plain \if@twocolumn \onecolumn @@ -889,17 +918,18 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \@endpart} \def\@endpart{\vfil\newpage \if@twoside - \if@openright %% added (2016/12/13) - \null - \thispagestyle{empty}% - \newpage - \fi %% added (2016/12/13) + \if@openleft %% added (2017/02/24) + \null\thispagestyle{empty}\newpage + \else\if@openright %% added (2016/12/13) + \null\thispagestyle{empty}\newpage + \fi\fi %% added (2016/12/13, 2017/02/24) \fi \if@restonecol \twocolumn \fi} \newcommand{\chapter}{% - \if@openright\cleardoublepage\else\clearpage\fi + \if@openleft\cleardoublepage\else + \if@openright\cleardoublepage\else\clearpage\fi\fi \plainifnotempty % 元: \thispagestyle{plain} \global\@topnum\z@ \if@english \@afterindentfalse \else \@afterindenttrue \fi @@ -1157,7 +1187,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}% \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls index 9fcf3df716e..2d1fe3159f3 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjtarticle} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -88,8 +88,8 @@ \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo index 89ed288cd45..f49f8ee78c8 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjtbk10.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xpt{17}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo index 8d72f842018..429d43b38f4 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjtbk11.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xipt{17}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo index 9543641fbe6..e13784b1f99 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjtbk12.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xiipt{18}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls index 7ae6e197202..390f9fef63f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjtbook} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -91,8 +91,8 @@ \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse @@ -462,12 +462,10 @@ \newcommand{\@chapapp}{\prechaptername} \newcommand{\@chappos}{\postchaptername} \newcommand{\frontmatter}{% - \if@openleft \cleardoublepage \else - \if@openright \cleardoublepage \else \clearpage \fi \fi + \pltx@cleartooddpage \@mainmatterfalse\pagenumbering{roman}} \newcommand{\mainmatter}{% - \if@openleft \cleardoublepage \else - \if@openright \cleardoublepage \else \clearpage \fi \fi + \pltx@cleartooddpage \@mainmattertrue\pagenumbering{arabic}} \newcommand{\backmatter}{% \if@openleft \cleardoublepage \else diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls index 2aaab6cd1a3..9feffd39538 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjtreport} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -90,8 +90,8 @@ \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo index 41c2c73b550..353e8ef571d 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjtsize10.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xpt{17}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo index fd34a3176c7..7adf09fb5b6 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjtsize11.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xipt{17}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo index 0cbabf39348..d066298ca65 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo +++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo @@ -23,7 +23,7 @@ %% File: ltjclasses.dtx \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltjtsize12.clo} - [2017/02/20 v1.7d-ltj-14 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja file (size option)] \renewcommand{\normalsize}{% \@setfontsize\normalsize\@xiipt{18}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty index 9c49367fede..4b9a9c967db 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty @@ -1,10 +1,9 @@ % % lltjcore.sty: derived from plcore.dtx in pLaTeX. -% This file does not include the code relating to "tategaki". % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjcore}[2017/02/19 Patch to LaTeX2e Kernel for LuaTeX-ja] +\ProvidesPackage{lltjcore}[2017/03/12 Patch to LaTeX2e Kernel for LuaTeX-ja] \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page @@ -105,6 +104,7 @@ \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@ \fi \let \protect \noexpand + \language\document@default@language %LaTeX2e 2017/05/01 \@resetactivechars \global\let\@@if@newlist\if@newlist \global\@newlistfalse @@ -182,7 +182,7 @@ \@latex@warning{Reference `#3' on page \thepage \space undefined}% \else - \expandafter#2#1\relax% change \null to \relax + \expandafter#2#1\relax{}% change \null to \relax \fi} \endgroup \if@compatibility\else @@ -190,12 +190,13 @@ \bgroup \verb@eol@error \let\do\@makeother \dospecials \verbatim@font\@noligs + \language\l@nohyphenation \@ifstar\@sverb\@verb} \fi \gdef\@stopfield{\null\color@endgroup\egroup} \newcount\hour \newcount\minute -%%% etoolbox is loaded by everyhook +\RequirePackage{etoolbox} \ifltj@everyhook@avail \pretocmd{\footnote}{\inhibitglue}{}{} \pretocmd{\footnotemark}{\inhibitglue}{}{} diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty index 1fdef28c623..f55a93f0d52 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty @@ -3,9 +3,10 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjfont}[2016/04/01 Patch to NFSS2 for LuaTeX-ja] +\ProvidesPackage{lltjfont}[2017/04/01 Patch to NFSS2 for LuaTeX-ja] \def\ltj@chardef@text@cmd#1{% + \let\@ifdefinable\@@ifdefinable% \edef\ltj@chardef@text@cmd@name{\expandafter\@gobble\string#1}% \afterassignment\ltj@chardef@text@cmd@\ltj@tempcnta } @@ -23,7 +24,11 @@ } \ifdefined\UnicodeEncodingName + \let\ltj@temp@DeclareTextComposite=\DeclareTextComposite + \def\DeclareTextComposite#1#2#3#4{}% \input{tuenc.def} + \let\DeclareTextComposite=\ltj@temp@DeclareTextComposite + \expandafter\patchcmd\csname TU\string\textasteriskcentered\endcsname{\char}{\ltjalchar}{}{} \fi @@ -50,21 +55,33 @@ \ifdefined\cHT\else\newdimen\cHT\fi %\let\afont\font +\let\ystrutbox\strutbox \newbox\dstrutbox \newbox\tstrutbox \newbox\zstrutbox +\def\strutbox{% + \ifnum\ltjgetparameter{direction}=1 \dstrutbox % dtou + \else\ifnum\ltjgetparameter{direction}=4 \ystrutbox % yoko + \else\tstrutbox % tate and utod + \fi\fi +} \def\strut{\relax \ifnum\ltjgetparameter{direction}=1 % dtou \ifmmode\copy\dstrutbox\else\unhcopy\dstrutbox\fi \else\ifnum\ltjgetparameter{direction}=4 % yoko - \ifmmode\copy\strutbox\else\unhcopy\strutbox\fi + \ifmmode\copy\ystrutbox\else\unhcopy\ystrutbox\fi \else % tate and utod \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi \fi\fi } + +\def\ystrut{\relax\hbox{\yoko + \ifmmode\copy\ystrutbox\else\unhcopy\ystrutbox\fi}} \def\tstrut{\relax\hbox{\tate \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi}} -\def\zstrut{\relax\hbox{\tate +\def\dstrut{\relax\hbox{\dtou + \ifmmode\copy\dstrutbox\else\unhcopy\dstrutbox\fi}} +\def\zstrut{\relax\hbox{\utod \ifmmode\copy\zstrutbox\else\unhcopy\zstrutbox\fi}} {% @@ -374,7 +391,7 @@ \baselineskip\f@linespread\baselineskip \normalbaselineskip\baselineskip \adjustbaseline - \setbox\strutbox\hbox{\yoko + \setbox\ystrutbox\hbox{\yoko \vrule\@width\z@ \@height.7\baselineskip \@depth.3\baselineskip}% \setbox\dstrutbox\hbox{\dtou @@ -383,7 +400,7 @@ \setbox\tstrutbox\hbox{\tate \vrule\@width\z@ \@height.5\baselineskip \@depth.5\baselineskip}% - \setbox\zstrutbox\hbox{\tate + \setbox\zstrutbox\hbox{\utod \vrule\@width\z@ \@height.7\baselineskip \@depth.3\baselineskip}% \let\size@update\relax}} @@ -480,7 +497,7 @@ \csname D@\k@encoding\endcsname \let\kenc@update\relax \let\ck@encoding\k@encoding - \edef\tmp@enc{'\luatexluaescapestring{\k@encoding}'} + \edef\tmp@enc{'\luatexluaescapestring{\k@encoding}'}% \directlua{luatexja.jfont.is_kyenc(\tmp@enc)}\ifin@% \let\cy@encoding\k@encoding \else @@ -595,9 +612,6 @@ } \@onlypreamble\romanprocess@table \@onlypreamble\kanjiprocess@table -\DeclareTextCommandDefault{\textunderscore}{% - \leavevmode\kern.06em - \vbox{\hrule\@width.3em}} %%%%%% LuaTeX-ja specific -- cgit v1.2.3