DVItoDVI - general page imposition for DVI files


dvitodvi [-v] [-q] [-r] [-d lwidth] [-o x,y] [-w width] [-h height] [-p paper] [-s scale] [-m mag] pagespec [[in.dvi] out.dvi]


DVItoDVI is used for re-arranging pages from a DVI file.

The pagespec is quite general, and can be used for page selection, n-up imposition, page scaling, and other tricks. It has the general form modulo:spec, where spec is [-]pageno[@scale] [(xoff,yoff)] [,spec|+spec]. The pages are dealt with in blocks; modulo specifies the number of pages in each block. The default value is one, and the value should be greater than zero. The value of the pageno in each spec should be between 0 (the first page in the block), and modulo-1 (the last page in each block). If a minus sign appears before the pageno, the page is calculated relative to the end of the document rather than the start.

The optional dimensions xoff and yoff shift the page by the specified amount; any of TeX's units can be used. The scale parameter can be used to re-scale the page by a fractional amount.

A plus sign before an elements in a page specification indicates that the element should be placed on the same page as the previous element. A comma indicates that a new output page should be generated for that element.

An offset can be applied to the whole page with the -o option. This option takes two comma-separated dimensions, which are the horizontal and vertical offsets to apply to the whole page.

The -w, -h, and -p options are used to set the page size of the input (and output) file; the parameters to -w and -h can be specified in any of the normal TeX dimensions, or the name of a paper size can be given to -p. The currently supported paper sizes are: A3, A4, A5, B5, Letter, Legal, Ledger, Tabloid, Statement, Executive, Folio, Quarto, and 10 by 14 (10x14). If a papersize special command is found in the file, the dimensions specified by it will be used instead.

A line of the specified thickness will be drawn around each imposed page if the -d option specifies a postive dimension.

The -r flag indicates if the whole page should be turned into landscape, or turned from landscape to portrait if it is already oriented that way.

The -s option introduces a magnification factor, which is applied to the whole document. Alternatively, the -m option can be used to set the magnification factor for the whole document.

If no output file is specified on the command line, the output is written to the standard output. If no input file is specified on the command line, the input is read from the standard input.


To place two A4 pages side by side, making an A3 page:
dvitodvi -p A4 "2:0+1(1w,0)" input.dvi output.dvi
A cascade of smaller and smaller pages can be created by:
dvitodvi -p A4 "4:0+1@.8(1w,0)+2@.6(1.8w,0)+3@.4(2.4w,0)" input.dvi output.dvi

[Home] [Up]
Last modified on 12th February 2004 by