| 1 |
.\" Copyright (c) 1987-2020 UMD-CS, released under the X11 license; |
| 2 |
.\" see README and source files. |
| 3 |
.TH DVITODVI 1 "8 September 2020" "TeX Live" |
| 4 |
.SH NAME |
| 5 |
dvitodvi \- rearrange pages in a DVI file |
| 6 |
.SH SYNOPSIS |
| 7 |
.B dvitodvi |
| 8 |
[ |
| 9 |
.B \-q |
| 10 |
] [ |
| 11 |
.B \-i |
| 12 |
.I infile |
| 13 |
] [ |
| 14 |
.B \-o |
| 15 |
.I outfile |
| 16 |
] |
| 17 |
[ |
| 18 |
.B \-w\fIwidth\fR |
| 19 |
] |
| 20 |
[ |
| 21 |
.B \-h\fIheight\fR |
| 22 |
] |
| 23 |
.I pagespecs |
| 24 |
[ |
| 25 |
.I infile |
| 26 |
[ |
| 27 |
.I outfile |
| 28 |
] ] |
| 29 |
.SH DESCRIPTION |
| 30 |
.I Dvitodvi |
| 31 |
rearranges pages from a DVI file, creating a new DVI file. |
| 32 |
.I Dvitodvi |
| 33 |
can be used to perform a large number of arbitrary re-arrangements of |
| 34 |
Documents, including arranging for printing 2-up, 4-up, booklets, reversing, |
| 35 |
selecting front or back sides of documents, scaling, etc. |
| 36 |
.PP |
| 37 |
.I pagespecs |
| 38 |
follow the syntax: |
| 39 |
.RS |
| 40 |
.TP 12 |
| 41 |
.I pagespecs |
| 42 |
.I = [modulo:][mag@]specs |
| 43 |
.TP |
| 44 |
.I specs |
| 45 |
.I = spec[+specs][,specs] |
| 46 |
.TP |
| 47 |
.I spec |
| 48 |
.I = [-]pageno[(xoff,yoff)] |
| 49 |
.RE |
| 50 |
.sp |
| 51 |
.I modulo |
| 52 |
is the number of pages in each block. The value of |
| 53 |
.I modulo |
| 54 |
should be greater than 0; the default value is 1. |
| 55 |
The optional |
| 56 |
.I mag |
| 57 |
parameter adjusts the file's magnification by the magnification specified. The |
| 58 |
magnification and modulo can be specified in reverse order if desired. |
| 59 |
.I specs |
| 60 |
are the page specifications for the pages in each block. The value of the |
| 61 |
.I pageno |
| 62 |
in each |
| 63 |
.I spec |
| 64 |
should be between 0 (for the first page in the block) and \fImodulo\fR-1 |
| 65 |
(for the last page in each block) inclusive. |
| 66 |
The optional dimensions |
| 67 |
.I xoff |
| 68 |
and |
| 69 |
.I yoff |
| 70 |
shift the page by the specified (positive) amount. |
| 71 |
.I xoff |
| 72 |
and |
| 73 |
.I yoff |
| 74 |
are in PostScript's points, but may be followed by the units |
| 75 |
.B "cm" |
| 76 |
or |
| 77 |
.B "in" |
| 78 |
to convert to centimetres or inches, or the flag |
| 79 |
.B "w" |
| 80 |
or |
| 81 |
.B "h" |
| 82 |
to specify as a multiple of the width or height. |
| 83 |
If the optional minus sign is specified, the page is relative to the end of |
| 84 |
the document, instead of the start. |
| 85 |
|
| 86 |
If page \fIspec\fRs are separated by |
| 87 |
.B + |
| 88 |
the pages will be merged into one page; if they are separated by |
| 89 |
.B , |
| 90 |
they will be on separate pages. |
| 91 |
If there is only one page specification, with |
| 92 |
.I pageno |
| 93 |
zero, the \fIpageno\fR may be omitted. |
| 94 |
.PP |
| 95 |
The |
| 96 |
.I \-w |
| 97 |
option gives the width which is used by the |
| 98 |
.B "w" |
| 99 |
dimension specifier, and the |
| 100 |
.I \-h |
| 101 |
option gives the height which is used by the |
| 102 |
.B "h" |
| 103 |
dimension specifier. These dimensions are also used (after scaling) to set the |
| 104 |
clipping path for each page. |
| 105 |
.PP |
| 106 |
Dvitodvi normally prints the page numbers of the pages re-arranged; the |
| 107 |
.I \-q |
| 108 |
option suppresses this. |
| 109 |
.SH EXAMPLES |
| 110 |
This section contains some sample re-arrangements. To put two pages on one |
| 111 |
sheet (of landscaped A3 paper), the pagespec to use is: |
| 112 |
.sp |
| 113 |
.RS |
| 114 |
2:0+1(21cm,0) |
| 115 |
.RE |
| 116 |
.sp |
| 117 |
To reduce an A3 page to A4 size, the pagespec to use is: |
| 118 |
.sp |
| 119 |
.RS |
| 120 |
700@(-.3in,-.3in) |
| 121 |
.RE |
| 122 |
.sp |
| 123 |
To select all of the odd pages in reverse order, use: |
| 124 |
.sp |
| 125 |
.RS |
| 126 |
2:-0 |
| 127 |
.RE |
| 128 |
.sp |
| 129 |
.SH AUTHOR |
| 130 |
Angus Duggan, from dviselect(1), by |
| 131 |
Chris Torek, University of Maryland. Currently maintained as part |
| 132 |
of TeX Live (https://tug.org/texlive). |
| 133 |
.SH "SEE ALSO" |
| 134 |
dvibook(1), dviconcat(1), dviselect(1), latex(1), tex(1) |
| 135 |
.br |
| 136 |
.I "MC-TeX User's Guide" |
| 137 |
.SH BUGS |
| 138 |
.I Dvitodvi |
| 139 |
does not adjust some of the parameters in the postamble. This may be a problem |
| 140 |
if these values are used to size certain structures in the output |
| 141 |
conversion programs. |