Name | Type | Usage |
---|---|---|
N | fn | Short for def |
SI | var | Used to store the state at the beginning of a page (but after bop-hook), and restore it at the end. |
V | fn | Do nothing ? |
Note that, like many programs producing PostScript code, the files aren't indented and the names used are very short (to save communication time with the printer ? The header is tiny with respect to the data to be printed, anyway). This doesn't make them very readable, but we have to live with that.
dvips -h twobypage your-file.dvi > your-file.ps
(Assuming you saved it under the name "twobypage"). The header works
by defining the functions /bop-hook, /eop-hook and
/end-hook, that are called by the dvips generated program at
the beginning of each page, the end of each page and end of the file,
respectively. The only trouble is that /eop-hook is called
after the showpage, the PostScript instruction that
provokes the printing of the page and resets the graphics state.
But
twobypage needs to execute code in place of the showpage,
since printing is called only after every two pages. The work around is to
redefine the showpage instruction. Not every interpreter may be happy with
this, so you'll have to try.
I wrote this for dvips 5.516.