OSDN Git Service

Fix #37004 (maybe)
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 19 Feb 2017 02:36:32 +0000 (11:36 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 19 Feb 2017 02:36:32 +0000 (11:36 +0900)
21 files changed:
src/ltjarticle.cls
src/ltjbk10.clo
src/ltjbk11.clo
src/ltjbk12.clo
src/ltjbook.cls
src/ltjclasses.dtx
src/ltjreport.cls
src/ltjsize10.clo
src/ltjsize11.clo
src/ltjsize12.clo
src/ltjtarticle.cls
src/ltjtbk10.clo
src/ltjtbk11.clo
src/ltjtbk12.clo
src/ltjtbook.cls
src/ltjtreport.cls
src/ltjtsize10.clo
src/ltjtsize11.clo
src/ltjtsize12.clo
src/patches/lltjcore.sty
src/patches/lltjp-stfloats.sty

index 40732e9..ed8dffe 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{ltjarticle}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
  Standard LuaLaTeX-ja class]
 \RequirePackage{luatexja}
 \newcounter{@paper}
 \pagestyle{plain}
 \pagenumbering{arabic}
 \raggedbottom
+\fnfixbottomtrue % 2017-02-19
 \if@twocolumn
   \twocolumn
   \sloppy
index 0c84fca..ff2f576 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjbk10.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xpt{15}%
index b7f9397..fcb183e 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjbk11.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xipt{15.5}%
index ca9fa1d..3a693df 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjbk12.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xiipt{16.5}%
index 56658e7..29cac11 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{ltjbook}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
  Standard LuaLaTeX-ja class]
 \RequirePackage{luatexja}
 \newcounter{@paper}
 \pagestyle{headings}
 \pagenumbering{arabic}
 \raggedbottom
+\fnfixbottomtrue % 2017-02-19
 \if@twocolumn
   \twocolumn
   \sloppy
index 9d8d760..4630725 100644 (file)
 % \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
 %<11pt&bk>\ProvidesFile{ltjtbk11.clo}
 %<12pt&bk>\ProvidesFile{ltjtbk12.clo}
 %</tate>
-  [2017/02/15 v1.7d-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>
 % \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}{\pLaTeX と\LuaTex-ja の|\@makecol|が違うことを
+%   考慮していなかった}
 %    \begin{macrocode}
 %<book>\pagestyle{headings}
 %<!book>\pagestyle{plain}
 \pagenumbering{arabic}
 \raggedbottom
+\fnfixbottomtrue % 2017-02-19
 \if@twocolumn
   \twocolumn
   \sloppy
 %</article|report|book>
 %    \end{macrocode}
 %
+% \section{各種パッケージへの対応}
+% もともと縦組での利用を想定されていないいくつかのパッケージについて、
+% 補正するためのコードを記述しておきます。
+% この節のコードは|filehook|パッケージ(\LuaTeX-ja読み込み時に自動でロードされます)
+% の機能を用いています。
+%
+% \subsection{\texttt{ftnright}パッケージ}
+% 脚注番号の書式が|ftnright|パッケージによって勝手に書き換えられるので、
+% パッケージ読み込み前に予め退避しておき、読み込み後に復帰させます。
+% \changes{v1.7d}{2017/02/19}{コード追加}
+%    \begin{macrocode}
+%<*tate>
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
+%</tate>
+%    \end{macrocode}
 %
 %
 % \Finale
index 68e6164..80eded0 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{ltjreport}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
  Standard LuaLaTeX-ja class]
 \RequirePackage{luatexja}
 \newcounter{@paper}
 \pagestyle{plain}
 \pagenumbering{arabic}
 \raggedbottom
+\fnfixbottomtrue % 2017-02-19
 \if@twocolumn
   \twocolumn
   \sloppy
index 2c52aed..1366174 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjsize10.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xpt{15}%
index 85f8094..2b20287 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjsize11.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xipt{15.5}%
index 8da44b5..2ae85a7 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjsize12.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xiipt{16.5}%
index 199131b..c011492 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{ltjtarticle}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
  Standard LuaLaTeX-ja class]
 \RequirePackage{luatexja}
 \newcounter{@paper}
 \pagestyle{plain}
 \pagenumbering{arabic}
 \raggedbottom
+\fnfixbottomtrue % 2017-02-19
 \if@twocolumn
   \twocolumn
   \sloppy
 \fi
 \normalmarginpar
 \@mparswitchfalse
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtarticle.cls'.
index bf18eb7..1a10e26 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjtbk10.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xpt{17}%
 \def\@listvi {\leftmargin\leftmarginvi
               \labelwidth\leftmarginvi
               \advance\labelwidth-\labelsep}
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtbk10.clo'.
index 714ed5d..f5a5fc0 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjtbk11.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xipt{17}%
 \def\@listvi {\leftmargin\leftmarginvi
               \labelwidth\leftmarginvi
               \advance\labelwidth-\labelsep}
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtbk11.clo'.
index 80f97b9..c150739 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjtbk12.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xiipt{18}%
 \def\@listvi {\leftmargin\leftmarginvi
               \labelwidth\leftmarginvi
               \advance\labelwidth-\labelsep}
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtbk12.clo'.
index 4e948c6..189647e 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{ltjtbook}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
  Standard LuaLaTeX-ja class]
 \RequirePackage{luatexja}
 \newcounter{@paper}
 \pagestyle{headings}
 \pagenumbering{arabic}
 \raggedbottom
+\fnfixbottomtrue % 2017-02-19
 \if@twocolumn
   \twocolumn
   \sloppy
 \fi
 \normalmarginpar
 \@mparswitchfalse
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtbook.cls'.
index fa9bb9b..bdd5baa 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{ltjtreport}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
  Standard LuaLaTeX-ja class]
 \RequirePackage{luatexja}
 \newcounter{@paper}
 \pagestyle{plain}
 \pagenumbering{arabic}
 \raggedbottom
+\fnfixbottomtrue % 2017-02-19
 \if@twocolumn
   \twocolumn
   \sloppy
 \fi
 \normalmarginpar
 \@mparswitchfalse
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtreport.cls'.
index a1d01ef..8fca8ff 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjtsize10.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xpt{17}%
 \def\@listvi {\leftmargin\leftmarginvi
               \labelwidth\leftmarginvi
               \advance\labelwidth-\labelsep}
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtsize10.clo'.
index a0ec23a..8b14902 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjtsize11.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xipt{17}%
 \def\@listvi {\leftmargin\leftmarginvi
               \labelwidth\leftmarginvi
               \advance\labelwidth-\labelsep}
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtsize11.clo'.
index 8c5a76f..4760f40 100644 (file)
@@ -23,7 +23,7 @@
 %% File: ltjclasses.dtx
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltjtsize12.clo}
-  [2017/02/15 v1.7d-ltj-12
+  [2017/02/19 v1.7d-ltj-13
   Standard LuaLaTeX-ja file (size option)]
 \renewcommand{\normalsize}{%
     \@setfontsize\normalsize\@xiipt{18}%
 \def\@listvi {\leftmargin\leftmarginvi
               \labelwidth\leftmarginvi
               \advance\labelwidth-\labelsep}
+\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
+\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
 \endinput
 %%
 %% End of file `ltjtsize12.clo'.
index f632fe8..2d31dcd 100644 (file)
@@ -4,7 +4,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2016/05/05 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2017/02/19 Patch to LaTeX2e Kernel for LuaTeX-ja]
 
 \def\cleardoublepage{\clearpage\if@twoside
   \ifodd\c@page
     \vbox{\yoko\unvbox \@begindvibox #1}%
 }
 
+\newif\iffnfixbottom
+\newif\ifltj@ftn@unvboxed
 %%% @makecol
 \gdef \@makecol {%
    \ifvoid\footins
+     \ltj@ftn@unvboxedfalse
      \setbox\@outputbox \box\@cclv
    \else
+     \ltj@ftn@unvboxedtrue
      \setbox\@outputbox \vbox {%
        \boxmaxdepth \@maxdepth
        \unvbox \@cclv
+       \iffnfixbottom\vskip\z@ \@plus.0001fil\fi
        \vskip \skip\footins
        \color@begingroup
          \normalcolor
    \else
      \setbox\@outputbox \vbox to\@colht {%
        \@texttop
-       \dimen@ \dp\@outputbox
+       \dimen@ \dp\@outputbox\typeout{\the\dimen@,\meaning\@textbottom}
        \unvbox \@outputbox
        \ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja
        \vskip -\dimen@
-       \@textbottom
+       \ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi
        }%
+    {\scrollmode\showboxdepth1\showboxbreadth10000
+     \tracingonline1\showbox\@outputbox\errorstopmode}
    \fi
    \global \maxdepth \@maxdepth
 }
 
+\patchcmd\@makespecialcolbox{\@textbottom}{\ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi}{}{}
+
 \def\@gnewline #1{%
   \ifvmode
     \@nolnerr
index 794db15..b5ff2a3 100644 (file)
@@ -3,16 +3,20 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-stfloats}[2017/01/19 Patch to stfloats for LuaTeX-ja]
+\ProvidesPackage{lltjp-stfloats}[2017/02/19 Patch to stfloats for LuaTeX-ja]
 
 \RequirePackage{stfloats,luatexja}
 \RequirePackage{etoolbox}
 
 \let\ltj@fn@makecol=\fn@makecol
 
-\patchcmd\fn@makecol{\vskip -\dimen@}%
+\patchcmd\fn@makecol{\vskip -\dimen@\@textbottom}%
   {\ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja
-   \vskip -\dimen@}{}{}
+   \vskip -\dimen@
+   \ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi}{}{}
+\patchcmd\fn@makecol{\vskip\skip\footins}{\iffnfixbottom\vskip\z@\@plus.0001fil\fi\vskip\skip\footins}{}{}
+\patchcmd\fn@makecol{\ifvoid\footins}{\ifvoid\footins\ltj@ftn@unvboxedfalse}{}{}
+\patchcmd\fn@makecol{\setbox\@outputbox \vbox}{\ltj@ftn@unvboxedtrue\setbox\@outputbox \vbox}{}{}
 
 \ifx\@makecol\ltj@fn@makecol
   \global\let\@makecol\fn@makecol