% pLaTeX2ε新ドキュメントクラス
%
% これは LaTeX3 Project の classes.dtx と株式会社アスキーの jclasses.dtx
-% に基づいて奥村 <okumura@edu.mie-u.ac.jp> が改変したものです。
-% 奥村の改変部分については何の権利も主張しません。
-% オリジナルの著作権の許す範囲で自由にご利用ください。
+% に基づいて,もともと奥村晴彦 <okumura@okumuralab.org> により
+% 作成されたものです。
+% 現在は日本語\TeX 開発コミュニティにより管理されています。
%
% [2002-12-19] いろいろなものに収録していただく際にライセンスを明確にする
% 必要が生じてきました。アスキーのものが最近はmodified BSDライセンスになっ
% ていますので,私のものもそれに準じてmodified BSDとすることにします。
%
+% [2016-07-11] abenoriさんによる\texttt{nomag}オプションをマージしました。
+% なお,ソースコードの管理はGitHubで行うことにしました。
+%
+% [2016-07-13] 日本語\TeX 開発コミュニティによる管理に移行しました。
+%
% Copyright 1993 1994 1995 1996 1997 1998 1999
% The LaTeX3 Project and any individual authors listed elsewhere
-% in this file.
+% in this file.
%
% Copyright 1995-1999 ASCII Corporation.
+% Copyright 1999-2016 Haruhiko Okumura
+% Copyright 2016-2017 Japanese TeX Development Community
% -----------------------------------------
%
% \fi
-% \CheckSum{5199}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% \iffalse
%
% \begin{macrocode}
-%<article|book|jspf|kiyou>\NeedsTeXFormat{LaTeX2e}
+\NeedsTeXFormat{LaTeX2e}
%<article>\ProvidesClass{ltjsarticle}
%<book>\ProvidesClass{ltjsbook}
+%<report>\ProvidesClass{ltjsreport}
%<jspf>\ProvidesClass{ltjspf}
%<kiyou>\ProvidesClass{ltjskiyou}
%<*driver>
\ProvidesFile{ltjsclasses.dtx}
%</driver>
- [2014/02/07 ]
+ [2017/03/06 ltjsclasses ]
%<*driver>
+\IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{}
\documentclass{ltjsarticle}
-\usepackage{doc}
-\usepackage[kozuka-pr6n]{luatexja-preset}
-\usepackage{unicode-math}
-\setmathfont{Latin Modern Math}
-\usepackage[unicode]{hyperref}
+\usepackage{hypdoc}
+\hypersetup{unicode=true}
+\usepackage[ipaex,nfssonly]{luatexja-preset}
+\ltjsetparameter{alxspmode={`\*,allow}}
+\ltjsetparameter{alxspmode={`\\,allow}}
+%%%%\usepackage{unicode-math}
+%%%%\setmathfont{Latin Modern Math}
\addtolength{\textwidth}{-1in}
\addtolength{\evensidemargin}{1in}
\addtolength{\oddsidemargin}{1in}
\addtolength{\marginparwidth}{1in}
\setlength\marginparpush{0pt}
% \OnlyDescription
-\DisableCrossrefs
+\EnableCrossrefs
\setcounter{StandardModuleDepth}{1}
\GetFileInfo{ltjsclasses.dtx}
\CodelineNumbered
%
% \section{はじめに}
%
-% これは奥村晴彦先生による |jsclasses.dtx| をLua\LaTeX-ja用に改変したものです。
+% これは,元々奥村晴彦先生により作成され,現在は日本語\TeX 開発コミュニティにより
+% 管理されている\texttt{jsclasses.dtx}をLua\LaTeX-ja用に改変したものです。
% 次のドキュメントクラス(スタイルファイル)を生成します。
+%
+% [2017-02-13] forum:2121の議論を機に,ltjsreportクラスを新設しました。
+% 従来のltjsbookの |report| オプションと比べると,|abstract| 環境の使い方
+% および挙動がアスキーのjreportに近づきました。
+%
% \begin{quote}
% \begin{tabular}{lll}
% $\langle$\textsf{article}$\rangle$ & \texttt{ltjsarticle.cls} & 論文・レポート用 \\
% $\langle$\textsf{book}$\rangle$ & \texttt{ltjsbook.cls} & 書籍用 \\
+% $\langle$\textsf{report}$\rangle$ & \texttt{ltjsreport.cls} & レポート用 \\
% $\langle$\textsf{jspf}$\rangle$ & \texttt{ltjspf.cls} & 某学会誌用 \\
-% $\langle$\textsf{kiyou}$\rangle$ & \texttt{ltjskiyou.cls} & 某紀要用
+% $\langle$\textsf{kiyou}$\rangle$ & \texttt{ltjskiyou.cls} & 某紀要用
% \end{tabular}
% \end{quote}
%
-% |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| を
+% 全ての変更点を知りたい場合は,\texttt{jsclasses.dtx}と\texttt{ltjsclasses.dtx}でdiffを
% とって下さい。zw, zh は全て |\zw|, |\zh| に置き換えられています。
% \begin{itemize}
-% \item フォントメトリック関係のオプション |winjis |は単に無視されます。
-% \item 標準では |jfm-ujis.lua|(Lua\TeX-ja標準のメトリック,OTFパッケージのものがベース)を使用します。
-% \item |uplatex| オプションを削除してあります。
-% \item |disablejfam| オプションが無効になっています。もし
+% \item フォントメトリック関係のオプション\texttt{winjis}は単に無視されます。
+% \item 標準では\texttt{jfm-ujis.lua}(Lua\TeX-ja標準のメトリック,OTFパッケージのものがベース)を使用します。
+% \item \texttt{uplatex}オプション,\texttt{autodetect-engine}オプションを
+% 削除してあります(前者ではエラーを出すようにしています)。
+% \item \texttt{disablejfam}オプションが無効になっています。もし
% \begin{quotation}
% |! LaTeX Error: Too many math alphabets used in version ****.|
% \end{quotation}
-% のエラーが起こった場合は,|lualatex-math| パッケージを読み込んでみて下さい。
-% \item |papersize| オプションの指定に関わらずPDFのページサイズは適切に
+% のエラーが起こった場合は,\texttt{lualatex-math}パッケージを読み込んでみて下さい。
+% \item \texttt{papersize}オプションの指定に関わらずPDFのページサイズは適切に
% 設定されます。
% \item Lua\TeX-ja同梱のメトリックを用いる限りは,段落の頭にグルーは挿入されません。
-% そのため,オリジナルの |jsclasses.dtx| 内にあったhack (|\everyparhook|)は不要になったので,
+% そのため,オリジナルの\texttt{jsclasses}内にあったhack (|\everyparhook|)は不要になったので,
% 削除しました。
% \item 「\texttt{amsmath}との衝突の回避」のコードは,上流で既に対処されているうえ,
-% これがあると |grfext.sty| を読み込んだ際にエラーを引き起こすので削除しました。
+% これがあると\texttt{grfext.sty}を読み込んだ際にエラーを引き起こすので削除しました。
+% \item 本家\texttt{jsclasses}では |\mag| を用いて「10\,pt時の組版結果を本文フォントサイズに合わせ拡大縮小」
+% という方針でしたが,本\texttt{ltjsclasses}ではそのような方法を取っていません。
+% \begin{itemize}
+% \item \texttt{nomag}オプション指定時には,単にレイアウトに用いる各種長さの値をスケールさせるだけです。
+% そのため,例えば本文の文字サイズが17\,ptのときにはcmr10でなくcmr17を用いることになり,組版結果の印象が
+% 異なる恐れがあります。
+% \item \texttt{nomag*}オプション指定時には,上記に加えてオプティカルサイズを調整する(本文ではcmr17の代わりに
+% cmr10を拡大縮小する,など)ため,\LaTeX のフォント選択システムNFSSへパッチを当てます。
+% こうすることで前項に書いた不具合はなくなりますが,かえって別の不具合が起きる可能性
+% はあります\footnote{%
+% \texttt{nomag*}は\texttt{jsclasses}でも利用可能ですが,\texttt{ltjsclasses}では\texttt{jsclasses}とは
+% 別の実装をしています。
+% }。
+% \end{itemize}
+% 標準では\texttt{nomag*}オプションが有効になっています。\texttt{jsclasses}で用意され,かつ既定になっている
+% \texttt{usemag}オプションを指定すると警告を出します。
% \end{itemize}
%
-% [2014-02-07 LTJ] jsclasses 2014-02-07 ベースにしました.
+% [2014-02-07 LTJ] jsclasses 2014-02-07 ベースにしました。
+%
+% [2014-07-26 LTJ] 縦組用和文フォントの設定を加えました。
+%
+% [2014-12-24 LTJ] |\@setfontsize| 中の和欧文間空白の設定で if 文が抜けていたのを直しました。
+%
+% [2016-01-30 LTJ] |\rmfamily| 他で和文フォントファミリも変更するコードを
+% Lua\TeX-ja カーネル内に移しました。
+%
+% [2016-03-21 LTJ] Lua\TeX~beta-0.87.0 ではPDF出力時に|\mag|が使用できなくなったので,
+% ZRさんの\texttt{bxjscls}を参考に使わないように書き換えました。
+%
+% [2016-03-31 LTJ] \texttt{xreal}オプションを標準で有効にしました。
+%
+% [2016-07-12 LTJ] \texttt{jsclasses}開発版に合わせ,\texttt{real},~\texttt{xreal}オプションの名称を変更するなどの変更を行いました。
+%
+% [2016-07-18 LTJ] \texttt{usemag}オプションが指定されると警告を出すようにしました。
+%
+% [2016-07-21 LTJ] \LaTeX 等のロゴの再定義で,\texttt{jslogo}パッケージがあればそちらを読み込むことにしました。
+%
+% [2016-10-13 LTJ] \texttt{slide}オプションの使用時にエラーが出るのを修正.
%
% \StopEventually{}
%
% 以下では実際のコードに即して説明します。
+%
+% \begin{macro}{\jsc@clsname}
+%
+% 文書クラスの名前です。エラーメッセージ表示などで使われます。
+%
+% \begin{macrocode}
+%<article>\def\jsc@clsname{ltjsarticle}
+%<book>\def\jsc@clsname{ltjsbook}
+%<report>\def\jsc@clsname{ltjsreport}
+%<jspf>\def\jsc@clsname{ltjspf}
+%<kiyou>\def\jsc@clsname{ltjskiyou}
+% \end{macrocode}
+% \end{macro}
+%
% \section{Lua\TeX-jaの読み込み}
%
-% まず,|luatexja| を読み込みます。
+% まず,Lua\TeX-jaを読み込みます。
% \begin{macrocode}
\RequirePackage{luatexja}
% \end{macrocode}
%
% \begin{macro}{\if@openright}
%
-% |\chapter|,|\part| を奇数ページ起こしにするかどうかです。
-% 書籍では真が標準です。
+% |\chapter|,|\part| を右ページ起こしにするかどうかです。
+% 横組の書籍では真が標準で,要するに片起こし,奇数ページ起こしになります。
+%
+% \begin{macrocode}
+%<book|report>\newif\if@openright
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@openleft}
+%
+% [2017-02-24] |\chapter|,|\part| を左ページ起こしにするかどうかです。
%
% \begin{macrocode}
-%<book>\newif\if@openright
+%<book|report>\newif\if@openleft
% \end{macrocode}
% \end{macro}
%
% \pLaTeXe の \texttt{b5paper}
% は $257\,\mathrm{mm} \times 182\,\mathrm{mm}$ になっています。
% ここでは\pLaTeXe にならってJISに従いました。
-%
+%
% デフォルトは \texttt{a4paper} です。
%
% \texttt{b5var}(B5変形,182mm×230mm),
%
% オプション \texttt{slide} を新設しました。
%
+% [2016-10-08] \texttt{slide} オプションは article 以外では使い物にならなかったので,
+% 簡単のため article のみで使えるオプションとしました。
+%
% \begin{macrocode}
\newif\if@slide
\@slidefalse
%
% [2003-04-18] 12Qオプションを追加しました。
%
+% [2016-07-08] |\mag| を使わずに各種寸法をスケールさせるためのオプション \texttt{nomag} を新設しました。
+% \texttt{usemag} オプションの指定で従来通りの動作となります。デフォルトは \texttt{usemag} です。
+%
+% [2016-07-24] オプティカルサイズを調整するためにNFSSへパッチを当てるオプション \texttt{nomag*} を新設しました。
+%
% \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\jsc@magscale{1}
+%<*article>
+\DeclareOption{slide}{\@slidetrue\def\jsc@magscale{3.583}\@landscapetrue\@titlepagetrue}
+%</article>
+\DeclareOption{8pt} {\def\jsc@magscale{0.833}}% 1.2^(-1)
+\DeclareOption{9pt} {\def\jsc@magscale{0.913}}% 1.2^(-0.5}
+\DeclareOption{10pt}{\def\jsc@magscale{1}}
+\DeclareOption{11pt}{\def\jsc@magscale{1.095}}% 1.2^0.5
+\DeclareOption{12pt}{\def\jsc@magscale{1.200}}
+\DeclareOption{14pt}{\def\jsc@magscale{1.440}}
+\DeclareOption{17pt}{\def\jsc@magscale{1.728}}
+\DeclareOption{20pt}{\def\jsc@magscale{2}}
+\DeclareOption{21pt}{\def\jsc@magscale{2.074}}
+\DeclareOption{25pt}{\def\jsc@magscale{2.488}}
+\DeclareOption{30pt}{\def\jsc@magscale{2.986}}
+\DeclareOption{36pt}{\def\jsc@magscale{3.583}}
+\DeclareOption{43pt}{\def\jsc@magscale{4.300}}
+\DeclareOption{12Q} {\def\jsc@magscale{0.923}}% 1pt*12Q/13Q
+\DeclareOption{14Q} {\def\jsc@magscale{1.077}}% 1pt*14Q/13Q
+\DeclareOption{10ptj}{\def\jsc@magscale{1.085}}% 1pt*10bp/13Q
+\DeclareOption{10.5ptj}{\def\jsc@magscale{1.139}}
+\DeclareOption{11ptj}{\def\jsc@magscale{1.194}}
+\DeclareOption{12ptj}{\def\jsc@magscale{1.302}}
+% \end{macrocode}
+%
+% \paragraph{オプティカルサイズの補正}
+% \texttt{nomag*}オプション指定時には,本文のフォントサイズが10pt以外の場合に
+% オプティカルサイズの補正を行うためにNFSSにパッチを当てます。
+% 現在の\texttt{ltjsclasses}ではこのパッチ当ては標準では行いますが,
+% 将来どうなるかわからないので\texttt{nomag}で無効化することができるようにしました。
+%
+% \texttt{noxreal},~\texttt{real}は旧来の互換性として今は残してありますが,2017年7月に削除する予定です。
+% \begin{macrocode}
+\newif\if@ltjs@mag@xreal
+\@ltjs@mag@xrealtrue
+\DeclareOption{nomag*}{\@ltjs@mag@xrealtrue}
+\DeclareOption{nomag}{\@ltjs@mag@xrealfalse}
+\DeclareOption{noxreal}{%
+ \ClassWarningNoLine{\jsc@clsname}{%
+ The class option `noxreal' is obsolete. \MessageBreak
+ Please use the `nomag' option instead}%
+ \@ltjs@mag@xrealfalse}
+\DeclareOption{real}{%
+ \ClassWarningNoLine{\jsc@clsname}{%
+ The class option `real' is obsolete. \MessageBreak
+ Please use the `nomag' option instead}%
+ \@ltjs@mag@xrealfalse}
+\DeclareOption{usemag}{%
+ \ClassWarningNoLine{\jsc@clsname}{%
+ This \jsc@clsname\space cls does not support `usemag'\MessageBreak
+ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}%
+ \@ltjs@mag@xrealtrue}
+
+
% \end{macrocode}
%
+%
% \paragraph{トンボオプション}
%
% トンボ(crop marks)を出力します。
-% 実際の処理は |lltjcore.sty| で行います。
+% 実際の処理は\texttt{lltjcore.sty}で行います。
% オプション \texttt{tombow} で日付付きのトンボ,
% オプション \texttt{tombo} で日付なしのトンボを出力します。
% これらはアスキー版のままです。
-% カウンタ |\hour|,|\minute| は |luatexja-compat.sty| で宣言されています。
+% カウンタ |\hour|,|\minute| は\texttt{luatexja-compat.sty}で宣言されています。
%
% \begin{macrocode}
\hour\time \divide\hour by 60\relax
%
% \paragraph{右左起こし}
%
-% 書籍では章は通常は奇数ページ起こしになりますが,
+% 書籍では章は通常は奇数ページ起こしになりますが,横組ではこれを
+% \texttt{openright} と表すことにしてあります。
% \texttt{openany} で偶数ページからでも始まるようになります。
%
+% [2017-02-24] \texttt{openright} は横組では奇数ページ起こし,縦組では
+% 偶数ページ起こしを表します。ややこしいですが,これは\LaTeX の標準クラスが
+% 西欧の横組事情しか考慮せずに,奇数ページ起こしと右起こしを一緒にしてしまっ
+% たせいです。縦組での奇数ページ起こしと横組での偶数ページ起こしも表現したい
+% ので,ltjsclassesでは新たに \texttt{openleft} も追加しました。
+%
% \begin{macrocode}
-%<book>\DeclareOption{openright}{\@openrighttrue}
-%<book>\DeclareOption{openany}{\@openrightfalse}
+%<book|report>\DeclareOption{openright}{\@openrighttrue\@openleftfalse}
+%<book|report>\DeclareOption{openleft}{\@openlefttrue\@openrightfalse}
+%<book|report>\DeclareOption{openany}{\@openrightfalse\@openleftfalse}
% \end{macrocode}
%
% \paragraph{eqnarray環境と数式の位置}
%
% \paragraph{数式フォントとして和文フォントを登録しないオプション}
%
-% p\TeX では数式中では16通りのフォントしか使えませんでしたが,Lua\TeX では
+% \pTeX では数式中では16通りのフォントしか使えませんでしたが,Lua\TeX では
% Omega拡張が取り込まれていて256通りのフォントが使えます。
% ただし,\LaTeXe カーネルでは未だに数式ファミリの数は16個に制限されているので,
-% 実際に使用可能な数式ファミリの数を増やすためには |lualatex-math| パッケージを
+% 実際に使用可能な数式ファミリの数を増やすためには\texttt{lualatex-math}パッケージを
% 読み込む必要があることに注意が必要です。
%
% \begin{macrocode}
\DeclareOption{disablejfam}{%
- \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}}
+ \ClassWarningNoLine{\jsc@clsname}{The class option 'disablejfam' is obsolete}}
% \end{macrocode}
%
% \paragraph{ドラフト}
%
% \texttt{draft} でoverfull boxの起きた行末に5ptの罫線を引きます。
%
+% [2016-07-13] |\ifdraft| を定義するのをやめました。
+%
% \begin{macrocode}
-\newif\ifdraft
-\DeclareOption{draft}{\drafttrue \setlength\overfullrule{5pt}}
-\DeclareOption{final}{\draftfalse \setlength\overfullrule{0pt}}
+\DeclareOption{draft}{\setlength\overfullrule{5pt}}
+\DeclareOption{final}{\setlength\overfullrule{0pt}}
% \end{macrocode}
%
% \paragraph{和文フォントメトリックの選択}
%
-% ここではOTFパッケージのメトリックを元とした,|jfm-ujis.lua| メトリックを標準で使います。
+% ここではOTFパッケージのメトリックを元とした,\texttt{jfm-ujis.lua}メトリックを標準で使います。
% 古い\texttt{min10},\texttt{goth10}互換のメトリックを使いたいときは\texttt{mingoth}
% というオプションを指定します。
-% p\TeX でよく利用される\texttt{jis}フォントメトリックと互換のメトリックを使いたい場合は,
+% \pTeX でよく利用される\texttt{jis}フォントメトリックと互換のメトリックを使いたい場合は,
% \texttt{ptexjis}というオプションを指定します。
% \texttt{winjis}メトリックは用済みのため,\texttt{winjis}オプションは無視されます。
%
+% [2016-11-09] pLaTeX / upLaTeX を自動判別するオプション \texttt{autodetect-engine} を新設しました。
+%
+% [2016-11-24 LTJ] \texttt{autodetect-engine} はLua\TeX-jaでは意味がないので警告を表示させます.
+%
% \begin{macrocode}
\newif\ifmingoth
\mingothfalse
\newif\ifptexjis
\ptexjisfalse
\DeclareOption{winjis}{%
- \ClassWarningNoLine{\@currname}{The class option 'winjis' is obsolete}}
+ \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `winjis' option}}
\DeclareOption{uplatex}{%
- \ClassWarningNoLine{\@currname}{The class option 'uplatex' is obsolete}}
+ \ClassErrorNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `uplatex' option}}
+\DeclareOption{autodetect-engine}{%
+ \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `autodetect-engine' option}}
\DeclareOption{mingoth}{\mingothtrue}
\DeclareOption{ptexjis}{\ptexjistrue}
\DeclareOption{jis}{\jisfonttrue}
%
% \paragraph{papersizeスペシャルの利用}
%
-% |ltjsclasses| では |papersize| オプションの有無に関わらず,
-% PDFのページサイズは適切に設定されます。
-%
-% \begin{macrocode}
-\newif\ifpapersize
-\papersizefalse
-\DeclareOption{papersize}{\papersizetrue}
-% \end{macrocode}
+% \texttt{ltjsclasses}では\texttt{papersize}オプションの有無に関わらず,
+% PDFのページサイズは適切に設定されるので,削除しました。
%
% \paragraph{英語化}
%
\DeclareOption{english}{\@englishtrue}
% \end{macrocode}
%
-% \paragraph{ltjsreport相当}
+% \paragraph{ltjsbookをltjsreportもどきに}
%
% オプション \texttt{report} を新設しました。
%
+% [2017-02-13] 従来は「ltjsreport相当」をltjsbookの \texttt{report} オプションで提供して
+% いましたが,新しくltjsreportクラスも作りました。どちらでもお好きな方を使ってください。
+%
% \begin{macrocode}
%<*book>
\newif\if@report
%</book>
% \end{macrocode}
%
+% \paragraph{\texttt{jslogo}パッケージの読み込み}
+%
+% \LaTeX 関連のロゴを再定義する\texttt{jslogo}パッケージを
+% 読み込まないオプション\texttt{nojslogo}を新設しました。
+% \texttt{jslogo}オプションの指定で従来どおりの動作となります。
+% デフォルトは\texttt{jslogo}で,すなわちパッケージを読み込みます。
+% \begin{macrocode}
+\newif\if@jslogo \@jslogotrue
+\DeclareOption{jslogo}{\@jslogotrue}
+\DeclareOption{nojslogo}{\@jslogofalse}
+% \end{macrocode}
+%
% \paragraph{オプションの実行}
%
% デフォルトのオプションを実行します。
% \begin{macrocode}
%<article>\ExecuteOptions{a4paper,oneside,onecolumn,notitlepage,final}
%<book>\ExecuteOptions{a4paper,twoside,onecolumn,titlepage,openright,final}
+%<report>\ExecuteOptions{a4paper,oneside,onecolumn,titlepage,openany,final}
%<jspf>\ExecuteOptions{a4paper,twoside,twocolumn,notitlepage,fleqn,final}
%<kiyou>\ExecuteOptions{a4paper,twoside,twocolumn,notitlepage,final}
\ProcessOptions
% 基準となる行送りをポイント単位で表したものです。
%
% \begin{macrocode}
-%<article|book>\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi
+%<article|book|report>\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi
%<jspf>\def\n@baseline{14.554375}
%<kiyou>\def\n@baseline{14.897}
% \end{macrocode}
% \item |geometry| 側でオプション |mag| は使えません。
% \end{itemize}
%
+% [2016-03-21 LTJ] |\mag| を使わないように全面的に書き換えました。
+% |\ltjs@mpt| に「拡大率だけ大きくしたpt」の値が格納されます。
+% \texttt{bxjscls}と同様に,|\@ptsize| は |10pt|,~|11pt|,~|12pt| オプションが指定された時だけ
+% 従来通り0,~1,~2と設定し,それ以外の場合は$-20$とすることにしました。
+% |\inv@mag| はもはや定義していません。
+%
+% [2016-03-26 LTJ] |\ltjs@magscale| に拡大率を格納した後,それを用いて |\ltjs@mpt| を
+% 設定するようにしました。
+%
+% [2016-07-08] |\jsc@mpt| および |\jsc@mmm| に,それぞれ1ptおよび1mmを拡大させた値を格納します。
+% 以降のレイアウト指定ではこちらを使います。
+%
+% [2016-07-12 LTJ] |\ltjs@...| を本家に合わせて |\jsc@...| に名称変更しました。
% \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\jsc@magscale{0.9769230}
%</kiyou>
-\setlength\paperwidth{\inv@mag\paperwidth}%
-\setlength\paperheight{\inv@mag\paperheight}%
+\newdimen\jsc@mpt
+\newdimen\jsc@mmm
+\jsc@mpt=\jsc@magscale\p@
+\jsc@mmm=\jsc@magscale mm
+\ifdim\jsc@mpt<.92\p@ % 8pt, 9pt 指定時
+ \def\n@baseline{15}%
+\fi
+\newcommand{\@ptsize}{0}
+\ifdim\jsc@mpt=1.0954\p@ \renewcommand{\@ptsize}{1}\else
+\ifdim\jsc@mpt=1.2\p@ \renewcommand{\@ptsize}{2}\else
+\renewcommand{\@ptsize}{-20}\fi\fi
+% \end{macrocode}
+%
+% \paragraph{オプティカルサイズの補正}
+% \leavevmode\par
+% [2016-03-26 LTJ] |xreal|オプションの指定時には,\texttt{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の誤差は仕方がないです。
+% そのため,事前に\texttt{type1cm}パッケージを読みこんでおきます。
+%
+% [2016-03-28 LTJ] |\luafunction|を使うようにし,また本文のフォントサイズが10\,ptのときには
+% (不要なので)パッチを当てないことにしました。
+%
+% [2016-04-04 LTJ] NFSSへのパッチを修正。
+%
+% [2017-01-23] \LaTeXe\ 2017-01-01以降ではTUエンコーディングが標準なので,
+% \texttt{type1cm}パッケージは読み込まないようにしました.
+%
+% [2017-02-17 LTJ] |\directlua|中で出力される数字のカテゴリーコードが12になるようにしました.
+% この保証をしないと例えば\texttt{listings}パッケージで無限ループになります.
+% \begin{macrocode}
+\if@ltjs@mag@xreal
+\ifdim\jsc@mpt=\p@\else
+ \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname TU/lmr/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('jsc@mpt')/65536
+ local t = lua.get_functions_table()
+ t[\the\ltjs@@magnify@font@calc] = function()
+ tex.sprint(-2,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(-2, (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(-2,math.floor(0.5+\jsc@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}
+%
+% [2016-11-16] latex.ltx (ltspace.dtx)で定義されている |\smallskip| の,
+% 単位 |pt| を |\jsc@mpt| に置き換えた |\jsc@smallskip| を定義します。
+% これは |\maketitle| で用いられます。
+% |\jsc@medskip| と |\jsc@bigskip| は必要ないのでコメントアウトしています。
+%
+% \begin{macro}{\jsc@smallskip}
+% \begin{macro}{\jsc@medskip}
+% \begin{macro}{\jsc@bigskip}
+% \begin{macrocode}
+\def\jsc@smallskip{\vspace\jsc@smallskipamount}
+%\def\jsc@medskip{\vspace\jsc@medskipamount}
+%\def\jsc@bigskip{\vspace\jsc@bigskipamount}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\jsc@smallskipamount}
+% \begin{macro}{\jsc@medskipamount}
+% \begin{macro}{\jsc@bigskipamount}
+% \begin{macrocode}
+\newskip\jsc@smallskipamount
+\jsc@smallskipamount=3\jsc@mpt plus 1\jsc@mpt minus 1\jsc@mpt
+%\newskip\jsc@medskipamount
+%\jsc@medskipamount =6\jsc@mpt plus 2\jsc@mpt minus 2\jsc@mpt
+%\newskip\jsc@bigskipamount
+%\jsc@bigskipamoun =12\jsc@mpt plus 4\jsc@mpt minus 4\jsc@mpt
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
%
% \paragraph{PDFの用紙サイズの設定}
%
-% \begin{macro}{\pdfpagewidth}
-% \begin{macro}{\pdfpageheight}
+% \begin{macro}{\pagewidth}
+% \begin{macro}{\pageheight}
+% \begin{macro}{\stockwidth}
+% \begin{macro}{\stockheight}
% 出力のPDFの用紙サイズをここで設定しておきます。
% |tombow| が真のときは2インチ足しておきます。
+%
+% [2015-10-18 LTJ] Lua\TeX\ 0.81.0ではプリミティブの名称変更がされたので,
+% それに合わせておきます。
+%
+% [2016-07-12 LTJ] luatex.defが新しくなったことに対応するaminophenさんのパッチを取り込みました。
+%
+% [2017-01-11] トンボオプションが指定されているとき「だけ」|\stockwidth|,
+% |\stockheight|を定義するようにしました。
+%
% \begin{macrocode}
-\setlength{\@tempdima}{\paperwidth}
-\setlength{\@tempdimb}{\paperheight}
\iftombow
- \advance \@tempdima 2in
- \advance \@tempdimb 2in
+ \newlength{\stockwidth}
+ \newlength{\stockheight}
+ \setlength{\stockwidth}{\paperwidth}
+ \setlength{\stockheight}{\paperheight}
+ \advance \stockwidth 2in
+ \advance \stockheight 2in
+ \ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\stockwidth}
+ \setlength{\pdfpageheight}{\stockheight}
+ \else
+ \setlength{\pagewidth}{\stockwidth}
+ \setlength{\pageheight}{\stockheight}
+ \fi
+\else
+ \ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\paperwidth}
+ \setlength{\pdfpageheight}{\paperheight}
+ \else
+ \setlength{\pagewidth}{\paperwidth}
+ \setlength{\pageheight}{\paperheight}
+ \fi
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \section{和文フォントの変更}
%
% 一方,Lua\TeX-jaの提供するメトリックでは,そのようなことはありません。
% 公称10ポイントの和文フォントは,10ポイントで出力されます。
%
-% この |ltjsclasses| でも,派生元の |jsclasses| と同じように,
+% この\texttt{ltjsclasses}でも,派生元の\texttt{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| による、デフォルトで使われ明朝・ゴシックのフォントの
-% 設定に対応しました。この2つの命令の値はユーザが日々の利用でその都度指定するものではなく、
-% 何らかの理由で非埋め込みフォントが正しく利用できない場合にのみ |luatexja.cfg| によって
+% |\ltj@stdmcfont|,~|\ltj@stdgtfont| による,デフォルトで使われる明朝・ゴシックのフォントの
+% 設定に対応しました。この2つの命令の値はユーザが日々の利用でその都度指定するものではなく,
+% 何らかの理由で非埋め込みフォントが正しく利用できない場合にのみ\texttt{luatexja.cfg}によって
% セットされるものです。
%
+% [2014-07-26 LTJ] なお,現状のところ,縦組用JFMは\texttt{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.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ポイント強になります。
\DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.903375] \ltj@stdgtfont:jfm=ujis}{}
\fi
\fi
+\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.903375] \ltj@stdmcfont:jfm=ujisv}{}
+\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.903375] \ltj@stdgtfont:jfm=ujisv}{}
%</jspf>
% \end{macrocode}
%
% タイプライタ体の代わりにゴシック体を使うことにします。
%
% [2014-03-25 LTJ] タイプライタ体に合わせるファミリを |\jttdefault| とし,
-% 通常のゴシック体と別にできるようにしました.|\jttdefault| は,標準で
-% |\gtdefault| と定義しています.
+% 通常のゴシック体と別にできるようにしました。|\jttdefault| は,標準で
+% |\gtdefault| と定義しています。
%
% [2003-03-16] イタリック体,斜体について,和文でゴシックを当てていましたが,
% 数学の定理環境などで多量のイタリック体を使うことがあり,ゴシックに
%
% [2004-11-03] |\rmfamily| も和文対応にしました。
%
+% [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}{}
%% \DeclareFontShape{JT3}{gt}{m}{sl}{<->ssub*gt/m/n}{}
%% \DeclareFontShape{JT3}{mc}{bx}{it}{<->ssub*gt/m/n}{}
%% \DeclareFontShape{JT3}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
-\renewcommand\jttdefault{\gtdefault}
-\DeclareRobustCommand\rmfamily
- {\not@math@alphabet\rmfamily\mathrm
- \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont}
-\DeclareRobustCommand\sffamily
- {\not@math@alphabet\sffamily\mathsf
- \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont}
-\DeclareRobustCommand\ttfamily
- {\not@math@alphabet\ttfamily\mathtt
- \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont}
+\renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue
% \end{macrocode}
%%
% Lua\TeX-jaでは和文組版に伴うグルーはノードベースで挿入するようになり,また
% 欧文・和文間のグルーとイタリック補正は干渉しないようになりました。
% まだ「和文の斜体」についてはLua\LaTeX カーネル側でまともな対応がされていませんが,
-% |jsclasses.dtx| で行われていた |\textmc|, |\textgt| の再定義は不要のように思われます。
+% \texttt{jsclasses}で行われていた |\textmc|, |\textgt| の再定義は不要のように思われます。
%
-% |jsclasses.dtx| 中で行われていた |\reDeclareMathAlphabet| の再定義は削除。
+% \texttt{jsclasses.dtx}中で行われていた |\reDeclareMathAlphabet| の再定義は削除。
%
% \begin{macrocode}
\AtBeginDocument{%
% では |I watch TV\@.| と書くと V とピリオドのペアカーニングが効かなくなります。
% そこで,次のような定義に直し,|I watch TV.\@| と書くことにします。
%
+% [2016-07-14] 2015-01-01の\LaTeX で,auxiliary filesに書き出されたときに
+% スペースが食われないようにする修正が入りました。これに合わせて |{}| を補いました。
+%
% \begin{macrocode}
-\def\@{\spacefactor3000\space}
+\def\@{\spacefactor3000{}}
% \end{macrocode}
% \end{macro}
%
% 和文文字間のスペース |kanjiskip|,
% 和文・欧文間のスペース |xkanjiskip| を変更しています。
%
-% |kanjiskip| は |ltj-latex.sty| で |0pt plus 0.4pt minus 0.4pt| に
+% |kanjiskip| は |ltj-latex.sty| で |0pt plus 0.4pt minus 0.5pt| に
% 設定していますが,
% これはそもそも文字サイズの変更に応じて変わるべきものです。
% それに,プラスになったりマイナスになったりするのは,
%
% [2008-02-18] |english| オプションで |\parindent| を 1em にしました。
%
+% [2014-05-14 LTJ] |\ltjsetparameter|の実行は時間がかかるので,
+% |\ltjsetkanjiskip| と |\ltjsetxkanjiskip|(両者とも,
+% 実行前には |\ltj@setpar@global| の実行が必要)にしました。
+%
+% [2014-12-24 LTJ] |jsclasses| では,|\@setfontsize| 中で |xkanjiskip| を
+% 設定するのは現在の和欧文間空白の自然長が正の場合だけでした。
+% |ltjsclasses| では最初からこの判定が抜けてしまっていたので,復活させます。
+%
% \begin{macrocode}
\def\@setfontsize#1#2#3{%
% \@nomath#1%
\parindent=1\zw
\fi
\fi
- \ltjsetparameter{kanjiskip={0\zw plus .1\zw minus .01\zw}}
- \if@slide \ltjsetparameter{xkanjiskip={0.1em}} \else
- \ltjsetparameter{xkanjiskip={0.25em plus 0.15em minus 0.06em}}
+ \ltj@setpar@global
+ \ltjsetkanjiskip\z@ plus .1\zw minus .01\zw
+ \@tempskipa=\ltjgetparameter{xkanjiskip}
+ \ifdim\@tempskipa>\z@
+ \if@slide
+ \ltjsetxkanjiskip .1em
+ \else
+ \ltjsetxkanjiskip .25em plus .15em minus .06em
+ \fi
\fi}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\jsc@setfontsize}
+% クラスファイルの内部では,拡大率も考慮した |\jsc@setfontsize| を
+% |\@setfontsize| の変わりに用いることにします。
+% \begin{macrocode}
+\def\jsc@setfontsize#1#2#3{%
+ \@setfontsize#1{#2\jsc@mpt}{#3\jsc@mpt}}
+% \end{macrocode}
+% \end{macro}
+%
% これらのグルーをもってしても行分割ができない場合は,
% |\emergencystretch| に訴えます。
%
%
% TODO: Hasumiさん [qa:54539] のご指摘は考慮中です。
%
+% [2015-01-07 LTJ] 遅くなりましたが,
+% \url{http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1005} にあったZRさんのパッチを取り込みました。
+%
% \begin{macrocode}
\newif\ifnarrowbaselines
\if@english
\belowdisplayskip=\skip4
\belowdisplayshortskip=\skip6\relax}
\def\widebaselines{\narrowbaselinesfalse\@currsize\selectfont}
+\def\ltj@@ifnarrowbaselines{%
+ \ifnarrowbaselines\expandafter\@firstoftwo
+ \else \expandafter\@secondoftwo
+ \fi
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macrocode}
\renewcommand{\normalsize}{%
- \ifnarrowbaselines
- \@setfontsize\normalsize\@xpt\@xiipt
- \else
- \@setfontsize\normalsize\@xpt{\n@baseline}%
- \fi
+ \ltj@@ifnarrowbaselines
+ {\jsc@setfontsize\normalsize\@xpt\@xiipt}%
+ {\jsc@setfontsize\normalsize\@xpt{\n@baseline}}%
% \end{macrocode}
%
% 数式の上のアキ(|\abovedisplayskip|),
% いましたが,結局,微調節してみることにしました。
%
% \begin{macrocode}
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+ \abovedisplayskip 11\jsc@mpt \@plus3\jsc@mpt \@minus4\jsc@mpt
+ \abovedisplayshortskip \z@ \@plus3\jsc@mpt
+ \belowdisplayskip 9\jsc@mpt \@plus3\jsc@mpt \@minus4\jsc@mpt
\belowdisplayshortskip \belowdisplayskip
% \end{macrocode}
%
% ここで実際に標準フォントサイズで初期化します。
%
% \begin{macrocode}
-\normalsize
+\mcfamily\selectfont\normalsize
% \end{macrocode}
%
% \end{macro}
%
% \begin{macrocode}
\newcommand{\small}{%
- \ifnarrowbaselines
-%<!kiyou> \@setfontsize\small\@ixpt{11}%
-%<kiyou> \@setfontsize\small{8.8888}{11}%
- \else
-%<!kiyou> \@setfontsize\small\@ixpt{13}%
-%<kiyou> \@setfontsize\small{8.8888}{13.2418}%
- \fi
- \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus3\p@
+ \ltj@@ifnarrowbaselines
+%<!kiyou> {\jsc@setfontsize\small\@ixpt{11}}%
+%<kiyou> {\jsc@setfontsize\small{8.8888}{11}}%
+%<!kiyou> {\jsc@setfontsize\small\@ixpt{13}}%
+%<kiyou> {\jsc@setfontsize\small{8.8888}{13.2418}}%
+ \abovedisplayskip 9\jsc@mpt \@plus3\jsc@mpt \@minus4\jsc@mpt
+ \abovedisplayshortskip \z@ \@plus3\jsc@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
%
% \begin{macrocode}
\newcommand{\footnotesize}{%
- \ifnarrowbaselines
-%<!kiyou> \@setfontsize\footnotesize\@viiipt{9.5}%
-%<kiyou> \@setfontsize\footnotesize{8.8888}{11}%
- \else
-%<!kiyou> \@setfontsize\footnotesize\@viiipt{11}%
-%<kiyou> \@setfontsize\footnotesize{8.8888}{13.2418}%
- \fi
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus3\p@
- \abovedisplayshortskip \z@ \@plus2\p@
+ \ltj@@ifnarrowbaselines
+%<!kiyou> {\jsc@setfontsize\footnotesize\@viiipt{9.5}}%
+%<kiyou> {\jsc@setfontsize\footnotesize{8.8888}{11}}%
+%<!kiyou> {\jsc@setfontsize\footnotesize\@viiipt{11}}%
+%<kiyou> {\jsc@setfontsize\footnotesize{8.8888}{13.2418}}%
+ \abovedisplayskip 6\jsc@mpt \@plus2\jsc@mpt \@minus3\jsc@mpt
+ \abovedisplayshortskip \z@ \@plus2\jsc@mpt
\belowdisplayskip \abovedisplayskip
\belowdisplayshortskip \belowdisplayskip
\def\@listi{\leftmargin\leftmargini
% [2004-11-03] |\HUGE| を追加。
%
% \begin{macrocode}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
-\newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand{\scriptsize}{\jsc@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand{\tiny}{\jsc@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}{\jsc@setfontsize\large\@xiipt{\n@baseline}}
+%<kiyou> \newcommand{\large}{\jsc@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}{\jsc@setfontsize\large\@xiipt{17}}
+%<kiyou> \newcommand{\large}{\jsc@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}{\jsc@setfontsize\Large\@xivpt{21}}
+%<kiyou>\newcommand{\Large}{\jsc@setfontsize\Large{12.222}{21}}
+\newcommand{\LARGE}{\jsc@setfontsize\LARGE\@xviipt{25}}
+\newcommand{\huge}{\jsc@setfontsize\huge\@xxpt{28}}
+\newcommand{\Huge}{\jsc@setfontsize\Huge\@xxvpt{33}}
+\newcommand{\HUGE}{\jsc@setfontsize\HUGE{30}{40}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macrocode}
%<!kiyou>\setlength\columnsep{2\zw}
%<kiyou>\setlength\columnsep{28truebp}
-\setlength\columnseprule{0\p@}
+\setlength\columnseprule{\z@}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \texttt{normal...} の付いた方は保存用です。
%
% \begin{macrocode}
-\setlength\lineskip{1\p@}
-\setlength\normallineskip{1\p@}
-\setlength\lineskiplimit{1\p@}
-\setlength\normallineskiplimit{1\p@}
+\setlength\lineskip{1\jsc@mpt}
+\setlength\normallineskip{1\jsc@mpt}
+\setlength\lineskiplimit{1\jsc@mpt}
+\setlength\normallineskiplimit{1\jsc@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
% |\parindent| は段落の先頭の字下げ幅です。
%
% \begin{macrocode}
-\setlength\parskip{0\p@}
+\setlength\parskip{\z@}
\if@slide
\setlength\parindent{0\zw}
\else
% 計算では |\headheight| ではなく |\topskip| を使う
% ことにしました。
%
+%
+% [2016-08-17] 圏点やルビが一行目に来た場合に下がるのを防ぐた
+% め,|\topskip| を10ptから1.38zwに増やしました。
+% |\headheight| は従来と同じ20ptのままとします。
+%
+% [2016-08-17 LTJ] 1.38zwの代わりに1.38|\zh|にしています。
+%
% \begin{macrocode}
-\setlength\topskip{10\p@}
+\setlength\topskip{1.38\zh}%% from 10\jsc@mpt (2016-08-17)
\if@slide
- \setlength\headheight{0\p@}
+ \setlength\headheight{0\jsc@mpt}
\else
- \setlength\headheight{2\topskip}
+ \setlength\headheight{20\jsc@mpt}%% from 2\topskip (2016-08-17); from \topskip (2003-06-26)
\fi
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
%<*article|kiyou>
\if@slide
- \setlength\footskip{0pt}
+ \setlength\footskip{\z@}
\else
\setlength\footskip{0.03367\paperheight}
\ifdim\footskip<\baselineskip
\fi
\fi
%</article|kiyou>
-%<jspf>\setlength\footskip{9mm}
+%<jspf>\setlength\footskip{9\jsc@mmm}
%<*book>
\if@report
\setlength\footskip{0.03367\paperheight}
\setlength\footskip{\baselineskip}
\fi
\else
- \setlength\footskip{0pt}
+ \setlength\footskip{\z@}
\fi
%</book>
+%<*report>
+\setlength\footskip{0.03367\paperheight}
+\ifdim\footskip<\baselineskip
+ \setlength\footskip{\baselineskip}
+\fi
+%</report>
% \end{macrocode}
% \end{macro}
%
% それ以外で25pt(約8.79mm)になっていました。
% ここでは article は |\footskip| $-$ |\topskip| としました。
%
+% [2016-10-08] article の \texttt{slide} のとき,
+% および book の非 \texttt{report} と kiyou のときに |\headsep| を
+% 減らしそこねていたのを修正しました(2016-08-17での修正漏れ)。
+%
% \begin{macrocode}
%<*article>
\if@slide
- \setlength\headsep{0\p@}
+ \setlength\headsep{0\jsc@mpt}
+ \addtolength\headsep{-\topskip}%% added (2016-10-08)
+ \addtolength\headsep{10\jsc@mpt}%% added (2016-10-08)
\else
\setlength\headsep{\footskip}
\addtolength\headsep{-\topskip}
\setlength\headsep{\footskip}
\addtolength\headsep{-\topskip}
\else
- \setlength\headsep{6mm}
+ \setlength\headsep{6\jsc@mmm}
+ \addtolength\headsep{-\topskip}%% added (2016-10-08)
+ \addtolength\headsep{10\jsc@mpt}%% added (2016-10-08)
\fi
%</book>
+%<*report>
+\setlength\headsep{\footskip}
+\addtolength\headsep{-\topskip}
+%</report>
%<*jspf>
-\setlength\headsep{9mm}
+\setlength\headsep{9\jsc@mmm}
\addtolength\headsep{-\topskip}
%</jspf>
%<*kiyou>
-\setlength\headheight{0\p@}
-\setlength\headsep{0\p@}
+\setlength\headheight{0\jsc@mpt}
+\setlength\headsep{0\jsc@mpt}
+\addtolength\headsep{-\topskip}%% added (2016-10-08)
+\addtolength\headsep{10\jsc@mpt}%% added (2016-10-08)
%</kiyou>
% \end{macrocode}
% \end{macro}
%
% 書籍以外では本文領域の幅 |\textwidth| は |\fullwidth| と等しくします。
% |article| ではA4縦置きで49文字となります。
-% 某学会誌スタイルでは|50\zw|(25文字×2段)+段間8mmとします。
+% 某学会誌スタイルでは |50\zw|(25文字×2段)+段間8\,mmとします。
%
% \begin{macrocode}
%<*article>
\setlength\fullwidth{0.76\paperwidth}
\else
\setlength\fullwidth{\paperwidth}
- \addtolength\fullwidth{-36mm}
+ \addtolength\fullwidth{-36\jsc@mmm}
\fi
\if@twocolumn \@tempdima=2\zw \else \@tempdima=1\zw \fi
\divide\fullwidth\@tempdima \multiply\fullwidth\@tempdima
\fi
\fi
%</book>
+%<*report>
+\setlength\fullwidth{0.76\paperwidth}
+\if@twocolumn \@tempdima=2\zw \else \@tempdima=1\zw \fi
+\divide\fullwidth\@tempdima \multiply\fullwidth\@tempdima
+\setlength\textwidth{\fullwidth}
+%</report>
%<*jspf>
\setlength\fullwidth{50\zw}
-\addtolength\fullwidth{8mm}
+\addtolength\fullwidth{8\jsc@mmm}
\setlength\textwidth{\fullwidth}
%</jspf>
%<*kiyou>
% [2003-06-26] |\headheight| を |\topskip| に直しました。
% 以前はこの二つは値が同じであったので,変化はないはずです。
%
+% [2016-08-26] |\topskip| を10ptから1.38zwに増やしましたので,
+% その分 |\textheight| を増やします(2016-08-17での修正漏れ)。
+%
+% [2016-10-08] article の slide のときに |\headheight| はゼロ
+% なので,さらに修正しました(2016-08-17での修正漏れ)。
+%
% \begin{macrocode}
-%<*article|book>
+%<*article|book|report>
\if@slide
\setlength{\textheight}{0.95\paperheight}
\else
\setlength{\textheight}{0.83\paperheight}
\fi
-\addtolength{\textheight}{-\topskip}
+\addtolength{\textheight}{-10\jsc@mpt}%% from -\topskip (2016-10-08); from -\headheight (2003-06-26)
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\footskip}
\addtolength{\textheight}{-\topskip}
\divide\textheight\baselineskip
\multiply\textheight\baselineskip
-%</article|book>
+%</article|book|report>
%<jspf>\setlength{\textheight}{51\baselineskip}
%<kiyou>\setlength{\textheight}{47\baselineskip}
\addtolength{\textheight}{\topskip}
-\addtolength{\textheight}{0.1\p@}
-%<jspf>\setlength{\mathindent}{10mm}
+\addtolength{\textheight}{0.1\jsc@mpt}
+%<jspf>\setlength{\mathindent}{10\jsc@mmm}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flushbottom}
+%
+% [2016-07-18] |\textheight| に念のため0.1ポイント余裕を持たせて
+% いるのと同様に,|\flushbottom| にも余裕を持たせます。
+% 元の\LaTeXe での完全な |\flushbottom| の定義は
+%\begin{verbatim}
+% \def\flushbottom{%
+% \let\@textbottom\relax \let\@texttop\relax}
+%\end{verbatim}
+% ですが,次のようにします。
+%
+% \begin{macrocode}
+\def\flushbottom{%
+ \def\@textbottom{\vskip \z@ \@plus.1\jsc@mpt}%
+ \let\@texttop\relax}
% \end{macrocode}
% \end{macro}
%
% |\marginparwidth| は欄外の書き込みの横幅です。
% 外側マージンの幅(|\evensidemargin| $+$ 1インチ)から1センチを引き,
% さらに |\marginparsep|(欄外の書き込みと本文のアキ)を引いた値に
-% しました。最後に|1\zw|の整数倍に切り捨てます。
+% しました。最後に |1\zw| の整数倍に切り捨てます。
%
% \begin{macrocode}
\setlength\marginparwidth{\paperwidth}
\addtolength\marginparwidth{-\oddsidemargin}
\addtolength\marginparwidth{-1in}
\addtolength\marginparwidth{-\textwidth}
-\addtolength\marginparwidth{-1cm}
+\addtolength\marginparwidth{-10\jsc@mmm}
\addtolength\marginparwidth{-\marginparsep}
\@tempdima=1\zw
\divide\marginparwidth\@tempdima
% [2011-10-03 LTJ] ここも |\oddsidemargin| のときと同様に |-\inv@mag in| ではなく
% |-1in| にします。
%
+% [2016-08-17] |\topskip| を10ptから1.38zwに直しましたが,
+% |\topmargin| は従来の値から変わらないように調節しました。
+% …のつもりでしたが,|\textheight| を増やし忘れていたので
+% 変わってしまっていました(2016-08-26修正済み)。
% \begin{macrocode}
\setlength\topmargin{\paperheight}
\addtolength\topmargin{-\textheight}
\if@slide
\addtolength\topmargin{-\headheight}
\else
- \addtolength\topmargin{-\topskip}
+ \addtolength\topmargin{-10\jsc@mpt}%% from -\topskip (2016-10-08); from -\headheight (2003-06-26)
\fi
\addtolength\topmargin{-\headsep}
\addtolength\topmargin{-\footskip}
% 和文の行送りを考えてもうちょっと大きくします。
%
% \begin{macrocode}
-\setlength{\skip\footins}{16\p@ \@plus 5\p@ \@minus 2\p@}
+\setlength{\skip\footins}{16\jsc@mpt \@plus 5\jsc@mpt \@minus 2\jsc@mpt}
% \end{macrocode}
% \end{macro}
%
% |\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\jsc@mpt \@plus 2\jsc@mpt \@minus 2\jsc@mpt}
+\setlength\textfloatsep{20\jsc@mpt \@plus 2\jsc@mpt \@minus 4\jsc@mpt}
+\setlength\intextsep {12\jsc@mpt \@plus 2\jsc@mpt \@minus 2\jsc@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
% 二段組のときの段抜きのフロートについての値です。
%
% \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\jsc@mpt \@plus 2\jsc@mpt \@minus 2\jsc@mpt}
+\setlength\dbltextfloatsep{20\jsc@mpt \@plus 2\jsc@mpt \@minus 4\jsc@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
% |\@fpsep| はフロート間に入ります。
%
% \begin{macrocode}
-\setlength\@fptop{0\p@ \@plus 1fil}
-\setlength\@fpsep{8\p@ \@plus 2fil}
-\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@fptop{0\jsc@mpt \@plus 1fil}
+\setlength\@fpsep{8\jsc@mpt \@plus 2fil}
+\setlength\@fpbot{0\jsc@mpt \@plus 1fil}
% \end{macrocode}
% \end{macro}
% \end{macro}
% 段抜きフロートについての値です。
%
% \begin{macrocode}
-\setlength\@dblfptop{0\p@ \@plus 1fil}
-\setlength\@dblfpsep{8\p@ \@plus 2fil}
-\setlength\@dblfpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\jsc@mpt \@plus 1fil}
+\setlength\@dblfpsep{8\jsc@mpt \@plus 2fil}
+\setlength\@dblfpbot{0\jsc@mpt \@plus 1fil}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \section{改ページ(日本語\TeX{}開発コミュニティ版のみ)}\label{sec:cleardoublepage}
+%
+% \begin{macro}{\pltx@cleartorightpage}
+% \begin{macro}{\pltx@cleartoleftpage}
+% \begin{macro}{\pltx@cleartooddpage}
+% \begin{macro}{\pltx@cleartoevenpage}
+% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて,
+% 同じ命令を追加しました。
+% \begin{enumerate}
+% \item|\pltx@cleartorightpage|:右ページになるまでページを繰る命令
+% \item|\pltx@cleartoleftpage|:左ページになるまでページを繰る命令
+% \item|\pltx@cleartooddpage|:奇数ページになるまでページを繰る命令
+% \item|\pltx@cleartoevenpage|:偶数ページになるまでページを繰る命令
+% \end{enumerate}
+% となっています。
+%
+% \begin{macrocode}
+%<*article|book|report>
+\def\pltx@cleartorightpage{\clearpage\if@twoside
+ \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi\fi}
+\def\pltx@cleartoleftpage{\clearpage\if@twoside
+ \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi\fi}
+\def\pltx@cleartooddpage{\clearpage\if@twoside
+ \ifodd\c@page\else
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi\fi}
+\def\pltx@cleartoevenpage{\clearpage\if@twoside
+ \ifodd\c@page
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi\fi}
+%</article|book|report>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cleardoublepage}
+% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて,
+% reportとbookクラスの場合に|\cleardoublepage|を再定義します。
+% \begin{macrocode}
+%<*book|report>
+\if@openleft
+ \let\cleardoublepage\pltx@cleartoleftpage
+\else\if@openright
+ \let\cleardoublepage\pltx@cleartorightpage
+\fi\fi
+%</book|report>
+% \end{macrocode}
+% \end{macro}
%
% \section{ページスタイル}\label{sec:pagestyle}
%
% ページスタイルとして,\LaTeXe (欧文版)の標準クラス
% では |empty|,|plain|,|headings|,|myheadings| があります。
% このうち |empty|,|plain| スタイルは\LaTeXe 本体
-% で定義されています。
+% で定義されています。
%
% アスキーのクラスファイルでは |headnombre|,|footnombre|,
% |bothstyle|,|jpl@in| が追加されていますが,
%</article|kiyou>
% \end{macrocode}
%
-% 次は book の場合です。
+% 次ã\81¯ book ã\81\8aã\82\88ã\81³ report ã\81®å ´å\90\88ã\81§ã\81\99ã\80\82
% [2011-05-10] しっぽ愛好家さん [qa:6370] のパッチを取り込ませていただきました
% (北見さん [qa:55896] のご指摘ありがとうございます)。
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\newif\if@omit@number
\def\ps@headings{%
\let\@oddfoot\@empty
\let\@mkboth\markboth
\def\chaptermark##1{\markboth{%
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
+%<book> \if@mainmatter
\if@omit@number\else
\@chapapp\thechapter\@chappos\hskip1\zw
\fi
- \fi
+%<book> \fi
\fi
##1}{}}%
\def\sectionmark##1{\markright{%
\ifnum \c@secnumdepth >\z@ \thesection \hskip1\zw\fi
##1}}}%
-%</book>
+%</book|report>
% \end{macrocode}
%
% 最後は学会誌の場合です。
\def\@oddhead{%
\hbox to \fullwidth{\rightmark\hfil\thepage}\hss}%
\let\@mkboth\@gobbletwo
-%<book> \let\chaptermark\@gobble
+%<book|report> \let\chaptermark\@gobble
\let\sectionmark\@gobble
-%<!book> \let\subsectionmark\@gobble
+%<!book&!report> \let\subsectionmark\@gobble
}
% \end{macrocode}
% \end{macro}
% にしました。
%
% \begin{macrocode}
-%<*article|book|kiyou>
+%<*article|book|report|kiyou>
\if@titlepage
\newcommand{\maketitle}{%
\begin{titlepage}%
\begin{center}
\mbox{} \\[1\zw]
\large
- {\maybeblue\hrule height0pt depth2pt\relax}\par
- \smallskip
+ {\maybeblue\hrule height0\jsc@mpt depth2\jsc@mpt\relax}\par
+ \jsc@smallskip
\@title
- \smallskip
- {\maybeblue\hrule height0pt depth2pt\relax}\par
+ \jsc@smallskip
+ {\maybeblue\hrule height0\jsc@mpt depth2\jsc@mpt\relax}\par
\vfill
{\small \@author}%
\end{center}
\else
- \vskip 60\p@
+ \vskip 60\jsc@mpt
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
{\large \@date}%
\end{center}%
\par\vskip 1.5em
-%<article|kiyou> \ifvoid\@abstractbox\else\centerline{\box\@abstractbox}\vskip1.5em\fi
+%<article|report|kiyou> \ifvoid\@abstractbox\else\centerline{\box\@abstractbox}\vskip1.5em\fi
}
\fi
-%</article|book|kiyou>
+%</article|book|report|kiyou>
%<*jspf>
\newcommand{\maketitle}{\par
\begingroup
\centerline{\box\@abstractbox}
\ifx\@keywords\@undefined\else
\vskip 1.5em
- \centerline{\parbox{157mm}{\textsf{Keywords:}\\ \small\@keywords}}
+ \centerline{\parbox{157\jsc@mmm}{\textsf{Keywords:}\\ \small\@keywords}}
\fi
\vskip 1.5em}
%</jspf>
%
% [2011-10-05 LTJ] Lua\TeX-jaでは |\everyparhook| は不要なので削除。
%
+% [2016-07-28] \texttt{slide}オプションと\texttt{twocolumn}オプションを
+% 同時に指定した場合の罫線の位置を微調整しました。
+%
% \begin{macrocode}
\def\@xsect#1{%
% 見出しの後ろの空きを \@tempskipa にセット
\begingroup \@svsechd \endgroup
\unskip
\@tempskipa #1\relax
- \hskip -\@tempskipa\@inhibitglue
+ \hskip -\@tempskipa\ltjfakeparbegin
\else
\clubpenalty \@clubpenalty
\everypar{}%
\@afterheading
\fi
\if@slide
- {\vskip-6pt\maybeblue\hrule height0pt depth1pt\vskip7pt\relax}%
+ {\vskip\if@twocolumn-5\jsc@mpt\else-6\jsc@mpt\fi
+ \maybeblue\hrule height0\jsc@mpt depth1\jsc@mpt
+ \vskip\if@twocolumn 4\jsc@mpt\else 7\jsc@mpt\fi\relax}
\fi
\par % 2000-12-18
\ignorespaces}
% 番号を付けるかを決めるカウンタです。
%
% \begin{macrocode}
-%<!book>\setcounter{secnumdepth}{3}
-%<book>\setcounter{secnumdepth}{2}
+%<!book&!report>\setcounter{secnumdepth}{3}
+%<book|report>\setcounter{secnumdepth}{2}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macrocode}
\newcounter{part}
-%<book>\newcounter{chapter}
-%<book>\newcounter{section}[chapter]
-%<!book>\newcounter{section}
+%<book|report>\newcounter{chapter}
+%<book|report>\newcounter{section}[chapter]
+%<!book&!report>\newcounter{section}
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
%
% \begin{macrocode}
\renewcommand{\thepart}{\@Roman\c@part}
-%<!book>% \renewcommand{\thesection}{\@arabic\c@section}
-%<!book>\renewcommand{\thesection}{\presectionname\@arabic\c@section\postsectionname}
-%<!book>\renewcommand{\thesubsection}{\@arabic\c@section.\@arabic\c@subsection}
-%<*book>
+%<!book&!report>% \renewcommand{\thesection}{\@arabic\c@section}
+%<!book&!report>\renewcommand{\thesection}{\presectionname\@arabic\c@section\postsectionname}
+%<!book&!report>\renewcommand{\thesubsection}{\@arabic\c@section.\@arabic\c@subsection}
+%<*book|report>
\renewcommand{\thechapter}{\@arabic\c@chapter}
\renewcommand{\thesection}{\thechapter.\@arabic\c@section}
\renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection}
-%</book>
+%</book|report>
\renewcommand{\thesubsubsection}{%
\thesubsection.\@arabic\c@subsubsection}
\renewcommand{\theparagraph}{%
% [2003-03-02] |\@secapp| は外しました。
%
% \begin{macrocode}
-%<book>\newcommand{\@chapapp}{\prechaptername}
-%<book>\newcommand{\@chappos}{\postchaptername}
+%<book|report>\newcommand{\@chapapp}{\prechaptername}
+%<book|report>\newcommand{\@chappos}{\postchaptername}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macrocode}
%<*book>
\newcommand\frontmatter{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
+ \pltx@cleartooddpage
\@mainmatterfalse
\pagenumbering{roman}}
% \end{macrocode}
%
% ページ番号を算用数字にし,章番号を付けるようにします。
%
+% [2017-03-05] |\frontmatter| と |\mainmatter| の2つの命令は,
+% 改丁または改ページした後で |\pagenumbering{...}| でノンブルを1に
+% リセットします。長い間 |\frontmatter| は \texttt{openany} のときに
+% 単なる改ページとしていましたが,これではノンブルをリセットする際に
+% 偶奇逆転が起こる場合がありました。\texttt{openany} かどうかに依らず
+% 奇数ページまで繰るように修正することで,問題を解消しました。
+% 実は,\LaTeX の標準クラスでは1998年に修正されていた問題です
+% (コミュニティ版\pLaTeX の標準クラス2017/03/05も参照)。
+%
% \begin{macrocode}
\newcommand\mainmatter{%
-% \if@openright
- \cleardoublepage
-% \else
-% \clearpage
-% \fi
+ \pltx@cleartooddpage
\@mainmattertrue
\pagenumbering{arabic}}
% \end{macrocode}
%
% \begin{macrocode}
\newcommand\backmatter{%
- \if@openright
+ \if@openleft
+ \cleardoublepage
+ \else\if@openright
\cleardoublepage
\else
\clearpage
- \fi
+ \fi\fi
\@mainmatterfalse}
%</book>
% \end{macrocode}
% \def\CMDB #1{....} % \chapter*{...} の定義
%\end{verbatim}
%
-% まず |book| クラス以外です。
+% ã\81¾ã\81\9a |book| ã\81¨ |report| ã\81®ã\82¯ã\83©ã\82¹ä»¥å¤\96ã\81§ã\81\99ã\80\82
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\newcommand\part{%
\if@noskipsec \leavevmode \fi
\par
\addvspace{4ex}%
\if@english \@afterindentfalse \else \@afterindenttrue \fi
\secdef\@part\@spart}
-%</!book>
+%</!book&!report>
% \end{macrocode}
%
-% |book| ã\82¹ã\82¿ã\82¤ã\83«の場合は,少し複雑です。
+% |book| ã\81\8aã\82\88ã\81³ |report| ã\82¯ã\83©ã\82¹の場合は,少し複雑です。
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\newcommand\part{%
- \if@openright
+ \if@openleft
+ \cleardoublepage
+ \else\if@openright
\cleardoublepage
\else
\clearpage
- \fi
+ \fi\fi
\thispagestyle{empty}% 欧文用標準スタイルでは plain
\if@twocolumn
\onecolumn
\fi
\null\vfil
\secdef\@part\@spart}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% 部の見出しを出力します。
% |\bfseries| を |\headfont| に変えました。
%
-% |book| クラス以外では |secnumdepth| が $-1$ より大きいとき
+% |book| ã\81\8aã\82\88ã\81³ |report| ã\82¯ã\83©ã\82¹ä»¥å¤\96ã\81§ã\81¯ |secnumdepth| ã\81\8c $-1$ ã\82\88ã\82\8a大ã\81\8dã\81\84ã\81¨ã\81\8d
% 部番号を付けます。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{part}%
\nobreak
\vskip 3ex
\@afterheading}
-%</!book>
+%</!book&!report>
% \end{macrocode}
%
-% |book| クラスでは |secnumdepth| が $-2$ より大きいとき部番号を付けます。
+% |book| ã\81\8aã\82\88ã\81³ |report| ã\82¯ã\83©ã\82¹ã\81§ã\81¯ |secnumdepth| ã\81\8c $-2$ ã\82\88ã\82\8a大ã\81\8dã\81\84ã\81¨ã\81\8dé\83¨ç\95ªå\8f·ã\82\92ä»\98ã\81\91ã\81¾ã\81\99ã\80\82
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\normalfont
\ifnum \c@secnumdepth >-2\relax
\huge\headfont \prepartname\thepart\postpartname
- \par\vskip20\p@
+ \par\vskip20\jsc@mpt
\fi
\Huge \headfont #2\par}%
\@endpart}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% 番号を付けない部です。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\def\@spart#1{{%
\parindent \z@ \raggedright
\interlinepenalty \@M
\nobreak
\vskip 3ex
\@afterheading}
-%</!book>
-%<*book>
+%</!book&!report>
+%<*book|report>
\def\@spart#1{{%
\centering
\interlinepenalty \@M
\normalfont
\Huge \headfont #1\par}%
\@endpart}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% 両面印刷のときは白ページを追加します。
% 二段組のときには,二段組に戻します。
%
+% [2016-12-13] \texttt{openany} のときには白ページが追加されるのは変なので,
+% その場合は追加しないようにしました。このバグは\LaTeX では
+% classes.dtx v1.4b (2000/05/19)
+% で修正されています。
+%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\def\@endpart{\vfil\newpage
\if@twoside
- \null
- \thispagestyle{empty}%
- \newpage
+ \if@openleft %% added (2017/02/24)
+ \null\thispagestyle{empty}\newpage
+ \else\if@openright %% added (2016/12/13)
+ \null\thispagestyle{empty}\newpage
+ \fi\fi %% added (2016/12/13, 2017/02/24)
\fi
\if@restonecol
\twocolumn
\fi}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% 章見出しの上に図や表が来ないようにします。
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\newcommand{\chapter}{%
- \if@openright\cleardoublepage\else\clearpage\fi
+ \if@openleft\cleardoublepage\else
+ \if@openright\cleardoublepage\else\clearpage\fi\fi
\plainifnotempty % 元: \thispagestyle{plain}
\global\@topnum\z@
\if@english \@afterindentfalse \else \@afterindenttrue \fi
% \begin{macrocode}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
+%<book> \if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\thechapter\@chappos}%
\addcontentsline{toc}{chapter}%
% {\if@english\thechapter\else\@chapapp\thechapter\@chappos\fi}%
{\@chapapp\thechapter\@chappos}%
#1}%
- \else\addcontentsline{toc}{chapter}{#1}\fi
+%<book> \else\addcontentsline{toc}{chapter}{#1}\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \addtocontents{lof}{\protect\addvspace{10\jsc@mpt}}%
+ \addtocontents{lot}{\protect\addvspace{10\jsc@mpt}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\vspace*{2\Cvs}% 欧文は50pt
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
+%<book> \if@mainmatter
\huge\headfont \@chapapp\thechapter\@chappos
\par\nobreak
\vskip \Cvs % 欧文は20pt
- \fi
+%<book> \fi
\fi
\interlinepenalty\@M
\Huge \headfont #1\par\nobreak
\interlinepenalty\@M
\Huge \headfont #1\par\nobreak
\vskip 3\Cvs}} % 欧文は40pt
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\if@twocolumn
\newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
- {\z@}{\z@}%
+ {\z@}{\if@slide .4\Cvs \else \z@ \fi}%
{\normalfont\normalsize\headfont}}
\else
\newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
% \end{macro}
%
% \begin{macro}{\subsubsection}
+%
+% [2016-07-22] \texttt{slide}オプション指定時に |\subsubsection| の文字列
+% と罫線が重なる問題に対処しました(forum:1982)。
+%
% \begin{macrocode}
\if@twocolumn
\newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
- {\z@}{\z@}%
+ {\z@}{\if@slide .4\Cvs \else \z@ \fi}%
{\normalfont\normalsize\headfont}}
\else
\newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
{\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
- {\z@}%
+ {\if@slide .5\Cvs \@plus.3\Cdp \else \z@ \fi}%
{\normalfont\normalsize\headfont}}
\fi
% \end{macrocode}
%
% 見出しの後ろで改行されません。
%
+% [2016-11-16] 従来は |\paragraph| の最初に出るマークを「■」に固定して
+% いましたが,このマークを変更可能にするため |\jsParagraphMark| というマクロ
+% に切り出しました。これで,たとえば
+%\begin{verbatim}
+% \renewcommand{\jsParagraphMark}{★}
+%\end{verbatim}
+% とすれば「★」に変更できますし,マークを空にすることも容易です。
+% なお,某学会クラスでは従来どおりマークは付きません。
+%
% \begin{macrocode}
+%<!jspf>\newcommand{\jsParagraphMark}{■}
\if@twocolumn
\newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
- {\z@}{-1\zw}% 改行せず 1\zw のアキ
+ {\z@}{\if@slide .4\Cvs \else -1\zw\fi}% 改行せず 1\zw のアキ
%<jspf> {\normalfont\normalsize\headfont}}
-%<!jspf> {\normalfont\normalsize\headfont ■}}
+%<!jspf> {\normalfont\normalsize\headfont\jsParagraphMark}}
\else
\newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
{0.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
- {-1\zw}% 改行せず 1\zw のアキ
+ {\if@slide .5\Cvs \@plus.3\Cdp \else -1\zw\fi}% 改行せず 1\zw のアキ
%<jspf> {\normalfont\normalsize\headfont}}
-%<!jspf> {\normalfont\normalsize\headfont ■}}
+%<!jspf> {\normalfont\normalsize\headfont\jsParagraphMark}}
\fi
% \end{macrocode}
% \end{macro}
% 見出しの後ろで改行されません。
%
% \begin{macrocode}
-\newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
- {\z@}{-1\zw}%
- {\normalfont\normalsize\headfont}}
+\if@twocolumn
+ \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
+ {\z@}{\if@slide .4\Cvs \@plus.3\Cdp \else -1\zw\fi}%
+ {\normalfont\normalsize\headfont}}
+\else
+ \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
+ {\z@}{\if@slide .5\Cvs \@plus.3\Cdp \else -1\zw\fi}%
+ {\normalfont\normalsize\headfont}}
+\fi
% \end{macrocode}
% \end{macro}
%
\rightmargin=0pt
\leftmargin=5\zw}\item[]}{\end{list}\vspace{\baselineskip}}
%</book>
-%<*article|kiyou>
+%<*article|report|kiyou>
\newbox\@abstractbox
\if@titlepage
\newenvironment{abstract}{%
\endlist
\fi}
\fi
-%</article|kiyou>
+%</article|report|kiyou>
%<*jspf>
\newbox\@abstractbox
\newenvironment{abstract}{%
\global\setbox\@abstractbox\hbox\bgroup
- \begin{minipage}[b]{157mm}{\sffamily Abstract}\par
+ \begin{minipage}[b]{157\jsc@mmm}{\sffamily Abstract}\par
\small
- \if@english \parindent6mm \else \parindent1\zw \fi}%
+ \if@english \parindent6\jsc@mmm \else \parindent1\zw \fi}%
{\end{minipage}\egroup}
%</jspf>
% \end{macrocode}
%\newbox\@keywordsbox
%\newenvironment{keywords}{%
% \global\setbox\@keywordsbox\hbox\bgroup
-% \begin{minipage}[b]{157mm}{\sffamily Keywords:}\par
+% \begin{minipage}[b]{157\jsc@mmm}{\sffamily Keywords:}\par
% \small\parindent0\zw}%
% {\end{minipage}\egroup}
%</jspf>
%
% タイトルを独立のページに出力するのに使われます。
%
+% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて,
+% bookクラスでタイトルを必ず奇数ページに送るようにしました。といっても,
+% 横組クラスしかありませんでしたので,従来の挙動は何も変わっていません。
+% また,book以外の場合のページ番号のリセットもコミュニティ版\pLaTeX の
+% 標準クラス2017/02/15に合わせましたが,こちらも片面印刷あるいは
+% 独立のタイトルページを作らないクラスばかりでしたので,従来の挙動は
+% 何も変わらずに済みました。
+%
% \begin{macrocode}
\newenvironment{titlepage}{%
-%<book> \cleardoublepage
+%<book> \pltx@cleartooddpage %% 2017-02-24
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{empty}%
- \setcounter{page}\@ne
+ \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi
}%
{\if@restonecol\twocolumn \else \newpage \fi
\if@twoside\else
% 本文と付録を分離するコマンドです。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\newcommand{\appendix}{\par
\setcounter{section}{0}%
\setcounter{subsection}{0}%
% \gdef\thesection{\@Alph\c@section}% [2003-03-02]
\gdef\thesection{\presectionname\@Alph\c@section\postsectionname}%
\gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}}
-%</!book>
-%<*book>
+%</!book&!report>
+%<*book|report>
\newcommand{\appendix}{\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\@chapapp{\appendixname}%
\gdef\@chappos{}%
\gdef\thechapter{\@Alph\c@chapter}}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% |array| 環境の列間には |\arraycolsep| の2倍の幅の空きが入ります。
%
% \begin{macrocode}
-\setlength\arraycolsep{5\p@}
+\setlength\arraycolsep{5\jsc@mpt}
% \end{macrocode}
% \end{macro}
%
% |tabular| 環境の列間には |\tabcolsep| の2倍の幅の空きが入ります。
%
% \begin{macrocode}
-\setlength\tabcolsep{6\p@}
+\setlength\tabcolsep{6\jsc@mpt}
% \end{macrocode}
% \end{macro}
%
% |array|,|tabular| 環境内の罫線の幅です。
%
% \begin{macrocode}
-\setlength\arrayrulewidth{.4\p@}
+\setlength\arrayrulewidth{.4\jsc@mpt}
% \end{macrocode}
% \end{macro}
%
% |array|,|tabular| 環境での二重罫線間のアキです。
%
% \begin{macrocode}
-\setlength\doublerulesep{2\p@}
+\setlength\doublerulesep{2\jsc@mpt}
% \end{macrocode}
% \end{macro}
%
% |\fbox|,|\framebox| の罫線の幅です。
%
% \begin{macrocode}
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
+\setlength\fboxsep{3\jsc@mpt}
+\setlength\fboxrule{.4\jsc@mpt}
% \end{macrocode}
% \end{macro}
% \end{macro}
% 数式番号を出力するコマンドです。
%
% \begin{macrocode}
-%<!book>\renewcommand \theequation {\@arabic\c@equation}
-%<*book>
+%<!book&!report>\renewcommand \theequation {\@arabic\c@equation}
+%<*book|report>
\@addtoreset{equation}{chapter}
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% 図番号を出力するコマンドです。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\newcounter{figure}
\renewcommand \thefigure {\@arabic\c@figure}
-%</!book>
-%<*book>
+%</!book&!report>
+%<*book|report>
\newcounter{figure}[chapter]
\renewcommand \thefigure
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
% \end{macro}
% ここではオリジナルのままにしています。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\newcounter{table}
\renewcommand\thetable{\@arabic\c@table}
-%</!book>
-%<*book>
+%</!book&!report>
+%<*book|report>
\newcounter{table}[chapter]
\renewcommand \thetable
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macrocode}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
-\setlength\abovecaptionskip{5\p@} % 元: 10\p@
-\setlength\belowcaptionskip{5\p@} % 元: 0\p@
+\setlength\abovecaptionskip{5\jsc@mpt} % 元: 10\p@
+\setlength\belowcaptionskip{5\jsc@mpt} % 元: 0\p@
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% [2003-11-05] ロジックを少し変えてみました。
%
+% [2015-05-26] |listings| パッケージを使うときに|title| を指定すると次のエラーが出るのを修正。
+% \begin{verbatim}
+% ! Missing number, treated as zero.
+% \end{verbatim}
+%
+%
% \begin{macrocode}
%<*!jspf>
% \long\def\@makecaption#1#2{{\small
-% \advance\leftskip1cm
-% \advance\rightskip1cm
+% \advance\leftskip10\jsc@mmm
+% \advance\rightskip10\jsc@mmm
% \vskip\abovecaptionskip
-% \sbox\@tempboxa{#1\hskip1\zw\relax #2}%
+% \sbox\@tempboxa{#1{\hskip1\zw}#2}%
% \ifdim \wd\@tempboxa >\hsize
-% #1\hskip1\zw\relax #2\par
+% #1{\hskip1\zw}#2\par
% \else
% \global \@minipagefalse
% \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\advance\leftskip .0628\linewidth
\advance\rightskip .0628\linewidth
\vskip\abovecaptionskip
- \sbox\@tempboxa{#1\hskip1\zw\relax #2}%
+ \sbox\@tempboxa{#1{\hskip1\zw}#2}%
\ifdim \wd\@tempboxa <\hsize \centering \fi
- #1\hskip1\zw\relax #2\par
+ #1{\hskip1\zw}#2\par
\vskip\belowcaptionskip}}
%</!jspf>
%<*jspf>
\itemsep \z@
\itemindent \z@
\labelsep \z@
- \labelwidth 11mm
+ \labelwidth 11\jsc@mmm
\listparindent\z@
- \leftmargin 11mm}\item\relax #2\endlist}
+ \leftmargin 11\jsc@mmm}\item\relax #2\endlist}
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
% これらは互換性のためのもので,
% できるだけ |\text...| と |\math...| を使ってください。
%
+% [2016-07-15] KOMA-Script中の |\scr@DeclareOldFontCommand| に倣い,
+% これらの命令を使うときには警告を発することにしました。
+%
+% [2016-07-16] 警告を最初の一回だけ発することにしました。また,
+% 例外的に警告を出さないようにするスイッチも付けます。
+%
+% \begin{macro}{\if@jsc@warnoldfontcmd}
+% \begin{macro}{\if@jsc@warnoldfontcmdexception}
+% \begin{macrocode}
+\newif\if@jsc@warnoldfontcmd
+\@jsc@warnoldfontcmdtrue
+\newif\if@jsc@warnoldfontcmdexception
+\@jsc@warnoldfontcmdexceptionfalse
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\jsc@DeclareOldFontCommand}
+% \begin{macrocode}
+\newcommand*{\jsc@DeclareOldFontCommand}[3]{%
+ \DeclareOldFontCommand{#1}{%
+ \jsc@warnoldfontcmd{#1}#2%
+ }{%
+ \jsc@warnoldfontcmd{#1}#3%
+ }%
+}
+\DeclareRobustCommand*{\jsc@warnoldfontcmd}[1]{%
+ \if@jsc@warnoldfontcmdexception\else\if@jsc@warnoldfontcmd
+ \ClassWarning{\jsc@clsname}{%
+ deprecated old font command `\string#1' used.\MessageBreak
+ You should note, that since 1994 LaTeX2e provides a\MessageBreak
+ new font selection scheme called NFSS2 with several\MessageBreak
+ new, combinable font commands. This \jsc@clsname\MessageBreak
+ class has defined the old font commands like\MessageBreak
+ `\string#1' only for compatibility%
+ }%
+ \global\@jsc@warnoldfontcmdfalse
+ \fi\fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\mc}
% \begin{macro}{\gt}
% \begin{macro}{\rm}
% フォントファミリを変更します。
%
% \begin{macrocode}
-\DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
-\DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
-\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
-\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
-\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+\jsc@DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
+\jsc@DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
+\jsc@DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\jsc@DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\jsc@DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
% \end{macrocode}
% \end{macro}
% \end{macro}
% コマンドは |\mdseries| です。
%
% \begin{macrocode}
-\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+\jsc@DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
% \end{macrocode}
% \end{macro}
%
% 通常のアップライト体に戻すコマンドは |\upshape| です。
%
% \begin{macrocode}
-\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
-\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
-\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
+\jsc@DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\jsc@DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
+\jsc@DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
% \end{macrocode}
% \end{macro}
% \end{macro}
\newcommand\@pnumwidth{1.55em}
\newcommand\@tocrmarg{2.55em}
\newcommand\@dotsep{4.5}
-%<!book>\setcounter{tocdepth}{2}
-%<book>\setcounter{tocdepth}{1}
+%<!book&!report>\setcounter{tocdepth}{2}
+%<book|report>\setcounter{tocdepth}{1}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% 目次を生成します。
%
-% \begin{macro}{\js@tocl@width}
+% \begin{macro}{\jsc@tocl@width}
%
% [2013-12-30] |\prechaptername| などから見積もった目次のラベルの長さです。(by ts)
%
% \begin{macrocode}
-\newdimen\js@tocl@width
+\newdimen\jsc@tocl@width
\newcommand{\tableofcontents}{%
-%<*book>
- \settowidth\js@tocl@width{\headfont\prechaptername\postchaptername}%
+%<*book|report>
+ \settowidth\jsc@tocl@width{\headfont\prechaptername\postchaptername}%
\settowidth\@tempdima{\headfont\appendixname}%
- \ifdim\js@tocl@width<\@tempdima \setlength\js@tocl@width{\@tempdima}\fi
- \ifdim\js@tocl@width<2\zw \divide\js@tocl@width by 2 \advance\js@tocl@width 1\zw\fi
+ \ifdim\jsc@tocl@width<\@tempdima \setlength\jsc@tocl@width{\@tempdima}\fi
+ \ifdim\jsc@tocl@width<2\zw \divide\jsc@tocl@width by 2 \advance\jsc@tocl@width 1\zw\fi
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\fi
\chapter*{\contentsname}%
\@mkboth{\contentsname}{}%
-%</book>
-%<*!book>
- \settowidth\js@tocl@width{\headfont\presectionname\postsectionname}%
+%</book|report>
+%<*!book&!report>
+ \settowidth\jsc@tocl@width{\headfont\presectionname\postsectionname}%
\settowidth\@tempdima{\headfont\appendixname}%
- \ifdim\js@tocl@width<\@tempdima\relax\setlength\js@tocl@width{\@tempdima}\fi
- \ifdim\js@tocl@width<2\zw \divide\js@tocl@width by 2 \advance\js@tocl@width 1\zw\fi
+ \ifdim\jsc@tocl@width<\@tempdima\relax\setlength\jsc@tocl@width{\@tempdima}\fi
+ \ifdim\jsc@tocl@width<2\zw \divide\jsc@tocl@width by 2 \advance\jsc@tocl@width 1\zw\fi
\section*{\contentsname}%
\@mkboth{\contentsname}{\contentsname}%
-%</!book>
+%</!book&!report>
\@starttoc{toc}%
-%<book> \if@restonecol\twocolumn\fi
+%<book|report> \if@restonecol\twocolumn\fi
}
% \end{macrocode}
% \end{macro}\end{macro}
% \begin{macrocode}
\newcommand*{\l@part}[2]{%
\ifnum \c@tocdepth >-2\relax
-%<!book> \addpenalty\@secpenalty
-%<book> \addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
+%<!book&!report> \addpenalty\@secpenalty
+%<book|report> \addpenalty{-\@highpenalty}%
+ \addvspace{2.25em \@plus\jsc@mpt}%
\begingroup
\parindent \z@
% \@pnumwidth should be \@tocrmarg
\setlength\@lnumwidth{4\zw}%
#1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
\nobreak
-%<book> \global\@nobreaktrue
-%<book> \everypar{\global\@nobreakfalse\everypar{}}%
+%<book|report> \global\@nobreaktrue
+%<book|report> \everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
% \end{macrocode}
%
% 章の目次です。|\@lnumwidth| を |4.683\zw| に増やしました。
%
-% [2013-12-30] |\@lnumwidth| を |\js@tocl@width| から
+% [2013-12-30] |\@lnumwidth| を |\jsc@tocl@width| から
% 決めるようにしてみました。(by ts)
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\newcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
- \addvspace{1.0em \@plus\p@}
+ \addvspace{1.0em \@plus\jsc@mpt}
% \vskip 1.0em \@plus\p@ % book.clsでは↑がこうなっている
\begingroup
\parindent\z@
\parfillskip-\rightskip
\leavevmode\headfont
% \if@english\setlength\@lnumwidth{5.5em}\else\setlength\@lnumwidth{4.683\zw}\fi
- \setlength\@lnumwidth{\js@tocl@width}\advance\@lnumwidth 2.683\zw
+ \setlength\@lnumwidth{\jsc@tocl@width}\advance\@lnumwidth 2.683\zw
\advance\leftskip\@lnumwidth \hskip-\leftskip
#1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par
\penalty\@highpenalty
\endgroup
\fi}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
% 節の目次です。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\newcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty{\@secpenalty}%
- \addvspace{1.0em \@plus\p@}%
+ \addvspace{1.0em \@plus\jsc@mpt}%
\begingroup
\parindent\z@
% \rightskip\@pnumwidth
\parfillskip-\rightskip
\leavevmode\headfont
%\setlength\@lnumwidth{4\zw}% 元1.5em [2003-03-02]
- \setlength\@lnumwidth{\js@tocl@width}\advance\@lnumwidth 2\zw
+ \setlength\@lnumwidth{\jsc@tocl@width}\advance\@lnumwidth 2\zw
\advance\leftskip\@lnumwidth \hskip-\leftskip
#1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par
\endgroup
\fi}
-%</!book>
+%</!book&!report>
% \end{macrocode}
%
% インデントと幅はそれぞれ1.5em,2.3emでしたが,
% |1\zw|,|3.683\zw|に変えました。
%
% \begin{macrocode}
-%<book> % \newcommand*{\l@section}{\@dottedtocline{1}{1\zw}{3.683\zw}}
+%<book|report> % \newcommand*{\l@section}{\@dottedtocline{1}{1\zw}{3.683\zw}}
% \end{macrocode}
%
-% [2013-12-30] 上のインデントは |\js@tocl@width| から決めるように
+% [2013-12-30] 上のインデントは |\jsc@tocl@width| から決めるように
% しました。(by ts)
%
% \end{macro}
% さらに下位レベルの目次項目の体裁です。
% あまり使ったことがありませんので,要修正かもしれません。
%
-% [2013-12-30] ここも |\js@tocl@width| から決めるように
+% [2013-12-30] ここも |\jsc@tocl@width| から決めるように
% してみました。(by ts)
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
% \newcommand*{\l@subsection} {\@dottedtocline{2}{1.5em}{2.3em}}
% \newcommand*{\l@subsubsection}{\@dottedtocline{3}{3.8em}{3.2em}}
% \newcommand*{\l@paragraph} {\@dottedtocline{4}{7.0em}{4.1em}}
% \newcommand*{\l@subparagraph} {\@dottedtocline{5}{4\zw}{3\zw}}
%
\newcommand*{\l@subsection}{%
- \@tempdima\js@tocl@width \advance\@tempdima -1\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima -1\zw
\@dottedtocline{2}{\@tempdima}{3\zw}}
\newcommand*{\l@subsubsection}{%
- \@tempdima\js@tocl@width \advance\@tempdima 0\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima 0\zw
\@dottedtocline{3}{\@tempdima}{4\zw}}
\newcommand*{\l@paragraph}{%
- \@tempdima\js@tocl@width \advance\@tempdima 1\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima 1\zw
\@dottedtocline{4}{\@tempdima}{5\zw}}
\newcommand*{\l@subparagraph}{%
- \@tempdima\js@tocl@width \advance\@tempdima 2\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima 2\zw
\@dottedtocline{5}{\@tempdima}{6\zw}}
-%</!book>
-%<*book>
+%</!book&!report>
+%<*book|report>
% \newcommand*{\l@subsection} {\@dottedtocline{2}{3.8em}{3.2em}}
% \newcommand*{\l@subsubsection}{\@dottedtocline{3}{7.0em}{4.1em}}
% \newcommand*{\l@paragraph} {\@dottedtocline{4}{10em}{5em}}
% \newcommand*{\l@subparagraph} {\@dottedtocline{5}{12em}{6em}}
\newcommand*{\l@section}{%
- \@tempdima\js@tocl@width \advance\@tempdima -1\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima -1\zw
\@dottedtocline{1}{\@tempdima}{3.683\zw}}
\newcommand*{\l@subsection}{%
- \@tempdima\js@tocl@width \advance\@tempdima 2.683\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima 2.683\zw
\@dottedtocline{2}{\@tempdima}{3.5\zw}}
\newcommand*{\l@subsubsection}{%
- \@tempdima\js@tocl@width \advance\@tempdima 6.183\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima 6.183\zw
\@dottedtocline{3}{\@tempdima}{4.5\zw}}
\newcommand*{\l@paragraph}{%
- \@tempdima\js@tocl@width \advance\@tempdima 10.683\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima 10.683\zw
\@dottedtocline{4}{\@tempdima}{5.5\zw}}
\newcommand*{\l@subparagraph}{%
- \@tempdima\js@tocl@width \advance\@tempdima 16.183\zw
+ \@tempdima\jsc@tocl@width \advance\@tempdima 16.183\zw
\@dottedtocline{5}{\@tempdima}{6.5\zw}}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macrocode}
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
- \vskip \z@ \@plus.2\p@
+ \vskip \z@ \@plus.2\jsc@mpt
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
\@lnumwidth #3\relax
\advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip
{#4}\nobreak
- \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
+ \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill \nobreak\hb@xt@\@pnumwidth{%
\hfil\normalfont \normalcolor #5}\par}\fi}
% \end{macrocode}
%
% \begin{macrocode}
\newcommand{\listoffigures}{%
-%<*book>
+%<*book|report>
\if@twocolumn\@restonecoltrue\onecolumn
\else\@restonecolfalse\fi
\chapter*{\listfigurename}%
\@mkboth{\listfigurename}{}%
-%</book>
-%<*!book>
+%</book|report>
+%<*!book&!report>
\section*{\listfigurename}%
\@mkboth{\listfigurename}{\listfigurename}%
-%</!book>
+%</!book&!report>
\@starttoc{lof}%
-%<book> \if@restonecol\twocolumn\fi
+%<book|report> \if@restonecol\twocolumn\fi
}
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\newcommand{\listoftables}{%
-%<*book>
+%<*book|report>
\if@twocolumn\@restonecoltrue\onecolumn
\else\@restonecolfalse\fi
\chapter*{\listtablename}%
\@mkboth{\listtablename}{}%
-%</book>
-%<*!book>
+%</book|report>
+%<*!book&!report>
\section*{\listtablename}%
\@mkboth{\listtablename}{\listtablename}%
-%</!book>
+%</!book&!report>
\@starttoc{lot}%
-%<book> \if@restonecol\twocolumn\fi
+%<book|report> \if@restonecol\twocolumn\fi
}
% \end{macrocode}
% \end{macro}
%
% 参考文献リストを出力します。
%
+% [2016-07-16] \LaTeX~2.09で使われていたフォントコマンドの警告を,
+% 文献スタイル(.bst)ではよく |\bf| がいまだに用いられることが多いため,
+% |thebibliography| 環境内では例外的に出さないようにしました。
+%
% \begin{macrocode}
\newenvironment{thebibliography}[1]{%
+ \global\@jsc@warnoldfontcmdexceptiontrue
\global\let\presectionname\relax
\global\let\postsectionname\relax
%<article|jspf> \section*{\refname}\@mkboth{\refname}{\refname}%
\subsubsection*{\refname}\@mkboth{\refname}{\refname}%
\vspace{0.5\baselineskip}
%</kiyou>
-%<book> \chapter*{\bibname}\@mkboth{\bibname}{}%
-%<book> \addcontentsline{toc}{chapter}{\bibname}%
+%<book|report> \chapter*{\bibname}\@mkboth{\bibname}{}%
+%<book|report> \addcontentsline{toc}{chapter}{\bibname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
- \endlist}
+ \endlist
+ \global\@jsc@warnoldfontcmdexceptionfalse}
% \end{macrocode}
% \end{environment}
%
% で囲んでください。
%
% \begin{macrocode}
-% \def\@citex[#1]#2{%
+% \def\@citex[#1]#2{\leavevmode
% \let\@citea\@empty
% \@cite{\@for\@citeb:=#2\do
% {\@citea\def\@citea{,\inhibitglue\penalty\@m\ }%
-% \edef\@citeb{\expandafter\@firstofone\@citeb}%
+% \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
% \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
% \@ifundefined{b@\@citeb}{\mbox{\normalfont\bfseries ?}%
% \G@refundefinedtrue
% \@latex@warning
% {Citation `\@citeb' on page \thepage \space undefined}}%
-% {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
+% {\@cite@ofmt{\csname b@\@citeb\endcsname}}}}{#1}}
% \def\@cite#1#2{\inhibitglue[{#1\if@tempswa ,#2\fi}]\inhibitglue}
% \end{macrocode}
%
\fi
\columnseprule.4pt \columnsep 2\zw
\ifx\multicols\@undefined
-%<book> \twocolumn[\@makeschapterhead{\indexname}%
-%<book> \addcontentsline{toc}{chapter}{\indexname}]%
-%<!book> \def\presectionname{}\def\postsectionname{}%
-%<!book> \twocolumn[\section*{\indexname}]%
+%<book|report> \twocolumn[\@makeschapterhead{\indexname}%
+%<book|report> \addcontentsline{toc}{chapter}{\indexname}]%
+%<!book&!report> \def\presectionname{}\def\postsectionname{}%
+%<!book&!report> \twocolumn[\section*{\indexname}]%
\else
\ifdim\textwidth<\fullwidth
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{\fullwidth}
\setlength{\linewidth}{\fullwidth}
-%<book> \begin{multicols}{3}[\chapter*{\indexname}%
-%<book> \addcontentsline{toc}{chapter}{\indexname}]%
-%<!book> \def\presectionname{}\def\postsectionname{}%
-%<!book> \begin{multicols}{3}[\section*{\indexname}]%
+%<book|report> \begin{multicols}{3}[\chapter*{\indexname}%
+%<book|report> \addcontentsline{toc}{chapter}{\indexname}]%
+%<!book&!report> \def\presectionname{}\def\postsectionname{}%
+%<!book&!report> \begin{multicols}{3}[\section*{\indexname}]%
\else
-%<book> \begin{multicols}{2}[\chapter*{\indexname}%
-%<book> \addcontentsline{toc}{chapter}{\indexname}]%
-%<!book> \def\presectionname{}\def\postsectionname{}%
-%<!book> \begin{multicols}{2}[\section*{\indexname}]%
+%<book|report> \begin{multicols}{2}[\chapter*{\indexname}%
+%<book|report> \addcontentsline{toc}{chapter}{\indexname}]%
+%<!book&!report> \def\presectionname{}\def\postsectionname{}%
+%<!book&!report> \begin{multicols}{2}[\section*{\indexname}]%
\fi
\fi
-%<book> \@mkboth{\indexname}{}%
-%<!book> \@mkboth{\indexname}{\indexname}%
+%<book|report> \@mkboth{\indexname}{}%
+%<!book&!report> \@mkboth{\indexname}{\indexname}%
\plainifnotempty % \thispagestyle{plain}
\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
+ \parskip\z@ \@plus .3\jsc@mpt\relax
\let\item\@idxitem
\raggedright
\footnotesize\narrowbaselines
% 索引で先頭文字ごとのブロックの間に入るスペースです。
%
% \begin{macrocode}
-\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+\newcommand{\indexspace}{\par \vskip 10\jsc@mpt \@plus5\jsc@mpt \@minus3\jsc@mpt\relax}
% \end{macrocode}
% \end{macro}
%
%
% [2013-05-14] plcore.ltx に倣った形に書き直しました(Thanks: 北川さん)。
%
-% \begin{macrocode}
-\renewcommand\@makefnmark{\hbox{}\hbox{%
- \ifydir \@textsuperscript{\normalfont\@thefnmark}%
- \else\hbox{\yoko\@textsuperscript{\normalfont\@thefnmark}}\fi}\hbox{}}
-% \end{macrocode}
+% [2014-07-02 LTJ] |\ifydir| を使わない形に書換えました。
+%
+% [2016-07-11] コミュニティ版p\LaTeX の変更に追随しました(Thanks: 角藤さん)。
+%
+% [2016-08-27 LTJ] 結果的に |\@makefnmark| の定義が
+% Lua\TeX-ja本体(lltjcore.sty)中のものと全く同じになっていたので,削除します,
% \end{macro}
%
% \begin{macro}{\thefootnote}
% [2003-08-15] |\textasteriskcentered| ではフォントによって
% 下がりすぎるので変更しました。
%
+% [2016-10-08] TODO: 脚注番号が |newtxtext| や |newpxtext| の使用時に
+% おかしくなってしまいます。これらのパッケージは内部で |\thefootnote| を
+% 再定義していますので,気になる場合はパッケージを読み込むときに
+% \texttt{defaultsups} オプションを付けてください(qa:57284, qa:57287)。
+%
% \begin{macrocode}
\def\thefootnote{\ifnum\c@footnote>\z@\leavevmode\lower.5ex\hbox{*}\@arabic\c@footnote\fi}
% \end{macrocode}
%
% \begin{macrocode}
\renewcommand{\footnoterule}{%
- \kern-3\p@
- \hrule width .4\columnwidth
- \kern 2.6\p@}
+ \kern-3\jsc@mpt
+ \hrule width .4\columnwidth height 0.4\jsc@mpt
+ \kern 2.6\jsc@mpt}
% \end{macrocode}
% \end{macro}
%
% 脚注番号は章ごとにリセットされます。
%
% \begin{macrocode}
-%<book>\@addtoreset{footnote}{chapter}
+%<book|report>\@addtoreset{footnote}{chapter}
% \end{macrocode}
% \end{macro}
%
%
% 段落頭のかぎかっこなどを見かけ1字半下げから全角1字下げに直します。
%
-% [2012-04-24 LTJ] LuaTeX-jaではJFMに段落開始時の括弧類の字下げ幅をコントロール
+% [2012-04-24 LTJ] Lua\TeX-jaではJFMに段落開始時の括弧類の字下げ幅をコントロール
% する機能がありますが,|\item| 直後ではラベル用のボックスが段落先頭になる
-% ため,うまく働きませんでした.形を変えて復活させます.
+% ため,うまく働きませんでした。形を変えて復活させます。
+%
+% [2017-04-03 LTJ] 従来クラフファイルで定義していた |\@inhibitglue| は,
+% Lua\TeX-jaのコアに |\ltjfakeparbegin| として正式に追加されたのでリネームします.
%
% |\item| 命令の直後です。
%
% \begin{macrocode}
-\protected\def\@inhibitglue{\directlua{luatexja.jfmglue.create_beginpar_node()}}
+\let\@inhibitglue=\ltjfakeparbegin
\def\@item[#1]{%
\if@noparitem
\@donoparitem
\else
\clubpenalty \@clubpenalty
\everypar{}%
- \fi\@inhibitglue}%
+ \fi\ltjfakeparbegin}%
\if@noitemarg
\@noitemargfalse
\if@nmbrlist
%
% しかし単に戻すだけでも駄目みたいなので,ここでも最後にグルーを消しておきます。
%
+% [2016-12-05 LTJ] 本家[2016-11-29],lltjcore.styでの変更に追従させます.
+%
+% [2017-02-18 LTJ] lltjcore.sty側で戻したのを忘れていました.
% \begin{macrocode}
\def\@gnewline #1{%
\ifvmode
\@nolnerr
\else
\unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null
- \inhibitglue \ignorespaces
+ \inhibitglue\ignorespaces
\fi}
% \end{macrocode}
%
%
% \LaTeX 関連のロゴを作り直します。
%
+% [2016-07-14] ロゴの定義は\texttt{jslogo}パッケージに移転しました。
+% 後方互換のため,\texttt{jsclasses}ではデフォルトでこれを読み込みます。
+%
+% \texttt{nojslogo}オプションが指定されている場合は読み込みません。
+%
+% [2016-07-21 LTJ] \texttt{jsclasses} とLua\TeX-jaの更新タイミングが一致しない可能性を考慮し,
+% \texttt{jslogo}パッケージが存在しない場合は旧来の定義をそのまま使うことにしました。
+%
+% \begin{macrocode}
+\IfFileExists{jslogo.sty}{}{\@jslogofalse}%
+\if@jslogo
+ \RequirePackage{jslogo}
+ \def\小{\jslg@small}
+ \def\上小{\jslg@uppersmall}
+\else
+% \end{macrocode}
+%
+% 以下は\texttt{jslogo}パッケージがない場合の定義です。
+%
% \begin{macro}{\小}
% \begin{macro}{\上小}
%
% \end{macro}
% \end{macro}
%
+% \texttt{jslogo}パッケージがない場合の定義はここで終わりです。
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
% \section{初期設定}
%
% \paragraph{いろいろな語}
% \begin{macrocode}
\newcommand{\prepartname}{\if@english Part~\else 第\fi}
\newcommand{\postpartname}{\if@english\else 部\fi}
-%<book>\newcommand{\prechaptername}{\if@english Chapter~\else 第\fi}
-%<book>\newcommand{\postchaptername}{\if@english\else 章\fi}
+%<book|report>\newcommand{\prechaptername}{\if@english Chapter~\else 第\fi}
+%<book|report>\newcommand{\postchaptername}{\if@english\else 章\fi}
\newcommand{\presectionname}{}% 第
\newcommand{\postsectionname}{}% 節
% \end{macrocode}
% \paragraph{ページ設定}
%
% ページ設定の初期化です。
+% |stfloats|パッケージがシステムにインストールされている場合は、このパッケージを使って
+% \pLaTeX の標準時と同じようにボトムフロートの下に脚注が組まれるようにします。
%
+% [2017-02-19] \pLaTeX とLua\TeX-jaの|\@makecol|が違うことを
+% 考慮していませんでした。
% \begin{macrocode}
-%<article|kiyou>\if@slide \pagestyle{empty} \else \pagestyle{plain} \fi
+%<article>\if@slide \pagestyle{empty} \else \pagestyle{plain} \fi
%<book>\if@report \pagestyle{plain} \else \pagestyle{headings} \fi
+%<report|kiyou>\pagestyle{plain}
%<jspf>\pagestyle{headings}
\pagenumbering{arabic}
+\fnfixbottomtrue % 2017-02-19
+\IfFileExists{stfloats.sty}{\RequirePackage{stfloats}\fnbelowfloat}{}
\if@twocolumn
\twocolumn
\sloppy
\renewcommand\kanjifamilydefault{\gtdefault}
\renewcommand\familydefault{\sfdefault}
\raggedright
- \ltjsetparameter{xkanjiskip={0.1em}}\relax
+ \ltj@setpar@global
+ \ltjsetxkanjiskip0.1em\relax
\fi
% \end{macrocode}
%