summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-03-31 21:16:29 +0000
committerKarl Berry <karl@freefriends.org>2016-03-31 21:16:29 +0000
commit6ae83d3bdc0271cb972fd7e6c763c848e564635b (patch)
tree79f742e15cf1d655b4725e20bb753d4d344a20c9 /Master
parentd8dd2c6b804770d2b5c55edc1bfb2d5786e95386 (diff)
luatexja (31mar16)
git-svn-id: svn://tug.org/texlive/trunk@40198 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/README8
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdfbin767547 -> 825810 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdfbin453095 -> 454666 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdfbin828820 -> 830978 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx99
-rw-r--r--Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx478
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua12
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua22
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua43
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls324
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls328
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls329
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls298
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.lua1
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty44
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty15
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty1
20 files changed, 1019 insertions, 1001 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README
index 4909ab1c554..9e78efbeb53 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 20160208.0
+The LuaTeX-ja Package 20160331.0
--------------------------------
Copyright (c) 2011--2016 The LuaTeX-ja project
License: modified BSD (see COPYING)
@@ -34,9 +34,9 @@ Installation
2. If you must/want to install manually:
a. Download the source archive from CTAN,
- or tagged as 20160208.0 in the Git repository by
+ or tagged as 20160331.0 in the Git repository by
<http://git.osdn.jp/view?p=luatex-ja/luatexja.git
- ;a=snapshot;h=refs/tags/20160208.0;sf=tgz>
+ ;a=snapshot;h=refs/tags/20160331.0;sf=tgz>
b. Extract the archive and process following three files by LuaLaTeX
to generate classes for Japanese typesetting:
@@ -81,4 +81,4 @@ Notes
* src/*.{ins.dtx} and src/ltj-kinsoku_make.tex are not needed in regular use.
-Last commit date: Mon Feb 8 09:30:44 2016 +0900
+Last commit date: Thu Mar 31 14:06:40 2016 +0900
diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf
index f0b3b386f61..58341295fdc 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
index 365bc6442b2..b4146ee2545 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
index a39757ff287..05c381c509b 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
index 964cb60f682..2ee6bd90e38 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
+++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
@@ -453,7 +453,7 @@ Japanese characters in discretionary break (\cs{discretionary}) is not supported
%<*en>
\paragraph{Greek and Cyrillic letters, and ISO~8859-1 symbols}
By default, \LuaTeX-ja uses Japanese fonts to typeset Greek and Cyrillic letters,
- To change this behavior,
+ To change this behavior,
put \verb!\ltjsetparameter{jacharrange={-2,-3}}! in the preamble.
For the detailed description, see Subsection~\ref{ssec-setrange}.
@@ -816,7 +816,7 @@ bad argument #1 to 'open' (string expected, got nil)
If so, please execute a batch file which is written on
\href{https://osdn.jp/projects/luatex-ja/wiki/FrontPage%28en%29}{ the Project Wiki (English)}.
This batch file creates a temporary directory, copy CMaps in it,
-run a test file which loads \LuaTeX-ja in this directory,
+run a test file which loads \LuaTeX-ja in this directory,
and finally delete the temporary directory.
%</en>
%<*ja>
@@ -1058,6 +1058,12 @@ Okumura), namely, \Pkg{ltjclasses}\footnote{%
The latter \texttt{ltjt*.cls} are for vertically writtened Japanese documents.
} and \Pkg{ltjsclasses}\footnote{%
\texttt{ltjsarticle.cls},~\texttt{ltjsbook.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,
+so \Pkg{ltjsclasses} use different method%
+\footnote{Similar to \texttt{magstyle=xreal} in the \Pkg{BXjscls} classes (by Takayuki Yato).}
+to set the main document font size.
%</en>
%<*ja>
しかしながら,上記の設定は日本語の文書にとって十分とは言えない.
@@ -1072,6 +1078,12 @@ Okumura), namely, \Pkg{ltjclasses}\footnote{%
\Pkg{ltjsclasses}\footnote{%
\texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls},~\texttt{ltjskiyou.cls}.}%
がそれぞれ用意されている.
+
+元々の\Pkg{ltjsclasses}ではフォントサイズを指定するのに\cs{mag}プリミティブが使われていたが,
+\LuaTeX~beta-0.87.0以降ではPDF出力時の\cs{mag}のサポートが廃止された.
+そのため,\Pkg{ltjsclasses}では別の方法
+\footnote{八登崇之氏による\Pkg{BXjscls}クラスにおける\texttt{magstyle=xreal}指定時と類似している.}で
+フォントサイズを指定することにしている.
%</ja>
%<*ja>
@@ -1213,7 +1225,7 @@ auto select&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\
%<*en>
\item For defining a Japanese font family, use
\cs{DeclareKanjiFamily} instead of
- \cs{DeclareFontFamily}. (In previous version of \LuaTeX-ja,
+ \cs{DeclareFontFamily}. (In previous version of \LuaTeX-ja,
using \cs{DeclareFontFamily} didn't cause any problem. But this no longer applies
the current version.)
\item Defining a Japanese font shape can be done by usual \cs{DeclareFontShape}:
@@ -1300,7 +1312,7 @@ this chapter. For the method, please see Subsection~\ref{ssec-math}.
%<ja>\subsection{\Pkg{luatexja-fontspec}パッケージ}
\label{ssec-fontspec}
%<*en>
-To use the functionality of the \Pkg{fontspec} package to Japanese fonts,
+To use the functionality of the \Pkg{fontspec} package to Japanese fonts,
it is needed to load the \Pkg{luatexja-fontspec} package in the preamble, as follows:
\begin{quote}
\ttfamily \textbackslash usepackage[<options>]\{luatexja-fontspec\}
@@ -1459,7 +1471,7 @@ JIS~X~0208:1990→辻
%<*en>
One can load the \Pkg{luatexja-preset}
-package to use several ``presets'' of Japanese fonts.
+package to use several ``presets'' of Japanese fonts.
This package provides functions in a part of
\Pkg{japanese-otf} package and a part of \Pkg{PXchfon} package by Takayuki Yato.
@@ -1524,7 +1536,7 @@ With this option, selecting Japanese fonts won't be performed using the function
This option is ignored when \Pkg{luatexja-fontspec} package is loaded.
When this option is specified, \Pkg{fontspec}~and~\Pkg{luatexja-fontspec} are
-\emph{not} loaded by default. Nevertheless,
+\emph{not} loaded by default. Nevertheless,
the package\Pkg{fontspec} can coexist with the option, as the following:
\begin{lstlisting}
\usepackage{fontspec}
@@ -1563,7 +1575,7 @@ option is specifed.
このオプションが指定されると,「\pLaTeXe 新ドキュメントクラス」のように\
\cs{rmfamily}, \verb+\textrm{...}+, \cs{sffamily} 等が
欧文フォントだけでなく和文フォントも変更するようになる.
-\ \texttt{fontspec}\
+\ \texttt{fontspec}\
オプションが有効になっている場合は,このオプションは \Pkg{luatexja-fontspec} パッケージへと渡される.
%</ja>
@@ -1622,7 +1634,7 @@ characters designed for ruby.
\item[bold]
%<*en>
Substitute bold series of \textit{gothic} for bold series of \textit{mincho}.
-If \texttt{nodeluxe} option is enabled, medium series of \textit{gothic} is also changed,
+If \texttt{nodeluxe} option is enabled, medium series of \textit{gothic} is also changed,
since we use same font for both series of \textit{gothic}.
%</en>
%<*ja>
@@ -2227,7 +2239,7 @@ This range consists of the following Unicode ranges, \emph{except characters in
\item \texttt{U+0180}--\texttt{U+024F}: Latin Extended-B
\item \texttt{U+0250}--\texttt{U+02AF}: IPA Extensions
\item \texttt{U+02B0}--\texttt{U+02FF}: Spacing Modifier Letters
-%<en>\par\
+%<en>\par\
\item \texttt{U+0300}--\texttt{U+036F}: \\*\null\hfill Combining Diacritical Marks
\item \texttt{U+1E00}--\texttt{U+1EFF}: \\*\null\hfill Latin Extended Additional
%<ja>\par\
@@ -2366,7 +2378,7 @@ The block list is indicated in Table~\ref{table-rng7}.
%<*en>
\paragraph{Notes on \texttt{U+0080}--\texttt{U+00FF}}
-You should treat characters in \\texttt{U+0080}--\texttt{U+00FF} as \textbf{ALchar},
+You should treat characters in \\texttt{U+0080}--\texttt{U+00FF} as \textbf{ALchar},
when you use traditional 8-bit fonts, such as the \Pkg{textcomp} package or the
\Pkg{marvosym} package.
@@ -2375,7 +2387,7 @@ package is 182. This codepoint corresponds \P\ (\text{U+00B6}) in Unicode.
Similarly, \cs{Frowny} which is provided by the \Pkg{marvosym} package has
the same codepoint as \S\ (\text{U+00A7}).
Hence, as previous versions of \LuaTeX-ja, if these characters are treated as
-\text{JAchar}s, then \cs{textparagraph} produces ``ltjjachar`¶'' (in a Japanese font),
+\text{JAchar}s, then \cs{textparagraph} produces ``ltjjachar`¶'' (in a Japanese font),
and \cs{Frowny} produces ``\ltjjachar`§'' (in a Japanese font).
To avoid such situations, the default setting of \LuaTeX-ja is changed in this release
@@ -2900,7 +2912,7 @@ between \XeTeX\ and \LuaTeX, by the following reasons:
sets\cs{catcode} of several characters to 11, via setting \cs{XeTeXcharclass}.
However, this latter half does not exist (plain case), or not executed (\LaTeX~case) in \LuaTeX.
\end{itemize}
-In other words,
+In other words,
\begin{description}
\item[plain \LuaTeX]
Kanji nor kana characters cannot be used in
@@ -3919,7 +3931,7 @@ letter-spacing and the width of italic correction are not correct:
\paragraph{\texttt{ltjksp} 指定}
\label{pg:ltjksp}
\LuaTeX-ja標準では,
-JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
+JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
\texttt{kanjiskip\_shrink}キー(\pageref{pg:ksp_nat}ページ)の使用によって,
「JFM由来のグルーの他に,\Param{kanjiskip}の自然長/伸び量/縮み量の一部が
同じ場所に挿入される」という状況が起こりうる.
@@ -4627,7 +4639,7 @@ and is also easy to shrink.
kanjiskip\_stretch=<num>\textrm{, }kanjiskip\_shrink=<num>]\leavevmode
These keys specifies the amount of the natural width of \Param{kanjiskip}
-(the stretch/shrink part, respectively) which will be inserted
+(the stretch/shrink part, respectively) which will be inserted
in addition to the original JFM glue. Default values of them are all 0.
As an example, in \texttt{jfm-ujis.lua}, the standard JFM in horizontal writing, we have
@@ -4638,7 +4650,7 @@ a glue whose natural part and shrink part are both half-width, while its stretch
as much as the stretch part of \Param{kanjiskip} times the value of
\texttt{kanjiskip\_stretch} key (1 in this case).
\item Between an ideographic closeing brackets (the ideographic comma ``,''
- is included) and an ordinal letter, we have the same glue.
+ is included) and an ordinal letter, we have the same glue.
Again, this glue also can be stretched
as much as the stretch part of \Param{kanjiskip} times the value of
\texttt{kanjiskip\_stretch} key (1 in this case).
@@ -6162,7 +6174,7 @@ to match the vertical center of ``M'' and that of ``あ'' in vertical typesetti
where $h_{a}$~and~$d_{a}$ denote the height of ``$a$'' and the depth, respectively.
In \LuaTeX-ja, this \cs{adjustbaseline} does similar task, namely setting the
\Param{talbaselineshift} parameter.
-If the \LaTeX\ is 2015/10/01 release or later, \LuaTeX-ja use a Japanese
+If the \LaTeX\ is 2015/10/01 release or later, \LuaTeX-ja use a Japanese
character whose character class is zero, instead of `あ'.
%</en>
%<*ja>
@@ -6178,7 +6190,7 @@ character whose character class is zero, instead of `あ'.
理を行っている.
同時に,これも\pLaTeXe の \cs{adjustbaseline} で同様の処理が行われていたが,
-「漢」の寸法を元に(本節の最初に述べた,小文字で始まる)\cs{cht}, \cs{cwd}
+「漢」の寸法を元に(本節の最初に述べた,小文字で始まる)\cs{cht}, \cs{cwd}
といった長さ変数を設定する.
なお,\LaTeX が2015/10/01 版以降の場合は,「あ」「漢」の代わりに
@@ -6320,11 +6332,11 @@ We use an auxiliary list~$N_{\mathrm{J}}$.
\item If the \Pkg{luatexja-fontspec} package is loaded, we stop here, and <family> is not
recognized as a Japanese font family.
- If the \Pkg{luatexja-fontspec} package is \emph{not} loaded,
+ If the \Pkg{luatexja-fontspec} package is \emph{not} loaded,
now \LuaTeX-ja looks whether there exists a Japanese font encoding~<enc> such that
a font definition named \texttt{<enc><family>.fd} (the file name is
- all lowercase) exists. If so, <family> is recognized as a Japanese font family (the font definition file won't be loaded here).
- If not, <family> is not a Japanese font family, and
+ all lowercase) exists. If so, <family> is recognized as a Japanese font family (the font definition file won't be loaded here).
+ If not, <family> is not a Japanese font family, and
<family> is appended to the list~$N_{\mathrm{J}}$.
%</en>
%<*ja>
@@ -6344,7 +6356,7 @@ now \LuaTeX-ja looks whether there exists a Japanese font encoding~<enc> such th
%<*en>
\paragraph{Recognition as alphabetic font family}
Next, whether alphabetic font family will be changed is determined in following order.
-We use auxiliary lists $F_{\mathrm{A}}$~and~$N_{\mathrm{A}}$,
+We use auxiliary lists $F_{\mathrm{A}}$~and~$N_{\mathrm{A}}$,
%</en>
%<*ja>
\paragraph{欧文フォントファミリとしての認識}
@@ -6355,7 +6367,7 @@ We use auxiliary lists $F_{\mathrm{A}}$~and~$N_{\mathrm{A}}$,
\begin{enumerate}
%<*en>
-\item If the family~<family> has been listed in a list~$F_{\mathrm{A}}$,
+\item If the family~<family> has been listed in a list~$F_{\mathrm{A}}$,
<family> is recognized as an alphabetic font family.
%</en>
%<*ja>
@@ -6383,7 +6395,7 @@ We use auxiliary lists $F_{\mathrm{A}}$~and~$N_{\mathrm{A}}$,
\item Now \LuaTeX-ja looks whether there exists an alphabetic font encoding~<enc> such that
a font definition named \texttt{<enc><family>.fd} (the file name is
all lowercase) exists. If so, current alphabetic font family will be changed to
- <family>~(the font definition file won't be loaded here).
+ <family>~(the font definition file won't be loaded here).
If not, current alphabetic font family won't be changed, and
<family> is appended to the list~$N_{\mathrm{A}}$.
%</en>
@@ -6408,7 +6420,7 @@ the second argument (family) is appended to the list~$F_{\mathrm{A}}$.
%<*en>
The above order is very similar to \cs{fontfamily} in \pLaTeXe, but more complicated (clause~3.).
-This is because \pLaTeXe\ is a \emph{format} however \LuaTeX-ja is not,
+This is because \pLaTeXe\ is a \emph{format} however \LuaTeX-ja is not,
hence \LuaTeX-ja does not know calls of \cs{DeclareFontFamily} \emph{before} itself is
loaded.
%</en>
@@ -6525,7 +6537,7 @@ will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}.
%<*ja>
\pageref{pg:ltjksp}ページで説明した \verb+\jfont+ 中での \texttt{ltjksp} 指定と
同一の効力を持ち,
-JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
+JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
\texttt{kanjiskip\_shrink}キー(\pageref{pg:ksp_nat}ページ)の有効/無効を切り替える.
標準値は \texttt{true} である.
%</ja>
@@ -7403,6 +7415,18 @@ $i$は7より小さい自然数.
\end{description}
%<ja> \TeX 側から見える値,つまり \verb+\the\ltj@dir+ の値は常に0である.
+\cnt{ltjlineendcomment}
+%<*ja>
+ \LuaTeX-jaは\textbf{JAchar}で入力行が終了した場合,その直後にコメント文字を
+ おくことで余計な空白が挿入されることを防いでいる.
+ \cs{ltjlineendcomment}はその際のコメント文字のUnicodeにおける符号位置を指定する
+ (詳細は\ref{ssec:lineend}節を参照).
+
+ \LuaTeX-jaにおける既定値は$\texttt{"FFFFF}=1048575$であり,
+ ユーザは内部動作を熟知していない限りこのカウンタの値を変更してはならない.
+ \cs{ltjlineendcomment}の値がUnicodeの範囲外(負や,$\texttt{"10FFFF}=1114111$を超えた場合)
+ にくることは想定されていない.
+%</ja>
\end{list}
%<*en>
@@ -8009,6 +8033,7 @@ to State~$M$ (middle of line) sometimes.
%<en>\subsection{Behavior in \LuaTeX-ja}
%<ja>\subsection{\LuaTeX-jaの動作}
+ \label{ssec:lineend}
%<*en>
States in the input processor of \LuaTeX\ is the same as that of \TeX,
and they can't be customized by any callbacks. Hence, we can only use
@@ -8023,14 +8048,16 @@ space must be done \emph{just before} an input line is read.
Considering these situations, handling of an end-of-line in \LuaTeX-ja are as follows:
\begin{quote}
-A character \texttt{U+FFFFF} (its category code is set to 14~(\textit{comment}) by
-\LuaTeX-ja) is appended to an input line, \emph{before \LuaTeX\ actually
+A character whose character code is \cs{ltjlineendcomment}%
+\footnote{Its default value is \texttt{"FFFFF}, so \texttt{U+FFFFF} is used.
+The category code of \texttt{U+FFFFF} is set to 14~(\textit{comment}) by
+\LuaTeX-ja.} is appended to an input line, \emph{before \LuaTeX\ actually
process it}, if and only if the following three conditions are satisfied:
\begin{enumerate}
\item The category code of \cs{endlinechar}%
\footnote{Usually, it is $\langle$\textit{return}$\rangle$
(whose character code is 13).} is 5~(\textit{end-of-line}).
-\item The category code of \texttt{U+FFFFF} itself is 14~(\textit{comment}).
+\item The category code of \cs{ltjlineendcomment} itself is 14~(\textit{comment}).
\item The input line matches the following ``regular expression'':
\[
(\text{any char})^*(\textbf{JAchar})
@@ -8058,7 +8085,7 @@ there is a space before ``u''. This follows from following reasons:
\item When line~3 is processed by \texttt{process\_input\_buffer} callback,
``あ'' is considered as an \textbf{JAchar}.
Since line~3 ends with an \textbf{JAchar},
-the comment character \texttt{U+FFFFF} is appended to this line,
+the comment character (whose character code is \cs{ltjlineendcomment}) is appended to this line,
and hence the linebreak immediately after this line is ignored.
\item When line~4 is processed by \texttt{process\_input\_buffer} callback,
``い'' is considered as an \textbf{ALchar}.
@@ -8083,13 +8110,15 @@ emits a space.
\begin{quote}
各入力行に対し,\emph{その入力行が読まれる前の内部状態で}
-以下の3条件が満たされている場合,\LuaTeX-jaは\texttt{U+FFFFF}の文字
-\footnote{この文字はコメント文字として扱われるように\LuaTeX-ja内部で設定をしている.}
+以下の3条件が満たされている場合,\LuaTeX-jaは\cs{ltjlineendcomment}番の文字
+\footnote{\cs{ltjlineendcomment}の既定値は\texttt{"FFFFF}であるので,
+ 既定では\texttt{U+FFFFF}が使われることになる.この文字はコメント文字として扱われるように
+ \LuaTeX-ja内部で設定をしている.}%
を末尾に追加する.よって,その場合に改行は空白とは見做されないこととなる.
\begin{enumerate}
\item \cs{endlinechar}の文字\footnote{普通は,改行文字(文字コード13番)である.}
のカテゴリーコードが5~(\textit{end-of-line})である.
-\item \texttt{U+FFFFF}のカテゴリーコードが14~(\textit{comment})である.
+\item \cs{ltjlineendcomment}のカテゴリーコードが14~(\textit{comment})である.
\item 入力行は次の「正規表現」にマッチしている:
\[
(\text{any char})^*(\textbf{JAchar})
@@ -8119,7 +8148,7 @@ u
\begin{itemize}
\item 3行目を \texttt{process\_input\_buffer} で処理する時点では,
「あ」は\textbf{JAchar}(和文扱い)である.よって3行目は\textbf{JAchar}で終わることになり,
- コメント文字 \texttt{U+FFFFF} が追加される.
+ \cs{ltjlineendcomment}番のコメント文字が追加される.
よって,直後の改行文字は無視されることになり,空白は入らない.
\item 4行目を \texttt{process\_input\_buffer} で処理する時点では,
「い」は\textbf{ALchar}である.よって4行目は\textbf{ALchar}で終わることになり,
@@ -8892,7 +8921,7 @@ a patch \Pkg{jlisting.sty}~(\cite{jlisting}) resolves the problem forcibly.
%<*en>
In \LuaTeX-ja, the problem is resolved by using the \verb+process_input_buffer+ callback.
-The callback function inserts the output command (active character \texttt{U+FFFFF})
+The callback function inserts the output command (active character \cs{ltjlineendcomment})
before each letter above \texttt{U+0080}.
This method can omits the process to make all Japanese characters active
(most of the activated characters are not used in many cases).
@@ -8900,7 +8929,7 @@ This method can omits the process to make all Japanese characters active
%<*ja>
\LuaTeX-jaでは,\verb+process_input_buffer+ コールバックを利用することで,
「各行に出現する\texttt{U+0080}以降の文字に対して,それらの出力命令を前置する」
-という方法をとっている.出力命令としては,アクティブ文字化した \texttt{U+FFFFF} を用いている.
+という方法をとっている.出力命令としては,アクティブ文字化した\cs{ltjlineendcomment}を用いている.
これにより,(入力には使用されていないかもしれない)和文文字をもすべてアクティブ化する手間もなく,
見通しが良い実装になっている.
%</ja>
diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx
index 400d9db8b77..452d46f8c56 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{5202}
+% \CheckSum{5209}
%% \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,8 +50,9 @@
%<*driver>
\ProvidesFile{ltjsclasses.dtx}
%</driver>
- [2016/01/30 ]
+ [2016/03/31 ltjsclasses ]
%<*driver>
+\IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{}
\documentclass{ltjsarticle}
\usepackage{doc}
\usepackage{fontspec}
@@ -100,21 +101,11 @@
%
% |ltjclasses| と違うのは以下の点です。
%
-% \paragraph{サイズオプションの扱いが違う}
-%
-% |ltjclasses| では本文のポイント数を指定するオプションがあり
-% ましたが,ポイント数は10,11,12しかなく,それぞれ別のクラスオプション
-% ファイルを読み込むようになっていました。しかも,標準の10ポイント以外で
-% は多少フォントのバランスが崩れることがあり,あまり便利ではありませんで
-% した。ここでは文字サイズを増すとページを小さくし,\TeX の |\mag| プリ
-% ミティブで全体的に拡大するという手を使って,9ポイントや21,25,30,36,
-% 43ポイント,12Q,14Qの指定を可能にしています。
-%
% \subsection{\texttt{jsclasses.dtx}からの主な変更点}
% 全ての変更点を知りたい場合は,|jsclasses.dtx| と |ltjsclasses.dtx| で |diff| を
% とって下さい。zw, zh は全て |\zw|, |\zh| に置き換えられています。
% \begin{itemize}
-% \item フォントメトリック関係のオプション |winjis |は単に無視されます。
+% \item フォントメトリック関係のオプション |winjis| は単に無視されます。
% \item 標準では |jfm-ujis.lua|(Lua\TeX-ja標準のメトリック,OTFパッケージのものがベース)を使用します。
% \item |uplatex| オプションを削除してあります。
% \item |disablejfam| オプションが無効になっています。もし
@@ -129,16 +120,32 @@
% 削除しました。
% \item 「\texttt{amsmath}との衝突の回避」のコードは,上流で既に対処されているうえ,
% これがあると |grfext.sty| を読み込んだ際にエラーを引き起こすので削除しました。
+% \item 本家|jsclasses.dtx|では|\mag|を用いて「10pt時の組版結果を本文フォントサイズに合わせ拡大縮小」
+% という方針でしたが,本|ltjsclasses.dtx|ではそのような方法を取っていません。
+% \begin{itemize}
+% \item |real|オプション指定時には,単にレイアウトに用いる各種長さの値をスケールさせるだけです。
+% そのため,例えば本文の文字サイズが17ptのときにはcmr10でなくcmr17を用いることになり,組版結果の印象が
+% 異なる恐れがあります。
+% \item |xreal|オプション指定時には,上記に加えてオプティカルサイズを調整する(本文ではcmr17の代わりに
+% cmr10を拡大縮小する,など)ため,\LaTeX のフォント選択システムNFSSへパッチを当てます。
+% こうすることで前項に書いた不具合はなくなりますが,かえって別の不具合が起きる可能性はあります。
+% \end{itemize}
+% 標準では|xreal|オプションが有効になっています。オプション名は|bxjscls|パッケージの|magstyle|指定に倣いました。
% \end{itemize}
%
-% [2014-02-07 LTJ] jsclasses 2014-02-07 ベースにしました.
+% [2014-02-07 LTJ] jsclasses 2014-02-07 ベースにしました。
%
-% [2014-07-26 LTJ] 縦組用和文フォントの設定を加えました.
+% [2014-07-26 LTJ] 縦組用和文フォントの設定を加えました。
%
-% [2014-12-24 LTJ] |\@setfontsize| 中の和欧文間空白の設定で if 文が抜けていたのを直しました.
+% [2014-12-24 LTJ] |\@setfontsize| 中の和欧文間空白の設定で if 文が抜けていたのを直しました。
%
% [2016-01-30 LTJ] |\rmfamily| 他で和文フォントファミリも変更するコードを
-% Lua\TeX-ja カーネル内に移しました.
+% Lua\TeX-ja カーネル内に移しました。
+%
+% [2016-03-21 LTJ] Lua\TeX~beta-0.87.0 ではPDF出力時に|\mag|が使用できなくなったので,
+% ZRさんの|bxjscls|を参考に使わないように書き換えました。
+%
+% [2016-03-31 LTJ] |xreal|オプションを標準で有効にしました.
%
% \StopEventually{}
%
@@ -312,29 +319,45 @@
% [2003-04-18] 12Qオプションを追加しました。
%
% \begin{macrocode}
-\newcommand{\@ptsize}{0}
-\DeclareOption{slide}{\@slidetrue\renewcommand{\@ptsize}{26}\@landscapetrue\@titlepagetrue}
-\DeclareOption{8pt}{\renewcommand{\@ptsize}{-2}}
-\DeclareOption{9pt}{\renewcommand{\@ptsize}{-1}}
-\DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
-\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
-\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
-\DeclareOption{14pt}{\renewcommand{\@ptsize}{4}}
-\DeclareOption{17pt}{\renewcommand{\@ptsize}{7}}
-\DeclareOption{20pt}{\renewcommand{\@ptsize}{10}}
-\DeclareOption{21pt}{\renewcommand{\@ptsize}{11}}
-\DeclareOption{25pt}{\renewcommand{\@ptsize}{15}}
-\DeclareOption{30pt}{\renewcommand{\@ptsize}{20}}
-\DeclareOption{36pt}{\renewcommand{\@ptsize}{26}}
-\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}}
+\def\ltjs@magscale{1}
+\DeclareOption{slide}{\@slidetrue\def\ltjs@magscale{3.583}\@landscapetrue\@titlepagetrue}
+\DeclareOption{8pt} {\def\ltjs@magscale{0.83}}% 1.2^(-1)
+\DeclareOption{9pt} {\def\ltjs@magscale{0.913}}% 1.2^(-0.5}
+\DeclareOption{10pt}{\def\ltjs@magscale{1}}
+\DeclareOption{11pt}{\def\ltjs@magscale{1.095}}% 1.2^0.5
+\DeclareOption{12pt}{\def\ltjs@magscale{1.200}}
+\DeclareOption{14pt}{\def\ltjs@magscale{1.440}}
+\DeclareOption{17pt}{\def\ltjs@magscale{1.728}}
+\DeclareOption{20pt}{\def\ltjs@magscale{2}}
+\DeclareOption{21pt}{\def\ltjs@magscale{2.074}}
+\DeclareOption{25pt}{\def\ltjs@magscale{2.488}}
+\DeclareOption{30pt}{\def\ltjs@magscale{2.986}}
+\DeclareOption{36pt}{\def\ltjs@magscale{3.583}}
+\DeclareOption{43pt}{\def\ltjs@magscale{4.300}}
+\DeclareOption{12Q} {\def\ltjs@magscale{0.923}}% 1pt*12Q/13Q
+\DeclareOption{14Q} {\def\ltjs@magscale{1.077}}% 1pt*14Q/13Q
+\DeclareOption{10ptj}{\def\ltjs@magscale{1.085}}% 1pt*10bp/13Q
+\DeclareOption{10.5ptj}{\def\ltjs@magscale{1.139}}
+\DeclareOption{11ptj}{\def\ltjs@magscale{1.194}}
+\DeclareOption{12ptj}{\def\ltjs@magscale{1.302}}
+% \end{macrocode}
+%
+% \paragraph{オプティカルサイズの補正}
+% [2016-03-26 LTJ] |xreal|オプション指定時には,本文のフォントサイズが10pt以外の場合に
+% オプティカルサイズの補正を行うためにNFSSにパッチを当てます。
+% 現在の|ltjsclasses|ではこのパッチ当ては標準では行いませんが,
+% 将来どうなるかわからないので|real|, |noxreal|で無効化することができるようにしました。
+%
+% [2016-03-31 LTJ] |xreal|オプションを標準にしました.
+% \begin{macrocode}
+\newif\if@ltjs@mag@xreal
+\@ltjs@mag@xrealtrue
+\DeclareOption{xreal}{\@ltjs@mag@xrealtrue}
+\DeclareOption{noxreal}{\@ltjs@mag@xrealfalse}
+\DeclareOption{real}{\@ltjs@mag@xrealfalse}
% \end{macrocode}
%
+%
% \paragraph{トンボオプション}
%
% トンボ(crop marks)を出力します。
@@ -543,13 +566,7 @@
% \paragraph{papersizeスペシャルの利用}
%
% |ltjsclasses| では |papersize| オプションの有無に関わらず,
-% PDFのページサイズは適切に設定されます。
-%
-% \begin{macrocode}
-\newif\ifpapersize
-\papersizefalse
-\DeclareOption{papersize}{\papersizetrue}
-% \end{macrocode}
+% PDFのページサイズは適切に設定されるので,削除しました。
%
% \paragraph{英語化}
%
@@ -627,90 +644,87 @@
% \item |geometry| 側でオプション |mag| は使えません。
% \end{itemize}
%
+% [2016-03-21 LTJ] |\mag| を使わないように全面的に書き換えました。
+% |\ltjs@mpt| に「拡大率だけ大きくしたpt」の値が格納されます。
+% |bxjscls| と同様に,|\@ptsize| は |10pt|,~|11pt|,~|12pt| オプションが指定された時だけ
+% 従来通り0,~1,~2と設定し,それ以外の場合は$-20$とすることにしました。
+% |\inv@mag| はもはや定義していません。
+%
+% [2016-03-26 LTJ] |\ltjs@magscale| に拡大率を格納した後,それを用いて |ltjs@mpt| を
+% 設定するようにしました。
% \begin{macrocode}
-\def\inv@mag{1}
-\ifnum\@ptsize=-2
- \mag 833
- \def\inv@mag{1.20048}
- \def\n@baseline{15}%
-\fi
-\ifnum\@ptsize=-1
- \mag 913 % formerly 900
- \def\inv@mag{1.09529}
- \def\n@baseline{15}%
-\fi
-\ifnum\@ptsize=1
- \mag 1095 % formerly 1100
- \def\inv@mag{0.913242}
-\fi
-\ifnum\@ptsize=2
- \mag 1200
- \def\inv@mag{0.833333}
-\fi
-\ifnum\@ptsize=4
- \mag 1440
- \def\inv@mag{0.694444}
-\fi
-\ifnum\@ptsize=7
- \mag 1728
- \def\inv@mag{0.578704}
-\fi
-\ifnum\@ptsize=10
- \mag 2000
- \def\inv@mag{0.5}
-\fi
-\ifnum\@ptsize=11
- \mag 2074
- \def\inv@mag{0.48216}
-\fi
-\ifnum\@ptsize=15
- \mag 2488
- \def\inv@mag{0.401929}
-\fi
-\ifnum\@ptsize=20
- \mag 2986
- \def\inv@mag{0.334896}
-\fi
-\ifnum\@ptsize=26
- \mag 3583
- \def\inv@mag{0.279096}
-\fi
-\ifnum\@ptsize=33
- \mag 4300
- \def\inv@mag{0.232558}
-\fi
-\ifnum\@ptsize=1200
- \mag 923
- \def\inv@mag{1.0834236}
-\fi
-\ifnum\@ptsize=1400
- \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}
+\def\ltjs@magscale{0.977}
%</kiyou>
-\setlength\paperwidth{\inv@mag\paperwidth}%
-\setlength\paperheight{\inv@mag\paperheight}%
+\newdimen\ltjs@mpt
+\ltjs@mpt=\ltjs@magscale\p@
+\ifdim\ltjs@mpt<.92\p@ % 8pt, 9pt 指定時
+ \def\n@baseline{15}%
+\fi
+\newcommand{\@ptsize}{0}
+\ifdim\ltjs@mpt=1.0954\p@ \renewcommand{\@ptsize}{1}\else
+\ifdim\ltjs@mpt=1.2\p@ \renewcommand{\@ptsize}{2}\else
+\renewcommand{\@ptsize}{-20}\fi\fi
+% \end{macrocode}
+%
+% \paragraph{オプティカルサイズの補正}
+% \leavevmode\par
+% [2016-03-26 LTJ] |xreal|オプションの指定時には,|bxjscls|の|magstyle=xreal|
+% オプションのように,オプティカルの補正を行うためにNFSSにパッチを当てます。
+% パッチは,概ねmiscさんによる「js*.cls 同様の文字サイズ設定を
+% |\mag|によらずに行う方法:試案」
+% (\texttt{http://oku.edu.mie-u.ac.jp/\textasciitilde okumura/texfaq/qa/28416.html})の
+% 方法に沿っていますが,拡大/縮小するところの計算にはLuaを用いています。
+%
+% なお,\TeX 内部で長さはsp単位の整数倍で表現されているので,数spの誤差は仕方がないです。
+% そのため,事前に|type1cm|パッケージを読みこんでおきます。
+%
+% [2016-03-28 LTJ] |\luafunction|を使うようにし,また本文のフォントサイズが10ptのときには
+% (不要なので)パッチを当てないことにしました。
+% \begin{macrocode}
+\if@ltjs@mag@xreal\RequirePackage{type1cm}
+\ifdim\ltjs@mpt=\p@\else
+ \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
+ \newluafunction\ltjs@@magnify@font@calc
+ \begingroup\catcode`\%=12\relax
+ \directlua{
+ local getdimen, mpt=tex.getdimen, tex.getdimen('ltjs@mpt')/65536
+ local t = lua.get_functions_table()
+ t[\the\ltjs@@magnify@font@calc] = function()
+ tex.sprint(math.floor(0.5+mpt*getdimen('dimen@')))
+ end
+ function luatexja.ltjs_unmagnify_fsize(a)
+ local s = luatexja.print_scaled(math.floor(0.5+a/mpt*65536))
+ tex.sprint( (s:match('%.0$')) and s:sub(1,-3) or s )
+ end
+ }
+ \endgroup
+ \def\ltjs@magnify@external@font#1 at#2 at#3\@nil{%
+ \def\@tempa{#1}\def\@tempb{#2}%
+ \ifx\@tempb\@empty
+ \edef\@tempb{ scaled\directlua{%
+ tex.sprint(math.floor(0.5+\ltjs@magscale*1000))
+ }}%
+ \else
+ \dimen@\@tempb\relax
+ \edef\@tempb{ at\luafunction\ltjs@@magnify@font@calc sp}%
+ \fi
+ \edef\@tempa{\def\noexpand\external@font{\@tempa\@tempb}}
+ }
+ \let\ltjs@orig@get@external@font=\get@external@font
+ \def\get@external@font{%
+ \edef\f@size{\directlua{luatexja.ltjs_unmagnify_fsize(\f@size)}}%
+ \ltjs@orig@get@external@font
+ \begingroup
+ \edef\@tempa{\external@font\space at\space at}%
+ \expandafter\ltjs@magnify@external@font\@tempa\@nil
+ \expandafter\endgroup\@tempa
+ }
+\fi\fi
% \end{macrocode}
%
+%
% \paragraph{PDFの用紙サイズの設定}
%
% \begin{macro}{\pdfpagewidth}
@@ -719,7 +733,7 @@
% |tombow| が真のときは2インチ足しておきます。
%
% [2015-10-18 LTJ] Lua\TeX\ 0.81.0ではプリミティブの名称変更がされたので,
-% それに合わせておきます.
+% それに合わせておきます。
% \begin{macrocode}
\setlength{\@tempdima}{\paperwidth}
\setlength{\@tempdimb}{\paperheight}
@@ -757,7 +771,7 @@
%
% この |ltjsclasses| でも,派生元の |jsclasses| と同じように,
% この公称10ポイントのフォントをここでは13級に縮小して
-% 使うことにします。そのためには,$13\,\textrm{Q}/10\,\textrm{pt}\simeq 0.924872$倍
+% 使うことにします。そのためには,$13\,\textrm{Q}/10\,\textrm{pt}\simeq 0.924715$倍
% すればいいことになります。
%
% |\ltj@stdmcfont|,~|\ltj@stdgtfont| による、デフォルトで使われ明朝・ゴシックのフォントの
@@ -765,29 +779,30 @@
% 何らかの理由で非埋め込みフォントが正しく利用できない場合にのみ |luatexja.cfg| によって
% セットされるものです。
%
-% [2014-07-26 LTJ] なお,現状のところ,縦組用JFMは |jfm-ujisv.lua| しか準備していません.
+% [2014-07-26 LTJ] なお,現状のところ,縦組用JFMは |jfm-ujisv.lua| しか準備していません。
%
+% [2016-03-21 LTJ] 拡大率の計算で1~ptを$1/72.27$インチでなく0.3514~mmと間違えて扱っていたのを修正.
% \begin{macrocode}
%<*!jspf>
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=min}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=min}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=min}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=min}{}
\else
\ifptexjis
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=jis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=jis}{}
\else
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujis}{}
\fi
\fi
-\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujisv}{}
-\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujisv}{}
%</!jspf>
% \end{macrocode}
%
-% これにより,公称10ポイントの和文フォントを0.924872倍したことにより,
+% これにより,公称10ポイントの和文フォントを0.924715倍したことにより,
% 約9.25ポイント,
% DTPで使う単位(1/72インチ)では9.21ポイントということになり,
% 公称10ポイントといっても実は9ポイント強になります。
@@ -820,8 +835,8 @@
% タイプライタ体の代わりにゴシック体を使うことにします。
%
% [2014-03-25 LTJ] タイプライタ体に合わせるファミリを |\jttdefault| とし,
-% 通常のゴシック体と別にできるようにしました.|\jttdefault| は,標準で
-% |\gtdefault| と定義しています.
+% 通常のゴシック体と別にできるようにしました。|\jttdefault| は,標準で
+% |\gtdefault| と定義しています。
%
% [2003-03-16] イタリック体,斜体について,和文でゴシックを当てていましたが,
% 数学の定理環境などで多量のイタリック体を使うことがあり,ゴシックに
@@ -836,7 +851,7 @@
%
% [2016-01-30 LTJ] |\rmfamily|, |\sffamily|, |\ttfamily| の再定義をLua\TeX-ja
% カーネルに移動させたので,ここでは和文対応にするフラグ |\@ltj@match@family|\
-% を有効にさせるだけでよいです.
+% を有効にさせるだけでよいです。
% \begin{macrocode}
\DeclareFontShape{JY3}{mc}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{gt}{bx}{n}{<->ssub*gt/m/n}{}
@@ -974,11 +989,11 @@
%
% [2014-05-14 LTJ] |\ltjsetparameter|の実行は時間がかかるので,
% |\ltjsetkanjiskip| と |\ltjsetxkanjiskip|(両者とも,
-% 実行前には |\ltj@setpar@global| の実行が必要)にしました.
+% 実行前には |\ltj@setpar@global| の実行が必要)にしました。
%
% [2014-12-24 LTJ] |jsclasses| では,|\@setfontsize| 中で |xkanjiskip| を
-% 設定するのは現在の和欧文間空白の自然長が正の場合だけでした.
-% |ltjsclasses| では最初からこの判定が抜けてしまっていたので,復活させます.
+% 設定するのは現在の和欧文間空白の自然長が正の場合だけでした。
+% |ltjsclasses| では最初からこの判定が抜けてしまっていたので,復活させます。
%
% \begin{macrocode}
\def\@setfontsize#1#2#3{%
@@ -1001,12 +1016,21 @@
\if@slide
\ltjsetxkanjiskip .1em
\else
- \ltjsetxkanjiskip .25em plus .15em minus .06em
+ \ltjsetxkanjiskip .25em plus .15em minus .06em
\fi
\fi}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ltjs@setfontsize}
+% クラスファイルの内部では,拡大率も考慮した |ltjs@setfontsize| を
+% |\@setfontsize| の変わりに用いることにします。
+% \begin{macrocode}
+\def\ltjs@setfontsize#1#2#3{%
+ \@setfontsize#1{#2\ltjs@mpt}{#3\ltjs@mpt}}
+% \end{macrocode}
+% \end{macro}
+%
% これらのグルーをもってしても行分割ができない場合は,
% |\emergencystretch| に訴えます。
%
@@ -1030,7 +1054,7 @@
% TODO: Hasumiさん [qa:54539] のご指摘は考慮中です。
%
% [2015-01-07 LTJ] 遅くなりましたが,
-% \url{http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1005} にあったZRさんのパッチを取り込みました.
+% \url{http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1005} にあったZRさんのパッチを取り込みました。
%
% \begin{macrocode}
\newif\ifnarrowbaselines
@@ -1079,8 +1103,8 @@
% \begin{macrocode}
\renewcommand{\normalsize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\normalsize\@xpt\@xiipt}%
- {\@setfontsize\normalsize\@xpt{\n@baseline}}%
+ {\ltjs@setfontsize\normalsize\@xpt\@xiipt}%
+ {\ltjs@setfontsize\normalsize\@xpt{\n@baseline}}%
% \end{macrocode}
%
% 数式の上のアキ(|\abovedisplayskip|),
@@ -1093,9 +1117,9 @@
% いましたが,結局,微調節してみることにしました。
%
% \begin{macrocode}
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+ \abovedisplayskip 11\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
+ \belowdisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
\belowdisplayshortskip \belowdisplayskip
% \end{macrocode}
%
@@ -1152,12 +1176,12 @@
% \begin{macrocode}
\newcommand{\small}{%
\ltj@@ifnarrowbaselines
-%<!kiyou> {\@setfontsize\small\@ixpt{11}}%
-%<kiyou> {\@setfontsize\small{8.8888}{11}}%
-%<!kiyou> {\@setfontsize\small\@ixpt{13}}%
-%<kiyou> {\@setfontsize\small{8.8888}{13.2418}}%
- \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
+%<!kiyou> {\ltjs@setfontsize\small\@ixpt{11}}%
+%<kiyou> {\ltjs@setfontsize\small{8.8888}{11}}%
+%<!kiyou> {\ltjs@setfontsize\small\@ixpt{13}}%
+%<kiyou> {\ltjs@setfontsize\small{8.8888}{13.2418}}%
+ \abovedisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
@@ -1176,12 +1200,12 @@
% \begin{macrocode}
\newcommand{\footnotesize}{%
\ltj@@ifnarrowbaselines
-%<!kiyou> {\@setfontsize\footnotesize\@viiipt{9.5}}%
-%<kiyou> {\@setfontsize\footnotesize{8.8888}{11}}%
-%<!kiyou> {\@setfontsize\footnotesize\@viiipt{11}}%
-%<kiyou> {\@setfontsize\footnotesize{8.8888}{13.2418}}%
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus3\p@
- \abovedisplayshortskip \z@ \@plus2\p@
+%<!kiyou> {\ltjs@setfontsize\footnotesize\@viiipt{9.5}}%
+%<kiyou> {\ltjs@setfontsize\footnotesize{8.8888}{11}}%
+%<!kiyou> {\ltjs@setfontsize\footnotesize\@viiipt{11}}%
+%<kiyou> {\ltjs@setfontsize\footnotesize{8.8888}{13.2418}}%
+ \abovedisplayskip 6\ltjs@mpt \@plus2\ltjs@mpt \@minus3\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus2\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
@@ -1210,21 +1234,21 @@
% [2004-11-03] |\HUGE| を追加。
%
% \begin{macrocode}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
-\newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand{\scriptsize}{\ltjs@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand{\tiny}{\ltjs@setfontsize\tiny\@vpt\@vipt}
\if@twocolumn
-%<!kiyou> \newcommand{\large}{\@setfontsize\large\@xiipt{\n@baseline}}
-%<kiyou> \newcommand{\large}{\@setfontsize\large{11.111}{\n@baseline}}
+%<!kiyou> \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{\n@baseline}}
+%<kiyou> \newcommand{\large}{\ltjs@setfontsize\large{11.111}{\n@baseline}}
\else
-%<!kiyou> \newcommand{\large}{\@setfontsize\large\@xiipt{17}}
-%<kiyou> \newcommand{\large}{\@setfontsize\large{11.111}{17}}
+%<!kiyou> \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{17}}
+%<kiyou> \newcommand{\large}{\ltjs@setfontsize\large{11.111}{17}}
\fi
-%<!kiyou>\newcommand{\Large}{\@setfontsize\Large\@xivpt{21}}
-%<kiyou>\newcommand{\Large}{\@setfontsize\Large{12.222}{21}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}}
-\newcommand{\huge}{\@setfontsize\huge\@xxpt{28}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}}
-\newcommand{\HUGE}{\@setfontsize\HUGE{30}{40}}
+%<!kiyou>\newcommand{\Large}{\ltjs@setfontsize\Large\@xivpt{21}}
+%<kiyou>\newcommand{\Large}{\ltjs@setfontsize\Large{12.222}{21}}
+\newcommand{\LARGE}{\ltjs@setfontsize\LARGE\@xviipt{25}}
+\newcommand{\huge}{\ltjs@setfontsize\huge\@xxpt{28}}
+\newcommand{\Huge}{\ltjs@setfontsize\Huge\@xxvpt{33}}
+\newcommand{\HUGE}{\ltjs@setfontsize\HUGE{30}{40}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1280,7 +1304,7 @@
% \begin{macrocode}
%<!kiyou>\setlength\columnsep{2\zw}
%<kiyou>\setlength\columnsep{28truebp}
-\setlength\columnseprule{0\p@}
+\setlength\columnseprule{\z@}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1298,10 +1322,10 @@
% \texttt{normal...} の付いた方は保存用です。
%
% \begin{macrocode}
-\setlength\lineskip{1\p@}
-\setlength\normallineskip{1\p@}
-\setlength\lineskiplimit{1\p@}
-\setlength\normallineskiplimit{1\p@}
+\setlength\lineskip{1\ltjs@mpt}
+\setlength\normallineskip{1\ltjs@mpt}
+\setlength\lineskiplimit{1\ltjs@mpt}
+\setlength\normallineskiplimit{1\ltjs@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1332,7 +1356,7 @@
% |\parindent| は段落の先頭の字下げ幅です。
%
% \begin{macrocode}
-\setlength\parskip{0\p@}
+\setlength\parskip{\z@}
\if@slide
\setlength\parindent{0\zw}
\else
@@ -1399,9 +1423,9 @@
% ことにしました。
%
% \begin{macrocode}
-\setlength\topskip{10\p@}
+\setlength\topskip{10\ltjs@mpt}
\if@slide
- \setlength\headheight{0\p@}
+ \setlength\headheight{0\ltjs@mpt}
\else
\setlength\headheight{2\topskip}
\fi
@@ -1421,7 +1445,7 @@
% \begin{macrocode}
%<*article|kiyou>
\if@slide
- \setlength\footskip{0pt}
+ \setlength\footskip{\z@}
\else
\setlength\footskip{0.03367\paperheight}
\ifdim\footskip<\baselineskip
@@ -1437,7 +1461,7 @@
\setlength\footskip{\baselineskip}
\fi
\else
- \setlength\footskip{0pt}
+ \setlength\footskip{\z@}
\fi
%</book>
% \end{macrocode}
@@ -1453,7 +1477,7 @@
% \begin{macrocode}
%<*article>
\if@slide
- \setlength\headsep{0\p@}
+ \setlength\headsep{0\ltjs@mpt}
\else
\setlength\headsep{\footskip}
\addtolength\headsep{-\topskip}
@@ -1472,8 +1496,8 @@
\addtolength\headsep{-\topskip}
%</jspf>
%<*kiyou>
-\setlength\headheight{0\p@}
-\setlength\headsep{0\p@}
+\setlength\headheight{0\ltjs@mpt}
+\setlength\headsep{0\ltjs@mpt}
%</kiyou>
% \end{macrocode}
% \end{macro}
@@ -1598,7 +1622,7 @@
%<jspf>\setlength{\textheight}{51\baselineskip}
%<kiyou>\setlength{\textheight}{47\baselineskip}
\addtolength{\textheight}{\topskip}
-\addtolength{\textheight}{0.1\p@}
+\addtolength{\textheight}{0.1\ltjs@mpt}
%<jspf>\setlength{\mathindent}{10mm}
% \end{macrocode}
% \end{macro}
@@ -1711,7 +1735,7 @@
% 和文の行送りを考えてもうちょっと大きくします。
%
% \begin{macrocode}
-\setlength{\skip\footins}{16\p@ \@plus 5\p@ \@minus 2\p@}
+\setlength{\skip\footins}{16\ltjs@mpt \@plus 5\ltjs@mpt \@minus 2\ltjs@mpt}
% \end{macrocode}
% \end{macro}
%
@@ -1837,9 +1861,9 @@
% |\intextsep| は本文の途中に出力されるフロートと本文との距離です。
%
% \begin{macrocode}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\floatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\textfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\intextsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1851,8 +1875,8 @@
% 二段組のときの段抜きのフロートについての値です。
%
% \begin{macrocode}
-\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+\setlength\dblfloatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dbltextfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1867,9 +1891,9 @@
% |\@fpsep| はフロート間に入ります。
%
% \begin{macrocode}
-\setlength\@fptop{0\p@ \@plus 1fil}
-\setlength\@fpsep{8\p@ \@plus 2fil}
-\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@fptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@fpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@fpbot{0\ltjs@mpt \@plus 1fil}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1882,9 +1906,9 @@
% 段抜きフロートについての値です。
%
% \begin{macrocode}
-\setlength\@dblfptop{0\p@ \@plus 1fil}
-\setlength\@dblfpsep{8\p@ \@plus 2fil}
-\setlength\@dblfpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@dblfpbot{0\ltjs@mpt \@plus 1fil}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2188,16 +2212,16 @@
\begin{center}
\mbox{} \\[1\zw]
\large
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\smallskip
\@title
\smallskip
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\vfill
{\small \@author}%
\end{center}
\else
- \vskip 60\p@
+ \vskip 60\ltjs@mpt
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
@@ -2500,7 +2524,7 @@
\@afterheading
\fi
\if@slide
- {\vskip-6pt\maybeblue\hrule height0pt depth1pt\vskip7pt\relax}%
+ {\vskip-6\ltjs@mpt\maybeblue\hrule height0\ltjs@mpt depth1\ltjs@mpt\vskip7\ltjs@mpt\relax}%
\fi
\par % 2000-12-18
\ignorespaces}
@@ -2823,7 +2847,7 @@
\normalfont
\ifnum \c@secnumdepth >-2\relax
\huge\headfont \prepartname\thepart\postpartname
- \par\vskip20\p@
+ \par\vskip20\ltjs@mpt
\fi
\Huge \headfont #2\par}%
\@endpart}
@@ -2921,8 +2945,8 @@
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \addtocontents{lof}{\protect\addvspace{10\ltjs@mpt}}%
+ \addtocontents{lot}{\protect\addvspace{10\ltjs@mpt}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
@@ -3603,7 +3627,7 @@
% |array| 環境の列間には |\arraycolsep| の2倍の幅の空きが入ります。
%
% \begin{macrocode}
-\setlength\arraycolsep{5\p@}
+\setlength\arraycolsep{5\ltjs@mpt}
% \end{macrocode}
% \end{macro}
%
@@ -3612,7 +3636,7 @@
% |tabular| 環境の列間には |\tabcolsep| の2倍の幅の空きが入ります。
%
% \begin{macrocode}
-\setlength\tabcolsep{6\p@}
+\setlength\tabcolsep{6\ltjs@mpt}
% \end{macrocode}
% \end{macro}
%
@@ -3621,7 +3645,7 @@
% |array|,|tabular| 環境内の罫線の幅です。
%
% \begin{macrocode}
-\setlength\arrayrulewidth{.4\p@}
+\setlength\arrayrulewidth{.4\ltjs@mpt}
% \end{macrocode}
% \end{macro}
%
@@ -3630,7 +3654,7 @@
% |array|,|tabular| 環境での二重罫線間のアキです。
%
% \begin{macrocode}
-\setlength\doublerulesep{2\p@}
+\setlength\doublerulesep{2\ltjs@mpt}
% \end{macrocode}
% \end{macro}
%
@@ -3669,8 +3693,8 @@
% |\fbox|,|\framebox| の罫線の幅です。
%
% \begin{macrocode}
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
+\setlength\fboxsep{3\ltjs@mpt}
+\setlength\fboxrule{.4\ltjs@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3879,8 +3903,8 @@
% \begin{macrocode}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
-\setlength\abovecaptionskip{5\p@} % 元: 10\p@
-\setlength\belowcaptionskip{5\p@} % 元: 0\p@
+\setlength\abovecaptionskip{5\ltjs@mpt} % 元: 10\p@
+\setlength\belowcaptionskip{5\ltjs@mpt} % 元: 0\p@
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3891,7 +3915,7 @@
%
% [2003-11-05] ロジックを少し変えてみました。
%
-% [2015-05-26] |listings| パッケージを使うときに|title| を指定すると次のエラーが出るのを修正.
+% [2015-05-26] |listings| パッケージを使うときに|title| を指定すると次のエラーが出るのを修正。
% \begin{verbatim}
% ! Missing number, treated as zero.
% \end{verbatim}
@@ -4132,7 +4156,7 @@
\ifnum \c@tocdepth >-2\relax
%<!book> \addpenalty\@secpenalty
%<book> \addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
+ \addvspace{2.25em \@plus\ltjs@mpt}%
\begingroup
\parindent \z@
% \@pnumwidth should be \@tocrmarg
@@ -4163,7 +4187,7 @@
\newcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
- \addvspace{1.0em \@plus\p@}
+ \addvspace{1.0em \@plus\ltjs@mpt}
% \vskip 1.0em \@plus\p@ % book.clsでは↑がこうなっている
\begingroup
\parindent\z@
@@ -4191,7 +4215,7 @@
\newcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty{\@secpenalty}%
- \addvspace{1.0em \@plus\p@}%
+ \addvspace{1.0em \@plus\ltjs@mpt}%
\begingroup
\parindent\z@
% \rightskip\@pnumwidth
@@ -4306,7 +4330,7 @@
%
% \begin{macrocode}
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
- \vskip \z@ \@plus.2\p@
+ \vskip \z@ \@plus.2\ltjs@mpt
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
@@ -4544,7 +4568,7 @@
%<!book> \@mkboth{\indexname}{\indexname}%
\plainifnotempty % \thispagestyle{plain}
\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
+ \parskip\z@ \@plus .3\ltjs@mpt\relax
\let\item\@idxitem
\raggedright
\footnotesize\narrowbaselines
@@ -4579,7 +4603,7 @@
% 索引で先頭文字ごとのブロックの間に入るスペースです。
%
% \begin{macrocode}
-\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+\newcommand{\indexspace}{\par \vskip 10\ltjs@mpt \@plus5\ltjs@mpt \@minus3\ltjs@mpt\relax}
% \end{macrocode}
% \end{macro}
%
@@ -4632,7 +4656,7 @@
%
% [2013-05-14] plcore.ltx に倣った形に書き直しました(Thanks: 北川さん)。
%
-% [2014-07-02 LTJ] |\ifydir| を使わない形に書換えました.
+% [2014-07-02 LTJ] |\ifydir| を使わない形に書換えました。
%
% \begin{macrocode}
\renewcommand\@makefnmark{\hbox{}\hbox{%
@@ -4667,9 +4691,9 @@
%
% \begin{macrocode}
\renewcommand{\footnoterule}{%
- \kern-3\p@
- \hrule width .4\columnwidth
- \kern 2.6\p@}
+ \kern-3\ltjs@mpt
+ \hrule width .4\columnwidth height .4\ltjs@mpt
+ \kern 2.6\ltjs@mpt}
% \end{macrocode}
% \end{macro}
%
@@ -4756,9 +4780,9 @@
%
% 段落頭のかぎかっこなどを見かけ1字半下げから全角1字下げに直します。
%
-% [2012-04-24 LTJ] LuaTeX-jaではJFMに段落開始時の括弧類の字下げ幅をコントロール
+% [2012-04-24 LTJ] Lua\TeX-jaではJFMに段落開始時の括弧類の字下げ幅をコントロール
% する機能がありますが,|\item| 直後ではラベル用のボックスが段落先頭になる
-% ため,うまく働きませんでした.形を変えて復活させます.
+% ため,うまく働きませんでした。形を変えて復活させます。
%
% |\item| 命令の直後です。
%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
index cec74cfc232..f8a7b578629 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
@@ -8,18 +8,18 @@ luatexja.load_module('charrange'); local ltjc = luatexja.charrange
require("unicode")
local utflen = unicode.utf8.len
local utfbyte = unicode.utf8.byte
+local utfchar = unicode.utf8.char
local node_new = node.new
local node_free = node.free
local id_glyph = node.id('glyph')
-local getcatcode = tex.getcatcode
+local getcatcode, getcount = tex.getcatcode, tex.getcount
local ltjc_is_japanese_char_curlist = ltjc.is_japanese_char_curlist
-local FFFFF = string.char(0xF3,0xBF,0xBF,0xBF)
--- the following function is modified from jafontspec.lua (by K. Maeda).
--- Instead of "%", we use U+FFFFF for suppressing spaces.
--DEBUG require"socket"
local time_line = 0
-local start_time_measure, stop_time_measure
+local start_time_measure, stop_time_measure
= ltjb.start_time_measure, ltjb.stop_time_measure
local function add_comment(buffer)
start_time_measure('inputbuf')
@@ -33,12 +33,12 @@ local function add_comment(buffer)
if c>=0x80 then
local ct = getcatcode(c)
local te = tex.endlinechar
- local ctl = (te ~= -1) and (getcatcode(te)==5) and (getcatcode(0xFFFFF)==14)
+ local ctl = (te ~= -1) and (getcatcode(te)==5) and (getcatcode(getcount('ltjlineendcomment'))==14)
-- Is the catcode of endline character is 5 (end-of-line)?
- -- Is the catcode of U+FFFFF (new comment char) is 14 (comment)?
+ -- Is the catcode of \ltjlineendcomment (new comment char) is 14 (comment)?
if ((ct==11) or (ct==12)) and ctl then
if ltjc_is_japanese_char_curlist(c) then
- buffer = buffer .. FFFFF -- U+FFFFF
+ buffer = buffer .. utfchar(getcount('ltjlineendcomment'))
end
end
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
index a63c270e676..9a638e38928 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2015/05/03',
+ date = '2016/03/31',
description = 'Insertion process of JFM glues and kanjiskip',
})
module('luatexja.jfmglue', package.seeall)
@@ -283,8 +283,8 @@ do
local traverse = Dnode.traverse
local function check_next_ickern(lp)
- if lp and getid(lp) == id_kern and ITALIC == get_attr_icflag(lp) then
- set_attr(lp, attr_icflag, IC_PROCESSED)
+ if lp and getid(lp) == id_kern and ( getsubtype(lp)==3 or ITALIC == get_attr_icflag(lp)) then
+ set_attr(lp, attr_icflag, IC_PROCESSED);
Np.last = lp; return node_next(lp)
else
Np.last = Np.nuc; return lp
@@ -318,6 +318,7 @@ end
local ltjw_apply_ashift_math = ltjw.apply_ashift_math
local ltjw_apply_ashift_disc = ltjw.apply_ashift_disc
local min, max = math.min, math.max
+local rule_subtype = (status.luatex_version>=85) and 3 or 0
local function calc_np_aux_glyph_common(lp)
Np.nuc = lp
Np.first= (Np.first or lp)
@@ -366,7 +367,7 @@ local function calc_np_aux_glyph_common(lp)
lx = node_next(node_next(lx))
elseif ls==0 then
Np.last = lx
- elseif (ls==1 and lai==ITALIC) then
+ elseif (ls==3) or (lai==ITALIC) then
Np.last = lx; set_attr(lx, attr_icflag, IC_PROCESSED)
else
lp=lx; break
@@ -378,7 +379,7 @@ local function calc_np_aux_glyph_common(lp)
end
local r
if adj_depth>node_depth then
- r = node_new(id_rule)
+ r = node_new(id_rule,rule_subtype)
setfield(r, 'width', 0); setfield(r, 'height', 0)
setfield(r, 'depth',adj_depth); setfield(r, 'dir', tex_dir)
set_attr(r, attr_icflag, PROCESSED)
@@ -519,7 +520,11 @@ local calc_np_auxtable = {
end,
}
calc_np_auxtable[id_rule] = calc_np_auxtable.box_like
-calc_np_auxtable[13] = calc_np_auxtable.box_like
+if status.luatex_version>=85 then
+ calc_np_auxtable[15] = calc_np_auxtable.box_like
+else
+ calc_np_auxtable[13] = calc_np_auxtable.box_like
+end
calc_np_auxtable[id_ins] = calc_np_auxtable.skip
calc_np_auxtable[id_mark] = calc_np_auxtable.skip
calc_np_auxtable[id_adjust] = calc_np_auxtable.skip
@@ -541,7 +546,7 @@ function calc_np(last, lp)
for k = 1,#Bp do Bp[k] = nil end
while lp ~= last do
local lpa = has_attr(lp, attr_icflag) or 0
- -- unbox 由来ノードの検出
+ -- unbox 由来ノードの検出
if lpa>=PACKED then
if lpa%PROCESSED_BEGIN_FLAG == BOXBDD then
local lq = node_next(lp)
@@ -1196,7 +1201,8 @@ function main(ahead, mode, dir)
lp = calc_np(last, lp)
if Np then
handle_list_head(par_indented)
- lp = calc_np(last,lp); while Np do
+ lp = calc_np(last,lp);
+ while Np do
adjust_nq();
local pid, pm = Np.id, Np.met
-- 挿入部
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
index 3679ad11c7e..879d0b85b73 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfont',
- date = '2015/09/19',
+ date = '2016/03/31',
description = 'Loader for Japanese fonts',
})
module('luatexja.jfont', package.seeall)
@@ -167,8 +167,8 @@ do
for k,w in pairs(v.glue) do
local h = node_new(id_glue_spec)
v[k] = {
- true, h,
- ratio=w.ratio/sz,
+ true, h,
+ ratio=w.ratio/sz,
priority=FROM_JFM + w.priority/sz,
kanjiskip_natural = w.kanjiskip_natural and w.kanjiskip_natural/sz,
kanjiskip_stretch = w.kanjiskip_stretch and w.kanjiskip_stretch/sz,
@@ -260,7 +260,7 @@ do
cstemp = csname:sub( (utf8.byte(csname,1,1) == tex.escapechar) and 2 or 1, -1)
cstemp = cstemp:sub(1, ((cstemp:sub(-1,-1)==' ') and (cstemp:len()>=2)) and -2 or -1)
global_flag = g and '\\global' or ''
- tex.sprint(cat_lp, '\\expandafter\\font\\csname ',
+ tex.sprint(cat_lp, '\\expandafter\\font\\csname ',
(cstemp==' ') and '\\space' or cstemp, '\\endcsname')
end
@@ -277,7 +277,7 @@ do
"bad JFM `" .. jfm_file_name .. "'",
'The JFM file you specified is not valid JFM file.\n'..
'So defining Japanese font is cancelled.')
- tex.sprint(cat_lp, global_flag, '\\expandafter\\let\\csname ',
+ tex.sprint(cat_lp, global_flag, '\\expandafter\\let\\csname ',
(cstemp==' ') and '\\space' or cstemp,
'\\endcsname=\\relax')
return
@@ -286,7 +286,7 @@ do
local ad = identifiers[fn].parameters
local sz = metrics[j].size_cache[f.size]
local fmtable = { jfm = j, size = f.size, var = jfm_var,
- with_kanjiskip = jfm_ksp,
+ with_kanjiskip = jfm_ksp,
zw = sz.zw, zh = sz.zh,
ascent = ad.ascender,
descent = ad.descender,
@@ -420,9 +420,9 @@ do
kfam_list[fam]=true
end
function search_kfam(fam, use_fd)
- if kfam_list[fam] then
+ if kfam_list[fam] then
tex.sprint(cat_lp, '\\let\\ifin@\\iftrue '); return
- elseif Nkfam_list[fam] then
+ elseif Nkfam_list[fam] then
tex.sprint(cat_lp, '\\let\\ifin@\\iffalse '); return
elseif use_fd then
for i,_ in pairs(kyenc_list) do
@@ -455,7 +455,7 @@ do
tex.sprint(cat_lp, s)
end
function search_ffam_fd(fam)
- if Nffam_list[fam] then
+ if Nffam_list[fam] then
tex.sprint(cat_lp, '\\let\\ifin@\\iffalse '); return
else
for i,_ in pairs(fenc_list) do
@@ -765,7 +765,7 @@ do
end
if fl.subfonts then
for _,v in pairs(fl.subfonts) do
- dest = add_fl_table(dest, v, unicodes,
+ dest = add_fl_table(dest, v, unicodes,
fl.ascent + fl.descent, fl.units_per_em)
end
end
@@ -935,7 +935,7 @@ do
return tfmdata
end,
- 'ltj.supply_tounicode', 1)
+ 'ltj.supply_tounicode', 1)
end
@@ -950,7 +950,17 @@ do
local ensure_tex_attr = ltjb.ensure_tex_attr
local node_write = Dnode.write
local font = font
- local ITALIC = luatexja.icflag_table.ITALIC
+ local new_ic_kern
+ if status.luatex_version>=89 then
+ new_ic_kern = function(g) return node_new(id_kern,3) end
+ else
+ local ITALIC = luatexja.icflag_table.ITALIC
+ new_ic_kern = function()
+ local g = node_new(id_kern)
+ setfield(g, 'subtype', 1); set_attr(g, attr_icflag, ITALIC)
+ return g
+ end
+ end
-- EXT: italic correction
function append_italic()
local p = to_direct(tex.nest[tex.nest.ptr].tail)
@@ -960,17 +970,15 @@ do
local j = font_metric_table[
has_attr(p, (get_dir_count()==dir_tate) and attr_curtfnt or attr_curjfnt)
]
- local g = node_new(id_kern)
- setfield(g, 'subtype', 1); set_attr(g, attr_icflag, ITALIC)
+ local g = new_ic_kern()
setfield(g, 'kern', j.char_type[find_char_class(getchar(p), j)].italic)
node_write(g); ensure_tex_attr(attr_icflag, 0)
else
local f = getfont(p)
local h = font_getfont(f) or font.fonts[f]
if h then
- local g = node_new(id_kern)
- setfield(g, 'subtype', 1); set_attr(g, attr_icflag, ITALIC)
- if h.characters[getchar(p)] and h.characters[getchar(p)].italic then
+ local g = new_ic_kern()
+ if h.characters[getchar(p)] and h.characters[getchar(p)].italic then
setfield(g, 'kern', h.characters[getchar(p)].italic)
node_write(g); ensure_tex_attr(attr_icflag, 0)
end
@@ -993,4 +1001,3 @@ vert_form_table = {
[0xFF3B]=0xFE47, [0xFF3D]=0xFE48, [0xFF3F]=0xFE33,
}
setmetatable(vert_form_table, {__index=function(t,k) return k end});
-
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
index acbe7543ee1..e18e3a18aeb 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
@@ -74,6 +74,8 @@ local fshift = { down = 0, left = 0}
local min, max = math.min, math.max
+local rule_subtype = (status.luatex_version>=85) and 3 or 0
+
-- 和文文字の位置補正(横)
local function capsule_glyph_yoko(p, met, char_data, head, dir)
if not char_data then return node_next(p), head, p end
@@ -99,7 +101,7 @@ local function capsule_glyph_yoko(p, met, char_data, head, dir)
setfield(p, 'yoffset', getfield(p, 'yoffset') - kbl - fshift.down)
return node_next(p), head, p
elseif ht_diff >= 0 and dp_diff >=0 then -- rule
- local box = node_new(id_rule)
+ local box = node_new(id_rule,rule_subtype)
setfield(p, 'yoffset', getfield(p, 'yoffset') - kbl - fshift.down)
setfield(box, 'width', 0)
setfield(box, 'height', fheight - kbl)
@@ -251,7 +253,7 @@ do
setfield(lp, 'yoffset', getfield(lp, 'yoffset') - y_adjust)
end
if adj_depth>node_depth then
- local r = node_new(id_rule)
+ local r = node_new(id_rule,rule_subtype)
setfield(r, 'width', 0); setfield(r, 'height', 0)
setfield(r, 'depth', adj_depth); setfield(r, 'dir', tex_dir)
set_attr(r, attr_icflag, PROCESSED)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
index d71f55e4d77..7f73c95a582 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}
- [2016/01/30 ]
+ [2016/03/31 ltjsclasses ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -96,27 +96,32 @@
\DeclareOption{landscape}{\@landscapetrue}
\newif\if@slide
\@slidefalse
-\newcommand{\@ptsize}{0}
-\DeclareOption{slide}{\@slidetrue\renewcommand{\@ptsize}{26}\@landscapetrue\@titlepagetrue}
-\DeclareOption{8pt}{\renewcommand{\@ptsize}{-2}}
-\DeclareOption{9pt}{\renewcommand{\@ptsize}{-1}}
-\DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
-\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
-\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
-\DeclareOption{14pt}{\renewcommand{\@ptsize}{4}}
-\DeclareOption{17pt}{\renewcommand{\@ptsize}{7}}
-\DeclareOption{20pt}{\renewcommand{\@ptsize}{10}}
-\DeclareOption{21pt}{\renewcommand{\@ptsize}{11}}
-\DeclareOption{25pt}{\renewcommand{\@ptsize}{15}}
-\DeclareOption{30pt}{\renewcommand{\@ptsize}{20}}
-\DeclareOption{36pt}{\renewcommand{\@ptsize}{26}}
-\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}}
+\def\ltjs@magscale{1}
+\DeclareOption{slide}{\@slidetrue\def\ltjs@magscale{3.583}\@landscapetrue\@titlepagetrue}
+\DeclareOption{8pt} {\def\ltjs@magscale{0.83}}% 1.2^(-1)
+\DeclareOption{9pt} {\def\ltjs@magscale{0.913}}% 1.2^(-0.5}
+\DeclareOption{10pt}{\def\ltjs@magscale{1}}
+\DeclareOption{11pt}{\def\ltjs@magscale{1.095}}% 1.2^0.5
+\DeclareOption{12pt}{\def\ltjs@magscale{1.200}}
+\DeclareOption{14pt}{\def\ltjs@magscale{1.440}}
+\DeclareOption{17pt}{\def\ltjs@magscale{1.728}}
+\DeclareOption{20pt}{\def\ltjs@magscale{2}}
+\DeclareOption{21pt}{\def\ltjs@magscale{2.074}}
+\DeclareOption{25pt}{\def\ltjs@magscale{2.488}}
+\DeclareOption{30pt}{\def\ltjs@magscale{2.986}}
+\DeclareOption{36pt}{\def\ltjs@magscale{3.583}}
+\DeclareOption{43pt}{\def\ltjs@magscale{4.300}}
+\DeclareOption{12Q} {\def\ltjs@magscale{0.923}}% 1pt*12Q/13Q
+\DeclareOption{14Q} {\def\ltjs@magscale{1.077}}% 1pt*14Q/13Q
+\DeclareOption{10ptj}{\def\ltjs@magscale{1.085}}% 1pt*10bp/13Q
+\DeclareOption{10.5ptj}{\def\ltjs@magscale{1.139}}
+\DeclareOption{11ptj}{\def\ltjs@magscale{1.194}}
+\DeclareOption{12ptj}{\def\ltjs@magscale{1.302}}
+\newif\if@ltjs@mag@xreal
+\@ltjs@mag@xrealtrue
+\DeclareOption{xreal}{\@ltjs@mag@xrealtrue}
+\DeclareOption{noxreal}{\@ltjs@mag@xrealfalse}
+\DeclareOption{real}{\@ltjs@mag@xrealfalse}
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
\minute\time \advance\minute-\@tempcnta
@@ -201,9 +206,6 @@
\DeclareOption{mingoth}{\mingothtrue}
\DeclareOption{ptexjis}{\ptexjistrue}
\DeclareOption{jis}{\jisfonttrue}
-\newif\ifpapersize
-\papersizefalse
-\DeclareOption{papersize}{\papersizetrue}
\newif\if@english
\@englishfalse
\DeclareOption{english}{\@englishtrue}
@@ -218,83 +220,55 @@
\setlength\paperwidth {\@tempdima}
\fi
\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi
-\def\inv@mag{1}
-\ifnum\@ptsize=-2
- \mag 833
- \def\inv@mag{1.20048}
- \def\n@baseline{15}%
-\fi
-\ifnum\@ptsize=-1
- \mag 913 % formerly 900
- \def\inv@mag{1.09529}
+\newdimen\ltjs@mpt
+\ltjs@mpt=\ltjs@magscale\p@
+\ifdim\ltjs@mpt<.92\p@ % 8pt, 9pt 指定時
\def\n@baseline{15}%
\fi
-\ifnum\@ptsize=1
- \mag 1095 % formerly 1100
- \def\inv@mag{0.913242}
-\fi
-\ifnum\@ptsize=2
- \mag 1200
- \def\inv@mag{0.833333}
-\fi
-\ifnum\@ptsize=4
- \mag 1440
- \def\inv@mag{0.694444}
-\fi
-\ifnum\@ptsize=7
- \mag 1728
- \def\inv@mag{0.578704}
-\fi
-\ifnum\@ptsize=10
- \mag 2000
- \def\inv@mag{0.5}
-\fi
-\ifnum\@ptsize=11
- \mag 2074
- \def\inv@mag{0.48216}
-\fi
-\ifnum\@ptsize=15
- \mag 2488
- \def\inv@mag{0.401929}
-\fi
-\ifnum\@ptsize=20
- \mag 2986
- \def\inv@mag{0.334896}
-\fi
-\ifnum\@ptsize=26
- \mag 3583
- \def\inv@mag{0.279096}
-\fi
-\ifnum\@ptsize=33
- \mag 4300
- \def\inv@mag{0.232558}
-\fi
-\ifnum\@ptsize=1200
- \mag 923
- \def\inv@mag{1.0834236}
-\fi
-\ifnum\@ptsize=1400
- \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}%
+\newcommand{\@ptsize}{0}
+\ifdim\ltjs@mpt=1.0954\p@ \renewcommand{\@ptsize}{1}\else
+\ifdim\ltjs@mpt=1.2\p@ \renewcommand{\@ptsize}{2}\else
+\renewcommand{\@ptsize}{-20}\fi\fi
+\if@ltjs@mag@xreal\RequirePackage{type1cm}
+\ifdim\ltjs@mpt=\p@\else
+ \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
+ \newluafunction\ltjs@@magnify@font@calc
+ \begingroup\catcode`\%=12\relax
+ \directlua{
+ local getdimen, mpt=tex.getdimen, tex.getdimen('ltjs@mpt')/65536
+ local t = lua.get_functions_table()
+ t[\the\ltjs@@magnify@font@calc] = function()
+ tex.sprint(math.floor(0.5+mpt*getdimen('dimen@')))
+ end
+ function luatexja.ltjs_unmagnify_fsize(a)
+ local s = luatexja.print_scaled(math.floor(0.5+a/mpt*65536))
+ tex.sprint( (s:match('%.0$')) and s:sub(1,-3) or s )
+ end
+ }
+ \endgroup
+ \def\ltjs@magnify@external@font#1 at#2 at#3\@nil{%
+ \def\@tempa{#1}\def\@tempb{#2}%
+ \ifx\@tempb\@empty
+ \edef\@tempb{ scaled\directlua{%
+ tex.sprint(math.floor(0.5+\ltjs@magscale*1000))
+ }}%
+ \else
+ \dimen@\@tempb\relax
+ \edef\@tempb{ at\luafunction\ltjs@@magnify@font@calc sp}%
+ \fi
+ \edef\@tempa{\def\noexpand\external@font{\@tempa\@tempb}}
+ }
+ \let\ltjs@orig@get@external@font=\get@external@font
+ \def\get@external@font{%
+ \edef\f@size{\directlua{luatexja.ltjs_unmagnify_fsize(\f@size)}}%
+ \ltjs@orig@get@external@font
+ \begingroup
+ \edef\@tempa{\external@font\space at\space at}%
+ \expandafter\ltjs@magnify@external@font\@tempa\@nil
+ \expandafter\endgroup\@tempa
+ }
+\fi\fi
\setlength{\@tempdima}{\paperwidth}
\setlength{\@tempdimb}{\paperheight}
\iftombow
@@ -310,19 +284,19 @@
\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=min}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=min}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=min}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=min}{}
\else
\ifptexjis
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=jis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=jis}{}
\else
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujis}{}
\fi
\fi
-\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujisv}{}
-\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujisv}{}
\DeclareFontShape{JY3}{mc}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{gt}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{mc}{m}{it}{<->ssub*mc/m/n}{}
@@ -368,9 +342,11 @@
\if@slide
\ltjsetxkanjiskip .1em
\else
- \ltjsetxkanjiskip .25em plus .15em minus .06em
+ \ltjsetxkanjiskip .25em plus .15em minus .06em
\fi
\fi}
+\def\ltjs@setfontsize#1#2#3{%
+ \@setfontsize#1{#2\ltjs@mpt}{#3\ltjs@mpt}}
\emergencystretch 3\zw
\newif\ifnarrowbaselines
\if@english
@@ -395,11 +371,11 @@
}
\renewcommand{\normalsize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\normalsize\@xpt\@xiipt}%
- {\@setfontsize\normalsize\@xpt{\n@baseline}}%
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+ {\ltjs@setfontsize\normalsize\@xpt\@xiipt}%
+ {\ltjs@setfontsize\normalsize\@xpt{\n@baseline}}%
+ \abovedisplayskip 11\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
+ \belowdisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
\belowdisplayshortskip \belowdisplayskip
\let\@listi\@listI}
\mcfamily\selectfont\normalsize
@@ -411,10 +387,10 @@
\setlength\Chs{\wd0}
\newcommand{\small}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\small\@ixpt{11}}%
- {\@setfontsize\small\@ixpt{13}}%
- \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
+ {\ltjs@setfontsize\small\@ixpt{11}}%
+ {\ltjs@setfontsize\small\@ixpt{13}}%
+ \abovedisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
@@ -423,38 +399,38 @@
\itemsep \parsep}}
\newcommand{\footnotesize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\footnotesize\@viiipt{9.5}}%
- {\@setfontsize\footnotesize\@viiipt{11}}%
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus3\p@
- \abovedisplayshortskip \z@ \@plus2\p@
+ {\ltjs@setfontsize\footnotesize\@viiipt{9.5}}%
+ {\ltjs@setfontsize\footnotesize\@viiipt{11}}%
+ \abovedisplayskip 6\ltjs@mpt \@plus2\ltjs@mpt \@minus3\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus2\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
\topsep \z@
\parsep \z@
\itemsep \parsep}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
-\newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand{\scriptsize}{\ltjs@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand{\tiny}{\ltjs@setfontsize\tiny\@vpt\@vipt}
\if@twocolumn
- \newcommand{\large}{\@setfontsize\large\@xiipt{\n@baseline}}
+ \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{\n@baseline}}
\else
- \newcommand{\large}{\@setfontsize\large\@xiipt{17}}
+ \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{17}}
\fi
-\newcommand{\Large}{\@setfontsize\Large\@xivpt{21}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}}
-\newcommand{\huge}{\@setfontsize\huge\@xxpt{28}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}}
-\newcommand{\HUGE}{\@setfontsize\HUGE{30}{40}}
+\newcommand{\Large}{\ltjs@setfontsize\Large\@xivpt{21}}
+\newcommand{\LARGE}{\ltjs@setfontsize\LARGE\@xviipt{25}}
+\newcommand{\huge}{\ltjs@setfontsize\huge\@xxpt{28}}
+\newcommand{\Huge}{\ltjs@setfontsize\Huge\@xxvpt{33}}
+\newcommand{\HUGE}{\ltjs@setfontsize\HUGE{30}{40}}
\everydisplay=\expandafter{\the\everydisplay \narrowbaselines}
\newcommand{\headfont}{\gtfamily\sffamily}
\setlength\columnsep{2\zw}
-\setlength\columnseprule{0\p@}
-\setlength\lineskip{1\p@}
-\setlength\normallineskip{1\p@}
-\setlength\lineskiplimit{1\p@}
-\setlength\normallineskiplimit{1\p@}
+\setlength\columnseprule{\z@}
+\setlength\lineskip{1\ltjs@mpt}
+\setlength\normallineskip{1\ltjs@mpt}
+\setlength\lineskiplimit{1\ltjs@mpt}
+\setlength\normallineskiplimit{1\ltjs@mpt}
\renewcommand{\baselinestretch}{}
-\setlength\parskip{0\p@}
+\setlength\parskip{\z@}
\if@slide
\setlength\parindent{0\zw}
\else
@@ -463,14 +439,14 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
-\setlength\topskip{10\p@}
+\setlength\topskip{10\ltjs@mpt}
\if@slide
- \setlength\headheight{0\p@}
+ \setlength\headheight{0\ltjs@mpt}
\else
\setlength\headheight{2\topskip}
\fi
\if@slide
- \setlength\footskip{0pt}
+ \setlength\footskip{\z@}
\else
\setlength\footskip{0.03367\paperheight}
\ifdim\footskip<\baselineskip
@@ -478,7 +454,7 @@
\fi
\fi
\if@slide
- \setlength\headsep{0\p@}
+ \setlength\headsep{0\ltjs@mpt}
\else
\setlength\headsep{\footskip}
\addtolength\headsep{-\topskip}
@@ -505,7 +481,7 @@
\divide\textheight\baselineskip
\multiply\textheight\baselineskip
\addtolength{\textheight}{\topskip}
-\addtolength{\textheight}{0.1\p@}
+\addtolength{\textheight}{0.1\ltjs@mpt}
\setlength\marginparsep{\columnsep}
\setlength\marginparpush{\baselineskip}
\setlength{\oddsidemargin}{\paperwidth}
@@ -539,7 +515,7 @@
\addtolength\topmargin{-1in}
{\footnotesize\global\setlength\footnotesep{\baselineskip}}
\setlength\footnotesep{0.7\footnotesep}
-\setlength{\skip\footins}{16\p@ \@plus 5\p@ \@minus 2\p@}
+\setlength{\skip\footins}{16\ltjs@mpt \@plus 5\ltjs@mpt \@minus 2\ltjs@mpt}
\setcounter{topnumber}{9}
\renewcommand{\topfraction}{.85}
\setcounter{bottomnumber}{9}
@@ -550,17 +526,17 @@
\setcounter{dbltopnumber}{9}
\renewcommand{\dbltopfraction}{.8}
\renewcommand{\dblfloatpagefraction}{.8}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\@fptop{0\p@ \@plus 1fil}
-\setlength\@fpsep{8\p@ \@plus 2fil}
-\setlength\@fpbot{0\p@ \@plus 1fil}
-\setlength\@dblfptop{0\p@ \@plus 1fil}
-\setlength\@dblfpsep{8\p@ \@plus 2fil}
-\setlength\@dblfpbot{0\p@ \@plus 1fil}
+\setlength\floatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\textfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\intextsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dblfloatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dbltextfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\@fptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@fpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@fpbot{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@dblfpbot{0\ltjs@mpt \@plus 1fil}
\def\ps@plainfoot{%
\let\@mkboth\@gobbletwo
\let\@oddhead\@empty
@@ -640,16 +616,16 @@
\begin{center}
\mbox{} \\[1\zw]
\large
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\smallskip
\@title
\smallskip
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\vfill
{\small \@author}%
\end{center}
\else
- \vskip 60\p@
+ \vskip 60\ltjs@mpt
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
@@ -811,7 +787,7 @@
\@afterheading
\fi
\if@slide
- {\vskip-6pt\maybeblue\hrule height0pt depth1pt\vskip7pt\relax}%
+ {\vskip-6\ltjs@mpt\maybeblue\hrule height0\ltjs@mpt depth1\ltjs@mpt\vskip7\ltjs@mpt\relax}%
\fi
\par % 2000-12-18
\ignorespaces}
@@ -1092,14 +1068,14 @@
\gdef\postsectionname{}%
\gdef\thesection{\presectionname\@Alph\c@section\postsectionname}%
\gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}}
-\setlength\arraycolsep{5\p@}
-\setlength\tabcolsep{6\p@}
-\setlength\arrayrulewidth{.4\p@}
-\setlength\doublerulesep{2\p@}
+\setlength\arraycolsep{5\ltjs@mpt}
+\setlength\tabcolsep{6\ltjs@mpt}
+\setlength\arrayrulewidth{.4\ltjs@mpt}
+\setlength\doublerulesep{2\ltjs@mpt}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
+\setlength\fboxsep{3\ltjs@mpt}
+\setlength\fboxrule{.4\ltjs@mpt}
\renewcommand \theequation {\@arabic\c@equation}
\newcounter{figure}
\renewcommand \thefigure {\@arabic\c@figure}
@@ -1127,8 +1103,8 @@
{\end@dblfloat}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
-\setlength\abovecaptionskip{5\p@} % 元: 10\p@
-\setlength\belowcaptionskip{5\p@} % 元: 0\p@
+\setlength\abovecaptionskip{5\ltjs@mpt} % 元: 10\p@
+\setlength\belowcaptionskip{5\ltjs@mpt} % 元: 0\p@
\long\def\@makecaption#1#2{{\small
\advance\leftskip .0628\linewidth
\advance\rightskip .0628\linewidth
@@ -1165,7 +1141,7 @@
\newcommand*{\l@part}[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty\@secpenalty
- \addvspace{2.25em \@plus\p@}%
+ \addvspace{2.25em \@plus\ltjs@mpt}%
\begingroup
\parindent \z@
\rightskip \@tocrmarg
@@ -1180,7 +1156,7 @@
\newcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty{\@secpenalty}%
- \addvspace{1.0em \@plus\p@}%
+ \addvspace{1.0em \@plus\ltjs@mpt}%
\begingroup
\parindent\z@
\rightskip\@tocrmarg
@@ -1207,7 +1183,7 @@
\newdimen\@lnumwidth
\def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}\hspace{0pt}}
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
- \vskip \z@ \@plus.2\p@
+ \vskip \z@ \@plus.2\ltjs@mpt
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
@@ -1279,7 +1255,7 @@
\@mkboth{\indexname}{\indexname}%
\plainifnotempty % \thispagestyle{plain}
\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
+ \parskip\z@ \@plus .3\ltjs@mpt\relax
\let\item\@idxitem
\raggedright
\footnotesize\narrowbaselines
@@ -1294,7 +1270,7 @@
\newcommand{\@idxitem}{\par\hangindent 4\zw} % 元 40pt
\newcommand{\subitem}{\@idxitem \hspace*{2\zw}} % 元 20pt
\newcommand{\subsubitem}{\@idxitem \hspace*{3\zw}} % 元 30pt
-\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+\newcommand{\indexspace}{\par \vskip 10\ltjs@mpt \@plus5\ltjs@mpt \@minus3\ltjs@mpt\relax}
\newcommand\seename{\if@english see\else →\fi}
\newcommand\alsoname{\if@english see also\else →\fi}
\let\footnotes@ve=\footnote
@@ -1306,9 +1282,9 @@
\else\hbox{\yoko\@textsuperscript{\normalfont\@thefnmark}}\fi}\hbox{}}
\def\thefootnote{\ifnum\c@footnote>\z@\leavevmode\lower.5ex\hbox{*}\@arabic\c@footnote\fi}
\renewcommand{\footnoterule}{%
- \kern-3\p@
- \hrule width .4\columnwidth
- \kern 2.6\p@}
+ \kern-3\ltjs@mpt
+ \hrule width .4\columnwidth height .4\ltjs@mpt
+ \kern 2.6\ltjs@mpt}
\long\def\@footnotetext{%
\insert\footins\bgroup
\normalfont\footnotesize
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
index 92c9822e45f..70042be7a4d 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}
- [2016/01/30 ]
+ [2016/03/31 ltjsclasses ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -98,27 +98,32 @@
\DeclareOption{landscape}{\@landscapetrue}
\newif\if@slide
\@slidefalse
-\newcommand{\@ptsize}{0}
-\DeclareOption{slide}{\@slidetrue\renewcommand{\@ptsize}{26}\@landscapetrue\@titlepagetrue}
-\DeclareOption{8pt}{\renewcommand{\@ptsize}{-2}}
-\DeclareOption{9pt}{\renewcommand{\@ptsize}{-1}}
-\DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
-\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
-\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
-\DeclareOption{14pt}{\renewcommand{\@ptsize}{4}}
-\DeclareOption{17pt}{\renewcommand{\@ptsize}{7}}
-\DeclareOption{20pt}{\renewcommand{\@ptsize}{10}}
-\DeclareOption{21pt}{\renewcommand{\@ptsize}{11}}
-\DeclareOption{25pt}{\renewcommand{\@ptsize}{15}}
-\DeclareOption{30pt}{\renewcommand{\@ptsize}{20}}
-\DeclareOption{36pt}{\renewcommand{\@ptsize}{26}}
-\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}}
+\def\ltjs@magscale{1}
+\DeclareOption{slide}{\@slidetrue\def\ltjs@magscale{3.583}\@landscapetrue\@titlepagetrue}
+\DeclareOption{8pt} {\def\ltjs@magscale{0.83}}% 1.2^(-1)
+\DeclareOption{9pt} {\def\ltjs@magscale{0.913}}% 1.2^(-0.5}
+\DeclareOption{10pt}{\def\ltjs@magscale{1}}
+\DeclareOption{11pt}{\def\ltjs@magscale{1.095}}% 1.2^0.5
+\DeclareOption{12pt}{\def\ltjs@magscale{1.200}}
+\DeclareOption{14pt}{\def\ltjs@magscale{1.440}}
+\DeclareOption{17pt}{\def\ltjs@magscale{1.728}}
+\DeclareOption{20pt}{\def\ltjs@magscale{2}}
+\DeclareOption{21pt}{\def\ltjs@magscale{2.074}}
+\DeclareOption{25pt}{\def\ltjs@magscale{2.488}}
+\DeclareOption{30pt}{\def\ltjs@magscale{2.986}}
+\DeclareOption{36pt}{\def\ltjs@magscale{3.583}}
+\DeclareOption{43pt}{\def\ltjs@magscale{4.300}}
+\DeclareOption{12Q} {\def\ltjs@magscale{0.923}}% 1pt*12Q/13Q
+\DeclareOption{14Q} {\def\ltjs@magscale{1.077}}% 1pt*14Q/13Q
+\DeclareOption{10ptj}{\def\ltjs@magscale{1.085}}% 1pt*10bp/13Q
+\DeclareOption{10.5ptj}{\def\ltjs@magscale{1.139}}
+\DeclareOption{11ptj}{\def\ltjs@magscale{1.194}}
+\DeclareOption{12ptj}{\def\ltjs@magscale{1.302}}
+\newif\if@ltjs@mag@xreal
+\@ltjs@mag@xrealtrue
+\DeclareOption{xreal}{\@ltjs@mag@xrealtrue}
+\DeclareOption{noxreal}{\@ltjs@mag@xrealfalse}
+\DeclareOption{real}{\@ltjs@mag@xrealfalse}
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
\minute\time \advance\minute-\@tempcnta
@@ -205,9 +210,6 @@
\DeclareOption{mingoth}{\mingothtrue}
\DeclareOption{ptexjis}{\ptexjistrue}
\DeclareOption{jis}{\jisfonttrue}
-\newif\ifpapersize
-\papersizefalse
-\DeclareOption{papersize}{\papersizetrue}
\newif\if@english
\@englishfalse
\DeclareOption{english}{\@englishtrue}
@@ -225,83 +227,55 @@
\setlength\paperwidth {\@tempdima}
\fi
\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi
-\def\inv@mag{1}
-\ifnum\@ptsize=-2
- \mag 833
- \def\inv@mag{1.20048}
- \def\n@baseline{15}%
-\fi
-\ifnum\@ptsize=-1
- \mag 913 % formerly 900
- \def\inv@mag{1.09529}
+\newdimen\ltjs@mpt
+\ltjs@mpt=\ltjs@magscale\p@
+\ifdim\ltjs@mpt<.92\p@ % 8pt, 9pt 指定時
\def\n@baseline{15}%
\fi
-\ifnum\@ptsize=1
- \mag 1095 % formerly 1100
- \def\inv@mag{0.913242}
-\fi
-\ifnum\@ptsize=2
- \mag 1200
- \def\inv@mag{0.833333}
-\fi
-\ifnum\@ptsize=4
- \mag 1440
- \def\inv@mag{0.694444}
-\fi
-\ifnum\@ptsize=7
- \mag 1728
- \def\inv@mag{0.578704}
-\fi
-\ifnum\@ptsize=10
- \mag 2000
- \def\inv@mag{0.5}
-\fi
-\ifnum\@ptsize=11
- \mag 2074
- \def\inv@mag{0.48216}
-\fi
-\ifnum\@ptsize=15
- \mag 2488
- \def\inv@mag{0.401929}
-\fi
-\ifnum\@ptsize=20
- \mag 2986
- \def\inv@mag{0.334896}
-\fi
-\ifnum\@ptsize=26
- \mag 3583
- \def\inv@mag{0.279096}
-\fi
-\ifnum\@ptsize=33
- \mag 4300
- \def\inv@mag{0.232558}
-\fi
-\ifnum\@ptsize=1200
- \mag 923
- \def\inv@mag{1.0834236}
-\fi
-\ifnum\@ptsize=1400
- \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}%
+\newcommand{\@ptsize}{0}
+\ifdim\ltjs@mpt=1.0954\p@ \renewcommand{\@ptsize}{1}\else
+\ifdim\ltjs@mpt=1.2\p@ \renewcommand{\@ptsize}{2}\else
+\renewcommand{\@ptsize}{-20}\fi\fi
+\if@ltjs@mag@xreal\RequirePackage{type1cm}
+\ifdim\ltjs@mpt=\p@\else
+ \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
+ \newluafunction\ltjs@@magnify@font@calc
+ \begingroup\catcode`\%=12\relax
+ \directlua{
+ local getdimen, mpt=tex.getdimen, tex.getdimen('ltjs@mpt')/65536
+ local t = lua.get_functions_table()
+ t[\the\ltjs@@magnify@font@calc] = function()
+ tex.sprint(math.floor(0.5+mpt*getdimen('dimen@')))
+ end
+ function luatexja.ltjs_unmagnify_fsize(a)
+ local s = luatexja.print_scaled(math.floor(0.5+a/mpt*65536))
+ tex.sprint( (s:match('%.0$')) and s:sub(1,-3) or s )
+ end
+ }
+ \endgroup
+ \def\ltjs@magnify@external@font#1 at#2 at#3\@nil{%
+ \def\@tempa{#1}\def\@tempb{#2}%
+ \ifx\@tempb\@empty
+ \edef\@tempb{ scaled\directlua{%
+ tex.sprint(math.floor(0.5+\ltjs@magscale*1000))
+ }}%
+ \else
+ \dimen@\@tempb\relax
+ \edef\@tempb{ at\luafunction\ltjs@@magnify@font@calc sp}%
+ \fi
+ \edef\@tempa{\def\noexpand\external@font{\@tempa\@tempb}}
+ }
+ \let\ltjs@orig@get@external@font=\get@external@font
+ \def\get@external@font{%
+ \edef\f@size{\directlua{luatexja.ltjs_unmagnify_fsize(\f@size)}}%
+ \ltjs@orig@get@external@font
+ \begingroup
+ \edef\@tempa{\external@font\space at\space at}%
+ \expandafter\ltjs@magnify@external@font\@tempa\@nil
+ \expandafter\endgroup\@tempa
+ }
+\fi\fi
\setlength{\@tempdima}{\paperwidth}
\setlength{\@tempdimb}{\paperheight}
\iftombow
@@ -317,19 +291,19 @@
\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=min}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=min}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=min}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=min}{}
\else
\ifptexjis
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=jis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=jis}{}
\else
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujis}{}
\fi
\fi
-\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujisv}{}
-\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujisv}{}
\DeclareFontShape{JY3}{mc}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{gt}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{mc}{m}{it}{<->ssub*mc/m/n}{}
@@ -375,9 +349,11 @@
\if@slide
\ltjsetxkanjiskip .1em
\else
- \ltjsetxkanjiskip .25em plus .15em minus .06em
+ \ltjsetxkanjiskip .25em plus .15em minus .06em
\fi
\fi}
+\def\ltjs@setfontsize#1#2#3{%
+ \@setfontsize#1{#2\ltjs@mpt}{#3\ltjs@mpt}}
\emergencystretch 3\zw
\newif\ifnarrowbaselines
\if@english
@@ -402,11 +378,11 @@
}
\renewcommand{\normalsize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\normalsize\@xpt\@xiipt}%
- {\@setfontsize\normalsize\@xpt{\n@baseline}}%
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+ {\ltjs@setfontsize\normalsize\@xpt\@xiipt}%
+ {\ltjs@setfontsize\normalsize\@xpt{\n@baseline}}%
+ \abovedisplayskip 11\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
+ \belowdisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
\belowdisplayshortskip \belowdisplayskip
\let\@listi\@listI}
\mcfamily\selectfont\normalsize
@@ -418,10 +394,10 @@
\setlength\Chs{\wd0}
\newcommand{\small}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\small\@ixpt{11}}%
- {\@setfontsize\small\@ixpt{13}}%
- \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
+ {\ltjs@setfontsize\small\@ixpt{11}}%
+ {\ltjs@setfontsize\small\@ixpt{13}}%
+ \abovedisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
@@ -430,38 +406,38 @@
\itemsep \parsep}}
\newcommand{\footnotesize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\footnotesize\@viiipt{9.5}}%
- {\@setfontsize\footnotesize\@viiipt{11}}%
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus3\p@
- \abovedisplayshortskip \z@ \@plus2\p@
+ {\ltjs@setfontsize\footnotesize\@viiipt{9.5}}%
+ {\ltjs@setfontsize\footnotesize\@viiipt{11}}%
+ \abovedisplayskip 6\ltjs@mpt \@plus2\ltjs@mpt \@minus3\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus2\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
\topsep \z@
\parsep \z@
\itemsep \parsep}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
-\newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand{\scriptsize}{\ltjs@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand{\tiny}{\ltjs@setfontsize\tiny\@vpt\@vipt}
\if@twocolumn
- \newcommand{\large}{\@setfontsize\large\@xiipt{\n@baseline}}
+ \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{\n@baseline}}
\else
- \newcommand{\large}{\@setfontsize\large\@xiipt{17}}
+ \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{17}}
\fi
-\newcommand{\Large}{\@setfontsize\Large\@xivpt{21}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}}
-\newcommand{\huge}{\@setfontsize\huge\@xxpt{28}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}}
-\newcommand{\HUGE}{\@setfontsize\HUGE{30}{40}}
+\newcommand{\Large}{\ltjs@setfontsize\Large\@xivpt{21}}
+\newcommand{\LARGE}{\ltjs@setfontsize\LARGE\@xviipt{25}}
+\newcommand{\huge}{\ltjs@setfontsize\huge\@xxpt{28}}
+\newcommand{\Huge}{\ltjs@setfontsize\Huge\@xxvpt{33}}
+\newcommand{\HUGE}{\ltjs@setfontsize\HUGE{30}{40}}
\everydisplay=\expandafter{\the\everydisplay \narrowbaselines}
\newcommand{\headfont}{\gtfamily\sffamily}
\setlength\columnsep{2\zw}
-\setlength\columnseprule{0\p@}
-\setlength\lineskip{1\p@}
-\setlength\normallineskip{1\p@}
-\setlength\lineskiplimit{1\p@}
-\setlength\normallineskiplimit{1\p@}
+\setlength\columnseprule{\z@}
+\setlength\lineskip{1\ltjs@mpt}
+\setlength\normallineskip{1\ltjs@mpt}
+\setlength\lineskiplimit{1\ltjs@mpt}
+\setlength\normallineskiplimit{1\ltjs@mpt}
\renewcommand{\baselinestretch}{}
-\setlength\parskip{0\p@}
+\setlength\parskip{\z@}
\if@slide
\setlength\parindent{0\zw}
\else
@@ -470,9 +446,9 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
-\setlength\topskip{10\p@}
+\setlength\topskip{10\ltjs@mpt}
\if@slide
- \setlength\headheight{0\p@}
+ \setlength\headheight{0\ltjs@mpt}
\else
\setlength\headheight{2\topskip}
\fi
@@ -482,7 +458,7 @@
\setlength\footskip{\baselineskip}
\fi
\else
- \setlength\footskip{0pt}
+ \setlength\footskip{\z@}
\fi
\if@report
\setlength\headsep{\footskip}
@@ -520,7 +496,7 @@
\divide\textheight\baselineskip
\multiply\textheight\baselineskip
\addtolength{\textheight}{\topskip}
-\addtolength{\textheight}{0.1\p@}
+\addtolength{\textheight}{0.1\ltjs@mpt}
\setlength\marginparsep{\columnsep}
\setlength\marginparpush{\baselineskip}
\setlength{\oddsidemargin}{\paperwidth}
@@ -554,7 +530,7 @@
\addtolength\topmargin{-1in}
{\footnotesize\global\setlength\footnotesep{\baselineskip}}
\setlength\footnotesep{0.7\footnotesep}
-\setlength{\skip\footins}{16\p@ \@plus 5\p@ \@minus 2\p@}
+\setlength{\skip\footins}{16\ltjs@mpt \@plus 5\ltjs@mpt \@minus 2\ltjs@mpt}
\setcounter{topnumber}{9}
\renewcommand{\topfraction}{.85}
\setcounter{bottomnumber}{9}
@@ -565,17 +541,17 @@
\setcounter{dbltopnumber}{9}
\renewcommand{\dbltopfraction}{.8}
\renewcommand{\dblfloatpagefraction}{.8}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\@fptop{0\p@ \@plus 1fil}
-\setlength\@fpsep{8\p@ \@plus 2fil}
-\setlength\@fpbot{0\p@ \@plus 1fil}
-\setlength\@dblfptop{0\p@ \@plus 1fil}
-\setlength\@dblfpsep{8\p@ \@plus 2fil}
-\setlength\@dblfpbot{0\p@ \@plus 1fil}
+\setlength\floatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\textfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\intextsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dblfloatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dbltextfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\@fptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@fpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@fpbot{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@dblfpbot{0\ltjs@mpt \@plus 1fil}
\def\ps@plainfoot{%
\let\@mkboth\@gobbletwo
\let\@oddhead\@empty
@@ -650,16 +626,16 @@
\begin{center}
\mbox{} \\[1\zw]
\large
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\smallskip
\@title
\smallskip
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\vfill
{\small \@author}%
\end{center}
\else
- \vskip 60\p@
+ \vskip 60\ltjs@mpt
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
@@ -820,7 +796,7 @@
\@afterheading
\fi
\if@slide
- {\vskip-6pt\maybeblue\hrule height0pt depth1pt\vskip7pt\relax}%
+ {\vskip-6\ltjs@mpt\maybeblue\hrule height0\ltjs@mpt depth1\ltjs@mpt\vskip7\ltjs@mpt\relax}%
\fi
\par % 2000-12-18
\ignorespaces}
@@ -905,7 +881,7 @@
\normalfont
\ifnum \c@secnumdepth >-2\relax
\huge\headfont \prepartname\thepart\postpartname
- \par\vskip20\p@
+ \par\vskip20\ltjs@mpt
\fi
\Huge \headfont #2\par}%
\@endpart}
@@ -947,8 +923,8 @@
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \addtocontents{lof}{\protect\addvspace{10\ltjs@mpt}}%
+ \addtocontents{lot}{\protect\addvspace{10\ltjs@mpt}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
@@ -1151,14 +1127,14 @@
\gdef\@chapapp{\appendixname}%
\gdef\@chappos{}%
\gdef\thechapter{\@Alph\c@chapter}}
-\setlength\arraycolsep{5\p@}
-\setlength\tabcolsep{6\p@}
-\setlength\arrayrulewidth{.4\p@}
-\setlength\doublerulesep{2\p@}
+\setlength\arraycolsep{5\ltjs@mpt}
+\setlength\tabcolsep{6\ltjs@mpt}
+\setlength\arrayrulewidth{.4\ltjs@mpt}
+\setlength\doublerulesep{2\ltjs@mpt}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
+\setlength\fboxsep{3\ltjs@mpt}
+\setlength\fboxrule{.4\ltjs@mpt}
\@addtoreset{equation}{chapter}
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
@@ -1190,8 +1166,8 @@
{\end@dblfloat}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
-\setlength\abovecaptionskip{5\p@} % 元: 10\p@
-\setlength\belowcaptionskip{5\p@} % 元: 0\p@
+\setlength\abovecaptionskip{5\ltjs@mpt} % 元: 10\p@
+\setlength\belowcaptionskip{5\ltjs@mpt} % 元: 0\p@
\long\def\@makecaption#1#2{{\small
\advance\leftskip .0628\linewidth
\advance\rightskip .0628\linewidth
@@ -1234,7 +1210,7 @@
\newcommand*{\l@part}[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
+ \addvspace{2.25em \@plus\ltjs@mpt}%
\begingroup
\parindent \z@
\rightskip \@tocrmarg
@@ -1251,7 +1227,7 @@
\newcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
- \addvspace{1.0em \@plus\p@}
+ \addvspace{1.0em \@plus\ltjs@mpt}
\begingroup
\parindent\z@
\rightskip\@tocrmarg
@@ -1283,7 +1259,7 @@
\newdimen\@lnumwidth
\def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}\hspace{0pt}}
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
- \vskip \z@ \@plus.2\p@
+ \vskip \z@ \@plus.2\ltjs@mpt
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
@@ -1362,7 +1338,7 @@
\@mkboth{\indexname}{}%
\plainifnotempty % \thispagestyle{plain}
\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
+ \parskip\z@ \@plus .3\ltjs@mpt\relax
\let\item\@idxitem
\raggedright
\footnotesize\narrowbaselines
@@ -1377,7 +1353,7 @@
\newcommand{\@idxitem}{\par\hangindent 4\zw} % 元 40pt
\newcommand{\subitem}{\@idxitem \hspace*{2\zw}} % 元 20pt
\newcommand{\subsubitem}{\@idxitem \hspace*{3\zw}} % 元 30pt
-\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+\newcommand{\indexspace}{\par \vskip 10\ltjs@mpt \@plus5\ltjs@mpt \@minus3\ltjs@mpt\relax}
\newcommand\seename{\if@english see\else →\fi}
\newcommand\alsoname{\if@english see also\else →\fi}
\let\footnotes@ve=\footnote
@@ -1389,9 +1365,9 @@
\else\hbox{\yoko\@textsuperscript{\normalfont\@thefnmark}}\fi}\hbox{}}
\def\thefootnote{\ifnum\c@footnote>\z@\leavevmode\lower.5ex\hbox{*}\@arabic\c@footnote\fi}
\renewcommand{\footnoterule}{%
- \kern-3\p@
- \hrule width .4\columnwidth
- \kern 2.6\p@}
+ \kern-3\ltjs@mpt
+ \hrule width .4\columnwidth height .4\ltjs@mpt
+ \kern 2.6\ltjs@mpt}
\@addtoreset{footnote}{chapter}
\long\def\@footnotetext{%
\insert\footins\bgroup
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
index 6279b5096d6..4781e3cd5dc 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}
- [2016/01/30 ]
+ [2016/03/31 ltjsclasses ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -96,27 +96,32 @@
\DeclareOption{landscape}{\@landscapetrue}
\newif\if@slide
\@slidefalse
-\newcommand{\@ptsize}{0}
-\DeclareOption{slide}{\@slidetrue\renewcommand{\@ptsize}{26}\@landscapetrue\@titlepagetrue}
-\DeclareOption{8pt}{\renewcommand{\@ptsize}{-2}}
-\DeclareOption{9pt}{\renewcommand{\@ptsize}{-1}}
-\DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
-\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
-\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
-\DeclareOption{14pt}{\renewcommand{\@ptsize}{4}}
-\DeclareOption{17pt}{\renewcommand{\@ptsize}{7}}
-\DeclareOption{20pt}{\renewcommand{\@ptsize}{10}}
-\DeclareOption{21pt}{\renewcommand{\@ptsize}{11}}
-\DeclareOption{25pt}{\renewcommand{\@ptsize}{15}}
-\DeclareOption{30pt}{\renewcommand{\@ptsize}{20}}
-\DeclareOption{36pt}{\renewcommand{\@ptsize}{26}}
-\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}}
+\def\ltjs@magscale{1}
+\DeclareOption{slide}{\@slidetrue\def\ltjs@magscale{3.583}\@landscapetrue\@titlepagetrue}
+\DeclareOption{8pt} {\def\ltjs@magscale{0.83}}% 1.2^(-1)
+\DeclareOption{9pt} {\def\ltjs@magscale{0.913}}% 1.2^(-0.5}
+\DeclareOption{10pt}{\def\ltjs@magscale{1}}
+\DeclareOption{11pt}{\def\ltjs@magscale{1.095}}% 1.2^0.5
+\DeclareOption{12pt}{\def\ltjs@magscale{1.200}}
+\DeclareOption{14pt}{\def\ltjs@magscale{1.440}}
+\DeclareOption{17pt}{\def\ltjs@magscale{1.728}}
+\DeclareOption{20pt}{\def\ltjs@magscale{2}}
+\DeclareOption{21pt}{\def\ltjs@magscale{2.074}}
+\DeclareOption{25pt}{\def\ltjs@magscale{2.488}}
+\DeclareOption{30pt}{\def\ltjs@magscale{2.986}}
+\DeclareOption{36pt}{\def\ltjs@magscale{3.583}}
+\DeclareOption{43pt}{\def\ltjs@magscale{4.300}}
+\DeclareOption{12Q} {\def\ltjs@magscale{0.923}}% 1pt*12Q/13Q
+\DeclareOption{14Q} {\def\ltjs@magscale{1.077}}% 1pt*14Q/13Q
+\DeclareOption{10ptj}{\def\ltjs@magscale{1.085}}% 1pt*10bp/13Q
+\DeclareOption{10.5ptj}{\def\ltjs@magscale{1.139}}
+\DeclareOption{11ptj}{\def\ltjs@magscale{1.194}}
+\DeclareOption{12ptj}{\def\ltjs@magscale{1.302}}
+\newif\if@ltjs@mag@xreal
+\@ltjs@mag@xrealtrue
+\DeclareOption{xreal}{\@ltjs@mag@xrealtrue}
+\DeclareOption{noxreal}{\@ltjs@mag@xrealfalse}
+\DeclareOption{real}{\@ltjs@mag@xrealfalse}
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
\minute\time \advance\minute-\@tempcnta
@@ -201,9 +206,6 @@
\DeclareOption{mingoth}{\mingothtrue}
\DeclareOption{ptexjis}{\ptexjistrue}
\DeclareOption{jis}{\jisfonttrue}
-\newif\ifpapersize
-\papersizefalse
-\DeclareOption{papersize}{\papersizetrue}
\newif\if@english
\@englishfalse
\DeclareOption{english}{\@englishtrue}
@@ -218,85 +220,56 @@
\setlength\paperwidth {\@tempdima}
\fi
\def\n@baseline{14.897}
-\def\inv@mag{1}
-\ifnum\@ptsize=-2
- \mag 833
- \def\inv@mag{1.20048}
- \def\n@baseline{15}%
-\fi
-\ifnum\@ptsize=-1
- \mag 913 % formerly 900
- \def\inv@mag{1.09529}
+\def\ltjs@magscale{0.977}
+\newdimen\ltjs@mpt
+\ltjs@mpt=\ltjs@magscale\p@
+\ifdim\ltjs@mpt<.92\p@ % 8pt, 9pt 指定時
\def\n@baseline{15}%
\fi
-\ifnum\@ptsize=1
- \mag 1095 % formerly 1100
- \def\inv@mag{0.913242}
-\fi
-\ifnum\@ptsize=2
- \mag 1200
- \def\inv@mag{0.833333}
-\fi
-\ifnum\@ptsize=4
- \mag 1440
- \def\inv@mag{0.694444}
-\fi
-\ifnum\@ptsize=7
- \mag 1728
- \def\inv@mag{0.578704}
-\fi
-\ifnum\@ptsize=10
- \mag 2000
- \def\inv@mag{0.5}
-\fi
-\ifnum\@ptsize=11
- \mag 2074
- \def\inv@mag{0.48216}
-\fi
-\ifnum\@ptsize=15
- \mag 2488
- \def\inv@mag{0.401929}
-\fi
-\ifnum\@ptsize=20
- \mag 2986
- \def\inv@mag{0.334896}
-\fi
-\ifnum\@ptsize=26
- \mag 3583
- \def\inv@mag{0.279096}
-\fi
-\ifnum\@ptsize=33
- \mag 4300
- \def\inv@mag{0.232558}
-\fi
-\ifnum\@ptsize=1200
- \mag 923
- \def\inv@mag{1.0834236}
-\fi
-\ifnum\@ptsize=1400
- \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}%
-\setlength\paperheight{\inv@mag\paperheight}%
+\newcommand{\@ptsize}{0}
+\ifdim\ltjs@mpt=1.0954\p@ \renewcommand{\@ptsize}{1}\else
+\ifdim\ltjs@mpt=1.2\p@ \renewcommand{\@ptsize}{2}\else
+\renewcommand{\@ptsize}{-20}\fi\fi
+\if@ltjs@mag@xreal\RequirePackage{type1cm}
+\ifdim\ltjs@mpt=\p@\else
+ \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
+ \newluafunction\ltjs@@magnify@font@calc
+ \begingroup\catcode`\%=12\relax
+ \directlua{
+ local getdimen, mpt=tex.getdimen, tex.getdimen('ltjs@mpt')/65536
+ local t = lua.get_functions_table()
+ t[\the\ltjs@@magnify@font@calc] = function()
+ tex.sprint(math.floor(0.5+mpt*getdimen('dimen@')))
+ end
+ function luatexja.ltjs_unmagnify_fsize(a)
+ local s = luatexja.print_scaled(math.floor(0.5+a/mpt*65536))
+ tex.sprint( (s:match('%.0$')) and s:sub(1,-3) or s )
+ end
+ }
+ \endgroup
+ \def\ltjs@magnify@external@font#1 at#2 at#3\@nil{%
+ \def\@tempa{#1}\def\@tempb{#2}%
+ \ifx\@tempb\@empty
+ \edef\@tempb{ scaled\directlua{%
+ tex.sprint(math.floor(0.5+\ltjs@magscale*1000))
+ }}%
+ \else
+ \dimen@\@tempb\relax
+ \edef\@tempb{ at\luafunction\ltjs@@magnify@font@calc sp}%
+ \fi
+ \edef\@tempa{\def\noexpand\external@font{\@tempa\@tempb}}
+ }
+ \let\ltjs@orig@get@external@font=\get@external@font
+ \def\get@external@font{%
+ \edef\f@size{\directlua{luatexja.ltjs_unmagnify_fsize(\f@size)}}%
+ \ltjs@orig@get@external@font
+ \begingroup
+ \edef\@tempa{\external@font\space at\space at}%
+ \expandafter\ltjs@magnify@external@font\@tempa\@nil
+ \expandafter\endgroup\@tempa
+ }
+\fi\fi
\setlength{\@tempdima}{\paperwidth}
\setlength{\@tempdimb}{\paperheight}
\iftombow
@@ -312,19 +285,19 @@
\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=min}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=min}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=min}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=min}{}
\else
\ifptexjis
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=jis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=jis}{}
\else
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujis}{}
\fi
\fi
-\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=ujisv}{}
-\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924872] \ltj@stdgtfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujisv}{}
\DeclareFontShape{JY3}{mc}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{gt}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{mc}{m}{it}{<->ssub*mc/m/n}{}
@@ -370,9 +343,11 @@
\if@slide
\ltjsetxkanjiskip .1em
\else
- \ltjsetxkanjiskip .25em plus .15em minus .06em
+ \ltjsetxkanjiskip .25em plus .15em minus .06em
\fi
\fi}
+\def\ltjs@setfontsize#1#2#3{%
+ \@setfontsize#1{#2\ltjs@mpt}{#3\ltjs@mpt}}
\emergencystretch 3\zw
\newif\ifnarrowbaselines
\if@english
@@ -397,11 +372,11 @@
}
\renewcommand{\normalsize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\normalsize\@xpt\@xiipt}%
- {\@setfontsize\normalsize\@xpt{\n@baseline}}%
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+ {\ltjs@setfontsize\normalsize\@xpt\@xiipt}%
+ {\ltjs@setfontsize\normalsize\@xpt{\n@baseline}}%
+ \abovedisplayskip 11\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
+ \belowdisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
\belowdisplayshortskip \belowdisplayskip
\let\@listi\@listI}
\mcfamily\selectfont\normalsize
@@ -413,10 +388,10 @@
\setlength\Chs{\wd0}
\newcommand{\small}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\small{8.8888}{11}}%
- {\@setfontsize\small{8.8888}{13.2418}}%
- \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
+ {\ltjs@setfontsize\small{8.8888}{11}}%
+ {\ltjs@setfontsize\small{8.8888}{13.2418}}%
+ \abovedisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
@@ -425,38 +400,38 @@
\itemsep \parsep}}
\newcommand{\footnotesize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\footnotesize{8.8888}{11}}%
- {\@setfontsize\footnotesize{8.8888}{13.2418}}%
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus3\p@
- \abovedisplayshortskip \z@ \@plus2\p@
+ {\ltjs@setfontsize\footnotesize{8.8888}{11}}%
+ {\ltjs@setfontsize\footnotesize{8.8888}{13.2418}}%
+ \abovedisplayskip 6\ltjs@mpt \@plus2\ltjs@mpt \@minus3\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus2\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
\topsep \z@
\parsep \z@
\itemsep \parsep}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
-\newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand{\scriptsize}{\ltjs@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand{\tiny}{\ltjs@setfontsize\tiny\@vpt\@vipt}
\if@twocolumn
- \newcommand{\large}{\@setfontsize\large{11.111}{\n@baseline}}
+ \newcommand{\large}{\ltjs@setfontsize\large{11.111}{\n@baseline}}
\else
- \newcommand{\large}{\@setfontsize\large{11.111}{17}}
+ \newcommand{\large}{\ltjs@setfontsize\large{11.111}{17}}
\fi
-\newcommand{\Large}{\@setfontsize\Large{12.222}{21}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}}
-\newcommand{\huge}{\@setfontsize\huge\@xxpt{28}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}}
-\newcommand{\HUGE}{\@setfontsize\HUGE{30}{40}}
+\newcommand{\Large}{\ltjs@setfontsize\Large{12.222}{21}}
+\newcommand{\LARGE}{\ltjs@setfontsize\LARGE\@xviipt{25}}
+\newcommand{\huge}{\ltjs@setfontsize\huge\@xxpt{28}}
+\newcommand{\Huge}{\ltjs@setfontsize\Huge\@xxvpt{33}}
+\newcommand{\HUGE}{\ltjs@setfontsize\HUGE{30}{40}}
\everydisplay=\expandafter{\the\everydisplay \narrowbaselines}
\newcommand{\headfont}{\gtfamily\sffamily}
\setlength\columnsep{28truebp}
-\setlength\columnseprule{0\p@}
-\setlength\lineskip{1\p@}
-\setlength\normallineskip{1\p@}
-\setlength\lineskiplimit{1\p@}
-\setlength\normallineskiplimit{1\p@}
+\setlength\columnseprule{\z@}
+\setlength\lineskip{1\ltjs@mpt}
+\setlength\normallineskip{1\ltjs@mpt}
+\setlength\lineskiplimit{1\ltjs@mpt}
+\setlength\normallineskiplimit{1\ltjs@mpt}
\renewcommand{\baselinestretch}{}
-\setlength\parskip{0\p@}
+\setlength\parskip{\z@}
\if@slide
\setlength\parindent{0\zw}
\else
@@ -465,22 +440,22 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
-\setlength\topskip{10\p@}
+\setlength\topskip{10\ltjs@mpt}
\if@slide
- \setlength\headheight{0\p@}
+ \setlength\headheight{0\ltjs@mpt}
\else
\setlength\headheight{2\topskip}
\fi
\if@slide
- \setlength\footskip{0pt}
+ \setlength\footskip{\z@}
\else
\setlength\footskip{0.03367\paperheight}
\ifdim\footskip<\baselineskip
\setlength\footskip{\baselineskip}
\fi
\fi
-\setlength\headheight{0\p@}
-\setlength\headsep{0\p@}
+\setlength\headheight{0\ltjs@mpt}
+\setlength\headsep{0\ltjs@mpt}
\setlength\maxdepth{.5\topskip}
\newdimen\fullwidth
\setlength\fullwidth{48\zw}
@@ -488,7 +463,7 @@
\setlength\textwidth{\fullwidth}
\setlength{\textheight}{47\baselineskip}
\addtolength{\textheight}{\topskip}
-\addtolength{\textheight}{0.1\p@}
+\addtolength{\textheight}{0.1\ltjs@mpt}
\setlength\marginparsep{\columnsep}
\setlength\marginparpush{\baselineskip}
\setlength{\oddsidemargin}{\paperwidth}
@@ -523,7 +498,7 @@
\addtolength\topmargin{-1in}
{\footnotesize\global\setlength\footnotesep{\baselineskip}}
\setlength\footnotesep{0.7\footnotesep}
-\setlength{\skip\footins}{16\p@ \@plus 5\p@ \@minus 2\p@}
+\setlength{\skip\footins}{16\ltjs@mpt \@plus 5\ltjs@mpt \@minus 2\ltjs@mpt}
\setcounter{topnumber}{9}
\renewcommand{\topfraction}{.85}
\setcounter{bottomnumber}{9}
@@ -534,17 +509,17 @@
\setcounter{dbltopnumber}{9}
\renewcommand{\dbltopfraction}{.8}
\renewcommand{\dblfloatpagefraction}{.8}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\@fptop{0\p@ \@plus 1fil}
-\setlength\@fpsep{8\p@ \@plus 2fil}
-\setlength\@fpbot{0\p@ \@plus 1fil}
-\setlength\@dblfptop{0\p@ \@plus 1fil}
-\setlength\@dblfpsep{8\p@ \@plus 2fil}
-\setlength\@dblfpbot{0\p@ \@plus 1fil}
+\setlength\floatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\textfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\intextsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dblfloatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dbltextfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\@fptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@fpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@fpbot{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@dblfpbot{0\ltjs@mpt \@plus 1fil}
\def\ps@plainfoot{%
\let\@mkboth\@gobbletwo
\let\@oddhead\@empty
@@ -624,16 +599,16 @@
\begin{center}
\mbox{} \\[1\zw]
\large
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\smallskip
\@title
\smallskip
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ {\maybeblue\hrule height0\ltjs@mpt depth2\ltjs@mpt\relax}\par
\vfill
{\small \@author}%
\end{center}
\else
- \vskip 60\p@
+ \vskip 60\ltjs@mpt
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
@@ -795,7 +770,7 @@
\@afterheading
\fi
\if@slide
- {\vskip-6pt\maybeblue\hrule height0pt depth1pt\vskip7pt\relax}%
+ {\vskip-6\ltjs@mpt\maybeblue\hrule height0\ltjs@mpt depth1\ltjs@mpt\vskip7\ltjs@mpt\relax}%
\fi
\par % 2000-12-18
\ignorespaces}
@@ -1076,14 +1051,14 @@
\gdef\postsectionname{}%
\gdef\thesection{\presectionname\@Alph\c@section\postsectionname}%
\gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}}
-\setlength\arraycolsep{5\p@}
-\setlength\tabcolsep{6\p@}
-\setlength\arrayrulewidth{.4\p@}
-\setlength\doublerulesep{2\p@}
+\setlength\arraycolsep{5\ltjs@mpt}
+\setlength\tabcolsep{6\ltjs@mpt}
+\setlength\arrayrulewidth{.4\ltjs@mpt}
+\setlength\doublerulesep{2\ltjs@mpt}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
+\setlength\fboxsep{3\ltjs@mpt}
+\setlength\fboxrule{.4\ltjs@mpt}
\renewcommand \theequation {\@arabic\c@equation}
\newcounter{figure}
\renewcommand \thefigure {\@arabic\c@figure}
@@ -1111,8 +1086,8 @@
{\end@dblfloat}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
-\setlength\abovecaptionskip{5\p@} % 元: 10\p@
-\setlength\belowcaptionskip{5\p@} % 元: 0\p@
+\setlength\abovecaptionskip{5\ltjs@mpt} % 元: 10\p@
+\setlength\belowcaptionskip{5\ltjs@mpt} % 元: 0\p@
\long\def\@makecaption#1#2{{\small
\advance\leftskip .0628\linewidth
\advance\rightskip .0628\linewidth
@@ -1149,7 +1124,7 @@
\newcommand*{\l@part}[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty\@secpenalty
- \addvspace{2.25em \@plus\p@}%
+ \addvspace{2.25em \@plus\ltjs@mpt}%
\begingroup
\parindent \z@
\rightskip \@tocrmarg
@@ -1164,7 +1139,7 @@
\newcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty{\@secpenalty}%
- \addvspace{1.0em \@plus\p@}%
+ \addvspace{1.0em \@plus\ltjs@mpt}%
\begingroup
\parindent\z@
\rightskip\@tocrmarg
@@ -1191,7 +1166,7 @@
\newdimen\@lnumwidth
\def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}\hspace{0pt}}
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
- \vskip \z@ \@plus.2\p@
+ \vskip \z@ \@plus.2\ltjs@mpt
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
@@ -1266,7 +1241,7 @@
\@mkboth{\indexname}{\indexname}%
\plainifnotempty % \thispagestyle{plain}
\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
+ \parskip\z@ \@plus .3\ltjs@mpt\relax
\let\item\@idxitem
\raggedright
\footnotesize\narrowbaselines
@@ -1281,7 +1256,7 @@
\newcommand{\@idxitem}{\par\hangindent 4\zw} % 元 40pt
\newcommand{\subitem}{\@idxitem \hspace*{2\zw}} % 元 20pt
\newcommand{\subsubitem}{\@idxitem \hspace*{3\zw}} % 元 30pt
-\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+\newcommand{\indexspace}{\par \vskip 10\ltjs@mpt \@plus5\ltjs@mpt \@minus3\ltjs@mpt\relax}
\newcommand\seename{\if@english see\else →\fi}
\newcommand\alsoname{\if@english see also\else →\fi}
\let\footnotes@ve=\footnote
@@ -1293,9 +1268,9 @@
\else\hbox{\yoko\@textsuperscript{\normalfont\@thefnmark}}\fi}\hbox{}}
\def\thefootnote{\ifnum\c@footnote>\z@\leavevmode\lower.5ex\hbox{*}\@arabic\c@footnote\fi}
\renewcommand{\footnoterule}{%
- \kern-3\p@
- \hrule width .4\columnwidth
- \kern 2.6\p@}
+ \kern-3\ltjs@mpt
+ \hrule width .4\columnwidth height .4\ltjs@mpt
+ \kern 2.6\ltjs@mpt}
\long\def\@footnotetext{%
\insert\footins\bgroup
\normalfont\footnotesize
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
index 00efa99d5be..1a153c41978 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}
- [2016/01/30 ]
+ [2016/03/31 ltjsclasses ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -96,27 +96,32 @@
\DeclareOption{landscape}{\@landscapetrue}
\newif\if@slide
\@slidefalse
-\newcommand{\@ptsize}{0}
-\DeclareOption{slide}{\@slidetrue\renewcommand{\@ptsize}{26}\@landscapetrue\@titlepagetrue}
-\DeclareOption{8pt}{\renewcommand{\@ptsize}{-2}}
-\DeclareOption{9pt}{\renewcommand{\@ptsize}{-1}}
-\DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
-\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
-\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
-\DeclareOption{14pt}{\renewcommand{\@ptsize}{4}}
-\DeclareOption{17pt}{\renewcommand{\@ptsize}{7}}
-\DeclareOption{20pt}{\renewcommand{\@ptsize}{10}}
-\DeclareOption{21pt}{\renewcommand{\@ptsize}{11}}
-\DeclareOption{25pt}{\renewcommand{\@ptsize}{15}}
-\DeclareOption{30pt}{\renewcommand{\@ptsize}{20}}
-\DeclareOption{36pt}{\renewcommand{\@ptsize}{26}}
-\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}}
+\def\ltjs@magscale{1}
+\DeclareOption{slide}{\@slidetrue\def\ltjs@magscale{3.583}\@landscapetrue\@titlepagetrue}
+\DeclareOption{8pt} {\def\ltjs@magscale{0.83}}% 1.2^(-1)
+\DeclareOption{9pt} {\def\ltjs@magscale{0.913}}% 1.2^(-0.5}
+\DeclareOption{10pt}{\def\ltjs@magscale{1}}
+\DeclareOption{11pt}{\def\ltjs@magscale{1.095}}% 1.2^0.5
+\DeclareOption{12pt}{\def\ltjs@magscale{1.200}}
+\DeclareOption{14pt}{\def\ltjs@magscale{1.440}}
+\DeclareOption{17pt}{\def\ltjs@magscale{1.728}}
+\DeclareOption{20pt}{\def\ltjs@magscale{2}}
+\DeclareOption{21pt}{\def\ltjs@magscale{2.074}}
+\DeclareOption{25pt}{\def\ltjs@magscale{2.488}}
+\DeclareOption{30pt}{\def\ltjs@magscale{2.986}}
+\DeclareOption{36pt}{\def\ltjs@magscale{3.583}}
+\DeclareOption{43pt}{\def\ltjs@magscale{4.300}}
+\DeclareOption{12Q} {\def\ltjs@magscale{0.923}}% 1pt*12Q/13Q
+\DeclareOption{14Q} {\def\ltjs@magscale{1.077}}% 1pt*14Q/13Q
+\DeclareOption{10ptj}{\def\ltjs@magscale{1.085}}% 1pt*10bp/13Q
+\DeclareOption{10.5ptj}{\def\ltjs@magscale{1.139}}
+\DeclareOption{11ptj}{\def\ltjs@magscale{1.194}}
+\DeclareOption{12ptj}{\def\ltjs@magscale{1.302}}
+\newif\if@ltjs@mag@xreal
+\@ltjs@mag@xrealtrue
+\DeclareOption{xreal}{\@ltjs@mag@xrealtrue}
+\DeclareOption{noxreal}{\@ltjs@mag@xrealfalse}
+\DeclareOption{real}{\@ltjs@mag@xrealfalse}
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
\minute\time \advance\minute-\@tempcnta
@@ -201,9 +206,6 @@
\DeclareOption{mingoth}{\mingothtrue}
\DeclareOption{ptexjis}{\ptexjistrue}
\DeclareOption{jis}{\jisfonttrue}
-\newif\ifpapersize
-\papersizefalse
-\DeclareOption{papersize}{\papersizetrue}
\newif\if@english
\@englishfalse
\DeclareOption{english}{\@englishtrue}
@@ -218,83 +220,55 @@
\setlength\paperwidth {\@tempdima}
\fi
\def\n@baseline{14.554375}
-\def\inv@mag{1}
-\ifnum\@ptsize=-2
- \mag 833
- \def\inv@mag{1.20048}
- \def\n@baseline{15}%
-\fi
-\ifnum\@ptsize=-1
- \mag 913 % formerly 900
- \def\inv@mag{1.09529}
+\newdimen\ltjs@mpt
+\ltjs@mpt=\ltjs@magscale\p@
+\ifdim\ltjs@mpt<.92\p@ % 8pt, 9pt 指定時
\def\n@baseline{15}%
\fi
-\ifnum\@ptsize=1
- \mag 1095 % formerly 1100
- \def\inv@mag{0.913242}
-\fi
-\ifnum\@ptsize=2
- \mag 1200
- \def\inv@mag{0.833333}
-\fi
-\ifnum\@ptsize=4
- \mag 1440
- \def\inv@mag{0.694444}
-\fi
-\ifnum\@ptsize=7
- \mag 1728
- \def\inv@mag{0.578704}
-\fi
-\ifnum\@ptsize=10
- \mag 2000
- \def\inv@mag{0.5}
-\fi
-\ifnum\@ptsize=11
- \mag 2074
- \def\inv@mag{0.48216}
-\fi
-\ifnum\@ptsize=15
- \mag 2488
- \def\inv@mag{0.401929}
-\fi
-\ifnum\@ptsize=20
- \mag 2986
- \def\inv@mag{0.334896}
-\fi
-\ifnum\@ptsize=26
- \mag 3583
- \def\inv@mag{0.279096}
-\fi
-\ifnum\@ptsize=33
- \mag 4300
- \def\inv@mag{0.232558}
-\fi
-\ifnum\@ptsize=1200
- \mag 923
- \def\inv@mag{1.0834236}
-\fi
-\ifnum\@ptsize=1400
- \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}%
+\newcommand{\@ptsize}{0}
+\ifdim\ltjs@mpt=1.0954\p@ \renewcommand{\@ptsize}{1}\else
+\ifdim\ltjs@mpt=1.2\p@ \renewcommand{\@ptsize}{2}\else
+\renewcommand{\@ptsize}{-20}\fi\fi
+\if@ltjs@mag@xreal\RequirePackage{type1cm}
+\ifdim\ltjs@mpt=\p@\else
+ \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
+ \newluafunction\ltjs@@magnify@font@calc
+ \begingroup\catcode`\%=12\relax
+ \directlua{
+ local getdimen, mpt=tex.getdimen, tex.getdimen('ltjs@mpt')/65536
+ local t = lua.get_functions_table()
+ t[\the\ltjs@@magnify@font@calc] = function()
+ tex.sprint(math.floor(0.5+mpt*getdimen('dimen@')))
+ end
+ function luatexja.ltjs_unmagnify_fsize(a)
+ local s = luatexja.print_scaled(math.floor(0.5+a/mpt*65536))
+ tex.sprint( (s:match('%.0$')) and s:sub(1,-3) or s )
+ end
+ }
+ \endgroup
+ \def\ltjs@magnify@external@font#1 at#2 at#3\@nil{%
+ \def\@tempa{#1}\def\@tempb{#2}%
+ \ifx\@tempb\@empty
+ \edef\@tempb{ scaled\directlua{%
+ tex.sprint(math.floor(0.5+\ltjs@magscale*1000))
+ }}%
+ \else
+ \dimen@\@tempb\relax
+ \edef\@tempb{ at\luafunction\ltjs@@magnify@font@calc sp}%
+ \fi
+ \edef\@tempa{\def\noexpand\external@font{\@tempa\@tempb}}
+ }
+ \let\ltjs@orig@get@external@font=\get@external@font
+ \def\get@external@font{%
+ \edef\f@size{\directlua{luatexja.ltjs_unmagnify_fsize(\f@size)}}%
+ \ltjs@orig@get@external@font
+ \begingroup
+ \edef\@tempa{\external@font\space at\space at}%
+ \expandafter\ltjs@magnify@external@font\@tempa\@nil
+ \expandafter\endgroup\@tempa
+ }
+\fi\fi
\setlength{\@tempdima}{\paperwidth}
\setlength{\@tempdimb}{\paperheight}
\iftombow
@@ -368,9 +342,11 @@
\if@slide
\ltjsetxkanjiskip .1em
\else
- \ltjsetxkanjiskip .25em plus .15em minus .06em
+ \ltjsetxkanjiskip .25em plus .15em minus .06em
\fi
\fi}
+\def\ltjs@setfontsize#1#2#3{%
+ \@setfontsize#1{#2\ltjs@mpt}{#3\ltjs@mpt}}
\emergencystretch 3\zw
\newif\ifnarrowbaselines
\if@english
@@ -395,11 +371,11 @@
}
\renewcommand{\normalsize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\normalsize\@xpt\@xiipt}%
- {\@setfontsize\normalsize\@xpt{\n@baseline}}%
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+ {\ltjs@setfontsize\normalsize\@xpt\@xiipt}%
+ {\ltjs@setfontsize\normalsize\@xpt{\n@baseline}}%
+ \abovedisplayskip 11\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
+ \belowdisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
\belowdisplayshortskip \belowdisplayskip
\let\@listi\@listI}
\mcfamily\selectfont\normalsize
@@ -411,10 +387,10 @@
\setlength\Chs{\wd0}
\newcommand{\small}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\small\@ixpt{11}}%
- {\@setfontsize\small\@ixpt{13}}%
- \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
+ {\ltjs@setfontsize\small\@ixpt{11}}%
+ {\ltjs@setfontsize\small\@ixpt{13}}%
+ \abovedisplayskip 9\ltjs@mpt \@plus3\ltjs@mpt \@minus4\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus3\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
@@ -423,38 +399,38 @@
\itemsep \parsep}}
\newcommand{\footnotesize}{%
\ltj@@ifnarrowbaselines
- {\@setfontsize\footnotesize\@viiipt{9.5}}%
- {\@setfontsize\footnotesize\@viiipt{11}}%
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus3\p@
- \abovedisplayshortskip \z@ \@plus2\p@
+ {\ltjs@setfontsize\footnotesize\@viiipt{9.5}}%
+ {\ltjs@setfontsize\footnotesize\@viiipt{11}}%
+ \abovedisplayskip 6\ltjs@mpt \@plus2\ltjs@mpt \@minus3\ltjs@mpt
+ \abovedisplayshortskip \z@ \@plus2\ltjs@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
\topsep \z@
\parsep \z@
\itemsep \parsep}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
-\newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand{\scriptsize}{\ltjs@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand{\tiny}{\ltjs@setfontsize\tiny\@vpt\@vipt}
\if@twocolumn
- \newcommand{\large}{\@setfontsize\large\@xiipt{\n@baseline}}
+ \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{\n@baseline}}
\else
- \newcommand{\large}{\@setfontsize\large\@xiipt{17}}
+ \newcommand{\large}{\ltjs@setfontsize\large\@xiipt{17}}
\fi
-\newcommand{\Large}{\@setfontsize\Large\@xivpt{21}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}}
-\newcommand{\huge}{\@setfontsize\huge\@xxpt{28}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}}
-\newcommand{\HUGE}{\@setfontsize\HUGE{30}{40}}
+\newcommand{\Large}{\ltjs@setfontsize\Large\@xivpt{21}}
+\newcommand{\LARGE}{\ltjs@setfontsize\LARGE\@xviipt{25}}
+\newcommand{\huge}{\ltjs@setfontsize\huge\@xxpt{28}}
+\newcommand{\Huge}{\ltjs@setfontsize\Huge\@xxvpt{33}}
+\newcommand{\HUGE}{\ltjs@setfontsize\HUGE{30}{40}}
\everydisplay=\expandafter{\the\everydisplay \narrowbaselines}
\newcommand{\headfont}{\gtfamily\sffamily}
\setlength\columnsep{2\zw}
-\setlength\columnseprule{0\p@}
-\setlength\lineskip{1\p@}
-\setlength\normallineskip{1\p@}
-\setlength\lineskiplimit{1\p@}
-\setlength\normallineskiplimit{1\p@}
+\setlength\columnseprule{\z@}
+\setlength\lineskip{1\ltjs@mpt}
+\setlength\normallineskip{1\ltjs@mpt}
+\setlength\lineskiplimit{1\ltjs@mpt}
+\setlength\normallineskiplimit{1\ltjs@mpt}
\renewcommand{\baselinestretch}{}
-\setlength\parskip{0\p@}
+\setlength\parskip{\z@}
\if@slide
\setlength\parindent{0\zw}
\else
@@ -463,9 +439,9 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
-\setlength\topskip{10\p@}
+\setlength\topskip{10\ltjs@mpt}
\if@slide
- \setlength\headheight{0\p@}
+ \setlength\headheight{0\ltjs@mpt}
\else
\setlength\headheight{2\topskip}
\fi
@@ -479,7 +455,7 @@
\setlength\textwidth{\fullwidth}
\setlength{\textheight}{51\baselineskip}
\addtolength{\textheight}{\topskip}
-\addtolength{\textheight}{0.1\p@}
+\addtolength{\textheight}{0.1\ltjs@mpt}
\setlength{\mathindent}{10mm}
\setlength\marginparsep{\columnsep}
\setlength\marginparpush{\baselineskip}
@@ -514,7 +490,7 @@
\addtolength\topmargin{-1in}
{\footnotesize\global\setlength\footnotesep{\baselineskip}}
\setlength\footnotesep{0.7\footnotesep}
-\setlength{\skip\footins}{16\p@ \@plus 5\p@ \@minus 2\p@}
+\setlength{\skip\footins}{16\ltjs@mpt \@plus 5\ltjs@mpt \@minus 2\ltjs@mpt}
\setcounter{topnumber}{9}
\renewcommand{\topfraction}{.85}
\setcounter{bottomnumber}{9}
@@ -525,17 +501,17 @@
\setcounter{dbltopnumber}{9}
\renewcommand{\dbltopfraction}{.8}
\renewcommand{\dblfloatpagefraction}{.8}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\@fptop{0\p@ \@plus 1fil}
-\setlength\@fpsep{8\p@ \@plus 2fil}
-\setlength\@fpbot{0\p@ \@plus 1fil}
-\setlength\@dblfptop{0\p@ \@plus 1fil}
-\setlength\@dblfpsep{8\p@ \@plus 2fil}
-\setlength\@dblfpbot{0\p@ \@plus 1fil}
+\setlength\floatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\textfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\intextsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dblfloatsep {12\ltjs@mpt \@plus 2\ltjs@mpt \@minus 2\ltjs@mpt}
+\setlength\dbltextfloatsep{20\ltjs@mpt \@plus 2\ltjs@mpt \@minus 4\ltjs@mpt}
+\setlength\@fptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@fpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@fpbot{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfptop{0\ltjs@mpt \@plus 1fil}
+\setlength\@dblfpsep{8\ltjs@mpt \@plus 2fil}
+\setlength\@dblfpbot{0\ltjs@mpt \@plus 1fil}
\def\ps@plainfoot{%
\let\@mkboth\@gobbletwo
\let\@oddhead\@empty
@@ -724,7 +700,7 @@
\@afterheading
\fi
\if@slide
- {\vskip-6pt\maybeblue\hrule height0pt depth1pt\vskip7pt\relax}%
+ {\vskip-6\ltjs@mpt\maybeblue\hrule height0\ltjs@mpt depth1\ltjs@mpt\vskip7\ltjs@mpt\relax}%
\fi
\par % 2000-12-18
\ignorespaces}
@@ -965,14 +941,14 @@
\gdef\postsectionname{}%
\gdef\thesection{\presectionname\@Alph\c@section\postsectionname}%
\gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}}
-\setlength\arraycolsep{5\p@}
-\setlength\tabcolsep{6\p@}
-\setlength\arrayrulewidth{.4\p@}
-\setlength\doublerulesep{2\p@}
+\setlength\arraycolsep{5\ltjs@mpt}
+\setlength\tabcolsep{6\ltjs@mpt}
+\setlength\arrayrulewidth{.4\ltjs@mpt}
+\setlength\doublerulesep{2\ltjs@mpt}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
+\setlength\fboxsep{3\ltjs@mpt}
+\setlength\fboxrule{.4\ltjs@mpt}
\renewcommand \theequation {\@arabic\c@equation}
\newcounter{figure}
\renewcommand \thefigure {\@arabic\c@figure}
@@ -1000,8 +976,8 @@
{\end@dblfloat}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
-\setlength\abovecaptionskip{5\p@} % 元: 10\p@
-\setlength\belowcaptionskip{5\p@} % 元: 0\p@
+\setlength\abovecaptionskip{5\ltjs@mpt} % 元: 10\p@
+\setlength\belowcaptionskip{5\ltjs@mpt} % 元: 0\p@
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{\small\sffamily #1\quad #2}%
@@ -1048,7 +1024,7 @@
\newcommand*{\l@part}[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty\@secpenalty
- \addvspace{2.25em \@plus\p@}%
+ \addvspace{2.25em \@plus\ltjs@mpt}%
\begingroup
\parindent \z@
\rightskip \@tocrmarg
@@ -1063,7 +1039,7 @@
\newcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty{\@secpenalty}%
- \addvspace{1.0em \@plus\p@}%
+ \addvspace{1.0em \@plus\ltjs@mpt}%
\begingroup
\parindent\z@
\rightskip\@tocrmarg
@@ -1090,7 +1066,7 @@
\newdimen\@lnumwidth
\def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}\hspace{0pt}}
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
- \vskip \z@ \@plus.2\p@
+ \vskip \z@ \@plus.2\ltjs@mpt
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
@@ -1162,7 +1138,7 @@
\@mkboth{\indexname}{\indexname}%
\plainifnotempty % \thispagestyle{plain}
\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
+ \parskip\z@ \@plus .3\ltjs@mpt\relax
\let\item\@idxitem
\raggedright
\footnotesize\narrowbaselines
@@ -1177,7 +1153,7 @@
\newcommand{\@idxitem}{\par\hangindent 4\zw} % 元 40pt
\newcommand{\subitem}{\@idxitem \hspace*{2\zw}} % 元 20pt
\newcommand{\subsubitem}{\@idxitem \hspace*{3\zw}} % 元 30pt
-\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+\newcommand{\indexspace}{\par \vskip 10\ltjs@mpt \@plus5\ltjs@mpt \@minus3\ltjs@mpt\relax}
\newcommand\seename{\if@english see\else →\fi}
\newcommand\alsoname{\if@english see also\else →\fi}
\let\footnotes@ve=\footnote
@@ -1189,9 +1165,9 @@
\else\hbox{\yoko\@textsuperscript{\normalfont\@thefnmark}}\fi}\hbox{}}
\def\thefootnote{\ifnum\c@footnote>\z@\leavevmode\lower.5ex\hbox{*}\@arabic\c@footnote\fi}
\renewcommand{\footnoterule}{%
- \kern-3\p@
- \hrule width .4\columnwidth
- \kern 2.6\p@}
+ \kern-3\ltjs@mpt
+ \hrule width .4\columnwidth height .4\ltjs@mpt
+ \kern 2.6\ltjs@mpt}
\long\def\@footnotetext{%
\insert\footins\bgroup
\normalfont\footnotesize
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index c8815703b05..5784b1b3c6e 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2015/12/11 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2016/03/31 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -120,7 +120,9 @@
%! ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
% LuaTeX-ja core TeX source
-\catcode"FFFFF=14 %"
+\newcount\ltjlineendcomment
+\ltjlineendcomment="FFFFF
+\catcode\ltjlineendcomment=14 %"
\def\ltj@loaded{hoge}
@@ -771,7 +773,7 @@
\newcatcodetable\ltj@temp@cctb
\def\ltj@overwrite@catcodetable#1{%
\setluatexcatcodetable\ltj@temp@cctb{\luatexcatcodetable#1}%
- \setluatexcatcodetable#1{\luatexcatcodetable\ltj@temp@cctb\catcode"FFFFF=14}%"
+ \setluatexcatcodetable#1{\luatexcatcodetable\ltj@temp@cctb\catcode\ltjlineendcomment=14}%"
}
\ltj@overwrite@catcodetable\CatcodeTableLaTeX
\ltj@overwrite@catcodetable\CatcodeTableLaTeXAtLetter
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
index 7b0cd155341..9f3bd36a383 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
@@ -131,6 +131,7 @@ local function print_scaled(s)
until s<=delta
return out
end
+luatexja.print_scaled = print_scaled
local function print_glue(d,order)
local out=print_scaled(d)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
index 4d239659cb1..93ebd9a16f3 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
@@ -34,7 +34,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2015/11/03 Japanese Typesetting with Lua(La)TeX]
+ \ProvidesPackage{luatexja}[2016/03/31 Japanese Typesetting with Lua(La)TeX]
\fi %</LaTeX>
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
@@ -42,7 +42,7 @@
%% Load all sub-packages.
\ifltj@in@latex %<*LaTeX>
%% \RequirePackage{expl3} needed if the version of l3kernel is v6111
- \RequirePackage{luatexja-core} [2015/11/03]
+ \RequirePackage{luatexja-core} [2016/03/31]
\RequirePackage{luatexja-compat}[2013/05/14]
\else %<*!LaTeX>
\input luatexja-core.sty %
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
index 4ba873ba675..d1e894e3716 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-fontspec}[2013/05/14 Patch to fontspec for LuaTeX-ja]
+\ProvidesPackage{lltjp-fontspec}[2016/03/31 Patch to fontspec for LuaTeX-ja]
\RequirePackage{fontspec,luatexja}
\ExplSyntaxOn
@@ -23,5 +23,47 @@
\@ifstar\__fontspecsverb\@verb
}
+
+\cs_set_eq:NN \ltj_orig_fontspec_setup_maths: \fontspec_setup_maths:
+\cs_set:Nn \fontspec_setup_maths:
+ {
+ \group_begin:
+ \cs_set:Npn \DeclareMathSymbol##1##2##3##4{%
+ \expandafter\in@\csname sym##3\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \count\z@=##4\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \if\relax\noexpand##1% is command?
+ \edef\reserved@a{\noexpand\in@{\string\mathchar}{\meaning##1}}%
+ \reserved@a
+ \ifin@
+ \expandafter\set@mathsymbol
+ \csname sym##3\endcsname##1##2%
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \@font@info{Redeclaring math symbol \string##1}%
+ \else
+ \expandafter\set@mathsymbol
+ \csname sym##3\endcsname##1##2%
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \fi
+ \else
+ \expandafter\set@mathchar
+ \csname sym##3\endcsname##1##2
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \fi
+ \endgroup
+ \else
+ \@latex@error{Symbol font `##3' is not defined}\@eha
+ \fi
+ }
+ \ltj_orig_fontspec_setup_maths:
+ \group_end:
+ }
\ExplSyntaxOff
\endinput
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
index 987cd691c52..9a5d9d2cbbc 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-listings}[2016/02/07 Patch to listings for LuaTeX-ja]
+\ProvidesPackage{lltjp-listings}[2016/03/31 Patch to listings for LuaTeX-ja]
\RequirePackage{listings,luatexbase-cctb}
%%%%%%%%%%%%%%%% Japanese support
@@ -173,7 +173,7 @@
\newluatexcatcodetable\CatcodeTableLTJlistings
\setluatexcatcodetable\CatcodeTableLTJlistings{%
\luatexcatcodetable\CatcodeTableLaTeXAtLetter
- \catcode"FFFFF=13%"
+ \catcode\ltjlineendcomment=13%"
\SetCatcodeRange{"FF61}{"FF9F}{13}% 半角カナ
\SetCatcodeRange{"E0100}{"E01EF}{13}% 漢字用異体字セレクタ
\SetCatcodeRange{"FE00}{"FE0F}{13}% Variation Selector
@@ -215,6 +215,7 @@
}}
\directlua{
+ local utfchar, getcount = unicode.utf8.char, tex.getcount
luatexja.listings.insert_cb = function()
if not luatexja.listings.patched then
luatexja.listings.patched = 1
@@ -225,7 +226,7 @@
local c = utf.sub(buf, i, i)
local cu = utf.byte(c)
if cu >= 0x80 and tex.getcatcode(cu) \string~= 13 then
- ret = ret .. utf.char(1048575) % U+FFFFF
+ ret = ret .. utfchar(getcount('ltjlineendcomment'))
end
ret = ret .. c
end
@@ -244,7 +245,7 @@
% hook!
\lst@AddToHook{Init}{%
\luatexcatcodetable\CatcodeTableLTJlistings\ltj@@listing@jpcmd
- \lccode`\~="FFFFF\lowercase{\def~{\ltj@lst@ProcessJALetter}}%"
+ \lccode`\~=\ltjlineendcomment\lowercase{\def~{\ltj@lst@ProcessJALetter}}%"
\directlua{luatexja.listings.insert_cb()}%
\if@ltj@lst@double
\let\ltj@lst@hss@normal=\ltj@lst@hss@double
@@ -263,7 +264,7 @@
\begingroup
\catcode`\^^A=12
\catcode`\^^@=\active
-\lccode`\$="FFFFF \catcode`\$=13 %"
+\lccode`\$=\ltjlineendcomment \catcode`\$=13 %"
\lowercase{%
\gdef\ltj@lst@MakeActive@#1{\let\lst@next\relax%
\ifx#1\relax
@@ -364,7 +365,7 @@
{}%
\fi%
\ltj@lst@escape@setup#2%
- #3\catcode"FFFFF=9\lst@escapebegin\expandafter\lst@next%"
+ #3\catcode\ltjlineendcomment=9\lst@escapebegin\expandafter\lst@next%"
\fi}%
{}}
\def\ltj@lst@escape@setup#1{%
@@ -376,7 +377,7 @@
}\endgroup
}
\begingroup
- \lccode`\|="FFFFF \lowercase{%"
+ \lccode`\|=\ltjlineendcomment \lowercase{%"
\gdef\ltj@lst@remove@jacmd#1{%
\expandafter\ltj@lst@remove@jacmd@\detokenize{#1}|\@nil|}
\gdef\ltj@lst@remove@jacmd@#1|{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty
index 21ce7c9ac8d..bff08c3670c 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty
@@ -79,6 +79,7 @@
% Therefore temporarily set \hbar=\relax.
\let\ltj@tmpa\hbar
\let\hbar\relax
+
\let\ltj@tmpb\iftipaonetoken
\let\iftipaonetoken\relax
\typeout{UTFencname: \UTFencname}