summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/platex-tools/bounddvi-en.tex
blob: 4899a0878089c0ddc03a6fb8c5248d508f7149ad (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
%# -*- 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}