From 9444430d73ece7ecf9adaf5b3f4ee373896f95be Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 21 Sep 2018 21:06:46 +0000 Subject: platex-tools (21sep18) git-svn-id: svn://tug.org/texlive/trunk@48722 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/platex-tools/README.md | 2 +- .../texmf-dist/doc/latex/platex-tools/plarray.pdf | Bin 61438 -> 61348 bytes .../texmf-dist/doc/latex/platex-tools/plarray.tex | 4 +- .../doc/latex/platex-tools/plextarray.pdf | Bin 86809 -> 86879 bytes .../doc/latex/platex-tools/plextarray.tex | 9 +-- .../doc/latex/platex-tools/pxatbegshi.pdf | Bin 57178 -> 68491 bytes .../doc/latex/platex-tools/pxatbegshi.tex | 13 +++- .../texmf-dist/tex/latex/platex-tools/plarray.sty | 16 ++--- .../tex/latex/platex-tools/plextarray.sty | 16 +++-- .../tex/latex/platex-tools/plextdelarray.sty | 2 +- .../tex/latex/platex-tools/pxatbegshi.sty | 66 ++++++++++++++------- 11 files changed, 80 insertions(+), 48 deletions(-) diff --git a/Master/texmf-dist/doc/latex/platex-tools/README.md b/Master/texmf-dist/doc/latex/platex-tools/README.md index bd2718be768..f39ac340072 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/README.md +++ b/Master/texmf-dist/doc/latex/platex-tools/README.md @@ -74,6 +74,6 @@ the 3-clause BSD license (see [LICENSE](./LICENSE)). ## Release Date -2018-09-18 +2018-09-21 Hironobu Yamashita diff --git a/Master/texmf-dist/doc/latex/platex-tools/plarray.pdf b/Master/texmf-dist/doc/latex/platex-tools/plarray.pdf index a4f3901336b..4f706b73c9a 100644 Binary files a/Master/texmf-dist/doc/latex/platex-tools/plarray.pdf and b/Master/texmf-dist/doc/latex/platex-tools/plarray.pdf differ diff --git a/Master/texmf-dist/doc/latex/platex-tools/plarray.tex b/Master/texmf-dist/doc/latex/platex-tools/plarray.tex index f7f60fc0cc0..fdb95faf3ec 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/plarray.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/plarray.tex @@ -60,7 +60,7 @@ This package is part of \textsf{platex-tools} bundle: \begin{tabular}{|>{$}c<{$}|c|}\hline \exp(x) & 指数関数 \\ \hline \log(x) & 対数関数 \\ \hline - \end{tabular} + \end{tabular}% 終わり \end{document} \end{verbatim} @@ -70,7 +70,7 @@ This package is part of \textsf{platex-tools} bundle: \begin{tabular}{|>{$}c<{$}|c|}\hline \exp(x) & 指数関数 \\ \hline \log(x) & 対数関数 \\ \hline - \end{tabular} + \end{tabular}% 終わり \end{minipage} \bigskip diff --git a/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf b/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf index 7f6bfa30bc2..f62132a5cb7 100644 Binary files a/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf and b/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf differ diff --git a/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex b/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex index c5261112fcb..47e1f68e1f8 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex @@ -38,6 +38,7 @@ environments by adding \texttt{} option, which specifies the writing direction: \begin{verbatim} \begin{tabular}[pos]{table spec} ... \end{tabular} + \begin{tabular*}{width}[pos]{table spec} ... \end{tabular*} \begin{array}[pos]{table spec} ... \end{array} \end{verbatim} The option \texttt{} permits one of the following three values. @@ -91,7 +92,7 @@ p\LaTeX の拡張パッケージである\textsf{plext}パッケージと互換 \begin{tabular}{|>{$}c<{$}|c|}\hline \exp(x) & 指数関数 \\ \hline \log(x) & 対数関数 \\ \hline - \end{tabular} + \end{tabular}% 終わり \end{document} \end{verbatim} @@ -101,7 +102,7 @@ p\LaTeX の拡張パッケージである\textsf{plext}パッケージと互換 \begin{tabular}{|>{$}c<{$}|c|}\hline \exp(x) & 指数関数 \\ \hline \log(x) & 対数関数 \\ \hline - \end{tabular} + \end{tabular}% 終わり \end{minipage} @@ -127,7 +128,7 @@ p\LaTeX の拡張パッケージである\textsf{plext}パッケージと互換 みかん & 150円 & 和歌山県 \\ \hline パイナップル & 400円 & 沖縄県 \\ \hline バナナ & 190円 & フィリピン \\ \hline - \end{tabular} + \end{tabular}% 終わり \end{document} \end{verbatim} @@ -142,7 +143,7 @@ p\LaTeX の拡張パッケージである\textsf{plext}パッケージと互換 みかん & 150円 & 和歌山県 \\ \hline パイナップル & 400円 & 沖縄県 \\ \hline バナナ & 190円 & フィリピン \\ \hline -\end{tabular} +\end{tabular}% 終わり \end{minipage} \bigskip diff --git a/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf b/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf index d67774c577c..afa389cd08a 100644 Binary files a/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf and b/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf differ diff --git a/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex b/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex index cf5af4c9979..c69b1b6ab98 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex @@ -35,10 +35,12 @@ This package is part of \textsf{platex-tools} bundle: Heiko Oberdiek氏による\textsf{atbegshi}パッケージは \verb+\AtBeginShipout{...}+というコマンドを提供しますが、これを p\LaTeX の縦組クラス(tarticle.clsなど)で使うとエラーが出てしまいます -\footnote{単に縦組クラスで\textsf{pxatbegshi}パッケージを読み込んだだけ +\footnote{単に縦組クラスで\textsf{atbegshi}パッケージを読み込んだだけ では、エラーは出ないようです。}。 この\textsf{pxatbegshi}パッケージは、縦組クラスでも \textsf{atbegshi}パッケージの機能を使えるようにするためのものです。 +もちろん、横組クラスで\textsf{pxatbegshi}パッケージを使用しても +問題は起きません。 使いかたは、\textsf{atbegshi}パッケージの代わりに、あるいは \textsf{atbegshi}パッケージに追加して、\textsf{pxatbegshi}パッケージを @@ -58,9 +60,12 @@ p\LaTeX の縦組クラス(tarticle.clsなど)で使うとエラーが出て \section*{謝辞} -本パッケージの実装は、北川さん(Hironori Kitagawa)さんによる +本パッケージの実装には、Takayuki Yato (ZR) 氏による +\textsf{bxpapersize}パッケージを参考にしました +\footnote{2018/09/21 v0.3までは北川さん (Hironori Kitagawa) による 「\verb+\AtBegShi@Output+の処理を強引に横組でやらせるコード」 -をベースにしています。 +をベースにしていましたが、v0.4で\verb+\AtBeginShipoutDiscard+へ +対応させる改修を機に、書き直しました。}。 \section*{References} @@ -70,6 +75,8 @@ p\LaTeX の縦組クラス(tarticle.clsなど)で使うとエラーが出て \item \relax[tex-jp-build] [ptex] ページ・数式の組方向 (※北川さんのコードの初出)\\ \texttt{https://github.com/texjporg/tex-jp-build/issues/21} +\item CTAN: Package \textsf{bxpapersize}\\ + \texttt{https://ctan.org/pkg/bxpapersize} \end{itemize} \end{document} diff --git a/Master/texmf-dist/tex/latex/platex-tools/plarray.sty b/Master/texmf-dist/tex/latex/platex-tools/plarray.sty index 62221391eb3..4dd658f2cf6 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/plarray.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/plarray.sty @@ -14,15 +14,15 @@ \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{plarray} - [2018/09/18 v0.1f Tabular extension package for pLaTeX/upLaTeX] + [2018/09/20 v0.1g Tabular extension package for pLaTeX/upLaTeX] \RequirePackage{array} %% patching internal code for array.sty % %% remove extra \xkanjiskip (pLaTeX2e 2016/04/17) \@ifl@t@r{\pfmtversion}{2016/04/17} - {\expandafter\@firstoftwo} - {\expandafter\@secondoftwo} + {\expandafter\@firstofone} + {\expandafter\@gobble} {% = for pLaTeX2e 2016/04/17 or newer \def\@tabular{% \leavevmode \null @@ -32,14 +32,11 @@ \def\endtabular{\endarray $\egroup\null} \expandafter \let \csname endtabular*\endcsname = \endtabular }% = -{% = for pLaTeX2e 2006/11/10 or older -% nothing to be done -}% = % %% inhibit JFM glue around tabular cell components (pLaTeX2e 2018/03/09) \@ifl@t@r{\pfmtversion}{2017/07/29} - {\expandafter\@firstoftwo} - {\expandafter\@secondoftwo} + {\expandafter\@firstofone} + {\expandafter\@gobble} {% = for pLaTeX2e 2017/07/29 or newer % first, provide old definition; there are some known incompatibility % compared to LaTeX, pLaTeX or array @@ -59,9 +56,6 @@ \fi \fi }% = -{% = for pLaTeX2e 2017/05/05 or older -% nothing to be done -}% = % %% done diff --git a/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty b/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty index cc837edc6c5..3e1f3c207c6 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty @@ -9,24 +9,30 @@ % * array.sty in latex-tools % (2016/10/06 v2.4d -- 2018/09/13 v2.4i) % * plext.sty in platex -% (2001/09/26 v1.2 -- 2018/09/09 v1.2i) +% (2001/09/26 v1.2 -- 2018/09/20 v1.2j) % Largely based on lltjext.sty from LuaTeX-ja project. % \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{plextarray} - [2018/09/18 v1.1b Tabular extension package for plext and array] + [2018/09/20 v1.1c Tabular extension package for plext and array] \RequirePackage{plext} \RequirePackage{plarray} %% save definitions from array.sty +% the option will be handled later in \@tabarray \def\array{\col@sep\arraycolsep \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\def\@halignto{}% \@tabarray} \def\tabular{\def\@halignto{}\@tabular} -\expandafter\def\csname tabular*\endcsname#1{% - \setlength\dimen@{#1}% - \edef\@halignto{to\the\dimen@}\@tabular} +%% merged definitions from array.sty and plext.sty +% take option first as in plext.sty, +% which will be passed to \@tabarray +\@namedef{tabular*}{\@ifnextchar<%> + {\p@stabular}{\p@stabular}} +\def\p@stabular<#1>#2{% + \setlength\dimen@{#2}% + \edef\@halignto{to\the\dimen@}\@tabular<#1>} %% patching internal code for array.sty and plext.sty % diff --git a/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty b/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty index 57682c7fd83..03b6a1ccfff 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/plextdelarray.sty @@ -9,7 +9,7 @@ % * delarray.sty in latex-tools % (2014/10/28 v1.01) % * plext.sty in platex -% (2001/09/26 v1.2 -- 2018/09/09 v1.2i) +% (2001/09/26 v1.2 -- 2018/09/20 v1.2j) % \NeedsTeXFormat{pLaTeX2e} diff --git a/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty b/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty index 91e107dc790..577bfed6370 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty @@ -1,17 +1,19 @@ % % pxatbegshi.sty -% based on H. Kitagawa's code on GitHub:texjporg/tex-jp-build#21 -% and modified by Hironobu Yamashita +% written by Hironobu Yamashita (@aminophen) % -% This package is distributed as part of the platex-tools bundle -% maintained by Hironobu Yamashita +% This package is part of the platex-tools bundle. % https://github.com/aminophen/platex-tools % +% Largely based on bxpapersize.sty by T. Yato. +% Previous versions were largely based on H. Kitagawa's +% code on GitHub:texjporg/tex-jp-build#21. +% %% package declaration \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{pxatbegshi} - [2017/11/04 v0.2 Patch to atbegshi for (u)pLaTeX] + [2018/09/21 v0.4 Patch to atbegshi for (u)pLaTeX] %% preparations \def\pxabgs@pkgname{pxatbegshi} @@ -43,34 +45,56 @@ %--------------------------------------- -% concept: execute all hooks inside yoko direction \vbox - +%% patch \AtBegShi@Output +% concept: execute all hooks in temporary yoko direction, +% by prepending \yoko and switching back to the original +% % prepare \let\pxabgs@AtBegShi@Output\AtBegShi@Output -% try first patch +% first, check hooks inserted by bxpapersize.sty +% -> if detected, nothing to do \pxabgs@patch@cmd\pxabgs@AtBegShi@Output - {\let\AtBegShi@OrgProtect\protect}% - {\setbox8\vbox\bgroup\yoko\let\AtBegShi@OrgProtect\protect} -\ifx\pxabgs@fragment\relax % failure - \let\pxabgs@AtBegShi@Output\relax -\else % success, try second patch + {\bxpr@ABS@prehook}{\bxpr@ABS@prehook}% +\ifx\pxabgs@fragment\relax\else % found \pxabgs@patch@cmd\pxabgs@AtBegShi@Output - {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox}% - {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox\egroup} - \ifx\pxabgs@fragment\relax % failure + {\bxpr@ABS@posthook}{\bxpr@ABS@posthook}% + \ifx\pxabgs@fragment\relax\else % found \let\pxabgs@AtBegShi@Output\relax \fi \fi -% commit the change only when successful -\ifx\pxabgs@AtBegShi@Output\relax - \pxabgs@warn{Failed in patching \string\AtBegShi@Output} -\else +% -> if not detected, prepend/append hooks +\ifx\pxabgs@AtBegShi@Output\relax\else + \expandafter\def\expandafter\pxabgs@AtBegShi@Output\expandafter{% + \expandafter\pxabgs@ABS@prehook + \pxabgs@AtBegShi@Output + \pxabgs@ABS@posthook + } + % adjust for atbegshi.sty on non-e-TeX ... + % (for e-TeX, this patch should fail but does nothing!) + \pxabgs@patch@cmd\pxabgs@AtBegShi@Output + {\pxabgs@ABS@prehook\egroup\endgroup} + {\egroup\endgroup\pxabgs@ABS@prehook}% + % commit the change \global\let\AtBegShi@Output\pxabgs@AtBegShi@Output \fi +% +%% done + +%--------------------------------------- done \endgroup %% internal macros are no longer effective -%--------------------------------------- done +%% hooks +\let\pxabgs@restore@dir\relax +\def\pxabgs@ABS@prehook{% + \iftdir + \yoko + \let\pxabgs@restore@dir\tate + \else + \let\pxabgs@restore@dir\relax + \fi} +\def\pxabgs@ABS@posthook{\pxabgs@restore@dir} + \endinput %% EOF -- cgit v1.2.3