summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/platex-tools/gentombow.tex
blob: fc1d8f40f096192170601d056edb497830b5c689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
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}