DVITODVI(1)
π DVITODVI(1) π
General Commands Manual, manual page DVITODVI(1), all about dvitodvi, the tool that rearranges pages in a DVI file β¨
π NAME π
dvitodvi - rearrange pages in a DVI file π¦
πΈ SYNOPSIS πΈ
dvitodvi [ -q ] [ -i infile ] [ -o outfile ] [ -wwidth ] [ -hheight ]
pagespecs [ infile [ outfile ] ]
π DESCRIPTION π
okay so dvitodvi takes the pages from a DVI file and makes a brand new DVI file out of them π§ bestie, it can do a huge number of arbitrary rearrangements, like 2-up, 4-up, booklets, reversing, picking just the front or back sides of a document, scaling, and more. literally so versatile ππ₯
The pagespecs follow this syntax:
pagespecs = [modulo:][mag@]specs
specs = spec[+specs][,specs]
spec = [-]pageno[(xoff,yoff)]
Let's break the vibe down, fr fr π
modulois how many pages are in each block. It has to be greater than 0, and if you don't give one it defaults to1πmagis optional and adjusts the file's magnification to whatever you specify. You can also put the magnification and the modulo in reverse order if you want, no cap πspecsare the page specifications for the pages in each block. Eachpagenoshould be between0(the first page in the block) andmodulo-1(the last page in the block), inclusive β¨xoffandyoffshift the page by the given (positive) amount. They're in PostScript's points by default, but you can add the unitscmorinto get centimetres or inches. You can also use the flagworhto say it's a multiple of the width or height π«Ά- If you add a minus sign, the page is measured relative to the end of the document instead of the start. the way that's so handy for backwards stuff π
Now the separators are the real tea β If you separate page specs with +, the pages get merged into one page. If you separate them with ,, they go on separate pages. And if there's only one page specification and its pageno is zero, you can just leave the pageno out totally, iykyk π
The -w option gives the width that the w dimension specifier uses, and the -h option gives the height that the h dimension specifier uses. These dimensions also get used (after scaling) to set the clipping path for each page, so everything stays in its lane π
By default, dvitodvi prints the page numbers of the pages it rearranges. If that's too chatty for you, the -q option shuts it up π€«
β¨ EXAMPLES β¨
This section has some sample re-arrangements, bestie, so you can see the magic happen πͺ
To put two pages on one sheet (of landscaped A3 paper), the pagespec you want is:
2:0+1(21cm,0)
To shrink an A3 page down to A4 size, the pagespec is:
700@(-.3in,-.3in)
To select all of the odd pages in reverse order, use:
2:-0
π AUTHOR π
Angus Duggan, from dviselect(1), by Chris Torek, University of Maryland. It's currently maintained as part of TeX Live (https://tug.org/texlive) π
π¦ SEE ALSO π¦
dvibook(1), dviconcat(1), dviselect(1), latex(1), tex(1), and the MC-TeX User's Guide π
π BUGS π
Heads up, bestie: dvitodvi does not adjust some of the parameters in the postamble. This may be a problem if those values are used to size certain structures in the output conversion programs π
That's the tea, bestie! Man page courtesy of TeX Live, dated 8 September 2020 πΈπ Stay iconic, and go rearrange something amazing π§β¨
π¦ where this page comes from
- alpine 3.24: texlive-doc 2026.0-r0 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- arch rolling: texlive-doc 2026.1-1 Β· GPL
- debian bookworm: texlive-binaries 2022.20220321.62855-5.1+deb12u2
- debian trixie: texlive-binaries 2024.20240313.70630+ds-6 Β· TeX-Live
- fedora 43: texlive-seetexk 11:svn57972-93.fc43 Β· MIT
- fedora 43: texlive-seetexk 11:svn57972-95.fc43.1 Β· MIT
- fedora 44: texlive-seetexk 12:svn57972-105.fc44 Β· MIT
- fedora 44: texlive-seetexk 12:svn57972-111.fc44 Β· MIT
- opensuse-leap 16.0: texlive-seetexk 2025.221.svn57972-160000.3.1 Β· LPPL-1.0
- ubuntu jammy: texlive-binaries 2021.20210626.59705-1build1
- ubuntu jammy: texlive-binaries 2021.20210626.59705-1ubuntu0.3
- ubuntu noble: texlive-binaries 2023.20230311.66589-9build3 Β· TeX-Live
- ubuntu questing: texlive-binaries 2024.20240313.70630+ds-6ubuntu2 Β· TeX-Live
- ubuntu resolute: texlive-binaries 2025.20250727.75242+ds-5build1 Β· TeX-Live
- ubuntu stonking: texlive-binaries 2026.20260303.78225+ds-5ubuntu1 Β· TeX-Live
- Copyright (c) 1987-2020 UMD-CS, released under the X11 license
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms