dvipost(1)

πŸ“¦ version 1.1, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

dvipost, pptex, pplatex β€” post processing of dvi files


okay so welcome to dvipost(1) from the General Commands Manual, bestie. this page is about post-processing dvi files and it is lowkey iconic, let's get into it πŸ’…

✨ SYNOPSIS ✨

dvipost [-debug] [-version] [-help] in out

pplatex [-debug] [-version] [-help] [LaTeX-Arguments]

pptex [-debug] [-version] [-help] [TeX-Arguments]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so dvipost is a post processor for dvi files β€” the ones made by latex or tex. it exists for the special modes that normally need help from dvi drivers (think dvips). with dvipost, those features can be implemented independent of whichever driver you prefer. right now the post processor supports layout raster, change bars and overstrike mode. periodt.

this version of dvipost does not seek the dvi file, so you can literally use it as a filter 🫢. if - is given as a file name, the command uses standard input or standard output respectively. and heads up: the command does not substitute a missing .dvi extension onto the filename.

because the command works with a temporary file and only creates the output file after successfully processing the input file, it is possible to use the same name for input and output. no cap, that's genuinely convenient ✨.

if the command is renamed or linked to pplatex/pptex, it runs latex/tex and post processes the created output. if the name of the dvi file could not be determined by the arguments to latex/tex (e.g. on an interactive run), the command processes all dvi files in the current directory with a modification time later than the run of latex/tex. the way that works is so main character energy πŸ‘‘

🌸 Basics 🌸

if the filter is used in context of LaTeX, the style file dvipost.sty should be included in the LaTeX source.

the filter interprets dvi extensions in the form of

dvipost: name [arg]

where arg depends on the command name and may be separated from name by = or a space. all other extensions are not interpreted by dvipost and remain in the dvi file.

such a dvipost command could be placed with the TeX primitive

\special{dvipost: cmd}

or the LaTeX macro (provided by dvipost.sty)

\dvipost{cmd}

in the dvi file.

depending on the type of dvipost commands, the following kinds of arguments may be used:

  • length β€” a floating point number followed by a unit specification. the following units are supported by dvipost: pt, in, cm and mm. if no argument is given or the unit specification is missing, the corresponding length is set to 0.
  • string β€” an arbitrary string argument.
  • flag β€” an integer argument, where a value different from 0 (usually 1) means true and a missing value or 0 means false.
  • depth β€” an integer argument, where a value different from 0 (usually 1) increments a depth counter and a missing value or 0 decrements it.

πŸŽ€ Change bars πŸŽ€

all text printed with change mode level higher than 0 is marked with a change bar. slay.

the following LaTeX macros modify the change mode level:

  • \changestart β€” increments the change mode level.
  • \changeend β€” decrements the change mode level.
  • \textchanged text β€” increments the change mode level for text only.

the following dvipost commands are used in context of change bars:

  • cbmode depth β€” increments/decrements the change mode level. this command is used by the LaTeX macros.
  • cbrule length β€” determines the thickness of the change bar. the default value is 2pt.
  • cbsep length β€” sets the distance between page margin and change bar. the default value is 2pt.
  • cbexp length β€” sets the additional height and depth of a character in calculating the change bar positions. the default value is 6pt.
  • cbstart string β€” places the dvi extension string before printing characters in change mode.
  • cbend string β€” places the dvi extension string after printing characters in change mode.

the use of cbstart and cbend allows you to set additional attributes to the marked text, depending on the dvi driver πŸ‘‘

if dvips is used as dvi driver and the preamble of the LaTeX source contains

\usepackage{dvipost}
\dvipost{cbstart color push Blue}
\dvipost{cbend color pop}

the marked text is colored blue. cute AND functional πŸ’™

🌈 Overstrike mode 🌈

all text printed with overstrike level higher than 0 is overstriked with a horizontal line.

the overstrike line is positioned at the mean height of every block of text not broken by vertical movements and font changes.

the following LaTeX macros modify the overstrike level:

  • \overstrikeon β€” increments the overstrike level.
  • \overstrikeoff β€” decrements the overstrike level.
  • \overstrike text β€” increments the overstrike level for text only.

the following dvipost commands are used in context of overstrike mode:

  • osmode depth β€” increments/decrements the overstrike level. this command is used by the LaTeX macros.
  • osrule length β€” sets the thickness of the overstrike line to length. the default value is \fboxrule.
  • osstart string β€” places the dvi extension string before change of overstrike mode.
  • osend string β€” places the dvi extension string after change of overstrike mode.

the use of osstart and osend is similar to cbstart and cbend.

πŸ’œ Layout parameters πŸ’œ

layout parameters are transfered to the dvi file on loading the style file. if any changes are made to layout parameters, like \evensidemargin, the macro \dvipostlayout must be called to get the correct placement of change bars. additional calls to \dvipostlayout are harmless. fr fr, call it as much as you want.

the following layout parameters are transfered to the dvi file: \hoffset, \voffset, \textwidth, \textheight, \oddsidemargin, \evensidemargin, \topmargin, \headheight, \headsep, \footskip, \marginparsep and \marginparwidth. additionally the flag twoside is set to 0 or 1, depending on the document style option twoside.

instead of calling \dvipostlayout, particular values could be set. the command

\dvipost{evensidemargin=\the\evensidemargin}

transfers the actual setting of \evensidemargin to the dvi file.

the dvipost command allows the printing of the layout raster by setting layout to a length different to 0. the value of layout is used as the thickness of the raster lines.

for example: the command

\dvipost{layout=\the\fboxrule}

activates the layout raster and uses the same line thickness as frame boxes. ✨

πŸ’€ NOTES πŸ’€

the filter is primarily written for LaTeX. it could be used for plain TeX, but currently there is no assistance style file included in the distribution. maybe someone would write one β€” I am not a plain TeX user. πŸ™ˆ

the current state of change bar mode and overstrike mode must be committed to environments, which are placed on different locations than the current text. this is done in dvipost.sty by redefining \color@begingroup and \color@endgroup. this may conflict with other packages. so like, watch out bestie 😭

if the macro \footnoterule is redefined, it should start with the command \dvipost{footnote} for a correct handling of overstrike mode and change bars.

Copyright (C) 2002 Erich Fruehstueck


and that's the whole page, bestie 🫢 this was dvipost(1) from the General Commands Manual, copyright 2002 Erich Fruehstueck β€” go forth and post-process your dvi files, you absolute icon πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from