texlive[46083] Master/texmf-dist: platex-tools (17dec17)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 17 23:57:57 CET 2017


Revision: 46083
          http://tug.org/svn/texlive?view=revision&revision=46083
Author:   karl
Date:     2017-12-17 23:57:56 +0100 (Sun, 17 Dec 2017)
Log Message:
-----------
platex-tools (17dec17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/platex-tools/Makefile
    trunk/Master/texmf-dist/doc/latex/platex-tools/README.md
    trunk/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf
    trunk/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex
    trunk/Master/texmf-dist/doc/latex/platex-tools/pxgentombow.pdf
    trunk/Master/texmf-dist/doc/latex/platex-tools/pxgentombow.tex
    trunk/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.pdf
    trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.tex
    trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf
    trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex
    trunk/Master/texmf-dist/tex/latex/platex-tools/gentombow.sty
    trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty

Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/Makefile	2017-12-17 22:55:29 UTC (rev 46082)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/Makefile	2017-12-17 22:57:56 UTC (rev 46083)
@@ -3,8 +3,10 @@
 TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)
 
 all: plarray.pdf plextarray.pdf plextdelarray.pdf \
-	pxftnright.pdf pxeverysel.pdf pxeveryshi.pdf \
-	bounddvi.pdf bounddvi-en.pdf pxgentombow.pdf
+	pxatbegshi.pdf pxftnright.pdf \
+	pxeverysel.pdf pxeveryshi.pdf \
+	bounddvi.pdf bounddvi-en.pdf \
+	gentombow.pdf pxgentombow.pdf
 
 .SUFFIXES: .tex .dvi .pdf
 .tex.dvi:
@@ -14,6 +16,15 @@
 .dvi.pdf:
 	dvipdfmx $(FONTMAP) $<
 
+bounddvi-en.dvi: bounddvi-en.tex
+	latex $<
+	latex $<
+	rm *.aux *.log
+gentombow.pdf: gentombow.tex
+	pdflatex $<
+	pdflatex $<
+	rm *.aux *.log
+
 .PHONY: install clean
 install:
 	mkdir -p ${TEXMF}/doc/platex/platex-tools

Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/README.md	2017-12-17 22:55:29 UTC (rev 46082)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/README.md	2017-12-17 22:57:56 UTC (rev 46083)
@@ -39,6 +39,12 @@
     Takayuki YATO in 2012
     (https://gist.github.com/zr-tex8r/2702969),
     and incorporated into this bundle by his courtesy.
+- pxatbegshi.sty:
+    Patch for atbegshi.sty (oberdiek) to support
+    Japanese classes for vertical writing.
+    Can be used on pLaTeX/upLaTeX.
+    The essential part of this package was proposed by
+    Hironori Kitagawa in 2017.
 - bounddvi.sty:
     Set papersize special to DVI file.
     Can be used on LaTeX/pLaTeX/upLaTeX
@@ -77,6 +83,6 @@
 
 ## Release Date
 
-2017-07-29
+2017-12-17
 
 Hironobu Yamashita

Added: trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.pdf	2017-12-17 22:55:29 UTC (rev 46082)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.pdf	2017-12-17 22:57:56 UTC (rev 46083)

Property changes on: trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.tex	2017-12-17 22:57:56 UTC (rev 46083)
@@ -0,0 +1,209 @@
+%# -*- ascii characters only -*-
+
+\documentclass[a4paper]{article}
+\usepackage{doc}
+\makeatletter
+%%% dangerous bend
+\font\man=manfnt at 10pt
+\def\dbend{\leavevmode\raise0pt\hbox{\man\char'177}}
+\newenvironment{dangerous}{%
+  \ifnum\@listdepth>\z@
+    \GenericError{}{Do not use `dangerous' environment inside any list}{}{}
+  \fi
+  \par\addvspace\medskipamount
+  \@tempdima=\dimexpr\textwidth-2zw\relax\small
+  \divide\@tempdima by\dimexpr1zw\relax\@tempcnta=\@tempdima
+  \leftskip=\dimexpr\textwidth-\@tempcnta zw\relax
+    \@totalleftmargin\dimexpr\leftskip+0zw
+    \linewidth=\dimexpr\@tempcnta zw-0zw
+  \parindent1zw\noindent\kern-\leftskip\hbox to\leftskip{\dbend\hss}%
+  \everypar{\everypar{}}\ignorespaces
+}{\par\addvspace\medskipamount}
+%%% misc
+\newcommand{\Meta}[1]{$\langle$\mbox{}\textit{#1}\mbox{}$\rangle$}
+%%%
+\makeatother
+\usepackage{longtable}
+\usepackage{gentombow}
+\usepackage{bxpapersize}
+\GetFileInfo{gentombow.sty}
+\title{Package \textsf{gentombow} \fileversion}
+\author{Hironobu Yamashita}
+\date{\filedate}
+\begin{document}
+
+\maketitle
+
+It is convenient to print documents for final smaller paper sizes
+on paper of the printer's standard physical paper size;
+it allows printing close to the logical paper edge
+and even outside the logical page.
+
+This package \textsf{gentombow} provides a Japanese-style
+crop marks (called `tombow' in Japanese) for trimming paper stacks,
+and place the document page at the center of a larger physical
+paper sheet. It automatically detects the page size
+(\verb+\paperwidth+, \verb+\paperheight+) which is
+going to set by document class.
+This document itself is a demonstration of this package,
+with final A4 paper printed on B4 (JIS B4; not ISO B4!) paper.
+
+Note that this package does nothing about output paper size
+specification; use one of the followings to do it.
+\begin{itemize}
+\item \textsf{graphicx} package
+  with \texttt{setpagesize} feature added in 2016
+  (supports all engines)
+\item \textsf{bxpapersize} package
+  (supports all engines; by Takayuki YATO)
+\item \textsf{bounddvi} package
+  (supports only DVI output mode; part of \textsf{platex-tools} bundle)
+\end{itemize}
+
+A basic usage:
+\begin{verbatim}
+  \documentclass[a4paper]{article}
+  \usepackage{gentombow}
+  \usepackage{graphicx}
+  \begin{document}
+  The content
+  \end{document}
+\end{verbatim}
+For Japanese people, \textsf{pxgentombow} (also part of
+\textsf{platex-tools} bundle) is also available;
+it requires Japanese p\LaTeX/up\LaTeX\ or Lua\TeX-ja.
+
+This package is part of \textsf{platex-tools} bundle:
+\begin{verbatim}
+  https://github.com/aminophen/platex-tools
+\end{verbatim}
+
+\section*{Automatic Determination of Output Size}
+
+In this package,
+the following printer's standard physical paper sizes are predefined;
+A series (\texttt{a0}--\texttt{a10}),
+B series (\texttt{b0}--\texttt{b10}),
+C series (\texttt{c0}--\texttt{c10}),
+\texttt{letter}, \texttt{legal} and \texttt{executive}.
+In the current release, `B series' is JIS standard,
+not ISO standard (this might be changed in the near future).
+Also, some variations \texttt{a4var} and \texttt{b5var} are predefined.
+
+When one of the above sizes (except \texttt{a0}, \texttt{b0}
+and \texttt{c0}) is detected, the output size is
+automatically determined along with the following rule:
+\begin{itemize}
+\item When A series detected:
+        the output is going to be larger B series
+\item When B/C series or
+      \texttt{letter}, \texttt{legal}, \texttt{executive} detected:
+        the output is going to be larger A series
+\end{itemize}
+The crop marks are automatically added.
+The orientation (landscape/portrait) of the input paper is
+also preserved.
+
+The following list shows common examples:
+\begin{longtable}[c]{cc}
+  \hline
+  Detected page size & Output size \\
+  \hline
+  a6 & b6 \\
+  b6 & a5 \\
+  a5 & b5 \\
+  b5 & a4 \\
+  a4 & b4 \\
+  b4 & a3 \\
+  a3 & b3 \\
+  b3 & a2 \\
+  \hline
+  c6 & a5 \\
+  c5 & a4 \\
+  c4 & a3 \\
+  c3 & a2 \\
+  \hline
+  letter    & a3 \\
+  legal     & a3 \\
+  executive & a4 \\
+  \hline
+\end{longtable}
+
+\section*{When Automatic Determination Failed}
+
+When the page size is different from any of the predefined sizes,
+the page is placed with the surrounding 1~inch margins.
+For example, when the page has $100\,\mathrm{mm}$ width and
+$200\,\mathrm{mm}$ height, the output size is going to be
+$100\,\mathrm{mm}+2\,\mathrm{in}$ width and
+$200\,\mathrm{mm}+2\,\mathrm{in}$ height.
+
+\section*{Explicit Specification of Output Size}
+
+You can also force the output size using package option.
+For example,
+\begin{verbatim}
+  \documentclass[a4paper]{article}
+  \usepackage[tombow-a4]{gentombow}
+  \begin{document}
+  The content
+  \end{document}
+\end{verbatim}
+forces the output size to be a3 (the automatic determination
+`b4' is discarded). Available sizes are the same as
+the predefined sizes, that is,
+A series (\texttt{a0}--\texttt{a10}),
+B series (\texttt{b0}--\texttt{b10}),
+C series (\texttt{c0}--\texttt{c10}) and
+\texttt{a4var}, \texttt{b5var},
+\texttt{letter}, \texttt{legal}, \texttt{executive}.
+The orientation (landscape/portrait) of the input paper is
+also preserved again.
+
+The option format is:
+\Meta{crop mark format}\texttt{-}\Meta{output size}.
+The crop mark format is one of the following:
+\verb+tombow+ (default), \verb+tombo+ (without a job info),
+\verb+mentuke+ (do not print actual crop marks).
+
+\section*{Disabling Job Info Printing}
+
+When the output size is automatically determined,
+the crop marks are printed with a job info like
+\makeatletter\texttt{\the\@bannertoken}\makeatother.
+To disable it, use \texttt{notombowdate} option:
+\begin{verbatim}
+  \documentclass[a4j]{jarticle}
+  \usepackage[notombowdate]{gentombow}
+  \begin{document}
+  The content
+  \end{document}
+\end{verbatim}
+
+\section*{Note for \textsf{BXjscls} users}
+
+When using \textsf{BXjscls} (by Takayuki YATO) with size option
+other than 10pt, please add \verb+nomag+ or \verb+nomag*+ to the
+class option. For example,
+\begin{verbatim}
+  \documentclass[a4paper,14pt]{bxjsarticle}
+  \usepackage{gentombow}
+\end{verbatim}
+will not work as expected (\textsf{gentombow} throws an error
+for safety).
+
+\section*{Note about Layout Settings}
+
+You should not change \verb+\hoffset+ or \verb+\voffset+ to non-zero
+value, for the purpose of layout settings. Such settings will
+conflict with the feature of \textsf{gentombow} package.
+To set page layout correctly, you should adjust \verb+\oddsidemargin+
+or \verb+\topmargin+, or leave it to \textsf{geometry} package.
+
+\section*{Change History}
+
+\begin{itemize}
+  \item 2017/12/17 v0.9 First CTAN release
+\end{itemize}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/platex-tools/gentombow.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/plextarray.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex	2017-12-17 22:55:29 UTC (rev 46082)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/plextarray.tex	2017-12-17 22:57:56 UTC (rev 46083)
@@ -42,7 +42,7 @@
 \end{verbatim}
 The option \texttt{<dir>} permits one of the following three values.
 If none of them is specified, the direction inside the environment
-is same as that outside the enviromnent.
+is same as that outside the environment.
 \begin{quote}
   \begin{description}
   \item[y] \emph{yoko} direction (horizontal writing)

Added: trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf	2017-12-17 22:55:29 UTC (rev 46082)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf	2017-12-17 22:57:56 UTC (rev 46083)

Property changes on: trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex	2017-12-17 22:57:56 UTC (rev 46083)
@@ -0,0 +1,75 @@
+%# -*- coding: utf-8 -*-
+\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016)
+  \epTeXinputencoding utf8    % ensure utf-8 encoding for platex
+\fi
+
+\documentclass[a4paper]{jsarticle}
+\usepackage{doc}
+\usepackage{pxatbegshi}
+\GetFileInfo{pxatbegshi.sty}
+\title{Package \textsf{pxatbegshi} \fileversion}
+\author{Hironobu Yamashita}
+\date{\filedate}
+\begin{document}
+
+\maketitle
+
+Package \textsf{atbegshi} (written by Heiko Oberdiek) provides
+a command \verb+\AtBeginShipout{...}+, however it cannot be used
+with Japanese classes for vertical writing (tarticle.cls, etc).
+\begin{verbatim}
+  ! Incompatible direction list can't be unboxed.
+  \AtBeginShipoutAddToBox ...box \AtBeginShipoutBox 
+                                                    \kern 0pt}\AtBegShi at restor...
+\end{verbatim}
+The package \textsf{pxatbegshi} provides a patch for \textsf{atbegshi}
+to work with both horizontal and vertical writing.
+
+This package is part of \textsf{platex-tools} bundle:
+\begin{verbatim}
+  https://github.com/aminophen/platex-tools
+\end{verbatim}
+
+\bigskip
+
+Heiko Oberdiek氏による\textsf{atbegshi}パッケージは
+\verb+\AtBeginShipout{...}+というコマンドを提供しますが、これを
+p\LaTeX の縦組クラス(tarticle.clsなど)で使うとエラーが出てしまいます
+\footnote{単に縦組クラスで\textsf{pxatbegshi}パッケージを読み込んだだけ
+では、エラーは出ないようです。}。
+この\textsf{pxatbegshi}パッケージは、縦組クラスでも
+\textsf{atbegshi}パッケージの機能を使えるようにするためのものです。
+
+使いかたは、\textsf{atbegshi}パッケージの代わりに、あるいは
+\textsf{atbegshi}パッケージに追加して、\textsf{pxatbegshi}パッケージを
+読みこむだけです。使用例:
+\begin{verbatim}
+  \documentclass[a4paper]{tarticle}
+  \usepackage[dvipdfmx]{graphicx}
+  \usepackage{pxatbegshi}
+  \AtBeginShipout{%
+    \AtBeginShipoutUpperLeft{%
+      \parbox[t][\paperheight][b]{\paperwidth}{%
+        \includegraphics[width=210truemm]{background.eps}}}}
+  \begin{document}
+  背景に透かしを入れます。
+  \end{document}
+\end{verbatim}
+
+\section*{謝辞}
+
+本パッケージの実装は、北川さん(Hironori Kitagawa)さんによる
+「\verb+\AtBegShi at Output+の処理を強引に横組でやらせるコード」
+をベースにしています。
+
+\section*{References}
+
+\begin{itemize}
+\item utbookでatbegshiパッケージを使いたい\\
+  \texttt{https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=2134}
+\item \relax[tex-jp-build] [ptex] ページ・数式の組方向
+      (※北川さんのコードの初出)\\
+  \texttt{https://github.com/texjporg/tex-jp-build/issues/21}
+\end{itemize}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/platex-tools/pxatbegshi.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/pxgentombow.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/platex-tools/pxgentombow.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/platex-tools/pxgentombow.tex	2017-12-17 22:55:29 UTC (rev 46082)
+++ trunk/Master/texmf-dist/doc/latex/platex-tools/pxgentombow.tex	2017-12-17 22:57:56 UTC (rev 46083)
@@ -7,7 +7,7 @@
 \usepackage{doc}
 \makeatletter
 %%% import from jltxdoc.cls
-\def\verb{\relax\ifmmode\hbox\else\leavevmode\fi
+\def\verb{\relax\ifmmode\hbox\else\leavevmode\vadjust{}\fi
   \bgroup \let\do\do at noligs \verbatim at nolig@list
     \ttfamily \verb at eol@error \let\do\@makeother \dospecials
     \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
@@ -29,6 +29,9 @@
   \parindent1zw\noindent\kern-\leftskip\hbox to\leftskip{\dbend\hss}%
   \everypar{\everypar{}}\ignorespaces
 }{\par\addvspace\medskipamount}
+%%% misc
+\newcommand{\Meta}[1]{$\langle$\mbox{}\textit{#1}\mbox{}$\rangle$}
+\newcommand{\jMeta}[1]{$\langle$\mbox{}\textsf{#1}\mbox{}$\rangle$}
 %%%
 \makeatother
 \usepackage{longtable}
@@ -42,21 +45,34 @@
 
 \maketitle
 
-日本の出版では、たとえば版面がA4サイズの場合、一回り大きなB4サイズの用紙
-の中央にトンボ付きで印刷するということがなされることがあるようです。
+\begin{center}
+English version is available: see \textsf{gentombow} package!
+\end{center}
+
+日本の出版では、たとえば仕上がり寸法がA4サイズの場合、一回り大きな
+B4サイズの用紙の中央にトンボ付きで印刷することがあるようです。
 このドキュメントは、実際にA4用紙をB4用紙の中央にトンボ付きで
 配置している事例です。
 
 \textsf{pxgentombow}パッケージは、クラスファイルなどが想定している用紙
-サイズ情報(\verb+\paperwidth+, \verb+\paperheight+)を検知し、それより
-一回り大きなサイズの用紙の中央にトンボ付きで出力するために必要な機能を
-提供します。ただし、このパッケージは実際の出力サイズ指定を発行しません
-ので、\textsf{bxpapersize}パッケージまたは\textsf{bounddvi}パッケージと
-併用するとよいでしょう\footnote{\textsf{bounddvi}パッケージは、
-\textsf{pxgentombow}と同じく\textsf{platex-tools}バンドルに収録
-されていますが、名前のとおりDVIを経由する場合にしか利用できません。
+サイズ情報(\verb+\paperwidth+, \verb+\paperheight+)を検知し、
+それより一回り大きなサイズの用紙の中央にトンボ付きで出力するために
+必要な機能を提供します。
+ただし、このパッケージは実際の出力サイズ指定を発行しませんので、
+以下のいずれかのパッケージと併用するとよいでしょう:
+\begin{itemize}
+\item \textsf{bounddvi}パッケージ(\textsf{platex-tools}バンドル)
+\item \textsf{bxpapersize}パッケージ(ZRさん作)
+\item \textsf{graphicx}パッケージの2016年以降の版
+  (\texttt{setpagesize}機能つきのもの)
+\end{itemize}
+\textsf{bounddvi}パッケージは、\textsf{pxgentombow}と同じく
+\textsf{platex-tools}バンドルに収録されていますが、
+名前のとおりDVIを経由する場合にしか利用できません。
 一方、\textsf{bxpapersize}パッケージは汎用で、Lua\TeX のような
-PDF直接出力の場合にも利用できます。}。
+PDF直接出力の場合にも利用できます。また、\textsf{graphicx}パッケージ
+は画像挿入用のパッケージですが、2016年以降は自動的に出力サイズ指定も
+行うようです($\verb+\mag+ \ne 1000$の場合には機能しません)。
 
 使い方の例は
 \begin{verbatim}
@@ -69,7 +85,9 @@
 \end{verbatim}
 です。p\LaTeX における横組と縦組の両方で使え、また\textsf{jsclasses}の
 ような版面拡大(\verb+\mag+)が使われた場合にも対応しています。
-なお、現時点ではp\LaTeX とup\LaTeX およびLua\TeX-jaのみで動作します。
+なお、\textsf{pxgentombow}パッケージはp\LaTeX とup\LaTeX および
+Lua\TeX-jaのみで動作します。その他(pdf\LaTeX など)で使いたい
+場合は、代わりに\textsf{gentombow}パッケージを使用してください。
 
 本パッケージは、\textsf{platex-tools}バンドルの一部として
 配布されています:
@@ -79,19 +97,24 @@
 
 \section*{用紙サイズの自動検知による出力サイズ決定}
 
-パッケージにはあらかじめA系列(a0--a10)、B系列(b0--b10), C系列(c0--c10)と
-letter, legal, executiveの用紙サイズが定義されています。
-ここで、B系列はISOではなくJISです。また、変形版としてa4var(a4の変形)と
-b5var(b5の変形)も定義されています。
+パッケージにはあらかじめA系列(\texttt{a0}--\texttt{a10})、
+B系列(\texttt{b0}--\texttt{b10})、C系列(\texttt{c0}--\texttt{c10})と
+\texttt{letter}, \texttt{legal}, \texttt{executive}の用紙サイズが
+定義されています。ここで、B系列はISOではなくJISです。
+また、変型版として\texttt{a4var}(\texttt{a4}の変型)と
+\texttt{b5var}(\texttt{b5}の変型)も定義されています。
 
-これらのうちいずれか(ただしa0, b0, c0を除く)の用紙サイズを検知すると、
+これらのうちいずれか(ただし\texttt{a0}, \texttt{b0}, \texttt{c0}を
+除く)の用紙サイズを検知すると、
 出力サイズが次の規則で自動的に決定されます\footnote{なお、
-C系列とletter, legal, executiveについては日本での慣習が不明の
+C系列と\texttt{letter}, \texttt{legal}, \texttt{executive}については
+日本での慣習が不明の
 ため、現時点ではA系列のサイズで出力することにしています。}。
 \begin{itemize}
 \item 用紙サイズがA系列のとき:
         出力サイズは一回り大きなB系列
-\item 用紙サイズがB, C系列またはletter, legal, executiveのとき:
+\item 用紙サイズがB, C系列または
+      \texttt{letter}, \texttt{legal}, \texttt{executive}のとき:
         出力サイズは一回り大きなA系列
 \end{itemize}
 この場合、パッケージを読みこんだだけでトンボが付きます。
@@ -143,13 +166,16 @@
   \end{document}
 \end{verbatim}
 とすると、出力サイズは(自動決定のb4は無視されて)a3に変わります。
-指定可能なサイズは、定義済みの用紙サイズと同じものです。
-すなわち、A系列(a0--a10)、B系列(b0--b10), C系列(c0--c10)と
-a4var, b5var, letter, legal, executiveです。
+指定可能なサイズは、定義済みの用紙サイズと同じものです。すなわち、
+A系列(\texttt{a0}--\texttt{a10})、
+B系列(\texttt{b0}--\texttt{b10})、
+C系列(\texttt{c0}--\texttt{c10})と
+\texttt{a4var}, \texttt{b5var},
+\texttt{letter}, \texttt{legal}, \texttt{executive}です。
 なお、ここでも用紙サイズが横長の場合は自動的に出力も横長になり、
 縦長の場合は自動的に縦長になります。
 
-オプションの書式は、トンボ形式とサイズをハイフン(-)で結びます。
+オプションは\jMeta{トンボ形式}\texttt{-}\jMeta{出力サイズ}の書式で与えます。
 トンボ形式は、p\LaTeX の標準クラスと同じで
 \verb+tombow+, \verb+tombo+, \verb+mentuke+のいずれかを選びます
 (\verb+tombow+はジョブ情報を表示し、\verb+tombo+は表示しません。
@@ -195,11 +221,21 @@
 \end{verbatim}
 と書くようにしてください。
 
+同様に、ZR氏による\textsf{BXjscls}のクラスを使用していて、10pt以外の
+サイズオプションを指定する場合は
+\begin{itemize}
+\item クラスオプションに「\verb+\mag+を使わないオプション」
+      (\verb+nomag+または\verb+nomag*+)を追加する。
+\end{itemize}
+という対処が必要です(\textsf{BXjscls}クラスでは「トンボオプション」が
+機能しないダミーになっていることに注意)。
+
 \section*{レイアウト設定の注意}
 
 余白などのレイアウト設定でありがちですが、
-\verb+\hoffset+や\verb+\voffset+の値が$0$以外になっている場合、
-\textsf{pxgentombow}パッケージはエラーを出します。
+\verb+\hoffset+や\verb+\voffset+の値を$0$以外に設定するのは
+避けてください。このような設定は\textsf{pxgentombow}パッケージの
+トンボ出力機能と衝突するため、正しい出力が得られません。
 レイアウト設定のために変更すべきなのはこれらの寸法ではなく、
 \verb+\oddsidemargin+や\verb+\topmargin+であることがほとんどです。
 したがって、それらを適切な値に設定するか、レイアウトの設定すべてを
@@ -287,6 +323,7 @@
   \item 2017/05/06 v0.6 \textsf{jsclasses}との共存時のチェック強化、
                         Lua\TeX-jaでの動作確認
   \item 2017/07/23 v0.7 ドキュメント更新、CTANリリース版
+  \item 2017/12/17 v0.9 \textsf{gentombow}パッケージの新設、CTANリリース版
 \end{itemize}
 
 \end{document}

Added: trunk/Master/texmf-dist/tex/latex/platex-tools/gentombow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/platex-tools/gentombow.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/platex-tools/gentombow.sty	2017-12-17 22:57:56 UTC (rev 46083)
@@ -0,0 +1,159 @@
+%
+% gentombow.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the platex-tools bundle.
+% https://github.com/aminophen/platex-tools
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gentombow}
+    [2017/12/17 v0.9 Generate crop mark 'tombow']
+\def\pxgtmb at emu@pkgname{gentombow}
+
+%% error status (shared with pxgentombow.sty)
+\ifx\pxgtmb at errlevel\@undefined
+  \chardef\pxgtmb at errlevel=\z@
+\fi
+
+%% supported engines
+\ifx\pfmtversion\@undefined
+  \@ifpackageloaded{luatexja}{}{\chardef\pxgtmb at errlevel=\@ne}
+\fi
+\ifnum\pxgtmb at errlevel>\z@\else
+  \PackageInfo{\pxgtmb at emu@pkgname}{%
+    pLaTeX, upLaTeX and LuaTeX-ja are natively\MessageBreak
+    supported by `pxgentombow' package;\MessageBreak
+    there is no need for this package.}
+  \RequirePackageWithOptions{pxgentombow}
+  \expandafter\endinput
+\fi
+
+%%%%% EMULATION BEGIN
+
+% required for patching \@outputpage
+\RequirePackage{etoolbox}
+
+% patch \@outputpage
+\begingroup
+\def\pxgtmb at emu@status{0}
+\let\pxgtmb at emu@outputpage\@outputpage
+\patchcmd\pxgtmb at emu@outputpage % try first patch
+  {\reset at font\normalsize\normalsfcodes}%
+  {%
+     \@@topmargin\topmargin
+     \iftombow
+       \@@paperwidth\paperwidth \advance\@@paperwidth 6mm\relax
+       \@@paperheight\paperheight \advance\@@paperheight 16mm\relax
+       \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax
+     \fi
+   \reset at font\normalsize\normalsfcodes}
+  {}{\def\pxgtmb at emu@status{1}}
+\patchcmd\pxgtmb at emu@outputpage % try second patch
+  {\@begindvi \vskip \topmargin}%
+  {\@begindvi \@outputtombow \vskip \@@topmargin}%
+  {}{\def\pxgtmb at emu@status{1}}
+% commit the change only when successful; otherwise
+% tombow feature is never enabled, exit right away
+\if 0\pxgtmb at emu@status\relax
+  \global\let\@outputpage\pxgtmb at emu@outputpage
+\else
+  \PackageError{\pxgtmb at emu@pkgname}{%
+    Failed in patching \string\@outputpage!\MessageBreak
+    Sorry, I can't proceed anymore...}\@ehc
+  \expandafter\expandafter\expandafter\endinput\expandafter
+\fi
+\endgroup
+%
+
+% provides equivalent for plcore.ltx
+\newif\iftombow \tombowfalse
+\newif\iftombowdate \tombowdatetrue
+\newdimen\@tombowwidth
+\setlength{\@tombowwidth}{.1\p@}
+\newbox\@TL\newbox\@Tl
+\newbox\@TC
+\newbox\@TR\newbox\@Tr
+\newbox\@BL\newbox\@Bl
+\newbox\@BC
+\newbox\@BR\newbox\@Br
+\newbox\@CL
+\newbox\@CR
+\font\@bannerfont=cmtt9
+\newtoks\@bannertoken
+\@bannertoken{}
+\def\maketombowbox{% removed \yoko from all boxes
+  \setbox\@TL\hbox to\z@{\hss
+      \vrule width13mm height\@tombowwidth depth\z@
+      \vrule height10mm width\@tombowwidth depth\z@
+      \iftombowdate
+        \raise4pt\hbox to\z@{\hskip5mm\@bannerfont\the\@bannertoken\hss}%
+      \fi}%
+  \setbox\@Tl\hbox to\z@{\hss
+      \vrule width10mm height\@tombowwidth depth\z@
+      \vrule height13mm width\@tombowwidth depth\z@}%
+  \setbox\@TC\hbox{%
+      \vrule width10mm height\@tombowwidth depth\z@
+      \vrule height10mm width\@tombowwidth depth\z@
+      \vrule width10mm height\@tombowwidth depth\z@}%
+  \setbox\@TR\hbox to\z@{%
+      \vrule height10mm width\@tombowwidth depth\z@
+      \vrule width13mm height\@tombowwidth depth\z@\hss}%
+  \setbox\@Tr\hbox to\z@{%
+      \vrule height13mm width\@tombowwidth depth\z@
+      \vrule width10mm height\@tombowwidth depth\z@\hss}%
+  \setbox\@BL\hbox to\z@{\hss
+      \vrule width13mm depth\@tombowwidth height\z@
+      \vrule depth10mm width\@tombowwidth height\z@}%
+  \setbox\@Bl\hbox to\z@{\hss
+      \vrule width10mm depth\@tombowwidth height\z@
+      \vrule depth13mm width\@tombowwidth height\z@}%
+  \setbox\@BC\hbox{%
+      \vrule width10mm depth\@tombowwidth height\z@
+      \vrule depth10mm width\@tombowwidth height\z@
+      \vrule width10mm depth\@tombowwidth height\z@}%
+  \setbox\@BR\hbox to\z@{%
+      \vrule depth10mm width\@tombowwidth height\z@
+      \vrule width13mm depth\@tombowwidth height\z@\hss}%
+  \setbox\@Br\hbox to\z@{%
+      \vrule depth13mm width\@tombowwidth height\z@
+      \vrule width10mm depth\@tombowwidth height\z@\hss}%
+  \setbox\@CL\hbox to\z@{\hss
+      \vrule width10mm height.5\@tombowwidth depth.5\@tombowwidth
+      \vrule height10mm depth10mm width\@tombowwidth}%
+  \setbox\@CR\hbox to\z@{%
+      \vrule height10mm depth10mm width\@tombowwidth
+      \vrule height.5\@tombowwidth depth.5\@tombowwidth width10mm\hss}%
+}
+\def\@outputtombow{%
+  \iftombow
+  \vbox to\z@{\kern-13mm\relax
+    \boxmaxdepth\maxdimen
+    \moveleft3mm\vbox to\@@paperheight{%
+      \hbox to\@@paperwidth{\hskip3mm\relax
+         \copy\@TL\hfill\copy\@TC\hfill\copy\@TR\hskip3mm}%
+      \kern-10mm
+      \hbox to\@@paperwidth{\copy\@Tl\hfill\copy\@Tr}%
+      \vfill
+      \hbox to\@@paperwidth{\copy\@CL\hfill\copy\@CR}%
+      \vfill
+      \hbox to\@@paperwidth{\copy\@Bl\hfill\copy\@Br}%
+      \kern-10mm
+      \hbox to\@@paperwidth{\hskip3mm\relax
+         \copy\@BL\hfill\copy\@BC\hfill\copy\@BR\hskip3mm}%
+    }\vss
+  }%
+  \fi
+}
+\newdimen\@@paperheight
+\newdimen\@@paperwidth
+\newdimen\@@topmargin
+\newcount\hour
+\newcount\minute
+
+%%%%% EMULATION END
+
+%% load it
+\RequirePackageWithOptions{pxgentombow}
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/platex-tools/gentombow.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty	2017-12-17 22:57:56 UTC (rev 46083)
@@ -0,0 +1,76 @@
+%
+% pxatbegshi.sty
+% based on H. Kitagawa's code on GitHub:texjporg/tex-jp-build#21
+% and modified by Hironobu Yamashita
+%
+% This package is distributed as part of the platex-tools bundle
+% maintained by Hironobu Yamashita
+% https://github.com/aminophen/platex-tools
+%
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{pxatbegshi}
+    [2017/11/04 v0.2 Patch to atbegshi for (u)pLaTeX]
+
+%% preparations
+\def\pxabgs at pkgname{pxatbegshi}
+\def\pxabgs at warn{\PackageWarningNoLine\pxabgs at pkgname}
+
+%% load it
+\RequirePackage{atbegshi}
+
+%% internal macros are locally effective
+\begingroup
+
+%--------------------------------------- helpers
+
+%% unique tokens
+\def\pxabgs at mark{\pxabgs at mark@}
+\def\pxabgs at fin{\pxabgs at fin@}
+
+%% \pxabgs at patch@cmd\CMD{<orig>}{<new>}
+\@onlypreamble\pxabgs at patch@cmd
+\def\pxabgs at patch@cmd#1#2#3{%
+  \def\pxabgs at next##1#2##2\pxabgs at mark##3\pxabgs at fin{%
+    \ifx\pxabgs at mark##3\pxabgs at mark
+      \let\pxabgs at fragment\relax
+    \else
+      \def\pxabgs at fragment{##2}%
+      \def#1{##1#3##2}%
+    \fi}%
+  \expandafter\pxabgs at next#1\pxabgs at mark#2\pxabgs at mark\pxabgs at fin}
+
+%---------------------------------------
+
+% concept: execute all hooks inside yoko direction \vbox
+
+% prepare
+\let\pxabgs at AtBegShi@Output\AtBegShi at Output
+% try first patch
+\pxabgs at patch@cmd\pxabgs at AtBegShi@Output
+  {\let\AtBegShi at OrgProtect\protect}%
+  {\setbox8\vbox\bgroup\yoko\let\AtBegShi at OrgProtect\protect}
+\ifx\pxabgs at fragment\relax % failure
+  \let\pxabgs at AtBegShi@Output\relax
+\else % success, try second patch
+  \pxabgs at patch@cmd\pxabgs at AtBegShi@Output
+    {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox}%
+    {\AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox\egroup}
+  \ifx\pxabgs at fragment\relax % failure
+    \let\pxabgs at AtBegShi@Output\relax
+  \fi
+\fi
+% commit the change only when successful
+\ifx\pxabgs at AtBegShi@Output\relax
+  \pxabgs at warn{Failed in patching \string\AtBegShi at Output}
+\else
+  \global\let\AtBegShi at Output\pxabgs at AtBegShi@Output
+\fi
+
+\endgroup
+%% internal macros are no longer effective
+
+%--------------------------------------- done
+\endinput
+%% EOF


Property changes on: trunk/Master/texmf-dist/tex/latex/platex-tools/pxatbegshi.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty	2017-12-17 22:55:29 UTC (rev 46082)
+++ trunk/Master/texmf-dist/tex/latex/platex-tools/pxgentombow.sty	2017-12-17 22:57:56 UTC (rev 46083)
@@ -8,11 +8,13 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{pxgentombow}
-    [2017/07/23 v0.7 Generate crop mark 'tombow']
+    [2017/12/17 v0.9 Generate crop mark 'tombow']
 \def\pxgtmb at pkgname{pxgentombow}
 
-%% error status
-\chardef\pxgtmb at errlevel=\z@
+%% error status (shared with gentombow.sty)
+\ifx\pxgtmb at errlevel\@undefined
+  \chardef\pxgtmb at errlevel=\z@
+\fi
 
 %% supported engines
 \ifx\pfmtversion\@undefined
@@ -19,9 +21,14 @@
   \@ifpackageloaded{luatexja}{}{\chardef\pxgtmb at errlevel=\@ne}
 \fi
 \ifnum\pxgtmb at errlevel>\z@
-  \PackageError{\pxgtmb at pkgname}{%
-    Only pLaTeX, upLaTeX and LuaTeX-ja are supported now}\@ehc
-  \expandafter\endinput
+  \ifx\pxgtmb at emu@pkgname\@undefined % gentombow.sty not loaded
+    \PackageError{\pxgtmb at pkgname}{%
+      Only pLaTeX, upLaTeX and LuaTeX-ja are supported!\MessageBreak
+      Please use `gentombow' package instead}\@ehc
+    \expandafter\expandafter\expandafter\endinput\expandafter
+  \fi
+\else
+  \@namedef{ver at gentombow.sty}{}% fake
 \fi
 
 %% import from jsclasses
@@ -29,11 +36,23 @@
 \@tempcnta\hour \multiply\@tempcnta 60\relax
 \minute\time \advance\minute-\@tempcnta
 
+\ifnum\mag=\@m\else
+  % if BXjscls is detected and \mag != 1000,
+  % the layout will be definitely broken
+  \ifx\bxjs at param@mag\@undefined\else
+    \PackageError{\pxgtmb at pkgname}{%
+      It seems you are using Japanese `BXjscls'\MessageBreak
+      (bxjsarticle, bxjsbook, bxjsreport, etc.) or\MessageBreak
+      some derived class. Try adding `nomag' or\MessageBreak
+      `nomag*' to the class option list}\@ehc
+  \fi
+\fi
+
 %% this package will use tombo feature in pLaTeX kernel
 %  if tombow-related option is not included in class option list,
 %  show info and enable it now
 \iftombow\else
-  % if jsclasses is detected, it's too late
+  % if jsclasses is detected and \mag != 1000, it's too late
   % -- When a size option other than `10pt' is specified,
   %    jsclasses uses \mag and calculates \oddsidemargin and \topmargin
   %    differently, depending on tombow status.
@@ -47,6 +66,7 @@
       derived class. Please add `tombow' or `tombo'\MessageBreak
       to the class option list}\@ehc
   \fi \fi
+  % BXjscls is already checked above, no check here
   \PackageInfo\pxgtmb at pkgname{tombow feature enabled by \pxgtmb at pkgname}
 \fi
 \tombowtrue %\tombowdatetrue %% enabled by tombowdate option



More information about the tex-live-commits mailing list