summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-04-21 23:46:31 +0000
committerKarl Berry <karl@freefriends.org>2015-04-21 23:46:31 +0000
commitdbf06c3ecc6528bd2410630d2a251940ec0c9b23 (patch)
treec875bdd9f4e6a021f50e1e36e2779c07b828347c /Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
parent142d903dcd96ad083d58f5518aa138a676eb68c0 (diff)
luatexja (21apr15)
git-svn-id: svn://tug.org/texlive/trunk@36992 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx')
-rw-r--r--Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx147
1 files changed, 91 insertions, 56 deletions
diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
index cbd2dde3608..19f9234868b 100644
--- a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
+++ b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
@@ -10,7 +10,7 @@
%
% \fi
%
-% \CheckSum{4478}
+% \CheckSum{4499}
%% \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
@@ -76,7 +76,14 @@
% (ありがとうございます、鈴木た@MILNさん)}
% \changes{v1.6}{2006/06/27}{フォントコマンドを修正。ありがとう、ymtさん。}
% \changes{v1.6-ltj}{2011/09/27}{jclasses.dtx v1.6 をベースにLua\LaTeX-ja用に修正。}
-% \changes{v1.6-ltj-2}{2013/06/06}{jclasses.dtx luatexja.cfgに対応.}
+% \changes{v1.6-ltj-2}{2013/06/06}{luatexja.cfgに対応.}
+% \changes{v1.6-ltj-3}{2014/06/08}{縦組クラスの時のgeometry.styに対応.}
+% \changes{v1.6-ltj-4}{2014/06/30}{組方向の変更箇所を現行のLua\TeX-jaの仕様に合うように修正.}
+% \changes{v1.6-ltj-5}{2014/07/02}{\cs{ifydir}, \cs{iftdir}を使わないように修正.}
+% \changes{v1.6-ltj-6}{2014/07/28}{縦組クラスでlltjext.styを読み込むように修正.}
+% \changes{v1.6-ltj-7}{2014/11/15}{縦組クラスとeveryshi.styとの相性が悪い問題を修正.}
+% \changes{v1.6-ltj-8}{2014/11/22}{縦組時のgeometry.styへの対応を別ファイル(lltjp-geometry.sty)に分離.それに伴いv1.6-ltj-3での変更を削除.}
+% \changes{v1.6-ltj-9}{2015/01/01}{縦組クラスの日付出力でエラーになることなどを修正.}
% \fi
%
% \iffalse
@@ -106,7 +113,7 @@
%<11pt&bk>\ProvidesFile{ltjtbk11.clo}
%<12pt&bk>\ProvidesFile{ltjtbk12.clo}
%</tate>
- [2013/06/06 v1.6-ltj-2
+ [2015/01/01 v1.6-ltj-9
%<article|report|book> Standard LuaLaTeX-ja class]
%<10pt|11pt|12pt> Standard LuaLaTeX-ja file (size option)]
%<*driver>
@@ -147,7 +154,7 @@
% 11pt & 11ptサイズの設定を生成\\
% 12pt & 12ptサイズの設定を生成\\
% bk & bookクラス用のサイズの設定を生成\\
-% tate & 縦組用の設定を生成(現在無効)\\
+% tate & 縦組用の設定を生成\\
% yoko & 横組用の設定を生成\\
% \end{tabular}
% \end{center}
@@ -163,6 +170,7 @@
% \end{quotation}
% のエラーが起こった場合は、|lualatex-math|パッケージを読み込んでみて下さい。
% \item 出力PDFの用紙サイズが自動的に設定されるようにしてあります。
+% %%%\item 縦組みクラスにおいて、|geometry|パッケージを読み込んだときに意図通りにならない問題に対応しました。%
% \end{itemize}
%
% \section{Lua\TeX-ja の読み込み}
@@ -374,15 +382,34 @@
%
% \subsection{組方向オプション}
% このオプションが指定されると、縦組で組版をします。
-% しかしLua\TeX-jaではまだ縦組は未対応なのでコメントアウトします。
% \changes{v1.0g}{1997/01/25}{Insert \cs{hbox}, to switch tate-mode.}
% \changes{v1.1d}{1997/02/05}{開始ページがおかしくなるのを修正}
% \changes{v1.1f}{1997/07/08}{縦組時にベースラインがおかしくなるのを修正}
+%
+% \changes{v1.6-ltj-4}{2014/06/30}{本文の組方向を \cs{AtBeginDocument} で
+% 変更することができなくなったことに対応}
% \begin{macrocode}
-%% \DeclareOption{tate}{%
-%% \AtBeginDocument{\tate\message{《縦組モード》}%
-%% \adjustbaseline}%
-%% }
+\DeclareOption{tate}{%
+ \tate\AtBeginDocument{\message{《縦組モード》}\adjustbaseline}%
+}
+% \end{macrocode}
+%
+% 縦組クラスと|everyshi|パッケージの相性が悪い問題に対処します。
+% この処理は、ZRさんの|pxeveryshi|パッケージと実質的に同じ内容です。
+% \begin{macrocode}
+%<*tate>
+\AtEndOfPackageFile{everyshi}{%
+ \def\@EveryShipout@Output{%
+ \setbox8\vbox{%
+ \yoko
+ \@EveryShipout@Hook
+ \@EveryShipout@AtNextHook
+ \global\setbox\luatexoutputbox=\box\luatexoutputbox
+ }%
+ \gdef\@EveryShipout@AtNextHook{}%
+ \@EveryShipout@Org@Shipout\box\luatexoutputbox
+ }}
+%</tate>
% \end{macrocode}
%
% \subsection{両面、片面オプション}
@@ -479,38 +506,8 @@
%</article|report|book>
% \end{macrocode}
%
-% \subsection{オプションの実行}
-% オプションの実行、およびサイズクラスのロードを行ないます。
-% \begin{macrocode}
-%<*article|report|book>
-%<*article>
-%<tate>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,tate}
-%<yoko>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final}
-%</article>
-%<*report>
-%<tate>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany,tate}
-%<yoko>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany}
-%</report>
-%<*book>
-%<tate>\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright,tate}
-%<yoko>\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright}
-%</book>
-\ProcessOptions\relax
-%<book&tate>\input{ltjtbk1\@ptsize.clo}
-%<!book&tate>\input{ltjtsize1\@ptsize.clo}
-%<book&yoko>\input{ltjbk1\@ptsize.clo}
-%<!book&yoko>\input{ltjsize1\@ptsize.clo}
-% \end{macrocode}
-% 縦組用クラスファイルの場合は、ここで\file{plext.sty}が読み込まれていました。
-% Lua\TeX-jaでどうなるかは未定です。
-% \changes{v1.0e}{1996/03/21}{\cs{usepackage} to \cs{RequirePackage}}
-% \begin{macrocode}
-%<tate>%\RequirePackage{plext}
-%</article|report|book>
-% \end{macrocode}
-%
-% \section{フォント}
-%
+% \subsection{フォントメトリックの変更}
+%
% Lua\LaTeX-jaの標準では、OTFパッケージ由来のメトリックが使われるようになっています。
% 本クラスでは、「p\TeX の組版と互換性をできるだけ持たせる」例を提示するため、
% \begin{itemize}
@@ -527,8 +524,10 @@
% 設定に対応しました。この2つの命令の値はユーザが日々の利用でその都度指定するものではなく、
% 何らかの理由で非埋め込みフォントが正しく利用できない場合にのみ |luatexja.cfg| によって
% セットされるものです。
-%
%
+% \changes{v1.6-ltj-9}{2015/01/01}{サイズクラスのロード前にメトリックの変更を行わないと,
+% \cs{Cht}等の値が反映されないのでこの場所に移動させました.}
+%
% \begin{macrocode}
%<*article|report|book>
\directlua{luatexbase.add_to_callback('luatexja.load_jfm',
@@ -543,6 +542,39 @@
%</article|report|book>
% \end{macrocode}
%
+% \subsection{オプションの実行}
+% オプションの実行、およびサイズクラスのロードを行ないます。
+% \begin{macrocode}
+%<*article|report|book>
+%<*article>
+%<tate>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,tate}
+%<yoko>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final}
+%</article>
+%<*report>
+%<tate>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany,tate}
+%<yoko>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany}
+%</report>
+%<*book>
+%<tate>\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright,tate}
+%<yoko>\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright}
+%</book>
+\ProcessOptions\relax
+%<book&tate>\input{ltjtbk1\@ptsize.clo}
+%<!book&tate>\input{ltjtsize1\@ptsize.clo}
+%<book&yoko>\input{ltjbk1\@ptsize.clo}
+%<!book&yoko>\input{ltjsize1\@ptsize.clo}
+% \end{macrocode}
+% 縦組用クラスファイルの場合は、ここで\file{plext.sty}も読み込みます。
+% \changes{v1.0e}{1996/03/21}{\cs{usepackage} to \cs{RequirePackage}}
+% \changes{v1.6-ltj-6}{2014/07/28}{Lua\TeX-jaでは,代わりに\file{lltjext.sty}を読み込みま
+% す.これは\file{plext.sty}をLua\TeX-ja用に書きなおしたものです.}
+% \begin{macrocode}
+%<tate>\RequirePackage{lltjext}
+%</article|report|book>
+% \end{macrocode}
+%
+% \section{フォント}
+%
% ここでは、\LaTeX{}のフォントサイズコマンドの定義をしています。
% フォントサイズコマンドの定義は、次のコマンドを用います。
%
@@ -2123,7 +2155,7 @@
\newcommand{\maketitle}{\par
\begingroup
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
- \def\@makefnmark{\hbox{\ifydir $\m@th^{\@thefnmark}$
+ \def\@makefnmark{\hbox{\unless\ifnum\ltjgetparameter{direction}=3 $\m@th^{\@thefnmark}$
\else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}%
%<*tate>
\long\def\@makefntext##1{\parindent 1\zw\noindent
@@ -3040,7 +3072,7 @@
\advance\@enumdepth\@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
\list{\csname label\@enumctr\endcsname}{%
- \iftdir
+ \ifnum\ltjgetparameter{direction}=3
\ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
\else\topsep\z@\fi
\parskip\z@ \itemsep\z@ \parsep\z@
@@ -3068,7 +3100,7 @@
% \begin{macrocode}
\newcommand{\labelitemi}{\textbullet}
\newcommand{\labelitemii}{%
- \iftdir
+ \ifnum\ltjgetparameter{direction}=3
{\textcircled{~}}
\else
{\normalfont\bfseries\textendash}
@@ -3093,7 +3125,7 @@
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
\expandafter
\list{\csname \@itemitem\endcsname}{%
- \iftdir
+ \ifnum\ltjgetparameter{direction}=3
\ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
\else\topsep\z@\fi
\parskip\z@ \itemsep\z@ \parsep\z@
@@ -3118,7 +3150,7 @@
% \begin{macrocode}
\newenvironment{description}
{\list{}{\labelwidth\z@ \itemindent-\leftmargin
- \iftdir
+ \ifnum\ltjgetparameter{direction}=3
\leftmargin\leftskip \advance\leftmargin3\Cwd
\rightmargin\rightskip
\labelsep=1\zw \itemsep\z@
@@ -3355,11 +3387,11 @@
% \begin{macrocode}
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
- \iftdir\sbox\@tempboxa{#1\hskip1\zw#2}%
+ \ifnum\ltjgetparameter{direction}=3 \sbox\@tempboxa{#1\hskip1\zw#2}%
\else\sbox\@tempboxa{#1: #2}%
\fi
\ifdim \wd\@tempboxa >\hsize
- \iftdir #1\hskip1\zw#2\relax\par
+ \ifnum\ltjgetparameter{direction}=3 #1\hskip1\zw#2\relax\par
\else #1: #2\relax\par\fi
\else
\global \@minipagefalse
@@ -4064,17 +4096,20 @@
%
% \begin{macro}{\today}
% 縦組の場合は、漢数字で出力します。
+%
+% \changes{v1.6-ltj-9}{2015/01/01}{縦組では,この漢数字による日付出力でエラーになりました.
+% Lua\TeX-ja では,\cs{kansuji}の後に\cs{number}を続けることは出来ないので\cs{number}を削除しました.}
% \begin{macrocode}
\def\today{{%
- \iftdir
+ \ifnum\ltjgetparameter{direction}=3
\if西暦
- \kansuji\number\year 年
- \kansuji\number\month 月
- \kansuji\number\day 日
+ \kansuji\year 年
+ \kansuji\month 月
+ \kansuji\day 日
\else
- 平成\ifnum\heisei=1 元年\else\kansuji\number\heisei 年\fi
- \kansuji\number\month 月
- \kansuji\number\day 日
+ 平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
+ \kansuji\month 月
+ \kansuji\day 日
\fi
\else
\if西暦