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 πŸ’œ

  • modulo is how many pages are in each block. It has to be greater than 0, and if you don't give one it defaults to 1 πŸ“
  • mag is 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 🌈
  • specs are the page specifications for the pages in each block. Each pageno should be between 0 (the first page in the block) and modulo-1 (the last page in the block), inclusive ✨
  • xoff and yoff shift the page by the given (positive) amount. They're in PostScript's points by default, but you can add the units cm or in to get centimetres or inches. You can also use the flag w or h to 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 🧚✨