summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-02-21 00:35:20 +0000
committerKarl Berry <karl@freefriends.org>2017-02-21 00:35:20 +0000
commit3bbc63d38cf997ca6f9ca5700f4f9f98b014e0d9 (patch)
treef97d4d0a3999b87a34cfee47958c778979bf8eaa /Master/texmf-dist/source/luatex
parent6e8dfd310421201e3ac8847d1e8b8fa98e81c4d8 (diff)
luatexja (19feb17)
git-svn-id: svn://tug.org/texlive/trunk@43283 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex')
-rw-r--r--Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx279
-rw-r--r--Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx298
-rw-r--r--Master/texmf-dist/source/luatex/luatexja/ltjsclasses.ins1
3 files changed, 429 insertions, 149 deletions
diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
index e4afbbf29dc..495a3a658d6 100644
--- a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
+++ b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
@@ -4,6 +4,8 @@
% Original: jclasses.dtx
%
% Copyright 1995-2001 ASCII Corporation.
+% Copyright (c) 2010 ASCII MEDIA WORKS
+% Copyright (c) 2016-2017 Japanese TeX Development Community
%
% This file is part of the pLaTeX2e system.
% -----------------------------------------
@@ -91,6 +93,18 @@
% twoside and openright (sync with classes.dtx v1.4b)}
% \changes{v1.7c-ltj-12}{2017/01/17}{|\stockwidth|,~|\stockheight|をトンボオプション指定時にのみ定義
% (aminophenさん,ありがとうございます).}
+% \changes{v1.7c}{2016/12/18}{奇妙なarticleガードとコードを削除して
+% ドキュメントを追加}
+% \changes{v1.7d}{2017/02/15}{\cs{if@openleft}スイッチ追加}
+% \changes{v1.7d}{2017/02/15}{openleftオプション追加}
+% \changes{v1.7d}{2017/02/15}{\cs{cleardoublepage}の代用となる命令群を追加}
+% \changes{v1.7d}{2017/02/15}{bookクラスでtitlepageを必ず奇数ページ
+% に送るように変更}
+% \changes{v1.7d}{2017/02/15}{titlepageのページ番号を奇数ならば1に、
+% 偶数ならば0にリセットするように変更}
+% \changes{v1.7d}{2017/02/15}{縦組クラスの所属表示の番号を直立にした}
+% \changes{v1.7d-ltj-13}{2017/02/19}{縦組時クラスで|ftnright|パッケージを使うと
+% 脚注番号が上書きされ横に寝てしまう問題を修正(aminophenさん,ありがとうございます).}
% \fi
%
% \iffalse
@@ -120,7 +134,7 @@
%<11pt&bk>\ProvidesFile{ltjtbk11.clo}
%<12pt&bk>\ProvidesFile{ltjtbk12.clo}
%</tate>
- [2017/01/17 v1.7c-ltj-12
+ [2017/02/19 v1.7d-ltj-13
%<article|report|book> Standard LuaLaTeX-ja class]
%<10pt|11pt|12pt> Standard LuaLaTeX-ja file (size option)]
%<*driver>
@@ -230,7 +244,8 @@
% \end{macro}
%
% \begin{macro}{\if@openright}
-% chapterレベルを奇数ページからはじめるかどうかのスイッチです。
+% chapterレベルを右ページからはじめるかどうかのスイッチです。
+% 横組では奇数ページ、縦組では偶数ページから始まることになります。
% reportクラスのデフォルトは、``no''です。
% bookクラスのデフォルトは、``yes''です。
% \begin{macrocode}
@@ -238,6 +253,17 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\if@openleft}
+% chapterレベルを左ページからはじめるかどうかのスイッチです。
+% 日本語\TeX{}開発コミュニティ版で新たに追加されました。
+% 横組では偶数ページ、縦組では奇数ページから始まることになります。
+% reportクラスとbookクラスの両方で、デフォルトは``no''です。
+% \changes{v1.7d}{2017/02/15}{\cs{if@openleft}スイッチ追加}
+% \begin{macrocode}
+%<!article>\newif\if@openleft
+% \end{macrocode}
+% \end{macro}
+%
% \changes{v1.0c}{1995/12/25}{Macro \cs{if@openbib} removed}
%
% \begin{macro}{\if@mainmatter}
@@ -441,12 +467,15 @@
% \subsection{右左起こしオプション}
% chapterを右ページあるいは左ページから
% はじめるかどうかを指定するオプションです。
+% |openleft|オプションは日本語\TeX{}開発コミュニティによって追加されました。
+% \changes{v1.7d}{2017/02/15}{openleftオプション追加}
% \begin{macrocode}
%<!article>\if@compatibility
%<book>\@openrighttrue
%<!article>\else
-%<!article>\DeclareOption{openright}{\@openrighttrue}
-%<!article>\DeclareOption{openany}{\@openrightfalse}
+%<!article>\DeclareOption{openright}{\@openrighttrue\@openleftfalse}
+%<!article>\DeclareOption{openleft}{\@openlefttrue\@openrightfalse}
+%<!article>\DeclareOption{openany}{\@openrightfalse\@openleftfalse}
%<!article>\fi
% \end{macrocode}
%
@@ -1736,6 +1765,92 @@
% \end{macro}
%
%
+% \section{改ページ(日本語\TeX{}開発コミュニティ版のみ)}\label{sec:cleardoublepage}
+%
+% \begin{macro}{\pltx@cleartorightpage}
+% \begin{macro}{\pltx@cleartoleftpage}
+% \begin{macro}{\pltx@cleartooddpage}
+% \begin{macro}{\pltx@cleartoevenpage}
+% |\cleardoublepage|命令は、\LaTeX{}カーネルでは「奇数ページになるまでページを
+% 繰る命令」として定義されています。しかしp\LaTeX{}カーネルでは、アスキーの方針
+% により「横組では奇数ページになるまで、縦組では偶数ページになるまでページを
+% 繰る命令」に再定義されています。すなわち、p\LaTeX{}では縦組でも横組でも
+% 右ページになるまでページを繰ることになります。
+%
+% p\LaTeX{}標準クラスのbookは、横組も縦組も|openright|がデフォルトになっていて、
+% これは従来p\LaTeX{}カーネルで定義された|\cleardoublepage|を利用していました。
+% しかし、縦組で奇数ページ始まりの文書を作りたい場合もあるでしょうから、
+% コミュニティ版クラスでは以下の(非ユーザ向け)命令を追加します。
+% \begin{enumerate}
+% \item|\pltx@cleartorightpage|:右ページになるまでページを繰る命令
+% \item|\pltx@cleartoleftpage|:左ページになるまでページを繰る命令
+% \item|\pltx@cleartooddpage|:奇数ページになるまでページを繰る命令
+% \item|\pltx@cleartoevenpage|:偶数ページになるまでページを繰る命令
+% \end{enumerate}
+% \changes{v1.7d}{2017/02/15}{\cs{cleardoublepage}の代用となる命令群を追加}
+% \begin{macrocode}
+\def\pltx@cleartorightpage{\clearpage\if@twoside
+ \ifodd\c@page
+ \iftdir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \else
+ \ifydir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \fi\fi}
+\def\pltx@cleartoleftpage{\clearpage\if@twoside
+ \ifodd\c@page
+ \ifydir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \else
+ \iftdir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \fi\fi}
+% \end{macrocode}
+%
+% |\pltx@cleartooddpage|は\LaTeX{}の|\cleardoublepage|に似ていますが、
+% 上の2つに合わせるため|\thispagestyle{empty}|を追加してあります。
+% \begin{macrocode}
+\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}
+% そしてreportとbookクラスの場合は、ユーザ向け命令である|\cleardoublepage|を、
+% |openright|オプションが指定されている場合は|\pltx@cleartorightpage|に、
+% |openleft|オプションが指定されている場合は|\pltx@cleartoleftpage|に、
+% それぞれ|\let|します。|openany|の場合はp\LaTeX{}カーネルの定義のままです。
+% \begin{macrocode}
+%<*!article>
+\if@openleft
+ \let\cleardoublepage\pltx@cleartoleftpage
+\else\if@openright
+ \let\cleardoublepage\pltx@cleartorightpage
+\fi\fi
+%</!article>
+% \end{macrocode}
+% \end{macro}
+%
+%
%
% \section{ページスタイル}\label{sec:pagestyle}
% つぎの6種類のページスタイルを使用できます。
@@ -2047,7 +2162,7 @@
%
% \section{文書コマンド}
%
-% \subsubsection{表題}
+% \subsection{表題}
%
% \begin{macro}{\title}
% \begin{macro}{\author}
@@ -2076,6 +2191,84 @@
% 右起こしページ用のページパラメータでは誤った結果になります。
% 二段組スタイルでも一段組のページが作られます。
%
+% \noindent\emph{日本語\TeX{}開発コミュニティによる変更}:
+% 上にあるのはアスキー版の説明です。改めてアスキー版の挙動を整理すると、
+% 以下のようになります。
+% \begin{enumerate}
+% \item アスキー版では、タイトルページの番号を必ず1にリセットしていましたが、
+% これは正しくありません。これは、タイトルページが奇数ページ目か偶数ページ目
+% かにかかわらず、レイアウトだけ奇数ページ用が適用されてしまうからです。
+% さらに、タイトルの次のページも偶数のページ番号を持ってしまうため、両面印刷
+% で奇数ページと偶数ページが交互に出なくなるという問題もあります。
+% \item アスキー版bookクラスは、タイトルページを必ず|\cleardoublepage|で始めて
+% いました。p\LaTeX{}カーネルでの|\cleardoublepage|の定義から、縦組の既定では
+% タイトルが偶数ページ目に出ることになります。これ自体が正しくないと断定する
+% ことはできませんが、タイトルのページ番号を1にリセットすることと合わさって、
+% 偶数ページに送ったタイトルに奇数ページ用レイアウトが適用されてしまうという
+% 結果は正しくありません。
+% \end{enumerate}
+% そこで、コミュニティ版ではタイトルのレイアウトが必ず奇数ページ用になるという
+% 挙動を支持し、bookクラスではタイトルページを奇数ページ目に送ることにしました。
+% これでタイトルページが表紙らしく見えるようになります。また、reportクラスの
+% ようなタイトルが成り行きに従って出る場合には
+% \begin{itemize}
+% \item 奇数ページ目に出る場合、ページ番号を1(奇数)にリセット
+% \item 偶数ページ目に出る場合、ページ番号を0(偶数)にリセット
+% \end{itemize}
+% としました。
+%
+% 一つめの例を考えます。
+%\begin{verbatim}
+% \documentclass{tbook}
+% \title{タイトル}\author{著者}
+% \begin{document}
+% \maketitle
+% \chapter{チャプター}
+% \end{document}
+%\end{verbatim}
+% アスキー版tbookクラスでの結果は
+%\begin{verbatim}
+% 1ページ目:空白(ページ番号1は非表示)
+% 2ページ目:タイトル(奇数レイアウト、ページ番号1は非表示)
+% 3ページ目:チャプター(偶数レイアウト、ページ番号2)
+%\end{verbatim}
+% ですが、仮に最初の空白ページさえなければ
+%\begin{verbatim}
+% 1ページ目:タイトルすなわち表紙(奇数レイアウト、ページ番号1は非表示)
+% 2ページ目:チャプター(偶数レイアウト、ページ番号2)
+%\end{verbatim}
+% とみなせるため、コミュニティ版では空白ページを発生させないようにしました。
+%
+% 二つめの例を考えます。
+%\begin{verbatim}
+% \documentclass{tbook}
+% \title{タイトル}\author{著者}
+% \begin{document}
+% テスト文章
+% \maketitle
+% \chapter{チャプター}
+% \end{document}
+%\end{verbatim}
+% アスキー版tbookクラスでの結果は
+%\begin{verbatim}
+% 1ページ目:テスト文章(奇数レイアウト、ページ番号1)
+% 2ページ目:タイトル(奇数レイアウト、ページ番号1は非表示)
+% 3ページ目:チャプター(偶数レイアウト、ページ番号2)
+%\end{verbatim}
+% ですが、これでは奇数と偶数のページ番号が交互になっていないので正しく
+% ありません。そこで、コミュニティ版では
+%\begin{verbatim}
+% 1ページ目:テスト文章(奇数レイアウト、ページ番号1)
+% 2ページ目:空白ページ(ページ番号2は非表示)
+% 3ページ目:タイトル(奇数レイアウト、ページ番号1は非表示)
+% 4ページ目:チャプター(偶数レイアウト、ページ番号2)
+%\end{verbatim}
+% と直しました。
+%
+% なお、p\LaTeX~2.09互換モードはアスキー版のまま、すなわち「ページ番号をゼロに
+% 設定」としてあります。これは、横組の右起こしの挙動としては誤りですが、縦組の
+% 右起こしの挙動としては一応正しくなっているといえます。
+%
% 最初に互換モードの定義を作ります。
% \begin{macrocode}
\if@compatibility
@@ -2092,18 +2285,22 @@
% \end{macrocode}
%
% そして、\LaTeX{}ネイティブのための定義です。
++% \changes{v1.7d}{2017/02/15}{bookクラスでtitlepageを必ず奇数ページ
+% に送るように変更}
+% \changes{v1.7d}{2017/02/15}{titlepageのページ番号を奇数ならば1に、
+% 偶数ならば0にリセットするように変更}
% \begin{macrocode}
\else
\newenvironment{titlepage}
{%
-%<book> \cleardoublepage
+%<book> \pltx@cleartooddpage %% 2017/02/15
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{empty}%
- \setcounter{page}\@ne
+ \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi %% 2017/02/15
}%
{\if@restonecol\twocolumn \else \newpage \fi
% \end{macrocode}
@@ -2128,10 +2325,14 @@
% 縦組のときは、|\thanks|コマンドを|\p@thanks|に|\let|します。
% このコマンドは|\footnotetext|を使わず、直接、文字を|\@thanks|に格納
% していきます。
+%
+% 著者名の脇に表示される合印は直立した数字、注釈側は横に寝た数字となっていまし
+% たが、不自然なので|\hbox{\yoko ...}|を追加し、両方とも直立するようにしました。
+% \changes{v1.7d}{2017/02/15}{縦組クラスの所属表示の番号を直立にした}
% \begin{macrocode}
\def\p@thanks#1{\footnotemark
\protected@xdef\@thanks{\@thanks
- \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}}
+ \protect{\noindent\hbox{\yoko$\m@th^\thefootnote$}#1\protect\par}}}
% \end{macrocode}
% \end{macro}
%
@@ -2257,7 +2458,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{概要}
+% \subsection{概要}
%
% \begin{environment}{abstract}
% 要約文のための環境です。bookクラスでは使えません。
@@ -2294,7 +2495,7 @@
%
% \subsection{章見出し}
%
-% \subsection{マークコマンド}
+% \subsubsection{マークコマンド}
%
% \begin{macro}{\chaptermark}
% \begin{macro}{\sectionmark}
@@ -2470,13 +2671,16 @@
% \begin{macrocode}
%<*book>
\newcommand{\frontmatter}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\@mainmatterfalse\pagenumbering{roman}}
\newcommand{\mainmatter}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\@mainmattertrue\pagenumbering{arabic}}
\newcommand{\backmatter}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\@mainmatterfalse}
%</book>
% \end{macrocode}
@@ -2568,7 +2772,8 @@
% \begin{macrocode}
%<*report|book>
\newcommand{\part}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\thispagestyle{empty}%
\if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
\null\vfil
@@ -2672,9 +2877,11 @@
%<*report|book>
\def\@endpart{\vfil\newpage
\if@twoside
- \if@openright %% added (2016/12/18)
+ \if@openleft %% \if@openleft added (2017/02/15)
+ \null\thispagestyle{empty}\newpage
+ \else\if@openright %% \if@openright added (2016/12/18)
\null\thispagestyle{empty}\newpage
- \fi %% added (2016/12/18)
+ \fi\fi %% added (2016/12/18, 2017/02/15)
\fi
% \end{macrocode}
% 二段組文書のとき、スイッチを二段組モードに戻す必要があります。
@@ -2694,6 +2901,10 @@
% なお、縦組の場合でも右ページからはじまるように、
% フォーマットファイルで|\clerdoublepage|が定義されています。
%
+% \emph{日本語\TeX{}開発コミュニティによる補足}:コミュニティ版の実装では、
+% |openright|と|openleft|の場合に|\cleardoublepage|をクラスファイルの中で
+% 再々定義しています。\ref{sec:cleardoublepage}を参照してください。
+%
% 章見出しが出力されるページのスタイルは、\pstyle{jpl@in}になります。
% \pstyle{jpl@in}は、\pstyle{headnomble}か\pstyle{footnomble}のいずれかです。
% 詳細は、第\ref{sec:pagestyle}節を参照してください。
@@ -2703,7 +2914,8 @@
% \begin{macrocode}
%<*report|book>
\newcommand{\chapter}{%
- \if@openright\cleardoublepage\else\clearpage\fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\thispagestyle{jpl@in}%
\global\@topnum\z@
\@afterindenttrue
@@ -2715,6 +2927,12 @@
% このマクロは、章見出しに番号を付けるときに呼び出されます。
% \Lcount{secnumdepth}が$-1$よりも大きく、
% |\@mainmatter|が真(bookクラスの場合)のときに、番号を出力します。
+%
+% \emph{日本語\TeX{}開発コミュニティによる補足}:本家\LaTeX{}の
+% \file{classes}では、二段組のときチャプタータイトルは一段組に戻され
+% ますが、アスキーによる\file{jclasses}では二段組のままにされています。
+% したがって、チャプタータイトルより高い位置に右カラムの始点が来るという
+% 挙動になっていますが、コミュニティ版でもアスキー版の挙動を維持しています。
% \begin{macrocode}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
@@ -2765,11 +2983,14 @@
%
% \begin{macro}{\@schapter}
% このマクロは、章見出しに番号を付けないときに呼び出されます。
+%
+% \emph{日本語\TeX{}開発コミュニティによる補足}:やはり二段組でチャプター
+ タイトルより高い位置に右カラムの始点が来るという挙動を維持してあります。
+% \changes{v1.7c}{2016/12/18}{奇妙なarticleガードとコードを削除して
+% ドキュメントを追加}
% \begin{macrocode}
\def\@schapter#1{%
-%<article> \if@twocolumn\@topnewpage[\@makeschapterhead{#1}]\else
\@makeschapterhead{#1}\@afterheading
-%<article> \fi
}
% \end{macrocode}
% \end{macro}
@@ -4296,14 +4517,20 @@
% \end{macro}
% \end{macro}
%
+% |stfloats|パッケージがシステムにインストールされている場合は、このパッケージを使って
+% p\LaTeX の標準時と同じようにボトムフロートの下に脚注が組まれるようにします。
% \changes{v1.0d}{1996/02/29}{articleとreportのデフォルトを
% \pstyle{plain}に修正}
% \changes{v1.4}{2002/04/09}{縦組スタイルで\cs{flushbottom}しないようにした}
+% \changes{v1.7d-ltj-13}{2017/02/19}{p\LaTeX とLua\TeX-jaの|\@makecol|が違うことを
+% 考慮していなかった}
% \begin{macrocode}
%<book>\pagestyle{headings}
%<!book>\pagestyle{plain}
\pagenumbering{arabic}
\raggedbottom
+\fnfixbottomtrue % 2017-02-19
+\IfFileExists{stfloats.sty}{\RequirePackage{stfloats}\fnbelowfloat}{}
\if@twocolumn
\twocolumn
\sloppy
@@ -4334,6 +4561,20 @@
%</article|report|book>
% \end{macrocode}
%
+% \section{各種パッケージへの対応}
+% もともと縦組での利用を想定されていないいくつかのパッケージについて、
+% 補正するためのコードを記述しておきます。
+% この節のコードは|filehook|パッケージ(Lua\TeX-ja読み込み時に自動でロードされます)
+% の機能を用いています。
+%
+% \subsection{\texttt{ftnright}パッケージ}
+% 脚注番号の書式が|ftnright|パッケージによって勝手に書き換えられるので、
+% パッケージ読み込み前に予め退避しておき、読み込み後に復帰させます。
+% \changes{v1.7d}{2017/02/19}{コード追加}
+% \begin{macrocode}
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
+% \end{macrocode}
%
%
% \Finale
diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx
index bec94c00806..f64e93066c6 100644
--- a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx
+++ b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.dtx
@@ -25,7 +25,7 @@
%
% Copyright 1995-1999 ASCII Corporation.
% Copyright 1999-2016 Haruhiko Okumura
-% Copyright 2016 Japanese TeX Development Community
+% Copyright 2016-2017 Japanese TeX Development Community
% -----------------------------------------
%
% \fi
@@ -48,15 +48,16 @@
% \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>
- [2017/01/23 ltjsclasses ]
+ [2017/02/19 ltjsclasses ]
%<*driver>
\IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{}
\documentclass{ltjsarticle}
@@ -98,12 +99,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}
%
@@ -178,6 +185,7 @@
% \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}
@@ -223,7 +231,7 @@
% 書籍では真が標準です。
%
% \begin{macrocode}
-%<book>\newif\if@openright
+%<book|report>\newif\if@openright
% \end{macrocode}
% \end{macro}
%
@@ -491,8 +499,8 @@
% \texttt{openany} で偶数ページからでも始まるようになります。
%
% \begin{macrocode}
-%<book>\DeclareOption{openright}{\@openrighttrue}
-%<book>\DeclareOption{openany}{\@openrightfalse}
+%<book|report>\DeclareOption{openright}{\@openrighttrue}
+%<book|report>\DeclareOption{openany}{\@openrightfalse}
% \end{macrocode}
%
% \paragraph{eqnarray環境と数式の位置}
@@ -644,10 +652,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
@@ -676,6 +687,7 @@
% \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
@@ -701,7 +713,7 @@
% 基準となる行送りをポイント単位で表したものです。
%
% \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}
@@ -771,6 +783,9 @@
%
% [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
@@ -783,11 +798,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
@@ -795,7 +810,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
@@ -1617,6 +1632,12 @@
\setlength\footskip{\z@}
\fi
%</book>
+%<*report>
+\setlength\footskip{0.03367\paperheight}
+\ifdim\footskip<\baselineskip
+ \setlength\footskip{\baselineskip}
+\fi
+%</report>
% \end{macrocode}
% \end{macro}
%
@@ -1652,6 +1673,10 @@
\addtolength\headsep{10\jsc@mpt}%% added (2016-10-08)
\fi
%</book>
+%<*report>
+\setlength\headsep{\footskip}
+\addtolength\headsep{-\topskip}
+%</report>
%<*jspf>
\setlength\headsep{9\jsc@mmm}
\addtolength\headsep{-\topskip}
@@ -1733,6 +1758,12 @@
\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{8\jsc@mmm}
@@ -1775,7 +1806,7 @@
% なので,さらに修正しました(2016-08-17での修正漏れ)。
%
% \begin{macrocode}
-%<*article|book>
+%<*article|book|report>
\if@slide
\setlength{\textheight}{0.95\paperheight}
\else
@@ -1787,7 +1818,7 @@
\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}
@@ -2247,12 +2278,12 @@
%</article|kiyou>
% \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
@@ -2267,17 +2298,17 @@
\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}
%
% 最後は学会誌の場合です。
@@ -2311,9 +2342,9 @@
\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}
@@ -2390,7 +2421,7 @@
% にしました。
%
% \begin{macrocode}
-%<*article|book|kiyou>
+%<*article|book|report|kiyou>
\if@titlepage
\newcommand{\maketitle}{%
\begin{titlepage}%
@@ -2498,10 +2529,10 @@
{\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
@@ -2773,8 +2804,8 @@
% 番号を付けるかを決めるカウンタです。
%
% \begin{macrocode}
-%<!book>\setcounter{secnumdepth}{3}
-%<book>\setcounter{secnumdepth}{2}
+%<!book&!report>\setcounter{secnumdepth}{3}
+%<book|report>\setcounter{secnumdepth}{2}
% \end{macrocode}
% \end{macro}
%
@@ -2792,9 +2823,9 @@
%
% \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]
@@ -2832,14 +2863,14 @@
%
% \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}{%
@@ -2868,8 +2899,8 @@
% [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}
@@ -2954,23 +2985,23 @@
% \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}
-%</!book>
+%</!book&!report>
% \end{macrocode}
%
-% |book| スタイルの場合は,少し複雑です。
+% |book| および |report| クラスの場合は,少し複雑です。
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\newcommand\part{%
\if@openright
\cleardoublepage
@@ -2986,7 +3017,7 @@
\fi
\null\vfil
\secdef\@part\@spart}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
@@ -2995,11 +3026,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}%
@@ -3022,13 +3053,13 @@
\nobreak
\vskip 3ex
\@afterheading}
-%</!book>
+%</!book&!report>
% \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}%
@@ -3047,7 +3078,7 @@
\fi
\Huge \headfont #2\par}%
\@endpart}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
@@ -3056,7 +3087,7 @@
% 番号を付けない部です。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\def\@spart#1{{%
\parindent \z@ \raggedright
\interlinepenalty \@M
@@ -3065,15 +3096,15 @@
\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}
%
@@ -3089,7 +3120,7 @@
% で修正されています。
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright %% added (2016/12/13)
@@ -3101,7 +3132,7 @@
\if@restonecol
\twocolumn
\fi}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
@@ -3115,7 +3146,7 @@
% 章見出しの上に図や表が来ないようにします。
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\newcommand{\chapter}{%
\if@openright\cleardoublepage\else\clearpage\fi
\plainifnotempty % 元: \thispagestyle{plain}
@@ -3135,7 +3166,7 @@
% \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}%
@@ -3143,7 +3174,7 @@
% {\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
@@ -3169,11 +3200,11 @@
\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
@@ -3209,7 +3240,7 @@
\interlinepenalty\@M
\Huge \headfont #1\par\nobreak
\vskip 3\Cvs}} % 欧文は40pt
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
@@ -3638,7 +3669,7 @@
\rightmargin=0pt
\leftmargin=5\zw}\item[]}{\end{list}\vspace{\baselineskip}}
%</book>
-%<*article|kiyou>
+%<*article|report|kiyou>
\newbox\@abstractbox
\if@titlepage
\newenvironment{abstract}{%
@@ -3687,7 +3718,7 @@
\endlist
\fi}
\fi
-%</article|kiyou>
+%</article|report|kiyou>
%<*jspf>
\newbox\@abstractbox
\newenvironment{abstract}{%
@@ -3820,7 +3851,7 @@
% 本文と付録を分離するコマンドです。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\newcommand{\appendix}{\par
\setcounter{section}{0}%
\setcounter{subsection}{0}%
@@ -3829,15 +3860,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>
+%</!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}
%
@@ -3929,12 +3960,12 @@
% 数式番号を出力するコマンドです。
%
% \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}
%
@@ -3998,15 +4029,15 @@
% 図番号を出力するコマンドです。
%
% \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}
@@ -4057,15 +4088,15 @@
% ここではオリジナルのままにしています。
%
% \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}
@@ -4364,8 +4395,8 @@
\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}
@@ -4385,7 +4416,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
@@ -4397,17 +4428,17 @@
\fi
\chapter*{\contentsname}%
\@mkboth{\contentsname}{}%
-%</book>
-%<*!book>
+%</book|report>
+%<*!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}%
-%</!book>
+%</!book&!report>
\@starttoc{toc}%
-%<book> \if@restonecol\twocolumn\fi
+%<book|report> \if@restonecol\twocolumn\fi
}
% \end{macrocode}
% \end{macro}\end{macro}
@@ -4419,8 +4450,8 @@
% \begin{macrocode}
\newcommand*{\l@part}[2]{%
\ifnum \c@tocdepth >-2\relax
-%<!book> \addpenalty\@secpenalty
-%<book> \addpenalty{-\@highpenalty}%
+%<!book&!report> \addpenalty\@secpenalty
+%<book|report> \addpenalty{-\@highpenalty}%
\addvspace{2.25em \@plus\jsc@mpt}%
\begingroup
\parindent \z@
@@ -4433,8 +4464,8 @@
\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}
@@ -4448,7 +4479,7 @@
% 決めるようにしてみました。(by ts)
%
% \begin{macrocode}
-%<*book>
+%<*book|report>
\newcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
@@ -4467,7 +4498,7 @@
\penalty\@highpenalty
\endgroup
\fi}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
%
@@ -4476,7 +4507,7 @@
% 節の目次です。
%
% \begin{macrocode}
-%<*!book>
+%<*!book&!report>
\newcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty{\@secpenalty}%
@@ -4493,14 +4524,14 @@
#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] 上のインデントは |\jsc@tocl@width| から決めるように
@@ -4520,7 +4551,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}}
@@ -4543,8 +4574,8 @@
\newcommand*{\l@subparagraph}{%
\@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}}
@@ -4564,7 +4595,7 @@
\newcommand*{\l@subparagraph}{%
\@tempdima\jsc@tocl@width \advance\@tempdima 16.183\zw
\@dottedtocline{5}{\@tempdima}{6.5\zw}}
-%</book>
+%</book|report>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4617,18 +4648,18 @@
%
% \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}
@@ -4648,18 +4679,18 @@
%
% \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}
@@ -4705,8 +4736,8 @@
\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
@@ -4815,28 +4846,28 @@
\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\jsc@mpt\relax
@@ -4977,7 +5008,7 @@
% 脚注番号は章ごとにリセットされます。
%
% \begin{macrocode}
-%<book>\@addtoreset{footnote}{chapter}
+%<book|report>\@addtoreset{footnote}{chapter}
% \end{macrocode}
% \end{macro}
%
@@ -5138,14 +5169,14 @@
%
% [2016-12-05 LTJ] 本家[2016-11-29],lltjcore.styでの変更に追従させます.
%
+% [2017-02-18 LTJ] lltjcore.sty側で戻したのを忘れていました.
% \begin{macrocode}
\def\@gnewline #1{%
\ifvmode
\@nolnerr
\else
-%<article|book> \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \hskip\z@
-%<jspf|kiyou> \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null
- \inhibitglue \ignorespaces
+ \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null
+ \inhibitglue\ignorespaces
\fi}
% \end{macrocode}
%
@@ -5392,8 +5423,8 @@
% \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}
@@ -5492,12 +5523,19 @@
% \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
diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.ins b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.ins
index f8c000d0837..957178678cc 100644
--- a/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.ins
+++ b/Master/texmf-dist/source/luatex/luatexja/ltjsclasses.ins
@@ -6,6 +6,7 @@
\keepsilent
\generateFile{ltjsarticle.cls}{f}{\from{ltjsclasses.dtx}{article}}
\generateFile{ltjsbook.cls}{f}{\from{ltjsclasses.dtx}{book}}
+\generateFile{ltjsreport.cls}{f}{\from{ltjsclasses.dtx}{report}}
\generateFile{ltjspf.cls}{f}{\from{ltjsclasses.dtx}{jspf}}
\generateFile{ltjskiyou.cls}{f}{\from{ltjsclasses.dtx}{kiyou}}