diff options
author | Karl Berry <karl@freefriends.org> | 2016-10-25 20:39:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-10-25 20:39:41 +0000 |
commit | a668ec43fa4ad7236570e18fa0008c16d2f279c3 (patch) | |
tree | 601e7dcfd7ab7f8afe71a47dae6858842409b5db /Master/texmf-dist | |
parent | ebb5a88807ee66de22c4803faa1a8e9ad8ffa5bf (diff) |
platex-tools (25oct16)
git-svn-id: svn://tug.org/texlive/trunk@42352 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/Makefile | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/README.md | 45 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.pdf | bin | 0 -> 34295 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.tex | 119 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/bounddvi.pdf | bin | 0 -> 96915 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/bounddvi.tex | 129 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf | bin | 82471 -> 85081 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/plextarray.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/plextdelarray.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/pxeverysel.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/pxeveryshi.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/platex-tools/pxftnright.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/platex-tools/bounddvi.sty | 87 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/platex-tools/plextarray.sty | 9 |
14 files changed, 395 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/platex-tools/Makefile b/Master/texmf-dist/doc/latex/platex-tools/Makefile index 2124a49a87d..82faf1cf88e 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/Makefile +++ b/Master/texmf-dist/doc/latex/platex-tools/Makefile @@ -2,7 +2,8 @@ KANJI = -kanji=utf8 FONTMAP = -f ipaex.map -f ptex-ipaex.map all: plextarray.pdf plextdelarray.pdf pxftnright.pdf \ - pxeverysel.pdf pxeveryshi.pdf + pxeverysel.pdf pxeveryshi.pdf \ + bounddvi.pdf bounddvi-en.pdf .SUFFIXES: .tex .dvi .pdf .tex.dvi: diff --git a/Master/texmf-dist/doc/latex/platex-tools/README.md b/Master/texmf-dist/doc/latex/platex-tools/README.md index 48f14239b8d..c288ed09f53 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/README.md +++ b/Master/texmf-dist/doc/latex/platex-tools/README.md @@ -2,8 +2,47 @@ This bundle is an extended version of latex-tools bundle developed by LaTeX team, mainly intended to support pLaTeX2e and upLaTeX2e. -Currently patches for latex-tools bundle and ms bundle (by Martin -Martin Schröder) are included. +Patches for latex-tools bundle and ms bundle (by Martin Schröder) +and some additional packages are included. + +## Bundle contents + +- plextarray.sty: + Patch for array.sty (latex-tools) to improve + compatibility with plext.sty in pLaTeX. + Can be used on pLaTeX/upLaTeX. +- plextdelarray.sty: + Patch for delarray.sty (latex-tools) to improve + compatibility with plext.sty in pLaTeX. + Can be used on pLaTeX/upLaTeX. +- pxftnright.sty: + Patch for ftnright.sty (latex-tools) to support + Japanese classes for vertical writing. + Can be used on pLaTeX/upLaTeX. +- pxeverysel.sty: + Patch for everysel.sty (ms) to improve + compatibility with Japanese font selection in pLaTeX. + Can be used on pLaTeX/upLaTeX. + Previous version of this package (v0.1) was written by + Takayuki YATO in 2015 + (https://gist.github.com/zr-tex8r/48c6910bbbe2f41d72de), + and incorporated into this bundle by his courtesy. +- pxeveryshi.sty: + Patch for everyshi.sty (ms) to support + Japanese classes for vertical writing. + Can be used on pLaTeX/upLaTeX. + Previous version of this package (v0.1) was written by + Takayuki YATO in 2012 + (https://gist.github.com/zr-tex8r/2702969), + and incorporated into this bundle by his courtesy. +- bounddvi.sty: + Set papersize special to DVI file. + Can be used on LaTeX/pLaTeX/upLaTeX + with dvips or dvipdfmx drivers. + Previous version of this package (v6.0) was written by + Koichi INOUE in 2004 + (https://www.ma.ns.tcu.ac.jp/Pages/TeX/bounddvi.sty.html), + and incorporated into this bundle by his courtesy. ## Character encoding @@ -27,6 +66,6 @@ the 3-clause BSD license (see [LICENSE](./LICENSE)). ## Release Date -2016-10-15 +2016-10-25 Hironobu Yamashita diff --git a/Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.pdf b/Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.pdf Binary files differnew file mode 100644 index 00000000000..d4945baacee --- /dev/null +++ b/Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.pdf diff --git a/Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.tex b/Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.tex new file mode 100644 index 00000000000..4899a087808 --- /dev/null +++ b/Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.tex @@ -0,0 +1,119 @@ +%# -*- ascii characters only -*- + +% Package v1.0--v6.0: Koichi INOUE +% Package v7.0-- : Hironobu Yamashita +% The package documentation (this file) was +% written by Hironobu Yamashita. + +\documentclass[a4paper]{article} +\usepackage{doc} +\usepackage{bounddvi} +\GetFileInfo{bounddvi.sty} +\title{Package \textsf{bounddvi} \fileversion} +\author{Koichi Inoue \& Hironobu Yamashita} +\date{\filedate} +\begin{document} + +\maketitle + +Package \textsf{bounddvi} sets papersize special into DVI file. +This package can be used in both tate (vertical) and yoko (horizontal) +writing directions of Japanese p\LaTeX/up\LaTeX, and both +\texttt{dvipdfmx} and \texttt{dvips} drivers are supported. +The \texttt{tombow} option defined in Japanese p\LaTeX\ kernel is +also supported. Of course, this package can be used also with the +original \LaTeX\ in DVI output mode. + +This package (after v7.0) is part of \textsf{platex-tools} bundle: +\begin{verbatim} + https://github.com/aminophen/platex-tools +\end{verbatim} + +\section*{Usage} + +Load this package in preamble. +\begin{verbatim} + \documentclass[a5paper]{article} + \usepackage{bounddvi} + ... +\end{verbatim} +Process the \texttt{.tex} file using \texttt{latex} + +\texttt{dvips} chain or \texttt{latex} + \texttt{dvipdfmx} chain. + +\section*{Known limitations} + +\begin{enumerate} +\item The compatibility with \textsf{geometry} package may not be +perfect. When \texttt{dvips} is used, the specification which +appears \emph{first} in DVI takes effect. On the other hand, +when \texttt{dvipdfmx} is used, the specification which appears +\emph{at last} in DVI takes effect. For this reason, +\begin{verbatim} + % latex + dvipdfmx + \documentclass{...} + \usepackage{bounddvi} + \usepackage[dvipdfm]{geometry} +\end{verbatim} +can sometimes fail to set proper paper size. +\item This package supports ``\textsf{jsclasses}-like employment'' +of \verb+\mag+, because it's more widely used in Japan. This may +be incompatible with some classes or packages which employ +\verb+\mag+ in other ways (see descriptions below). +\end{enumerate} + +\section*{Note about \texttt{\char92mag} handling} + +Among the packages in CTAN, there are two types of implementation +in terms of \verb+\mag+ employment. It seems that there is no +(official or practical) ``standard'' in \verb+\mag+ treatment. + +When the output is going to the physical size of A4 +($210\,\mathrm{mm} \times 297\,\mathrm{mm}$), +there are two ways: some classes/packages can set +\begin{quote} + \texttt{\char92mag=2000}\\ + \texttt{\char92paperwidth=210mm} ($= 420\,\mathrm{truemm}$)\\ + \texttt{\char92paperheight=297mm} ($= 594\,\mathrm{truemm}$) +\end{quote} +and others can set +\begin{quote} + \texttt{\char92mag=2000}\\ + \texttt{\char92paperwidth=105mm} ($= 210\,\mathrm{truemm}$)\\ + \texttt{\char92paperheight=148.5mm} ($= 297\,\mathrm{truemm}$) +\end{quote} +The first way is adopted by \textsf{geometry} package etc, and it's +(probably) based on the behavior of the \verb+papersize+ special of +\texttt{dvips}. It does not handle true units properly, and accepts +only non-true units and evaluates them as if they were true units. +The second way is adopted by \textsf{jsclasses} document class etc, +and is also suppoted by \verb+pdf:pagesize+ special of +\texttt{dvipdfm(x)}. This can be more consistent with \LaTeX, since +all other layout parameters (e.g. \verb+\textwidth+) are set +according to the unit truemm. + +The \textsf{bounddvi} supports the latter, so some classes/packages +which are based on the former may or may not work properly when +using \textsf{bounddvi} package. + +\section*{References} + +\begin{itemize} +\item Setting paper size using \texttt{dvips} \& \texttt{dvipdfm} + (description in Japanese)\\ + \texttt{https://www.ma.ns.tcu.ac.jp/Pages/TeX/bounddvi.sty.html} +\end{itemize} + +\section*{ChangeLog} + +\begin{itemize} + \item 2002/03/10 v1.0 (KI) First version + \item 2002/10/30 v2.0 (KI) Add dvipdfm pdf:pagesize special + \item 2003/03/22 v3.2 (KI) Compatibility with hyperref + \item 2004/05/08 v4.0 (KI) Support for $\mathtt{\char92mag} \ne 1000$ + \item 2004/12/08 v5.2 (KI) Compatibility with geometry + \item 2004/12/15 v6.0 (KI) Not to use dvipdfm(x) pdf:pagesize special + \item 2016/10/25 v7.1 (HY) Support for p\LaTeXe\ tombow option, + compatibility with graphics/color packages +\end{itemize} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/platex-tools/bounddvi.pdf b/Master/texmf-dist/doc/latex/platex-tools/bounddvi.pdf Binary files differnew file mode 100644 index 00000000000..5c7f574c519 --- /dev/null +++ b/Master/texmf-dist/doc/latex/platex-tools/bounddvi.pdf diff --git a/Master/texmf-dist/doc/latex/platex-tools/bounddvi.tex b/Master/texmf-dist/doc/latex/platex-tools/bounddvi.tex new file mode 100644 index 00000000000..63afed712d4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/platex-tools/bounddvi.tex @@ -0,0 +1,129 @@ +%# -*- coding: utf-8 -*- +\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016) + \epTeXinputencoding utf8 % ensure utf-8 encoding for platex +\fi + +% パッケージ作者 (v1.0--v6.0):東京都市大学(旧称・武蔵工業大学)井上浩一 +% 修正版 (v7.0--) および本ドキュメント:山下弘展 (Hironobu Yamashita) + +\documentclass[a4paper]{jsarticle} +\usepackage{doc} +\usepackage{bounddvi} +\GetFileInfo{bounddvi.sty} +\title{Package \textsf{bounddvi} \fileversion} +\author{Koichi Inoue \& Hironobu Yamashita} +\date{\filedate} +\begin{document} + +\maketitle + +DVIファイルは用紙サイズ情報を含みませんが、PostScriptやPDFといった +用紙サイズを規定するフォーマットへ変換するプログラム(\texttt{dvips}や +\texttt{dvipdfmx})は、\verb+\special+命令によってDVIファイルに埋め込ま +れた用紙サイズ情報を解釈します。 +% たとえば、幅100mm、高さ200mmの用紙に出力したい場合は +%\begin{verbatim} +% \special{papersize=100mm,200mm} +%\end{verbatim} +% のように指定してやることができます。 + +\textsf{bounddvi}パッケージは、クラスファイルなどが想定している用紙 +サイズ情報(\verb+\paperwidth+, \verb+\paperheight+)をDVIファイルに +\verb+\special+命令として埋め込むことで、\texttt{dvips}や +\texttt{dvipdfmx}の出力用紙サイズを指定する機能を提供します。 +\begin{verbatim} + \documentclass[a4j]{jarticle} + \usepackage{bounddvi} + \begin{document} + …本文… + \end{document} +\end{verbatim} +のように使います。p\LaTeX における横組と縦組の両方で使え、また +版面拡大(\verb+\mag+)が使われた場合にも対応しています(詳細は付録 +を参照してください)。また、v7.0以降、p\LaTeX カーネルのトンボ +オプションを使用した場合にも対応しており、p\LaTeX が仮定している +「トンボのノビ(2in)を含めたサイズ」に設定します。 + +本パッケージはv7.0以降、\textsf{platex-tools}バンドルの一部として +配布されています: +\begin{verbatim} + https://github.com/aminophen/platex-tools +\end{verbatim} + +\section*{他のパッケージとの互換性} + +用紙サイズ設定機能だけを提供する\textsf{bounddvi}パッケージのほかにも、 +パッケージの機能の一部として用紙サイズ設定を行うものがいくつかあります。 +\begin{itemize} +\item 日本語環境でよく用いられる、p\LaTeX/up\LaTeX 用のクラスファイル + \textsf{jsclasses}(奥村さん作)の\texttt{papersize}オプション + との併用は問題ありません(ただし、このオプションを使用すれば用紙 + サイズ設定には十分ですから、本\textsf{bounddvi}パッケージを併用 + することにも特にメリットはありません)。 +\item 2016年以降の\textsf{graphics/graphicx}パッケージや + \textsf{color}パッケージには用紙サイズ設定機能 + (\texttt{setpagesize}オプション:デフォルトで有効)が + ありますが、併用しても問題は起きないでしょう。 +\item \textsf{hyperref}パッケージも上と同様で、併用しても + 問題は起きないでしょう。 +\item \textsf{geometry}パッケージと併用する場合は、 + 本\textsf{bounddvi}パッケージを\emph{後から}読み込むほうが + 安全でしょう。特に、\texttt{dvipdfmx}を使用して変換する場合に + トンボを付けたいなら、\textsf{bounddvi}を後から読み込むことで + うまくいく可能性があります(付録を参照)。 +\end{itemize} + +\section*{付録:\texttt{dvips}と\texttt{dvipdfmx}の違い} + +一つのDVIファイルに複数の用紙サイズ指定\verb+\special+命令が +埋め込まれる場合があります。このうち、\texttt{dvips}ではDVIファイル +の\emph{最初}に指定されたものが有効になります。 +逆に\texttt{dvipdfmx}では、DVIファイルの\emph{最後}に指定されたもの +が有効になります。このため、たとえば\textsf{bounddvi}と +\textsf{geometry}を併用したソース +\begin{verbatim} + \documentclass{...} + \usepackage{bounddvi} + \usepackage[dvipdfm]{geometry} +\end{verbatim} +を\textsf{dvipdfmx}でPDFに変換すると、用紙サイズの設定が正しくなさ +れない可能性があります。 + +\section*{付録:\texttt{\char92mag}の扱いについて} + +本\textsf{bounddvi}パッケージは、日本で広く使われている奥村さんの +\textsf{jsclasses}クラス流の\verb+\mag+の用法をサポートしています。 +しかし、\verb+\mag+の使い方はCTANにある多様なパッケージの中で統一 +されておらず、大きく分けて二通りの使い方があるようです。 + +たとえば、物理的なA4サイズ($210\,\mathrm{mm}\times297\,\mathrm{mm}$) +の出力を得たい場合 +\begin{quote} + \texttt{\char92mag=2000}\\ + \texttt{\char92paperwidth=210mm} ($= 420\,\mathrm{truemm}$)\\ + \texttt{\char92paperheight=297mm} ($= 594\,\mathrm{truemm}$) +\end{quote} +と設定するものと +\begin{quote} + \texttt{\char92mag=2000}\\ + \texttt{\char92paperwidth=105mm} ($= 210\,\mathrm{truemm}$)\\ + \texttt{\char92paperheight=148.5mm} ($= 297\,\mathrm{truemm}$) +\end{quote} +と設定するものとが存在します。 +前者は\textsf{geometry}パッケージなどの方式で、おそらく\texttt{dvips}の +\verb+papersize+ specialの挙動(truedimenを正しく解釈せず、trueの付か +ない単位だけを受け付けてあたかもtrue付であるかのように評価)に則った +ものでしょう。後者は\textsf{jsclasses}クラスの方式で、これは +\texttt{dvipdfm(x)}の\verb+pdf:pagesize+ specialとも同じです。 +この方式のほうが、truedimenで設定された\LaTeX のほかのレイアウト変数 +(\verb+\textwidth+など)に対して一貫性があると思われます。 +本\textsf{bounddvi}パッケージがサポートしているのは後者の方式です。 + +\section*{参考} + +\begin{itemize} +\item dvipsやdvipdfmなどで用紙サイズを出力\\ + \texttt{https://www.ma.ns.tcu.ac.jp/Pages/TeX/bounddvi.sty.html} +\end{itemize} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf b/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf Binary files differindex 2a10457c349..66503f218e2 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf +++ b/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf diff --git a/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex b/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex index fe5ad866e61..ef3b12e6d45 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex @@ -1,5 +1,5 @@ %# -*- coding: utf-8 -*- -\ifdefined\epTeXinputencoding % defined in e-pTeX (> TL2016) +\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016) \epTeXinputencoding utf8 % ensure utf-8 encoding for platex \fi @@ -75,7 +75,9 @@ p\LaTeX の拡張パッケージである\textsf{plext}パッケージと互換 \textsf{dcolumn}や\textsf{tabularx}のような、内部で\textsf{array}を利用 しているパッケージを\textsf{plext}と共存させたい場合にも、 -\textsf{plextarray}が便利です。 +\textsf{plextarray}が便利です。こうしたパッケージと\textsf{plextarray}を +併用する際には、なるべく後から\textsf{plextarray}を読み込むほうがよい +でしょう(例:\textsf{colortbl}など)。 以下に例を示します。横組中で縦組の表を書く例。 diff --git a/Master/texmf-dist/doc/latex/platex-tools/plextdelarray.tex b/Master/texmf-dist/doc/latex/platex-tools/plextdelarray.tex index cbbb3b56e06..cc5e5a745f5 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/plextdelarray.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/plextdelarray.tex @@ -1,5 +1,5 @@ %# -*- coding: utf-8 -*- -\ifdefined\epTeXinputencoding % defined in e-pTeX (> TL2016) +\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016) \epTeXinputencoding utf8 % ensure utf-8 encoding for platex \fi diff --git a/Master/texmf-dist/doc/latex/platex-tools/pxeverysel.tex b/Master/texmf-dist/doc/latex/platex-tools/pxeverysel.tex index a6d4ed04823..e2d766e09d7 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/pxeverysel.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/pxeverysel.tex @@ -1,5 +1,5 @@ %# -*- coding: utf-8 -*- -\ifdefined\epTeXinputencoding % defined in e-pTeX (> TL2016) +\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016) \epTeXinputencoding utf8 % ensure utf-8 encoding for platex \fi diff --git a/Master/texmf-dist/doc/latex/platex-tools/pxeveryshi.tex b/Master/texmf-dist/doc/latex/platex-tools/pxeveryshi.tex index ca3aafd9d6a..b5e612ba51f 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/pxeveryshi.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/pxeveryshi.tex @@ -1,5 +1,5 @@ %# -*- coding: utf-8 -*- -\ifdefined\epTeXinputencoding % defined in e-pTeX (> TL2016) +\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016) \epTeXinputencoding utf8 % ensure utf-8 encoding for platex \fi diff --git a/Master/texmf-dist/doc/latex/platex-tools/pxftnright.tex b/Master/texmf-dist/doc/latex/platex-tools/pxftnright.tex index 264f7181b75..d34c9dcfb99 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/pxftnright.tex +++ b/Master/texmf-dist/doc/latex/platex-tools/pxftnright.tex @@ -1,5 +1,5 @@ %# -*- coding: utf-8 -*- -\ifdefined\epTeXinputencoding % defined in e-pTeX (> TL2016) +\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016) \epTeXinputencoding utf8 % ensure utf-8 encoding for platex \fi diff --git a/Master/texmf-dist/tex/latex/platex-tools/bounddvi.sty b/Master/texmf-dist/tex/latex/platex-tools/bounddvi.sty new file mode 100644 index 00000000000..7e207da447e --- /dev/null +++ b/Master/texmf-dist/tex/latex/platex-tools/bounddvi.sty @@ -0,0 +1,87 @@ +% +% bounddvi.sty +% 2016/10/25 v7.0-v7.1 h.y.acetaminophen@gmail.com +% 2004/12/15 v6.0-v1.0 inoue@ma.ns.tcu.ac.jp +% +% This package, originally written by Koichi Inoue +% and modified by Hironobu Yamashita, is distributed +% as part of the platex-tools bundle. +% https://github.com/aminophen/platex-tools +% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bounddvi}[2016/10/25 v7.1 bounddvi] + +% catcode trick to hide \iftombow ... \else ... \fi +% since \iftombow is defined only in pLaTeX. +\ifx\pfmtname\@undefined + \catcode`\Q=14\relax +\else + \catcode`\Q=9\relax +\fi + +% Note: graphics/color drivers +% - dvips.def 2016/07/10 v3.1a or later +% - dvipdfmx.def 2016/07/10 v4.12 or later +% emit papersize special _only_ when \Gin@setpagesizetrue +% and \mag = 1000. When graphicx(s) or color is used with +% setpagesize option (= default since 2016) and \mag equals +% to 1000, we can exploit its routine. +% (they are using \AtBeginDocument{\AtBeginDvi{...}}) +% However, these .def files do _not_ care about tombow by pLaTeX; +% so, we set \stock{width,height} to invoke stock test in those +% files (probably meant for memoir.cls). +Q \iftombow +Q % if \stockwidth/\stockheight are not available, +Q % define them now +Q \ifx\stockwidth\@undefined \newdimen\stockwidth \fi +Q \ifx\stockheight\@undefined \newdimen\stockheight \fi +Q % if \stockwidth already has effective value, do nothing; +Q % otherwise assume pLaTeX-style tombow and set it to +Q % \paperwidth + 2in (similar for \stockheight) +Q \ifdim\stockwidth>\z@\else +Q \stockwidth\paperwidth \advance\stockwidth2in +Q \fi +Q \ifdim\stockheight>\z@\else +Q \stockheight\paperheight \advance\stockheight2in +Q \fi +Q \fi + +% reset catcode trick +\catcode`\Q=11\relax + +% following code is almost equivalent to +% \AtBeginDocument{\AtBeginDvi{...}} +% however, we append the specification to the _beginning_ of +% \@begindocumenthook; this ensures proper papersize on dvips. +\begingroup +\def\@prependto@begindocumenthook{\global\setbox\@begindvibox + \vbox{\csname yoko\endcsname\unvbox\@begindvibox + \begingroup + % if \stockwidth/\stockheight are defined & have effective + % values, copy them to \paperwidth/\paperheight + % for current group + \ifx\stockwidth\@undefined\else \ifdim\stockwidth>\z@ + \paperwidth\stockwidth + \fi\fi + \ifx\stockheight\@undefined\else \ifdim\stockheight>\z@ + \paperheight\stockheight + \fi\fi + % adjust for \mag and emit papersize special + \divide\paperwidth\@m\multiply\paperwidth\mag + \divide\paperheight\@m\multiply\paperheight\mag + \special{papersize=\the\paperwidth,\the\paperheight}% + \endgroup}} +\toks@\expandafter\expandafter\expandafter + {\expandafter\@prependto@begindocumenthook\@begindocumenthook} +\xdef\@begindocumenthook{\the\toks@} +% append papersize special again to the _end_ of the +% current \@begindocumenthook; this will be meaningful when +% geometry is loaded before bounddvi and dvipdfm(x) is used. +% (geometry adds \AtBeginDocument{\AtBeginDvi{...}}, but +% `sandwich' specification can inactivate the effect of geometry) +\expandafter\g@addto@macro\expandafter\@begindocumenthook + \expandafter{\@prependto@begindocumenthook} +\endgroup + +\endinput diff --git a/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty b/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty index 210dba5dee6..6c34ee0e4f5 100644 --- a/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty +++ b/Master/texmf-dist/tex/latex/platex-tools/plextarray.sty @@ -13,7 +13,7 @@ \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{plextarray} - [2016/10/07 v1.0f Tabular extension package for plext and array] + [2016/10/23 v1.0g Tabular extension package for plext and array] \RequirePackage{plext} \RequirePackage{array} @@ -97,6 +97,13 @@ \def\endtabular{\endarray $\egroup\null} \expandafter \let \csname endtabular*\endcsname = \endtabular % +%% done + +%% support for other packages +\@ifpackageloaded{colortbl}{% --- colortbl.sty 2012/06/21 v1.0b + \PackageInfo{plextarray}{Package colortbl detected}% + \def\endarray{\crcr \egroup \egroup \@end@alignbox \@arrayright \gdef\@preamble{}\CT@end}% +}{} %% all done \endinput |