X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltjsclasses.dtx;h=b816ad579ceb88c26a7b38f1dd7bb7b976dad12e;hb=f078ac2f7998a102c7ec765e725f2269eed9f872;hp=4c04d083a020ed0486d5ddd8bfca5273e7ee8b83;hpb=a23769444d2379bd9e2852a6faf9738f8b9c68b6;p=luatex-ja%2Fluatexja.git diff --git a/src/ltjsclasses.dtx b/src/ltjsclasses.dtx index 4c04d08..b816ad5 100644 --- a/src/ltjsclasses.dtx +++ b/src/ltjsclasses.dtx @@ -3,33 +3,19 @@ % ----------------------------------------- % Original: jsclasses.dtx % -% pLaTeX2ε新ドキュメントクラス +% pLaTeX2ε新ドキュメントクラス(日本語 TeX 開発コミュニティ版) +% 原作者:奥村晴彦 % -% これは LaTeX3 Project の classes.dtx と株式会社アスキーの jclasses.dtx -% に基づいて,もともと奥村晴彦 により -% 作成されたものです。 -% 現在は日本語\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 +% Copyright 1993-2016 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % % Copyright 1995-1999 ASCII Corporation. % Copyright 1999-2016 Haruhiko Okumura -% Copyright 2016 Japanese TeX Development Community +% Copyright 2016-2018 Japanese TeX Development Community % ----------------------------------------- % % \fi -% \CheckSum{5366} %% \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 @@ -49,22 +35,30 @@ % \iffalse % % \begin{macrocode} -%\NeedsTeXFormat{LaTeX2e} +\NeedsTeXFormat{LaTeX2e} %
\ProvidesClass{ltjsarticle} %\ProvidesClass{ltjsbook} +%\ProvidesClass{ltjsreport} %\ProvidesClass{ltjspf} %\ProvidesClass{ltjskiyou} %<*driver> \ProvidesFile{ltjsclasses.dtx} % - [2016/08/27 ltjsclasses ] + [2019/04/06 ltjsclasses ] %<*driver> \IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{} -\documentclass{ltjsarticle} +\documentclass[disablejfam]{ltjsarticle} \usepackage{hypdoc} \hypersetup{unicode=true} -\usepackage{fontspec} -\usepackage[ipaex,nfssonly]{luatexja-preset} +\begingroup + \suppressfontnotfounderror=1 + \global\font\testfont=file:KozMinPr6N-Regular.otf +\endgroup +\ifx\testfont\nullfont + \usepackage[ipaex,nfssonly]{luatexja-preset} +\else + \usepackage[kozuka-pr6n,nfssonly]{luatexja-preset} +\fi \ltjsetparameter{alxspmode={`\*,allow}} \ltjsetparameter{alxspmode={`\\,allow}} %%%%\usepackage{unicode-math} @@ -75,10 +69,10 @@ \addtolength{\marginparwidth}{1in} \setlength\marginparpush{0pt} % \OnlyDescription +\CodelineNumbered \EnableCrossrefs \setcounter{StandardModuleDepth}{1} \GetFileInfo{ltjsclasses.dtx} -\CodelineNumbered \begin{document} \DocInput{ltjsclasses.dtx} \end{document} @@ -100,12 +94,18 @@ % これは,元々奥村晴彦先生により作成され,現在は日本語\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} % @@ -115,8 +115,10 @@ % \begin{itemize} % \item フォントメトリック関係のオプション\texttt{winjis}は単に無視されます。 % \item 標準では\texttt{jfm-ujis.lua}(Lua\TeX-ja標準のメトリック,OTFパッケージのものがベース)を使用します。 -% \item \texttt{uplatex}オプションを削除してあります。 -% \item \texttt{disablejfam}オプションが無効になっています。もし +% \item \texttt{uplatex}オプション,\texttt{autodetect-engine}オプションを +% 削除してあります(前者ではエラーを出すようにしています)。 +% \item \texttt{disablejfam}オプションはクラス側では何もしません(ただLua\TeX-ja本体に +% 渡されるだけです).もし % \begin{quotation} % |! LaTeX Error: Too many math alphabets used in version ****.| % \end{quotation} @@ -166,6 +168,8 @@ % % [2016-07-21 LTJ] \LaTeX 等のロゴの再定義で,\texttt{jslogo}パッケージがあればそちらを読み込むことにしました。 % +% [2016-10-13 LTJ] \texttt{slide}オプションの使用時にエラーが出るのを修正. +% % \StopEventually{} % % 以下では実際のコードに即して説明します。 @@ -177,6 +181,7 @@ % \begin{macrocode} %
\def\jsc@clsname{ltjsarticle} %\def\jsc@clsname{ltjsbook} +%\def\jsc@clsname{ltjsreport} %\def\jsc@clsname{ltjspf} %\def\jsc@clsname{ltjskiyou} % \end{macrocode} @@ -184,8 +189,10 @@ % % \section{Lua\TeX-jaの読み込み} % -% まず,Lua\TeX-jaを読み込みます。 +% 和文スケール値を設定した後に,Lua\TeX-jaを読み込みます。 % \begin{macrocode} +%\def\Cjascale{0.924715} +%\def\Cjascale{0.903375} \RequirePackage{luatexja} % \end{macrocode} % @@ -218,11 +225,20 @@ % % \begin{macro}{\if@openright} % -% |\chapter|,|\part| を奇数ページ起こしにするかどうかです。 -% 書籍では真が標準です。 +% |\chapter|,|\part| を右ページ起こしにするかどうかです。 +% 横組の書籍では真が標準で,要するに片起こし,奇数ページ起こしになります。 % % \begin{macrocode} -%\newif\if@openright +%\newif\if@openright +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@openleft} +% +% [2017-02-24] |\chapter|,|\part| を左ページ起こしにするかどうかです。 +% +% \begin{macrocode} +%\newif\if@openleft % \end{macrocode} % \end{macro} % @@ -334,6 +350,9 @@ % % オプション \texttt{slide} を新設しました。 % +% [2016-10-08] \texttt{slide} オプションは article 以外では使い物にならなかったので, +% 簡単のため article のみで使えるオプションとしました。 +% % \begin{macrocode} \newif\if@slide \@slidefalse @@ -357,7 +376,9 @@ % % \begin{macrocode} \def\jsc@magscale{1} +%<*article> \DeclareOption{slide}{\@slidetrue\def\jsc@magscale{3.583}\@landscapetrue\@titlepagetrue} +%
\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}} @@ -386,28 +407,20 @@ % 将来どうなるかわからないので\texttt{nomag}で無効化することができるようにしました。 % % \texttt{noxreal},~\texttt{real}は旧来の互換性として今は残してありますが,2017年7月に削除する予定です。 +% +% [2018-01-14] \texttt{noxreal},~\texttt{real} を削除しました.また,内部命令の名称を +% \texttt{jsclasses}に合わせました. +% % \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} +\newif\ifjsc@mag@xreal +\jsc@mag@xrealtrue +\DeclareOption{nomag*}{\jsc@mag@xrealtrue} +\DeclareOption{nomag}{\jsc@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} - - + \jsc@mag@xrealtrue} % \end{macrocode} % % @@ -481,12 +494,20 @@ % % \paragraph{右左起こし} % -% 書籍では章は通常は奇数ページ起こしになりますが, +% 書籍では章は通常は奇数ページ起こしになりますが,横組ではこれを +% \texttt{openright} と表すことにしてあります。 % \texttt{openany} で偶数ページからでも始まるようになります。 % +% [2017-02-24] \texttt{openright} は横組では奇数ページ起こし,縦組では +% 偶数ページ起こしを表します。ややこしいですが,これは\LaTeX の標準クラスが +% 西欧の横組事情しか考慮せずに,奇数ページ起こしと右起こしを一緒にしてしまっ +% たせいです。縦組での奇数ページ起こしと横組での偶数ページ起こしも表現したい +% ので,ltjsclassesでは新たに \texttt{openleft} も追加しました。 +% % \begin{macrocode} -%\DeclareOption{openright}{\@openrighttrue} -%\DeclareOption{openany}{\@openrightfalse} +%\DeclareOption{openright}{\@openrighttrue\@openleftfalse} +%\DeclareOption{openleft}{\@openlefttrue\@openrightfalse} +%\DeclareOption{openany}{\@openrightfalse\@openleftfalse} % \end{macrocode} % % \paragraph{eqnarray環境と数式の位置} @@ -576,10 +597,8 @@ % 実際に使用可能な数式ファミリの数を増やすためには\texttt{lualatex-math}パッケージを % 読み込む必要があることに注意が必要です。 % -% \begin{macrocode} -\DeclareOption{disablejfam}{% - \ClassWarningNoLine{\jsc@clsname}{The class option 'disablejfam' is obsolete}} -% \end{macrocode} +% [2018-10-08 LTJ] Lua\TeX-ja本体が\texttt{disablejfam}オプションをサポートしたので, +% クラスファイルからは削除します. % % \paragraph{ドラフト} % @@ -601,6 +620,12 @@ % \texttt{ptexjis}というオプションを指定します。 % \texttt{winjis}メトリックは用済みのため,\texttt{winjis}オプションは無視されます。 % +% [2016-11-09] pLaTeX / upLaTeX を自動判別するオプション \texttt{autodetect-engine} を新設しました。 +% +% [2016-11-24 LTJ] \texttt{autodetect-engine} はLua\TeX-jaでは意味がないので警告を表示させます. +% +% [2018-07-30 LTJ] \texttt{uplatex} 指定時のエラーが正しく表示されなかったので修正しました. +% % \begin{macrocode} \newif\ifmingoth \mingothfalse @@ -609,9 +634,11 @@ \newif\ifptexjis \ptexjisfalse \DeclareOption{winjis}{% - \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `winjis' option}} + \ClassWarningNoLine{\jsc@clsname}{this class does not support `winjis' option}} \DeclareOption{uplatex}{% - \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `uplatex' option}} + \ClassError{\jsc@clsname}{this class does not support `uplatex' option}} +\DeclareOption{autodetect-engine}{% + \ClassWarningNoLine{\jsc@clsname}{this class does not support `autodetect-engine' option}} \DeclareOption{mingoth}{\mingothtrue} \DeclareOption{ptexjis}{\ptexjistrue} \DeclareOption{jis}{\jisfonttrue} @@ -632,10 +659,13 @@ \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 @@ -664,6 +694,7 @@ % \begin{macrocode} %
\ExecuteOptions{a4paper,oneside,onecolumn,notitlepage,final} %\ExecuteOptions{a4paper,twoside,onecolumn,titlepage,openright,final} +%\ExecuteOptions{a4paper,oneside,onecolumn,titlepage,openany,final} %\ExecuteOptions{a4paper,twoside,twocolumn,notitlepage,fleqn,final} %\ExecuteOptions{a4paper,twoside,twocolumn,notitlepage,final} \ProcessOptions @@ -689,7 +720,7 @@ % 基準となる行送りをポイント単位で表したものです。 % % \begin{macrocode} -%\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi +%\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi %\def\n@baseline{14.554375} %\def\n@baseline{14.897} % \end{macrocode} @@ -756,10 +787,21 @@ % (不要なので)パッチを当てないことにしました。 % % [2016-04-04 LTJ] NFSSへのパッチを修正。 +% +% [2017-01-23 LTJ] \LaTeXe\ 2017-01-01以降ではTUエンコーディングが標準なので, +% \texttt{type1cm}パッケージは読み込まないようにしました. +% +% [2017-02-17 LTJ] |\directlua|中で出力される数字のカテゴリーコードが12になるようにしました. +% この保証をしないと例えば\texttt{listings}パッケージで無限ループになります. +% +% [2018-07-02 LTJ] 10ptオプションが指定されており, +% 実際にはオプティカルサイズの補正が不要なときは「|xreal|オプションは指定されなかった」という +% 扱いにしておきます. % \begin{macrocode} -\if@ltjs@mag@xreal\RequirePackage{type1cm} -\ifdim\jsc@mpt=\p@\else +\ifjsc@mag@xreal +\ifdim\jsc@mpt=\p@\jsc@mag@xrealfalse\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 @@ -767,11 +809,11 @@ 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(math.floor(0.5+mpt*getdimen('dimen@'))) + 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( (s:match('%.0$')) and s:sub(1,-3) or s ) + tex.sprint(-2, (s:match('%.0$')) and s:sub(1,-3) or s ) end } \endgroup @@ -779,7 +821,7 @@ \def\@tempa{#1}\def\@tempb{#2}% \ifx\@tempb\@empty \edef\@tempb{ scaled\directlua{% - tex.sprint(math.floor(0.5+\jsc@magscale*1000)) + tex.sprint(-2,math.floor(0.5+\jsc@magscale*1000)) }}% \else \dimen@\@tempb\relax @@ -799,6 +841,38 @@ \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の用紙サイズの設定} % @@ -814,21 +888,32 @@ % % [2016-07-12 LTJ] luatex.defが新しくなったことに対応するaminophenさんのパッチを取り込みました。 % +% [2017-01-11] トンボオプションが指定されているとき「だけ」|\stockwidth|, +% |\stockheight|を定義するようにしました。 +% % \begin{macrocode} -\newlength{\stockwidth} -\newlength{\stockheight} -\setlength{\stockwidth}{\paperwidth} -\setlength{\stockheight}{\paperheight} \iftombow + \newlength{\stockwidth} + \newlength{\stockheight} + \setlength{\stockwidth}{\paperwidth} + \setlength{\stockheight}{\paperheight} \advance \stockwidth 2in \advance \stockheight 2in -\fi -\ifdefined\pdfpagewidth - \setlength{\pdfpagewidth}{\stockwidth} - \setlength{\pdfpageheight}{\stockheight} + \ifdefined\pdfpagewidth + \setlength{\pdfpagewidth}{\stockwidth} + \setlength{\pdfpageheight}{\stockheight} + \else + \setlength{\pagewidth}{\stockwidth} + \setlength{\pageheight}{\stockheight} + \fi \else - \setlength{\pagewidth}{\stockwidth} - \setlength{\pageheight}{\stockheight} + \ifdefined\pdfpagewidth + \setlength{\pdfpagewidth}{\paperwidth} + \setlength{\pdfpageheight}{\paperheight} + \else + \setlength{\pagewidth}{\paperwidth} + \setlength{\pageheight}{\paperheight} + \fi \fi % \end{macrocode} % \end{macro} @@ -865,26 +950,11 @@ % % [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.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.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.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}{} -% -% \end{macrocode} +% [2016-03-21 LTJ] 拡大率の計算で1~ptを$1/72.27$インチでなく0.3514\,mmと間違えて扱っていたのを修正。 +% +% [2017-12-31] 和文スケール($1\,\mathrm{zw} \div \hbox{要求サイズ}$)を +% 表す実数値マクロ |\Cjascale| を定義しました。 +% % % これにより,公称10ポイントの和文フォントを0.924715倍したことにより, % 約9.25ポイント, @@ -895,24 +965,27 @@ % 和文フォントをPostScriptの9ポイントにするために, % $0.9*72.27/72 \simeq 0.903375$ 倍します。 % +% [2018-09-23 LTJ] 実際の|\Cjascale|の定義はLua\TeX-jaの読み込み前に移動しました. +% こうすることによって「0.962216倍された和文フォント」という実際には使われない和文フォントを +% 読み込む必要がなくなります. +% +% +% 実際にフォントの再定義を行う部分です. +% +% [2018-09-23 LTJ] |\Cjascale|の設定を前倒ししたことに伴い,実際の再定義は +% \texttt{mingoth}, \texttt{ptexjis}のときしか必要なくなりました. +% % \begin{macrocode} -%<*jspf> \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax \ifmingoth - \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.903375] \ltj@stdmcfont:jfm=min}{} - \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.903375] \ltj@stdgtfont:jfm=min}{} + \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [\Cjascale] \ltj@stdmcfont:jfm=min}{} + \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [\Cjascale] \ltj@stdgtfont:jfm=min}{} \else \ifptexjis - \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.903375] \ltj@stdmcfont:jfm=jis}{} - \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.903375] \ltj@stdgtfont:jfm=jis}{} - \else - \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.903375] \ltj@stdmcfont:jfm=ujis}{} - \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.903375] \ltj@stdgtfont:jfm=ujis}{} + \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [\Cjascale] \ltj@stdmcfont:jfm=jis}{} + \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [\Cjascale] \ltj@stdgtfont:jfm=jis}{} \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}{} -% % \end{macrocode} % % 和文でイタリック体,斜体,サンセリフ体, @@ -936,9 +1009,14 @@ % [2016-01-30 LTJ] |\rmfamily|, |\sffamily|, |\ttfamily| の再定義をLua\TeX-ja % カーネルに移動させたので,ここでは和文対応にするフラグ |\@ltj@match@family|\ % を有効にさせるだけでよいです。 +% +% [2018-06-09 LTJ] シリーズ|b|は同じ書体の|bx|と等価になるように宣言します。 +% % \begin{macrocode} \DeclareFontShape{JY3}{mc}{bx}{n}{<->ssub*gt/m/n}{} \DeclareFontShape{JY3}{gt}{bx}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{JY3}{mc}{b}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{JY3}{mc}{b}{n}{<->ssub*gt/m/n}{} \DeclareFontShape{JY3}{mc}{m}{it}{<->ssub*mc/m/n}{} \DeclareFontShape{JY3}{mc}{m}{sl}{<->ssub*mc/m/n}{} \DeclareFontShape{JY3}{mc}{m}{sc}{<->ssub*mc/m/n}{} @@ -946,15 +1024,21 @@ \DeclareFontShape{JY3}{gt}{m}{sl}{<->ssub*gt/m/n}{} \DeclareFontShape{JY3}{mc}{bx}{it}{<->ssub*gt/m/n}{} \DeclareFontShape{JY3}{mc}{bx}{sl}{<->ssub*gt/m/n}{} -% \DeclareFontShape{JT3}{mc}{bx}{n}{<->ssub*gt/m/n}{} -% \DeclareFontShape{JT3}{gt}{bx}{n}{<->ssub*gt/m/n}{} -%% \DeclareFontShape{JT3}{mc}{m}{it}{<->ssub*mc/m/n}{} -%% \DeclareFontShape{JT3}{mc}{m}{sl}{<->ssub*mc/m/n}{} -%% \DeclareFontShape{JT3}{mc}{m}{sc}{<->ssub*mc/m/n}{} -%% \DeclareFontShape{JT3}{gt}{m}{it}{<->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}{} +\DeclareFontShape{JY3}{mc}{b}{it}{<->ssub*gt/m/n}{} +\DeclareFontShape{JY3}{mc}{b}{sl}{<->ssub*gt/m/n}{} +\DeclareFontShape{JT3}{mc}{bx}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{JT3}{gt}{bx}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{JT3}{mc}{b}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{JT3}{mc}{b}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{JT3}{mc}{m}{it}{<->ssub*mc/m/n}{} +\DeclareFontShape{JT3}{mc}{m}{sl}{<->ssub*mc/m/n}{} +\DeclareFontShape{JT3}{mc}{m}{sc}{<->ssub*mc/m/n}{} +\DeclareFontShape{JT3}{gt}{m}{it}{<->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}{} +\DeclareFontShape{JT3}{mc}{b}{it}{<->ssub*gt/m/n}{} +\DeclareFontShape{JT3}{mc}{b}{sl}{<->ssub*gt/m/n}{} \renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue % \end{macrocode} %% @@ -964,11 +1048,15 @@ % \texttt{jsclasses}で行われていた |\textmc|, |\textgt| の再定義は不要のように思われます。 % % \texttt{jsclasses.dtx}中で行われていた |\reDeclareMathAlphabet| の再定義は削除。 +% また,Yue ZHANGさん作の\texttt{fixjfm}パッケージ対応のコードもLua\TeX-jaでは削除しています. % % \begin{macrocode} \AtBeginDocument{% - \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc} - \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}}% + \unless\ifltj@disablejfam + \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc} + \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt} + \fi +}% % \end{macrocode} % % \begin{macro}{\textsterling} @@ -1236,13 +1324,18 @@ % パラメータに実際の値を設定します。 % たとえば |\Cwd| は |\normalfont| の全角幅(|1\zw|)です。 % +% [2017-08-31] 基準とする文字を「全角空白」(EUCコード\texttt{0xA1A1})から +% 「漢」(JISコード\texttt{0x3441})へ変更しました。 +% +% [2017-09-19] 内部的に使った |\box0| を空にします。 % \begin{macrocode} -\setbox0\hbox{\char"3000}% 全角スペース +\setbox0\hbox{漢} \setlength\Cht{\ht0} \setlength\Cdp{\dp0} \setlength\Cwd{\wd0} \setlength\Cvs{\baselineskip} \setlength\Chs{\wd0} +\setbox0=\box\voidb@x % \end{macrocode} % \end{macro} % \end{macro} @@ -1254,10 +1347,10 @@ % % |\small| も |\normalsize| と同様に設定します。 % 行送りは,|\normalsize| が16ポイントなら, -% 割合からすれば $16 \times 0.9 = 14.4$ ポイントになりますが, +% 割合からすれば$16 \times 0.9 = 14.4$ポイントになりますが, % |\small| の使われ方を考えて,ここでは和文13ポイント, % 欧文11ポイントとします。 -% また,|\topsep| と |\parsep| は,元はそれぞれ $4 \pm 2$,$2 \pm 1$ +% また,|\topsep| と |\parsep| は,元はそれぞれ$4 \pm 2$,$2 \pm 1$ % ポイントでしたが,ここではゼロ(|\z@|)にしました。 % % \begin{macrocode} @@ -1509,7 +1602,6 @@ % 計算では |\headheight| ではなく |\topskip| を使う % ことにしました。 % -% % [2016-08-17] 圏点やルビが一行目に来た場合に下がるのを防ぐた % め,|\topskip| を10ptから1.38zwに増やしました。 % |\headheight| は従来と同じ20ptのままとします。 @@ -1558,6 +1650,12 @@ \setlength\footskip{\z@} \fi % +%<*report> +\setlength\footskip{0.03367\paperheight} +\ifdim\footskip<\baselineskip + \setlength\footskip{\baselineskip} +\fi +% % \end{macrocode} % \end{macro} % @@ -1568,10 +1666,16 @@ % それ以外で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\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} @@ -1583,8 +1687,14 @@ \addtolength\headsep{-\topskip} \else \setlength\headsep{6\jsc@mmm} + \addtolength\headsep{-\topskip}%% added (2016-10-08) + \addtolength\headsep{10\jsc@mpt}%% added (2016-10-08) \fi % +%<*report> +\setlength\headsep{\footskip} +\addtolength\headsep{-\topskip} +% %<*jspf> \setlength\headsep{9\jsc@mmm} \addtolength\headsep{-\topskip} @@ -1592,6 +1702,8 @@ %<*kiyou> \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) % % \end{macrocode} % \end{macro} @@ -1664,6 +1776,12 @@ \fi \fi % +%<*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} +% %<*jspf> \setlength\fullwidth{50\zw} \addtolength\fullwidth{8\jsc@mmm} @@ -1702,20 +1820,23 @@ % [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}{-0.5\headheight}%% from -\topskip (2016-08-26); from -\headheight (2003-06-26) +\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 -% +% %\setlength{\textheight}{51\baselineskip} %\setlength{\textheight}{47\baselineskip} \addtolength{\textheight}{\topskip} @@ -1737,8 +1858,8 @@ % % \begin{macrocode} \def\flushbottom{% - \def\@textbottom{\vskip \z@ \@plus.1\jsc@mpt}% - \let\@texttop\relax} + \def\@textbottom{\vskip \z@ \@plus.1\jsc@mpt}% + \let\@texttop\relax} % \end{macrocode} % \end{macro} % @@ -1817,13 +1938,14 @@ % |\topmargin| は従来の値から変わらないように調節しました。 % …のつもりでしたが,|\textheight| を増やし忘れていたので % 変わってしまっていました(2016-08-26修正済み)。 +% % \begin{macrocode} \setlength\topmargin{\paperheight} \addtolength\topmargin{-\textheight} \if@slide \addtolength\topmargin{-\headheight} \else - \addtolength\topmargin{-0.5\headheight}%% from -\topskip (2016-08-17); from -\headheight (2003-06-26) + \addtolength\topmargin{-10\jsc@mpt}%% from -\topskip (2016-10-08); from -\headheight (2003-06-26) \fi \addtolength\topmargin{-\headsep} \addtolength\topmargin{-\footskip} @@ -1862,8 +1984,8 @@ % % フロート(図,表)関連のパラメータは\LaTeXe 本体で定義されていますが, % ここで設定変更します。本文ページ(本文とフロートが共存するページ) -% ちなみに,カウンタは内部では |\c@| を名前に冠したマクロになっています。 % とフロートだけのページで設定が異なります。 +% ちなみに,カウンタは内部では |\c@| を名前に冠したマクロになっています。 % % \begin{macro}{\c@topnumber} % @@ -2033,6 +2155,65 @@ % \end{macro} % \end{macro} % +% \section{改ページ(日本語\TeX{}開発コミュニティ版のみ)}\label{sec:cleardoublepage} +% +% \begin{macro}{\pltx@cleartorightpage} +% \begin{macro}{\pltx@cleartoleftpage} +% \begin{macro}{\pltx@cleartooddpage} +% \begin{macro}{\pltx@cleartoevenpage} +% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて, +% 同じ命令を追加しました。 +% \begin{enumerate} +% \item|\pltx@cleartorightpage|:右ページになるまでページを繰る命令 +% \item|\pltx@cleartoleftpage|:左ページになるまでページを繰る命令 +% \item|\pltx@cleartooddpage|:奇数ページになるまでページを繰る命令 +% \item|\pltx@cleartoevenpage|:偶数ページになるまでページを繰る命令 +% \end{enumerate} +% となっています。 +% +% \begin{macrocode} +%<*article|book|report> +\def\pltx@cleartorightpage{\clearpage\if@twoside + \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoleftpage{\clearpage\if@twoside + \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartooddpage{\clearpage\if@twoside + \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoevenpage{\clearpage\if@twoside + \ifodd\c@page + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\cleardoublepage} +% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて, +% reportとbookクラスの場合に|\cleardoublepage|を再定義します。 +% \begin{macrocode} +%<*book|report> +\if@openleft + \let\cleardoublepage\pltx@cleartoleftpage +\else\if@openright + \let\cleardoublepage\pltx@cleartorightpage +\fi\fi +% +% \end{macrocode} +% \end{macro} +% % \section{ページスタイル}\label{sec:pagestyle} % % ページスタイルとして,\LaTeXe (欧文版)の標準クラス @@ -2175,12 +2356,12 @@ % % \end{macrocode} % -% 次は book の場合です。 +% 次は book および report の場合です。 % [2011-05-10] しっぽ愛好家さん [qa:6370] のパッチを取り込ませていただきました % (北見さん [qa:55896] のご指摘ありがとうございます)。 % % \begin{macrocode} -%<*book> +%<*book|report> \newif\if@omit@number \def\ps@headings{% \let\@oddfoot\@empty @@ -2195,17 +2376,17 @@ \let\@mkboth\markboth \def\chaptermark##1{\markboth{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter +% \if@mainmatter \if@omit@number\else \@chapapp\thechapter\@chappos\hskip1\zw \fi - \fi +% \fi \fi ##1}{}}% \def\sectionmark##1{\markright{% \ifnum \c@secnumdepth >\z@ \thesection \hskip1\zw\fi ##1}}}% -% +% % \end{macrocode} % % 最後は学会誌の場合です。 @@ -2239,9 +2420,9 @@ \def\@oddhead{% \hbox to \fullwidth{\rightmark\hfil\thepage}\hss}% \let\@mkboth\@gobbletwo -% \let\chaptermark\@gobble +% \let\chaptermark\@gobble \let\sectionmark\@gobble -% \let\subsectionmark\@gobble +% \let\subsectionmark\@gobble } % \end{macrocode} % \end{macro} @@ -2317,8 +2498,12 @@ % 和文のものでは |\Large| になっていましたが,ここでは |\large| % にしました。 % +% [2016-11-16] スペーシングを元の |jsclasses| に合わせるため,|\smallskip| を +% |\jsc@smallskip| に置き換えました。|\smallskip| のままでは +% \texttt{nomag(*)} の場合にスケールしなくなり,レイアウトが変わってしまいます。 +% % \begin{macrocode} -%<*article|book|kiyou> +%<*article|book|report|kiyou> \if@titlepage \newcommand{\maketitle}{% \begin{titlepage}% @@ -2332,9 +2517,9 @@ \mbox{} \\[1\zw] \large {\maybeblue\hrule height0\jsc@mpt depth2\jsc@mpt\relax}\par - \smallskip + \jsc@smallskip \@title - \smallskip + \jsc@smallskip {\maybeblue\hrule height0\jsc@mpt depth2\jsc@mpt\relax}\par \vfill {\small \@author}% @@ -2426,10 +2611,10 @@ {\large \@date}% \end{center}% \par\vskip 1.5em -% \ifvoid\@abstractbox\else\centerline{\box\@abstractbox}\vskip1.5em\fi +% \ifvoid\@abstractbox\else\centerline{\box\@abstractbox}\vskip1.5em\fi } \fi -% +% %<*jspf> \newcommand{\maketitle}{\par \begingroup @@ -2635,7 +2820,7 @@ \begingroup \@svsechd \endgroup \unskip \@tempskipa #1\relax - \hskip -\@tempskipa\@inhibitglue + \hskip -\@tempskipa\ltjfakeparbegin \else \clubpenalty \@clubpenalty \everypar{}% @@ -2648,7 +2833,7 @@ \if@slide {\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} + \vskip\if@twocolumn 4\jsc@mpt\else 7\jsc@mpt\fi\relax}% \fi \par % 2000-12-18 \ignorespaces} @@ -2701,8 +2886,8 @@ % 番号を付けるかを決めるカウンタです。 % % \begin{macrocode} -%\setcounter{secnumdepth}{3} -%\setcounter{secnumdepth}{2} +%\setcounter{secnumdepth}{3} +%\setcounter{secnumdepth}{2} % \end{macrocode} % \end{macro} % @@ -2720,9 +2905,9 @@ % % \begin{macrocode} \newcounter{part} -%\newcounter{chapter} -%\newcounter{section}[chapter] -%\newcounter{section} +%\newcounter{chapter} +%\newcounter{section}[chapter] +%\newcounter{section} \newcounter{subsection}[section] \newcounter{subsubsection}[subsection] \newcounter{paragraph}[subsubsection] @@ -2760,14 +2945,14 @@ % % \begin{macrocode} \renewcommand{\thepart}{\@Roman\c@part} -%% \renewcommand{\thesection}{\@arabic\c@section} -%\renewcommand{\thesection}{\presectionname\@arabic\c@section\postsectionname} -%\renewcommand{\thesubsection}{\@arabic\c@section.\@arabic\c@subsection} -%<*book> +%% \renewcommand{\thesection}{\@arabic\c@section} +%\renewcommand{\thesection}{\presectionname\@arabic\c@section\postsectionname} +%\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} -% +% \renewcommand{\thesubsubsection}{% \thesubsection.\@arabic\c@subsubsection} \renewcommand{\theparagraph}{% @@ -2796,8 +2981,8 @@ % [2003-03-02] |\@secapp| は外しました。 % % \begin{macrocode} -%\newcommand{\@chapapp}{\prechaptername} -%\newcommand{\@chappos}{\postchaptername} +%\newcommand{\@chapapp}{\prechaptername} +%\newcommand{\@chappos}{\postchaptername} % \end{macrocode} % \end{macro} % \end{macro} @@ -2811,14 +2996,19 @@ % % ページ番号をローマ数字にし,章番号を付けないようにします。 % +% [2017-03-05] |\frontmatter| と |\mainmatter| の2つの命令は, +% 改丁または改ページした後で |\pagenumbering{...}| でノンブルを1に +% リセットします。長い間 |\frontmatter| は \texttt{openany} のときに +% 単なる改ページとしていましたが,これではノンブルをリセットする際に +% 偶奇逆転が起こる場合がありました。\texttt{openany} かどうかに依らず +% 奇数ページまで繰るように修正することで,問題を解消しました。 +% 実は,\LaTeX の標準クラスでは1998年に修正されていた問題です +% (コミュニティ版\pLaTeX の標準クラス2017/03/05も参照)。 +% % \begin{macrocode} %<*book> \newcommand\frontmatter{% - \if@openright - \cleardoublepage - \else - \clearpage - \fi + \pltx@cleartooddpage \@mainmatterfalse \pagenumbering{roman}} % \end{macrocode} @@ -2830,11 +3020,7 @@ % % \begin{macrocode} \newcommand\mainmatter{% -% \if@openright - \cleardoublepage -% \else -% \clearpage -% \fi + \pltx@cleartooddpage \@mainmattertrue \pagenumbering{arabic}} % \end{macrocode} @@ -2846,11 +3032,13 @@ % % \begin{macrocode} \newcommand\backmatter{% - \if@openright + \if@openleft + \cleardoublepage + \else\if@openright \cleardoublepage \else \clearpage - \fi + \fi\fi \@mainmatterfalse} % % \end{macrocode} @@ -2882,29 +3070,31 @@ % \def\CMDB #1{....} % \chapter*{...} の定義 %\end{verbatim} % -% まず |book| クラス以外です。 +% まず |book| と |report| のクラス以外です。 % % \begin{macrocode} -%<*!book> +%<*!book&!report> \newcommand\part{% \if@noskipsec \leavevmode \fi \par \addvspace{4ex}% \if@english \@afterindentfalse \else \@afterindenttrue \fi \secdef\@part\@spart} -% +% % \end{macrocode} % -% |book| スタイルの場合は,少し複雑です。 +% |book| および |report| クラスの場合は,少し複雑です。 % % \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 @@ -2914,7 +3104,7 @@ \fi \null\vfil \secdef\@part\@spart} -% +% % \end{macrocode} % \end{macro} % @@ -2923,11 +3113,11 @@ % 部の見出しを出力します。 % |\bfseries| を |\headfont| に変えました。 % -% |book| クラス以外では |secnumdepth| が $-1$ より大きいとき +% |book| および |report| クラス以外では |secnumdepth| が $-1$ より大きいとき % 部番号を付けます。 % % \begin{macrocode} -%<*!book> +%<*!book&!report> \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% @@ -2950,13 +3140,13 @@ \nobreak \vskip 3ex \@afterheading} -% +% % \end{macrocode} % -% |book| クラスでは |secnumdepth| が $-2$ より大きいとき部番号を付けます。 +% |book| および |report| クラスでは |secnumdepth| が $-2$ より大きいとき部番号を付けます。 % % \begin{macrocode} -%<*book> +%<*book|report> \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% @@ -2975,7 +3165,7 @@ \fi \Huge \headfont #2\par}% \@endpart} -% +% % \end{macrocode} % \end{macro} % @@ -2984,7 +3174,7 @@ % 番号を付けない部です。 % % \begin{macrocode} -%<*!book> +%<*!book&!report> \def\@spart#1{{% \parindent \z@ \raggedright \interlinepenalty \@M @@ -2993,15 +3183,15 @@ \nobreak \vskip 3ex \@afterheading} -% -%<*book> +% +%<*book|report> \def\@spart#1{{% \centering \interlinepenalty \@M \normalfont \Huge \headfont #1\par}% \@endpart} -% +% % \end{macrocode} % \end{macro} % @@ -3011,18 +3201,25 @@ % 両面印刷のときは白ページを追加します。 % 二段組のときには,二段組に戻します。 % +% [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} -% +% % \end{macrocode} % \end{macro} % @@ -3036,9 +3233,10 @@ % 章見出しの上に図や表が来ないようにします。 % % \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 @@ -3056,7 +3254,7 @@ % \begin{macrocode} \def\@chapter[#1]#2{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter +% \if@mainmatter \refstepcounter{chapter}% \typeout{\@chapapp\thechapter\@chappos}% \addcontentsline{toc}{chapter}% @@ -3064,7 +3262,7 @@ % {\if@english\thechapter\else\@chapapp\thechapter\@chappos\fi}% {\@chapapp\thechapter\@chappos}% #1}% - \else\addcontentsline{toc}{chapter}{#1}\fi +% \else\addcontentsline{toc}{chapter}{#1}\fi \else \addcontentsline{toc}{chapter}{#1}% \fi @@ -3090,11 +3288,11 @@ \vspace*{2\Cvs}% 欧文は50pt {\parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne - \if@mainmatter +% \if@mainmatter \huge\headfont \@chapapp\thechapter\@chappos \par\nobreak \vskip \Cvs % 欧文は20pt - \fi +% \fi \fi \interlinepenalty\@M \Huge \headfont #1\par\nobreak @@ -3130,7 +3328,7 @@ \interlinepenalty\@M \Huge \headfont #1\par\nobreak \vskip 3\Cvs}} % 欧文は40pt -% +% % \end{macrocode} % \end{macro} % @@ -3205,24 +3403,36 @@ % \end{macro} % % \begin{macro}{\paragraph} +% \begin{macro}{\jsParagraphMark} % % 見出しの後ろで改行されません。 % +% [2016-11-16] 従来は |\paragraph| の最初に出るマークを「■」に固定して +% いましたが,このマークを変更可能にするため |\jsParagraphMark| というマクロ +% に切り出しました。これで,たとえば +%\begin{verbatim} +% \renewcommand{\jsParagraphMark}{★} +%\end{verbatim} +% とすれば「★」に変更できますし,マークを空にすることも容易です。 +% なお,某学会クラスでは従来どおりマークは付きません。 +% % \begin{macrocode} +%\newcommand{\jsParagraphMark}{■} \if@twocolumn \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% {\z@}{\if@slide .4\Cvs \else -1\zw\fi}% 改行せず 1\zw のアキ % {\normalfont\normalsize\headfont}} -% {\normalfont\normalsize\headfont ■}} +% {\normalfont\normalsize\headfont\jsParagraphMark}} \else \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% {0.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}% {\if@slide .5\Cvs \@plus.3\Cdp \else -1\zw\fi}% 改行せず 1\zw のアキ % {\normalfont\normalsize\headfont}} -% {\normalfont\normalsize\headfont ■}} +% {\normalfont\normalsize\headfont\jsParagraphMark}} \fi % \end{macrocode} % \end{macro} +% \end{macro} % % \begin{macro}{\subparagraph} % @@ -3549,7 +3759,7 @@ \rightmargin=0pt \leftmargin=5\zw}\item[]}{\end{list}\vspace{\baselineskip}} % -%<*article|kiyou> +%<*article|report|kiyou> \newbox\@abstractbox \if@titlepage \newenvironment{abstract}{% @@ -3598,7 +3808,7 @@ \endlist \fi} \fi -% +% %<*jspf> \newbox\@abstractbox \newenvironment{abstract}{% @@ -3706,16 +3916,24 @@ % % タイトルを独立のページに出力するのに使われます。 % +% [2017-02-24] コミュニティ版\pLaTeX の標準クラス2017/02/15に合わせて, +% bookクラスでタイトルを必ず奇数ページに送るようにしました。といっても, +% 横組クラスしかありませんでしたので,従来の挙動は何も変わっていません。 +% また,book以外の場合のページ番号のリセットもコミュニティ版\pLaTeX の +% 標準クラス2017/02/15に合わせましたが,こちらも片面印刷あるいは +% 独立のタイトルページを作らないクラスばかりでしたので,従来の挙動は +% 何も変わらずに済みました。 +% % \begin{macrocode} \newenvironment{titlepage}{% -% \cleardoublepage +% \pltx@cleartooddpage %% 2017-02-24 \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else @@ -3731,7 +3949,7 @@ % 本文と付録を分離するコマンドです。 % % \begin{macrocode} -%<*!book> +%<*!book&!report> \newcommand{\appendix}{\par \setcounter{section}{0}% \setcounter{subsection}{0}% @@ -3740,15 +3958,15 @@ % \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|report> \newcommand{\appendix}{\par \setcounter{chapter}{0}% \setcounter{section}{0}% \gdef\@chapapp{\appendixname}% \gdef\@chappos{}% \gdef\thechapter{\@Alph\c@chapter}} -% +% % \end{macrocode} % \end{macro} % @@ -3840,12 +4058,12 @@ % 数式番号を出力するコマンドです。 % % \begin{macrocode} -%\renewcommand \theequation {\@arabic\c@equation} -%<*book> +%\renewcommand \theequation {\@arabic\c@equation} +%<*book|report> \@addtoreset{equation}{chapter} \renewcommand\theequation {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation} -% +% % \end{macrocode} % \end{macro} % @@ -3909,15 +4127,15 @@ % 図番号を出力するコマンドです。 % % \begin{macrocode} -%<*!book> +%<*!book&!report> \newcounter{figure} \renewcommand \thefigure {\@arabic\c@figure} -% -%<*book> +% +%<*book|report> \newcounter{figure}[chapter] \renewcommand \thefigure {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure} -% +% % \end{macrocode} % \end{macro} % \end{macro} @@ -3968,15 +4186,15 @@ % ここではオリジナルのままにしています。 % % \begin{macrocode} -%<*!book> +%<*!book&!report> \newcounter{table} \renewcommand\thetable{\@arabic\c@table} -% -%<*book> +% +%<*book|report> \newcounter{table}[chapter] \renewcommand \thetable {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table} -% +% % \end{macrocode} % \end{macro} % \end{macro} @@ -4275,8 +4493,8 @@ \newcommand\@pnumwidth{1.55em} \newcommand\@tocrmarg{2.55em} \newcommand\@dotsep{4.5} -%\setcounter{tocdepth}{2} -%\setcounter{tocdepth}{1} +%\setcounter{tocdepth}{2} +%\setcounter{tocdepth}{1} % \end{macrocode} % \end{macro} % \end{macro} @@ -4296,7 +4514,7 @@ % \begin{macrocode} \newdimen\jsc@tocl@width \newcommand{\tableofcontents}{% -%<*book> +%<*book|report> \settowidth\jsc@tocl@width{\headfont\prechaptername\postchaptername}% \settowidth\@tempdima{\headfont\appendixname}% \ifdim\jsc@tocl@width<\@tempdima \setlength\jsc@tocl@width{\@tempdima}\fi @@ -4308,17 +4526,17 @@ \fi \chapter*{\contentsname}% \@mkboth{\contentsname}{}% -% -%<*!book> +% +%<*!book&!report> \settowidth\jsc@tocl@width{\headfont\presectionname\postsectionname}% \settowidth\@tempdima{\headfont\appendixname}% \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}% -% +% \@starttoc{toc}% -% \if@restonecol\twocolumn\fi +% \if@restonecol\twocolumn\fi } % \end{macrocode} % \end{macro}\end{macro} @@ -4330,8 +4548,8 @@ % \begin{macrocode} \newcommand*{\l@part}[2]{% \ifnum \c@tocdepth >-2\relax -% \addpenalty\@secpenalty -% \addpenalty{-\@highpenalty}% +% \addpenalty\@secpenalty +% \addpenalty{-\@highpenalty}% \addvspace{2.25em \@plus\jsc@mpt}% \begingroup \parindent \z@ @@ -4344,8 +4562,8 @@ \setlength\@lnumwidth{4\zw}% #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par \nobreak -% \global\@nobreaktrue -% \everypar{\global\@nobreakfalse\everypar{}}% +% \global\@nobreaktrue +% \everypar{\global\@nobreakfalse\everypar{}}% \endgroup \fi} % \end{macrocode} @@ -4359,7 +4577,7 @@ % 決めるようにしてみました。(by ts) % % \begin{macrocode} -%<*book> +%<*book|report> \newcommand*{\l@chapter}[2]{% \ifnum \c@tocdepth >\m@ne \addpenalty{-\@highpenalty}% @@ -4378,7 +4596,7 @@ \penalty\@highpenalty \endgroup \fi} -% +% % \end{macrocode} % \end{macro} % @@ -4387,7 +4605,7 @@ % 節の目次です。 % % \begin{macrocode} -%<*!book> +%<*!book&!report> \newcommand*{\l@section}[2]{% \ifnum \c@tocdepth >\z@ \addpenalty{\@secpenalty}% @@ -4404,14 +4622,14 @@ #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par \endgroup \fi} -% +% % \end{macrocode} % % インデントと幅はそれぞれ1.5em,2.3emでしたが, % |1\zw|,|3.683\zw|に変えました。 % % \begin{macrocode} -% % \newcommand*{\l@section}{\@dottedtocline{1}{1\zw}{3.683\zw}} +% % \newcommand*{\l@section}{\@dottedtocline{1}{1\zw}{3.683\zw}} % \end{macrocode} % % [2013-12-30] 上のインデントは |\jsc@tocl@width| から決めるように @@ -4431,7 +4649,7 @@ % してみました。(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}} @@ -4454,8 +4672,8 @@ \newcommand*{\l@subparagraph}{% \@tempdima\jsc@tocl@width \advance\@tempdima 2\zw \@dottedtocline{5}{\@tempdima}{6\zw}} -% -%<*book> +% +%<*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}} @@ -4475,7 +4693,7 @@ \newcommand*{\l@subparagraph}{% \@tempdima\jsc@tocl@width \advance\@tempdima 16.183\zw \@dottedtocline{5}{\@tempdima}{6.5\zw}} -% +% % \end{macrocode} % \end{macro} % \end{macro} @@ -4500,11 +4718,24 @@ % \end{macro} % % \begin{macro}{\@dottedtocline} +% \begin{macro}{\jsTocLine} % % \LaTeX 本体(\texttt{ltsect.dtx} 参照)での定義と同じですが, % |\@tempdima| を |\@lnumwidth| に変えています。 % +% [2018-06-23] デフォルトでは\jsTocLine のようにベースラインになります。\par +% これを変更可能にするため,|\jsTocLine| というマクロに切り出しました。 +% 例えば,仮想ボディの中央 +% {\renewcommand{\jsTocLine}{\leaders \hbox {\hss ・\hss}\hfill}\jsTocLine} +% に変更したい場合は +%\begin{verbatim} +% \renewcommand{\jsTocLine}{\leaders \hbox {\hss ・\hss}\hfill} +%\end{verbatim} +% とします。 +% % \begin{macrocode} +\def\jsTocLine{\leaders\hbox{% + $\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill} \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else \vskip \z@ \@plus.2\jsc@mpt {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip @@ -4514,11 +4745,11 @@ \@lnumwidth #3\relax \advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip {#4}\nobreak - \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep - mu$}\hfill \nobreak\hb@xt@\@pnumwidth{% + \jsTocLine \nobreak\hb@xt@\@pnumwidth{% \hfil\normalfont \normalcolor #5}\par}\fi} % \end{macrocode} % \end{macro} +% \end{macro} % % \paragraph{図目次と表目次} % @@ -4528,18 +4759,18 @@ % % \begin{macrocode} \newcommand{\listoffigures}{% -%<*book> +%<*book|report> \if@twocolumn\@restonecoltrue\onecolumn \else\@restonecolfalse\fi \chapter*{\listfigurename}% \@mkboth{\listfigurename}{}% -% -%<*!book> +% +%<*!book&!report> \section*{\listfigurename}% \@mkboth{\listfigurename}{\listfigurename}% -% +% \@starttoc{lof}% -% \if@restonecol\twocolumn\fi +% \if@restonecol\twocolumn\fi } % \end{macrocode} % \end{macro} @@ -4559,18 +4790,18 @@ % % \begin{macrocode} \newcommand{\listoftables}{% -%<*book> +%<*book|report> \if@twocolumn\@restonecoltrue\onecolumn \else\@restonecolfalse\fi \chapter*{\listtablename}% \@mkboth{\listtablename}{}% -% -%<*!book> +% +%<*!book&!report> \section*{\listtablename}% \@mkboth{\listtablename}{\listtablename}% -% +% \@starttoc{lot}% -% \if@restonecol\twocolumn\fi +% \if@restonecol\twocolumn\fi } % \end{macrocode} % \end{macro} @@ -4616,8 +4847,8 @@ \subsubsection*{\refname}\@mkboth{\refname}{\refname}% \vspace{0.5\baselineskip} % -% \chapter*{\bibname}\@mkboth{\bibname}{}% -% \addcontentsline{toc}{chapter}{\bibname}% +% \chapter*{\bibname}\@mkboth{\bibname}{}% +% \addcontentsline{toc}{chapter}{\bibname}% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth @@ -4682,17 +4913,17 @@ % で囲んでください。 % % \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} % @@ -4726,28 +4957,28 @@ \fi \columnseprule.4pt \columnsep 2\zw \ifx\multicols\@undefined -% \twocolumn[\@makeschapterhead{\indexname}% -% \addcontentsline{toc}{chapter}{\indexname}]% -% \def\presectionname{}\def\postsectionname{}% -% \twocolumn[\section*{\indexname}]% +% \twocolumn[\@makeschapterhead{\indexname}% +% \addcontentsline{toc}{chapter}{\indexname}]% +% \def\presectionname{}\def\postsectionname{}% +% \twocolumn[\section*{\indexname}]% \else \ifdim\textwidth<\fullwidth \setlength{\evensidemargin}{\oddsidemargin} \setlength{\textwidth}{\fullwidth} \setlength{\linewidth}{\fullwidth} -% \begin{multicols}{3}[\chapter*{\indexname}% -% \addcontentsline{toc}{chapter}{\indexname}]% -% \def\presectionname{}\def\postsectionname{}% -% \begin{multicols}{3}[\section*{\indexname}]% +% \begin{multicols}{3}[\chapter*{\indexname}% +% \addcontentsline{toc}{chapter}{\indexname}]% +% \def\presectionname{}\def\postsectionname{}% +% \begin{multicols}{3}[\section*{\indexname}]% \else -% \begin{multicols}{2}[\chapter*{\indexname}% -% \addcontentsline{toc}{chapter}{\indexname}]% -% \def\presectionname{}\def\postsectionname{}% -% \begin{multicols}{2}[\section*{\indexname}]% +% \begin{multicols}{2}[\chapter*{\indexname}% +% \addcontentsline{toc}{chapter}{\indexname}]% +% \def\presectionname{}\def\postsectionname{}% +% \begin{multicols}{2}[\section*{\indexname}]% \fi \fi -% \@mkboth{\indexname}{}% -% \@mkboth{\indexname}{\indexname}% +% \@mkboth{\indexname}{}% +% \@mkboth{\indexname}{\indexname}% \plainifnotempty % \thispagestyle{plain} \parindent\z@ \parskip\z@ \@plus .3\jsc@mpt\relax @@ -4854,6 +5085,11 @@ % [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} @@ -4861,7 +5097,7 @@ % 「注1」の形式にするには次のようにしてください。 % % \begin{macrocode} -% \def\thefootnote{\ifnum\c@footnote>\z@注\kern0.1\zw\@arabic\c@footnote\fi} +% \def\thefootnote{\ifnum\c@footnote>\z@ 注\kern0.1\zw\@arabic\c@footnote\fi} % \end{macrocode} % % \end{macro} @@ -4882,8 +5118,10 @@ % % 脚注番号は章ごとにリセットされます。 % +% [2018-03-11] |\next|などいくつかの内部命令を |\jsc@...| 付きの +% ユニークな名前にしました。 % \begin{macrocode} -%\@addtoreset{footnote}{chapter} +%\@addtoreset{footnote}{chapter} % \end{macrocode} % \end{macro} % @@ -4893,6 +5131,8 @@ % Jeremy Gibbons, \textit{\TeX\ and TUG NEWS}, % Vol.~2, No.~4 (1993), p.~9) % +% [2018-03-11] |\next|などいくつかの内部命令を |\jsc@...| 付きの +% ユニークな名前にしました。 % \begin{macrocode} \long\def\@footnotetext{% \insert\footins\bgroup @@ -4907,12 +5147,12 @@ \color@begingroup \@makefntext{% \rule\z@\footnotesep\ignorespaces}% - \futurelet\next\fo@t} -\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t - \else \let\next\f@t\fi \next} -\def\f@@t{\bgroup\aftergroup\@foot\let\next} -\def\f@t#1{#1\@foot} -\def\@foot{\@finalstrut\strutbox\color@endgroup\egroup} + \futurelet\jsc@next\jsc@fo@t} +\def\jsc@fo@t{\ifcat\bgroup\noexpand\jsc@next \let\jsc@next\jsc@f@@t + \else \let\jsc@next\jsc@f@t\fi \jsc@next} +\def\jsc@f@@t{\bgroup\aftergroup\jsc@@foot\let\jsc@next} +\def\jsc@f@t#1{#1\jsc@@foot} +\def\jsc@@foot{\@finalstrut\strutbox\color@endgroup\egroup} % \end{macrocode} % \end{macro} % @@ -4965,10 +5205,13 @@ % する機能がありますが,|\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 @@ -5011,7 +5254,7 @@ \else \clubpenalty \@clubpenalty \everypar{}% - \fi\@inhibitglue}% + \fi\ltjfakeparbegin}% \if@noitemarg \@noitemargfalse \if@nmbrlist @@ -5042,6 +5285,9 @@ % % しかし単に戻すだけでも駄目みたいなので,ここでも最後にグルーを消しておきます。 % +% [2016-12-05 LTJ] 本家[2016-11-29],lltjcore.styでの変更に追従させます. +% +% [2017-02-18 LTJ] lltjcore.sty側で戻したのを忘れていました. % \begin{macrocode} \def\@gnewline #1{% \ifvmode @@ -5058,7 +5304,6 @@ % % [2016-07-14] ロゴの定義は\texttt{jslogo}パッケージに移転しました。 % 後方互換のため,\texttt{jsclasses}ではデフォルトでこれを読み込みます。 -% % \texttt{nojslogo}オプションが指定されている場合は読み込みません。 % % [2016-07-21 LTJ] \texttt{jsclasses} とLua\TeX-jaの更新タイミングが一致しない可能性を考慮し, @@ -5295,8 +5540,8 @@ % \begin{macrocode} \newcommand{\prepartname}{\if@english Part~\else 第\fi} \newcommand{\postpartname}{\if@english\else 部\fi} -%\newcommand{\prechaptername}{\if@english Chapter~\else 第\fi} -%\newcommand{\postchaptername}{\if@english\else 章\fi} +%\newcommand{\prechaptername}{\if@english Chapter~\else 第\fi} +%\newcommand{\postchaptername}{\if@english\else 章\fi} \newcommand{\presectionname}{}% 第 \newcommand{\postsectionname}{}% 節 % \end{macrocode} @@ -5355,8 +5600,13 @@ % \paragraph{今日の日付} % % \LaTeX で処理した日付を出力します。 -% |ltjarticle| などと違って,標準を西暦にし,余分な空白が入らないように改良しました。 +% ^^A |jarticle| などと違って,標準を西暦にし, +% ^^A 余分な空白が入らないように改良しました。 +% ^^A -- 2018年7月以降は |jarticle| なども標準が西暦, +% ^^A -- 2019年4月以降は余分な空白が入らなくなっています。 % 和暦にするには |\和暦| と書いてください。 +% ちなみにこの文章の作成日は西暦では{\西暦\today}で, +% 和暦では{\和暦\today}です。 % % \begin{macro}{\today} % \begin{macrocode} @@ -5364,23 +5614,42 @@ \def\西暦{\西暦true} \def\和暦{\西暦false} \newcount\heisei \heisei\year \advance\heisei-1988\relax +\def\pltx@today@year@#1{% + \ifnum\numexpr\year-#1=1 元\else + \ifnum\ltjgetparameter{direction}=3 + \kansuji\numexpr\year-#1\relax + \else + \number\numexpr\year-#1\relax\nobreak + \fi + \fi 年 +} +\def\pltx@today@year{% + \ifnum\numexpr\year*10000+\month*100+\day<19890108 + 昭和\pltx@today@year@{1925}% + \else\ifnum\numexpr\year*10000+\month*100+\day<20190501 + 平成\pltx@today@year@{1988}% + \else + 令和\pltx@today@year@{2018}% + \fi\fi} \def\today{% \if@english \ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year + \else\if西暦 + \ifnum\ltjgetparameter{direction}=3 \kansuji\year + \else\number\year\nobreak\fi 年 \else - \if西暦 - \number\year 年 - \number\month 月 - \number\day 日 - \else - 平成\number\heisei 年 - \number\month 月 - \number\day 日 - \fi - \fi} + \pltx@today@year + \fi + \ifnum\ltjgetparameter{direction}=3 + \kansuji\month 月 + \kansuji\day 日 + \else + \number\month\nobreak 月 + \number\day\nobreak 日 + \fi\fi} % \end{macrocode} % \end{macro} % @@ -5395,12 +5664,19 @@ % \paragraph{ページ設定} % % ページ設定の初期化です。 +% |stfloats|パッケージがシステムにインストールされている場合は、このパッケージを使って +% \pLaTeX の標準時と同じようにボトムフロートの下に脚注が組まれるようにします。 % +% [2017-02-19] \pLaTeX とLua\TeX-jaの|\@makecol|が違うことを +% 考慮していませんでした。 % \begin{macrocode} -%\if@slide \pagestyle{empty} \else \pagestyle{plain} \fi +%
\if@slide \pagestyle{empty} \else \pagestyle{plain} \fi %\if@report \pagestyle{plain} \else \pagestyle{headings} \fi +%\pagestyle{plain} %\pagestyle{headings} \pagenumbering{arabic} +\fnfixbottomtrue % 2017-02-19 +\IfFileExists{stfloats.sty}{\RequirePackage{stfloats}\fnbelowfloat}{} \if@twocolumn \twocolumn \sloppy @@ -5414,7 +5690,7 @@ \renewcommand\familydefault{\sfdefault} \raggedright \ltj@setpar@global - \ltjsetxkanjiskip{0.1em}\relax + \ltjsetxkanjiskip0.1em\relax \fi % \end{macrocode} %