summaryrefslogtreecommitdiff
path: root/language/japanese/platex-tools
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-08 03:01:40 +0000
committerNorbert Preining <norbert@preining.info>2019-09-08 03:01:40 +0000
commitdce09de80c37afccb6addb25d0c7d40367059ece (patch)
tree1e4dd6a67e521ca0bc733231afc3c071a69812d9 /language/japanese/platex-tools
parent7345b8683c7cbeaedf53e992fda0b3fa6141084e (diff)
CTAN sync 201909080301
Diffstat (limited to 'language/japanese/platex-tools')
-rw-r--r--language/japanese/platex-tools/Makefile32
-rw-r--r--language/japanese/platex-tools/README.md2
-rw-r--r--language/japanese/platex-tools/pxatbegshi.pdfbin68491 -> 70954 bytes
-rw-r--r--language/japanese/platex-tools/pxatbegshi.sty88
-rw-r--r--language/japanese/platex-tools/pxatbegshi.tex10
5 files changed, 53 insertions, 79 deletions
diff --git a/language/japanese/platex-tools/Makefile b/language/japanese/platex-tools/Makefile
deleted file mode 100644
index ec3d1c5546..0000000000
--- a/language/japanese/platex-tools/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-KANJI = -kanji=utf8
-FONTMAP = -f ipaex.map -f ptex-ipaex.map
-TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)
-
-all: plarray.pdf plextarray.pdf plextdelarray.pdf \
- pxatbegshi.pdf \
- pxftnright.pdf \
- pxmulticol.pdf \
- pxxspace.pdf \
- pxeverysel.pdf \
- pxeveryshi.pdf
-
-.SUFFIXES: .tex .dvi .pdf
-.tex.dvi:
- platex $(KANJI) $<
- platex $(KANJI) $<
- rm *.aux *.log
-.dvi.pdf:
- dvipdfmx $(FONTMAP) $<
-
-.PHONY: install clean
-install:
- mkdir -p ${TEXMF}/doc/platex/platex-tools
- cp ./Makefile ${TEXMF}/doc/platex/platex-tools/
- cp ./LICENSE ${TEXMF}/doc/platex/platex-tools/
- cp ./README.md ${TEXMF}/doc/platex/platex-tools/
- cp ./*.pdf ${TEXMF}/doc/platex/platex-tools/
- cp ./*.tex ${TEXMF}/doc/platex/platex-tools/
- mkdir -p ${TEXMF}/tex/platex/platex-tools
- cp ./*.sty ${TEXMF}/tex/platex/platex-tools/
-clean:
- rm -f *.dvi *.pdf
diff --git a/language/japanese/platex-tools/README.md b/language/japanese/platex-tools/README.md
index b1d55da4cc..72fb0632cb 100644
--- a/language/japanese/platex-tools/README.md
+++ b/language/japanese/platex-tools/README.md
@@ -83,6 +83,6 @@ the 3-clause BSD license (see [LICENSE](./LICENSE)).
## Release Date
-2019-09-05
+2019-09-07
Hironobu Yamashita
diff --git a/language/japanese/platex-tools/pxatbegshi.pdf b/language/japanese/platex-tools/pxatbegshi.pdf
index afa389cd08..68527a8a2c 100644
--- a/language/japanese/platex-tools/pxatbegshi.pdf
+++ b/language/japanese/platex-tools/pxatbegshi.pdf
Binary files differ
diff --git a/language/japanese/platex-tools/pxatbegshi.sty b/language/japanese/platex-tools/pxatbegshi.sty
index 577bfed637..bbe8c49ac3 100644
--- a/language/japanese/platex-tools/pxatbegshi.sty
+++ b/language/japanese/platex-tools/pxatbegshi.sty
@@ -5,15 +5,26 @@
% 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.
+% --------------------------------------------------------------------
+% [Note]
+% Previous version (2018/09/21 v0.4) was largely based on
+% "cope with tate-direction"
+% of bxpapersize.sty 2017/05/02 v0.3a by T. Yato.
+% -- concept: execute all hooks in temporary yoko direction,
+% -- by prepending \yoko and switching back to the original
+% However, it was problematic when used with multicol.sty.
+%
+% Thus, in newer version (2019/09/07 v0.5), I reverted back to
+% the original code (2018/09/21 v0.3), which was largely based on
+% H. Kitagawa's on GitHub:texjporg/tex-jp-build#21.
+% -- concept: execute all hooks inside yoko direction \vbox
+% --------------------------------------------------
%
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{pxatbegshi}
- [2018/09/21 v0.4 Patch to atbegshi for (u)pLaTeX]
+ [2019/09/07 v0.5 Patch to atbegshi for (u)pLaTeX]
%% preparations
\def\pxabgs@pkgname{pxatbegshi}
@@ -45,56 +56,51 @@
%---------------------------------------
-%% patch \AtBegShi@Output
-% concept: execute all hooks in temporary yoko direction,
-% by prepending \yoko and switching back to the original
-%
+% concept: execute all hooks inside yoko direction \vbox
+
% prepare
\let\pxabgs@AtBegShi@Output\AtBegShi@Output
-% first, check hooks inserted by bxpapersize.sty
-% -> if detected, nothing to do
+% try first patch
\pxabgs@patch@cmd\pxabgs@AtBegShi@Output
- {\bxpr@ABS@prehook}{\bxpr@ABS@prehook}%
-\ifx\pxabgs@fragment\relax\else % found
+ {\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
\pxabgs@patch@cmd\pxabgs@AtBegShi@Output
- {\bxpr@ABS@posthook}{\bxpr@ABS@posthook}%
- \ifx\pxabgs@fragment\relax\else % found
+ {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox}%
+ {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox\egroup}
+ \ifx\pxabgs@fragment\relax % failure
\let\pxabgs@AtBegShi@Output\relax
+ \else % success, try third patch
+ \pxabgs@patch@cmd\pxabgs@AtBegShi@Output{%
+ \begingroup
+ \setbox\AtBeginShipoutBox\box\AtBeginShipoutBox
+ \endgroup
+ \let\protect\AtBegShi@OrgProtect
+ }{%
+ \begingroup
+ \setbox\AtBeginShipoutBox\box\AtBeginShipoutBox
+ \endgroup
+ \let\protect\AtBegShi@OrgProtect
+ \egroup
+ }
+ \ifx\pxabgs@fragment\relax % failure
+ \let\pxabgs@AtBegShi@Output\relax
+ \fi
\fi
\fi
-% -> 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
+% commit the change only when successful
+\ifx\pxabgs@AtBegShi@Output\relax
+ \pxabgs@warn{Failed in patching \string\AtBegShi@Output}
+\else
\global\let\AtBegShi@Output\pxabgs@AtBegShi@Output
\fi
-%
-%% done
-
-%--------------------------------------- done
\endgroup
%% internal macros are no longer effective
-%% 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}
+%--------------------------------------- done
\endinput
%% EOF
diff --git a/language/japanese/platex-tools/pxatbegshi.tex b/language/japanese/platex-tools/pxatbegshi.tex
index c69b1b6ab9..35c6fd413a 100644
--- a/language/japanese/platex-tools/pxatbegshi.tex
+++ b/language/japanese/platex-tools/pxatbegshi.tex
@@ -60,12 +60,12 @@ p\LaTeX の縦組クラス(tarticle.clsなど)で使うとエラーが出て
\section*{謝辞}
-本パッケージの実装には、Takayuki Yato (ZR) 氏による
-\textsf{bxpapersize}パッケージを参考にしました
-\footnote{2018/09/21 v0.3までは北川さん (Hironori Kitagawa) による
+本パッケージの実装は、北川さん(Hironori Kitagawa)さんによる
「\verb+\AtBegShi@Output+の処理を強引に横組でやらせるコード」
-をベースにしていましたが、v0.4で\verb+\AtBeginShipoutDiscard+へ
-対応させる改修を機に、書き直しました。}。
+をベースにしています\footnote{2018/09/21 v0.4では
+Takayuki Yato (ZR) 氏による\textsf{bxpapersize}パッケージを参考に
+していましたが、\textsf{multicol}パッケージで問題が起きるようなので
+v0.3以前と同様に北川さんのコードベースに戻しました。}。
\section*{References}