home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-bin0.lha / info / dvips.info-2 (.txt) < prev    next >
GNU Info File  |  1996-10-12  |  49KB  |  865 lines

  1. This is Info file dvips.info, produced by Makeinfo-1.64 from the input
  2. file /ade-src/contrib/unixtex/dvipsk/dvips.texi.
  3. START-INFO-DIR-ENTRY
  4. * DVIps: (dvips).         DVI-to-PostScript translator.
  5. END-INFO-DIR-ENTRY
  6. File: dvips.info,  Node: Invoking dvips,  Next: Config File,  Prev: PostScript fonts,  Up: Top
  7. Invoking `dvips'
  8. ****************
  9.   The dvips driver has a plethora of command line options.  Reading
  10. through this section will give a good idea of the capabilities of the
  11. driver.
  12.   Many of the parameterless options listed here can be turned off by
  13. immediately suffixing the option with a zero (0); for instance, to turn
  14. off page reversal if it is turned on by default, use `-r0'.  The
  15. options that can be turned off in this way are `a', `f', `k', `i', `m',
  16. `q', `r', `s', `E', `F', `K', `M', `N', `U', and `Z'.
  17.   This is a handy summary of the options; it is printed out when you run
  18. dvips with no arguments.
  19.      This is dvipsk VERSION Copyright 1986, 1993 Radical Eye Software
  20.           Usage: dvips [options] filename[.dvi]
  21.       a*  Conserve memory, not time      y # Multiply by dvi magnification
  22.       b # Page copies, for posters e.g.  A   Print only odd (TeX) pages
  23.       c # Uncollated copies              B   Print only even (TeX) pages
  24.       d # Debugging                      C # Collated copies
  25.       e # Maxdrift value                 D # Resolution
  26.       f*  Run as filter                  E*  Try to create EPSF
  27.       h f Add header file                F*  Send control-D at end
  28.       i*  Separate file per section      K*  Pull comments from inclusions
  29.       k*  Print crop marks               M*  Don't make fonts
  30.       l # Last page                      N*  No structured comments
  31.       m*  Manual feed                    O c Set/change paper offset
  32.       n # Maximum number of pages        P s Load config.$s
  33.       o f Output file                    R   Run securely
  34.       p # First page                     S # Max section size in pages
  35.       q*  Run quietly                    T c Specify desired page size
  36.       r*  Reverse order of pages         U*  Disable string param trick
  37.       s*  Enclose output in save/restore V*  Send downloadable PS fonts as PK
  38.       t s Paper format                   X # Horizontal resolution
  39.       x # Override dvi magnification     Y # Vertical resolution
  40.                                          Z*  Compress bitmap fonts
  41.       pp #-# First-last page
  42.           # = number   f = file   s = string  * = suffix, `0' to turn off
  43.           c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)
  44.      Ask for additional options from standard input.
  45.      Conserve memory by making three passes over the `dvi' file instead
  46.      of two and only loading those characters actually used.  Generally
  47.      only useful on machines with a very limited amount of memory, like
  48.      some PCs.
  49. `-c NUM'
  50.      Generate NUM copies of every page.  Default is 1. (For collated
  51.      copies, see the `-C' option below.)
  52. `-b NUM'
  53.      Generate NUM copies of each page, but duplicating the page body
  54.      rather than using the `#numcopies' option.  This can be useful in
  55.      conjunction with a header file setting `\bop-hook' to do color
  56.      separations or other neat tricks.
  57. `-d NUM'
  58.      Set the debug flags.  This is intended only for emergencies or for
  59.      unusual fact-finding expeditions; it will work only if dvips has
  60.      been compiled with the `DEBUG' option.  *Note Debug Options::, for
  61.      the possible values of NUM.  Use a value of `-1', and specify the
  62.      option first, for maximum output.
  63. `-e NUM'
  64.      Make sure that each character is placed at most this many pixels
  65.      from its `true' resolution-independent position on the page. The
  66.      default value of this parameter is resolution dependent (it is the
  67.      number of entries in the list [100, 200, 300, 400, 500, 600, 800,
  68.      1000, 1200, 1600, 2000, 2400, 2800, 3200, ...] that are less than
  69.      or equal to the resolution in dots per inch). Allowing individual
  70.      characters to `drift' from their correctly rounded positions by a
  71.      few pixels, while regaining the true position at the beginning of
  72.      each new word, improves the spacing of letters in words.
  73.      Run as a filter.  Read the `dvi' file from standard input and
  74.      write the PostScript to standard output.  The standard input must
  75.      be seekable, so it cannot be a pipe.  If you must use a pipe,
  76.      write a shell script that copies the pipe output to a temporary
  77.      file and then points dvips at this file.  This option also
  78.      disables the automatic reading of the `PRINTER' environment
  79.      variable; use `-P$PRINTER' after the `-f' to read it anyway.  It
  80.      also turns off the automatic sending of control D if it was turned
  81.      on with the `-F' option or in the configuration file; use `-F'
  82.      after the `-f' to send it anyway.
  83. `-h NAME'
  84.      Prepend file NAME as an additional header file. (However, if the
  85.      name is simply `-', suppress all header files from the output.)
  86.      This header file gets added to the PostScript `userdict'.
  87.      Make each section be a separate file.  Under certain circumstances,
  88.      dvips will split the document up into `sections' to be processed
  89.      independently; this is most often done for memory reasons.  Using
  90.      this option tells dvips to place each section into a separate
  91.      file; the new file names are created replacing the suffix of the
  92.      supplied output file name by a three-digit sequence number.  This
  93.      option is most often used in conjunction with the `-S' option
  94.      which sets the maximum section length in pages.  For instance,
  95.      some phototypesetters cannot print more than ten or so consecutive
  96.      pages before running out of steam; these options can be used to
  97.      automatically split a book into ten-page sections, each to its own
  98.      file.
  99.      Print crop marks.  This option increases the paper size (which
  100.      should be specified, either with a paper size special or with the
  101.      `-T' option) by a half inch in each dimension.  It translates each
  102.      page by a quarter inch and draws cross-style crop marks.  It is
  103.      mostly useful with typesetters that can set the page size
  104.      automatically.
  105. `-l NUM'
  106.      The last page printed will be the first one numbered NUM. Default
  107.      is the last page in the document.  If the NUM is prefixed by an
  108.      equals sign, then it (and any argument to the `-p' option) is
  109.      treated as a sequence number, rather than a value to compare with
  110.      `\count0' values.  Thus, using `-l =9' will end with the ninth
  111.      page of the document, no matter what the pages are actually
  112.      numbered.
  113.      Specify manual feed for printer.
  114. `-mode MODE'
  115.      Use MODE as the Metafont device name for path searching and
  116.      generating fonts.  This overrides any value from configuration
  117.      files.  With the default paths, explicitly specifying the mode
  118.      also makes the program assume the fonts are in a subdirectory
  119.      named MODE.  *Note TeX directory structure: (kpathsea)TeX
  120.      directory structure.
  121.      If Metafont seems not to understand the MODE name, see *Note
  122.      Unable to Generate Fonts::.
  123. `-n NUM'
  124.      At most NUM pages will be printed. Default is 100000.
  125. `-o NAME'
  126.      The output will be sent to file NAME.  If no file name is given,
  127.      the default name is `FILE.ps' where the `dvi' file was called
  128.      `FILE.dvi'; if this option isn't given, any default in the
  129.      configuration file is used.  If the first character of the
  130.      supplied output file name is `!' or `|', then the remainder will
  131.      be used as an argument to `popen'; thus, specifying `|lpr' as the
  132.      output file will automatically queue the file for printing as
  133.      usual.  This option also disables the automatic reading of the
  134.      `PRINTER' environment variable, and turns off the automatic
  135.      sending of control D.  See the `-f' option for how to override
  136.      this.
  137. `-p NUM'
  138.      The first page printed will be the first one numbered NUM. Default
  139.      is the first page in the document.  If the NUM is prefixed by an
  140.      equals sign, then it (and any argument to the `-l' option) is
  141.      treated as a sequence number, rather than a value to compare with
  142.      `\count0' values.  Thus, using `-p =3' will start with the third
  143.      page of the document, no matter what the pages are actually
  144.      numbered.
  145. `-pp FIRST-LAST'
  146.      Print pages FIRST through LAST; equivalent to `-p FIRST -l LAST'.
  147.      The `-' range separator can also be a `:'.
  148.      Run quietly.  Don't chatter about pages converted, etc.; report
  149.      nothing but errors to standard error.
  150.      Stack pages in reverse order.  Normally, page 1 will be printed
  151.      first.
  152.      Causes the entire global output to be enclosed in a save/restore
  153.      pair.  This causes the file to not be truly conformant, and is
  154.      thus not recommended, but is useful if you are driving the printer
  155.      directly and don't care too much about the portability of the
  156.      output.
  157. `-t PAPERTYPE'
  158.      This sets the paper type to PAPERTYPE.  The PAPERTYPE should be
  159.      defined in one of the configuration files, along with the
  160.      appropriate code to select it.  See the documentation for `@'in the
  161.      configuration file option descriptions.  You can also specify `-t
  162.      landscape', which rotates a document by 90 degrees.  To rotate a
  163.      document whose size is not letter, you can use the `-t' option
  164.      twice, once for the page size, and once for `landscape'.  The upper
  165.      left corner of each page in the `dvi' file is placed one inch from
  166.      the left and one inch from the top.  Use of this option is highly
  167.      dependent on the configuration file.  Note that executing the
  168.      `letter' or `a4' or other PostScript operators cause the document
  169.      to be nonconforming and can cause it not to print on certain
  170.      printers, so the default paper size should not execute such an
  171.      operator if at all possible.
  172. `-x NUM'
  173.      Set the magnification ratio to NUM/1000. Overrides the
  174.      magnification specified in the `dvi' file.  Must be between 10 and
  175.      100000.  It is recommended that you use standard magstep values
  176.      (1095, 1200, 1440, 1728, 2074, 2488, 2986, and so on) to help
  177.      reduce the total number of PK files generated.
  178.      This option prints only the odd pages.  This option uses the \TeX\
  179.      page numbering rather than the sequence page numbers.
  180.      This option prints only the even pages.  This option uses the \TeX\
  181.      page numbering rather than the sequence page numbers.
  182. `-C NUM'
  183.      Create NUM copies, but collated (by replicating the data in the
  184.      PostScript file).  Slower than the `-c' option, but easier on the
  185.      hands, and faster than resubmitting the same PostScript file
  186.      multiple times.
  187. `-D NUM'
  188.      Set the resolution in dpi (dots per inch) to NUM. This affects the
  189.      choice of bitmap fonts that are loaded and also the positioning of
  190.      letters in resident PostScript fonts. Must be between 10 and 10000.
  191.      This affects both the horizontal and vertical resolution.  If a
  192.      high resolution (something greater than 400 dpi, say) is selected,
  193.      the `-Z' flag should probably also be used.
  194.      Makes dvips attempt to generate an EPSF file with a tight bounding
  195.      box.  This only works on one-page files, and it only looks at
  196.      marks made by characters and rules, not by any included graphics.
  197.      In addition, it gets the glyph metrics from the `tfm' file, so
  198.      characters that lie outside their enclosing `tfm' box may confuse
  199.      it.  In addition, the bounding box might be a bit too loose if the
  200.      character glyph has significant left or right side bearings.
  201.      Nonetheless, this option works well for creating small EPSF files
  202.      for equations or tables or the like.  (Of course, `dvips' output
  203.      is resolution dependent and thus does not make very good EPSF
  204.      files, especially if the images are to be scaled; use these EPSF
  205.      files with a great deal of care.)
  206.      Causes Control-D (ASCII code 4) to be appended as the very last
  207.      character of the PostScript file.  This is useful when dvips is
  208.      driving the printer directly instead of working through a spooler,
  209.      as is common on extremely small systems.  Otherwise, it is not
  210.      recommended.
  211.      This option causes comments in included PostScript graphics, font
  212.      files, and headers to be removed.  This is sometimes necessary to
  213.      get around bugs in spoolers or PostScript post-processing
  214.      programs.  Specifically, the `%%Page' comments, when left in,
  215.      often cause difficulties.  Use of this flag can cause some
  216.      included graphics to fail, since the PostScript header macros from
  217.      some software packages read portions of the input stream line by
  218.      line, searching for a particular comment.  This option has been
  219.      turned off by default because PostScript previewers and spoolers
  220.      have been getting better.
  221.      Turns off the automatic font generation facility.  If any fonts are
  222.      missing, commands to generate the fonts are appended to the file
  223.      `missfont.log' in the current directory; this file can then be
  224.      executed to create the missing fonts.
  225.      Turns off structured comments; this might be necessary on some
  226.      systems that try to interpret PostScript comments in weird ways,
  227.      or on some PostScript printers.  Old versions of TranScript in
  228.      particular cannot handle modern Encapsulated PostScript.
  229. `-O OFFSET'
  230.      Move the origin by a certain amount.  The OFFSET is a
  231.      comma-separated pair of dimensions, such as `.1in,-.3cm' (in the
  232.      same syntax used in the `papersize' special).  The origin of the
  233.      page is shifted from the default position (of one inch down, one
  234.      inch to the right from the upper left corner of the paper) by this
  235.      amount.
  236. `-P PRINTERNAME'
  237.      Sets up the output for the appropriate printer.  This is
  238.      implemented by reading in `config.PRINTERNAME', which can then set
  239.      the output pipe (as in, `o !lpr -Pprintername') as well as the font
  240.      paths and any other defaults for that printer only.  It is
  241.      recommended that all standard defaults go in the one master
  242.      `config.ps' file and only things that vary printer to printer go
  243.      in the `config.PRINTERNAME' files.  Note that `config.ps' is read
  244.      before `config.PRINTERNAME'.  In addition, another file called
  245.      `~/.dvipsrc' is searched for immediately after `config.ps'; this
  246.      file is intended for user defaults.  If no `-P' command is given,
  247.      the environment variable `PRINTER' is checked.  If that variable
  248.      exists, and a corresponding configuration file exists, that
  249.      configuration file is read in.
  250.      Run securely. This disables command execution in `\special' (via
  251.      ``') and config files (via the `E' option), pipes as output files,
  252.      and opening of any absolute filenames.
  253. `-S NUM'
  254.      Set the maximum number of pages in each `section'.  This option is
  255.      most commonly used with the `-i' option; see that documentation
  256.      above for more information.
  257. `-T OFFSET'
  258.      Set the paper size to the given pair of dimensions.  This option
  259.      takes its arguments in the same style as `-O'.  It overrides any
  260.      paper size special in the `dvi' file.
  261.      Disable a PostScript virtual memory saving optimization that
  262.      stores the character metric information in the same string that is
  263.      used to store the bitmap information.  This is only necessary when
  264.      driving the Xerox 4045 PostScript interpreter.  It is caused by a
  265.      bug in that interpreter that results in `garbage' on the bottom of
  266.      each character.  Not recommended unless you must drive this
  267.      printer.
  268.      Download non-resident PostScript fonts as bitmaps.  This requires
  269.      use of `mtpk' or `pstopk' or some combination of the two in order
  270.      to generate the required bitmap fonts; neither of these programs
  271.      are supplied with Dvips.
  272. `-X NUM'
  273.      Set the horizontal resolution in dots per inch to NUM.
  274. `-Y NUM'
  275.      Set the vertical resolution in dots per inch to NUM.
  276.      Causes bitmapped fonts to be compressed before they are downloaded,
  277.      thereby reducing the size of the PostScript font-downloading
  278.      information.  Especially useful at high resolutions or when very
  279.      large fonts are used.  Will slow down printing somewhat,
  280.      especially on early 68000-based PostScript printers.
  281. File: dvips.info,  Node: Config File,  Next: Font Generation,  Prev: Invoking dvips,  Up: Top
  282. Configuration File Searching
  283. ****************************
  284.   The dvips program has a system of loading configuration files such
  285. that parameters can be set globally across the system, on a per-printer
  286. basis, or by the user.
  287.   When dvips starts up, first the global `config.ps' file is searched
  288. for and loaded.  This file is looked for along the path for
  289. configuration files, which is set in the `Makefile' at compilation.
  290. After this master configuration file is loaded, a file by the name of
  291. `.dvipsrc' is loaded from the current user's home directory, if such a
  292. file exists.  This file is loaded in exactly the same way as the global
  293. configuration file, and it can override any options set in the global
  294. file.
  295.   Then the command line is read and parsed.  If the `-P' option is
  296. encountered, at that point in the command line a configuration file for
  297. that printer is read in.  Thus, the printer configuration file can
  298. override anything in the global or user configuration file, and it can
  299. also override most options in the command line up to the point that the
  300. `-P' option was encountered.
  301.   After the command line has been completely scanned, if there was no
  302. `-P' option selected, and also the `-o' and `-f' command line options
  303. were not used, a `PRINTER' environment variable is searched for.  If
  304. this variable exists, and a configuration file for the printer
  305. mentioned in it exists, this configuration file is loaded last of all.
  306.   Because the printer-specific configuration files are read after the
  307. user's configuration file, the user cannot override things in the
  308. printer configuration files.  On the other hand, the configuration path
  309. usually includes the current directory, and can be set to include the
  310. user's home directory (or any other directory of the user), so the user
  311. can always provide his or her own printer-specific configuration files
  312. that will be found before the system global ones.
  313.   A few options are treated specially, in that they are not overridden
  314. by configuration files:
  315. `-mode'
  316.      This overrides any mode setting (`M' line) in `config.*'.  `-mode'
  317.      does not affect the resolution, however.
  318.      This overrides any output setting (`o' line) in `config.*'.
  319.      As well as setting the current resolution, this unsets the mode if
  320.      the mode was set from a configuration file.  If `config.$PRINTER'
  321.      is read, however, any `D' or `M' lines from it will take effect.
  322.   The purpose of these special cases is to (1) minimize the chance of
  323. having a mismatched mode and resolution (which `MakeTeXPK' cannot
  324. handle), and (2) to let command-line options override config files.
  325. * Menu:
  326. * Config File Options::         Details of dvips config.* files.
  327. File: dvips.info,  Node: Config File Options,  Up: Config File
  328. Configuration File Options
  329. ==========================
  330.   Most of the configuration file options are similar to the command line
  331. options, but there are a few new ones.
  332.   Again, many may be turned off by suffixing the letter with a zero (0).
  333. These options are `a', `f', `q', `r', `K', `N', `U', and `Z'.
  334.   Within a configuration file, any empty line or line starting with a
  335. space, asterisk, equal sign, or a pound sign is ignored.
  336. `@ NAME HSIZE VSIZE'
  337.      This option is used to set the paper size defaults and options for
  338.      the particular printer this configuration file describes.  There
  339.      are three formats for this option.  If the option is specified on
  340.      a line by itself, with no parameters, it instructs dvips to
  341.      discard all other paper size information (possibly from another
  342.      configuration file) and start fresh.  If three parameters are
  343.      given, as above, with the first parameter being a name and the
  344.      second and third being a dimension (as in 8.5in or 3.2cc, just
  345.      like in the `papersize' special), then the option is interpreted
  346.      as starting a new paper size description, where NAME is the name
  347.      and HSIZE and VSIZE describe the horizontal and vertical size of
  348.      the sheet of paper, respectively.  If both HSIZE and VSIZE are
  349.      equal to zero (although you must still specify units!) then any
  350.      page size will match it.  If the `@' character is immediately
  351.      followed by a `+' sign, then the remainder of the line (after
  352.      skipping any leading blanks) is treated as PostScript code to send
  353.      to the printer to select that particular paper size.  After all
  354.      that, if the first character of the line is an exclamation point,
  355.      then the line is put in the initial comments section of the final
  356.      output file; else, it is put in the setup section of the output
  357.      file.  For instance, a subset of the paper size information
  358.      supplied in the default `config.ps' looks like
  359.           @ letterSize 8.5in 11in
  360.           @ letter 8.5in 11in
  361.           @+ %%BeginPaperSize: Letter
  362.           @+ letter
  363.           @+ %%EndPaperSize
  364.           @ legal 8.5in 14in
  365.           @+ ! %%DocumentPaperSizes: Legal
  366.           @+ %%BeginPaperSize: Legal
  367.           @+ legal
  368.           @+ %%EndPaperSize
  369.      Note that you can even include structured comments in the
  370.      configuration file!  When dvips has a paper format name given on
  371.      the command line, it looks for a match by the NAME; when it has a
  372.      `papersize' special, it looks for a match by dimensions.  The
  373.      first match found (in the order the paper size information is
  374.      found in the configuration file) is used.  If nothing matches, a
  375.      warning is printed and the first paper size given is used, so the
  376.      first paper size should always be the default.  The dimensions
  377.      must match within a quarter of an inch.  Landscape mode for all of
  378.      the paper sizes are automatically supported.  If your printer has
  379.      a command to set a special paper size, then give dimensions of
  380.      `0in 0in'; the PostScript code that sets the paper size can refer
  381.      to the dimensions the user requested as `hsize' and `vsize'; these
  382.      will be macros defined in the PostScript that return the requested
  383.      size in default PostScript units.  Note that virtually all of the
  384.      PostScript commands you use here are device dependent and degrade
  385.      the portability of the file; that is why the default first paper
  386.      size entry should not send any PostScript commands down (although a
  387.      structured comment or two would be okay).  Also, some printers want
  388.      `BeginPaperSize' comments and paper size setting commands; others
  389.      (such as the NeXT) want `PaperSize' comments and they will handle
  390.      setting the paper size.  There is no solution I could find that
  391.      works for both (except maybe specifying both.)  See the supplied
  392.      `config.ps' file for a more realistic example.
  393.      Conserve memory by making three passes over the `dvi' file instead
  394.      of two and only loading those characters actually used.  Generally
  395.      only useful on machines with a very limited amount of memory, like
  396.      some PCs.
  397. `b NUM'
  398.      Generate NUM copies of each page, but duplicating the page body
  399.      rather than using the `#numcopies' option.  This can be useful in
  400.      conjunction with a header file setting `\bop-hook' to do color
  401.      separations or other neat tricks.
  402. `e NUM'
  403.      Set the maximum drift parameter to NUM dots (pixels) as explained
  404.      above.
  405.      Run as a filter by default.
  406. `h NAME'
  407.      Add NAME as a PostScript header file to be downloaded at the
  408.      beginning.
  409. `i NUM'
  410.      Make each section be a separate file, and set the maximum number of
  411.      pages in a given file to NUM.  Under certain circumstances, dvips
  412.      will split the document into `sections' to be processed
  413.      independently; this is most often done for memory reasons.  Using
  414.      this option tells dvips to place each section into a separate
  415.      file; the new file names are created by replacing the suffix of
  416.      the supplied output file name with a three-digit sequence number.
  417.      This is essentially a combination of the command line options `-i'
  418.      and `-S'; see the documentation for these options for more
  419.      information.
  420. `m NUM'
  421.      The value NUM is the virtual memory available for fonts and
  422.      strings in the printer.  Default is 180000.  This value must be
  423.      accurate if memory conservation and document splitting is to work
  424.      correctly.  To determine this value, send the following file to
  425.      the printer:
  426.           %! Hey, we're PostScript
  427.           /Times-Roman findfont 30 scalefont setfont 144 432 moveto
  428.           vmstatus exch sub 40 string cvs show pop showpage
  429.      Note that the number returned by this file is the total memory
  430.      free; it is often a good idea to tell dvips that the printer has
  431.      somewhat less memory.  This is because many programs download
  432.      permanent macros that can reduce the memory in the printer.  In
  433.      general, a memory size of about `300000' is plenty, since dvips
  434.      can automatically split a document if required.  It is unfortunate
  435.      that PostScript printers with much less virtual memory still
  436.      exist.  Some systems or printers can dynamically increase the
  437.      memory available to a PostScript interpreter, in which case this
  438.      file might return a ridiculously low number; the NeXT computer is
  439.      such a machine.  For these systems, a value of one million works
  440.      well.
  441. `o NAME'
  442.      The default output file is set to NAME.  As above, it can be a
  443.      pipe.  Useful in printer-specific configuration files to redirect
  444.      the output to a particular printer queue.
  445. `p NAME'
  446.      The file to examine for PostScript font aliases is NAME.  It
  447.      defaults to `psfonts.map'.  This option allows different printers
  448.      to use different resident fonts.  If the name starts with a `+'
  449.      character, then the rest of the name (after any leading spaces) is
  450.      used as an additional map file; thus, it is possible to have local
  451.      map files pointed to by local configuration files that append to
  452.      the global map file.
  453.      Run quietly  by default.
  454.      Reverse the order of pages by default.
  455.      Enclose the entire document in a global save/restore pair by
  456.      default.  Not recommended, but useful in some environments; this
  457.      breaks the conformance of the document to the Adobe PostScript
  458.      structuring conventions.
  459. `D NUM'
  460.      Set the vertical and horizontal resolution to NUM dots per inch.
  461.      Useful in printer-specific configuration files.
  462. `E COMMAND'
  463.      Executes the command listed; can be used to get the current date
  464.      into a header file for inclusion, for instance.  Possibly
  465.      dangerous; in many installations this may be disabled, in which
  466.      case a warning message will be printed if the option is used.
  467. `H PATH'
  468.      The (colon-separated) path to search for PostScript header files is
  469.      PATH.  The environment variable `DVIPSHEADERS' overrides this.
  470.      Filter comments out of included PostScript files; see the
  471.      description above for more information.
  472. `M MODE'
  473.      Set MODE as the METAFONT mode to be used when generating fonts and
  474.      for path searching. The `-mode' option overrides this.  With the
  475.      default paths, specifying a mode this way also makes the program
  476.      assume the fonts are in a subdirectory named MODE.  *Note TeX
  477.      directory structure: (kpathsea)TeX directory structure.
  478.      Disable PostScript comments by default.
  479. `O OFFSET'
  480.      Move the origin by a certain amount.  The OFFSET is a
  481.      comma-separated pair of dimensions, such as `.1in,-.3cm' (in the
  482.      same syntax as used in the `papersize' special).  The origin of the
  483.      page is shifted from the default position (of one inch down, one
  484.      inch to the right from the upper left corner of the paper) by this
  485.      amount.
  486.      This is useful for a printer that consistently offsets output
  487.      pages by a certain amount. You can use the file `testpage.tex' to
  488.      determine the correct value for your printer. Be sure to do
  489.      several runs with the same `O' value--some printers vary widely
  490.      from run to run.
  491. `P PATH'
  492.      The (colon-separated) path to search for bitmap `pk' font files is
  493.      PATH.  The `PKFONTS', `TEXPKS', `GLYPHFONTS', and `TEXFONTS'
  494.      environment variables override this. *Note TeX environment
  495.      variables: (kpathsea)TeX environment variables.
  496. `R NUM NUM ...'
  497.      Sets up a list of default resolutions to search for `pk' fonts, if
  498.      the requested size is not available.  The output will then scale
  499.      the font found using PostScript scaling to the requested size.
  500.      The resulting output may be ugly, and thus a warning is issued.  To
  501.      turn this off, use a line with just the `R' and no numbers.
  502. `S PATH'
  503.      The path to search for special illustrations (Encapsulated
  504.      PostScript files or psfiles) is PATH.  The `TEXPICTS' and then
  505.      `TEXINPUTS' environment variables override this.
  506. `T PATH'
  507.      The path to search for the `tfm' files is PATH.  The `TFMFONTS'
  508.      and then `TEXFONTS' environment variables overrides this.  This
  509.      path is used for resident fonts and fonts that can't otherwise be
  510.      found.
  511.      Turns off a memory-saving optimization; this is necessary for the
  512.      Xerox 4045 printer, but not recommended otherwise.  See the
  513.      description above for more information.
  514. `V PATH'
  515.      The path to search for virtual font `vf' files is PATH.  This may
  516.      be device-dependent if you use virtual fonts to simulate actual
  517.      fonts on different devices.
  518. `W STRING'
  519.      Sends STRING to stderr, if a parameter is given; otherwise it
  520.      cancels another previous message.  This is useful in the default
  521.      configuration file if you want to require the user to specify a
  522.      printer, for instance, or if you want to notify the user that the
  523.      resultant output has special characteristics.
  524. `X NUM'
  525.      Set the horizontal resolution to NUM dots per inch.
  526. `Y NUM'
  527.      Set the vertical resolution to NUM dots per inch.
  528.      Compress all downloaded fonts by default, as above.
  529. File: dvips.info,  Node: Font Generation,  Next: Environment Variables,  Prev: Config File,  Up: Top
  530. Automatic Font Generation
  531. *************************
  532.   One major problem with TeX and the Computer Modern fonts is the huge
  533. amount of disk space a full set of high resolution fonts can take.
  534. Dvips solves this problem by creating fonts on demand, so only those
  535. fonts that are actually used are stored on disk.  At a typical site,
  536. less than one-fifth of the full set of Computer Modern fonts are used
  537. over a long period, so this saves a great deal of disk space.
  538.   Furthermore, the addition of dynamic font generation allows fonts to
  539. be used at any size, including typesetter resolutions and extremely huge
  540. banner sizes.  Nothing special needs to be done; the fonts will be
  541. automatically created and installed as needed.
  542.   The downside is that it does take a certain amount of time to create
  543. a new font if it has never been used before.  But once a font is
  544. created, it will exist on disk, and the next time that document is
  545. printed it will print very quickly.
  546.   It is the `MakeTeXPK' shell script that is responsible for making
  547. these fonts. It *must* echo the filename of the new font (and nothing
  548. else) to standard output. Use standard error for commentary.
  549.   `MakeTeXPK' is passed various arguments, the first of which is the
  550. font it's supposed to make. You can override the other argument
  551. conventions with environment variables or at compilation time; see the
  552. Kpathsea documentation.
  553.   The `MakeTeXPK' script supplied invokes Metafont (using the Sauter
  554. scripts first, if necessary and if they are installed) to create the
  555. font and then copies the resultant `pk' file to a world-writable font
  556. cache area.
  557.   `MakeTeXPK' can be customized to do other things to get the font.  For
  558. instance, if you are installing dvips to replace (or run alongside) an
  559. existing PostScript driver, and that driver demands `gf' fonts, you can
  560. easily modify `MakeTeXPK' to invoke `gftopk' to convert the `gf' files
  561. to `pk' files for dvips.  This provides the same space savings listed
  562. above.
  563.   Because dvips (and thus `MakeTeXPK') is run by a wide variety of
  564. users, there must be a system-wide place to put the cached font files.
  565. In order for everyone to be able to supply fonts, the directory must be
  566. world writable.  If your system administrator considers this a security
  567. hole, `MakeTeXPK' can write to `/tmp/pk' or some such directory, and
  568. periodically the cached fonts can be moved to a more general system
  569. area.  The cache directory must exist on the `pk' file search path in
  570. order for `MakeTeXPK' to work.
  571. File: dvips.info,  Node: Environment Variables,  Next: Bells and Whistles,  Prev: Font Generation,  Up: Top
  572. Environment Variables
  573. *********************
  574.   Dvips reads a certain set of environment variables to configure its
  575. operation.  The path variables are read as needed, after all
  576. configuration files are read, so they override values in the
  577. configuration files.  (Except for the `TEXCONFIG' variable.)
  578.   *Note Path specifications: (kpathsea)Path specifications, for details
  579. of interpretation of environment variable values, and the common
  580. environment variables.  Only the environment specific to `dvips' are
  581. mentioned here.
  582. `DVIPSFONTS'
  583.      Default path to search for all fonts.  Overrides all the
  584.      font-related config file options and other environment variables.
  585. `DVIPSHEADERS'
  586.      Default path to search for PostScript header files.  Overrides the
  587.      `H' config file option.
  588. `DVIPSMAKEPK'
  589.      Overrides `MakeTeXPK' as the name of the program to invoke to
  590.      create missing PK fonts.  You can change the arguments passed to
  591.      the `MakeTeXPK' program with the `MAKETEXPK' environment
  592.      variables; see the Kpathsea documentation.
  593. `DVIPSSIZES'
  594.      Last-resort sizes for scaling for unfound fonts.  Overrides the `R'
  595.      definition in config files.
  596. `PRINTER'
  597.      This environment variable is read to determine which default
  598.      printer configuration file to read in.  It is the responsibility of
  599.      the configuration file to send output to the proper print queue,
  600.      if such functionality is desired.
  601. `TEXCONFIG'
  602.      This environment variable sets the directories to search for
  603.      configuration files, including the system-wide one.  Using this
  604.      single environment variable and the appropriate configuration
  605.      files, it is possible to set up the program for any environment.
  606.      (The other path environment variables are thus redundant.)
  607. `TEXPICTS'
  608.      Path to search for special illustrations.  Overrides the `S' config
  609.      file option.  If not set, `TEXINPUTS' is used.
  610. File: dvips.info,  Node: Bells and Whistles,  Next: MS-DOS,  Prev: Environment Variables,  Up: Top
  611. Other Bells And Whistles
  612. ************************
  613.   For special effects, if any of the macros `bop-hook', `eop-hook',
  614. `start-hook', or `end-hook' are defined in the PostScript `userdict',
  615. they will be executed at the beginning of a page, end of a page, start
  616. of the document, and end of a document, respectively.
  617.   When these macros are executed, the default PostScript coordinate
  618. system and origin is in effect.  Such macros can be defined in headers
  619. added by the `-h' option or the `header=' special, and might be useful
  620. for writing, for instance, DRAFT across the entire page, or, with the
  621. aid of a shell script, dating the document.  These macros are executed
  622. outside of the save/restore context of the individual pages, so it is
  623. possible for them to accumulate information, but if a document must be
  624. divided into sections because of memory constraints, such added
  625. information will be lost across section breaks.
  626.   The single argument to `bop-hook' is the sequence number of the page
  627. in the file; the first page gets zero, the second one, etc.  The
  628. procedure must leave this number on the stack.  None of the other hooks
  629. are (currently) given parameters, although this may change in the
  630. future.
  631.   As an example of what can be done, the following special will write a
  632. light DRAFT across each page in the document:
  633.      \special{!userdict begin /bop-hook{gsave 200 30 translate
  634.      65 rotate /Times-Roman findfont 216 scalefont setfont
  635.      0 0 moveto 0.7 setgray (DRAFT) show grestore}def end}
  636.   Note that using `bop-hook' or `eop-hook' in any way that preserves
  637. information across pages will break compliance with the Adobe document
  638. structuring conventions, so if you use any such tricks, it is
  639. recommended that you also use the `-N' option to turn off structured
  640. comments.
  641.   Several of the above tricks can be used nicely together, and it is not
  642. necessary that a `printer configuration file' be used only to set
  643. printer defaults.  For instance, a `-P' file can be set up to print the
  644. date on each page; the particular configuration file will execute a
  645. command to put the date into a header file, which is then included with
  646. a `h' line in the configuration file.  Multiple `-P' options can be
  647. used.
  648. File: dvips.info,  Node: MS-DOS,  Next: Installation,  Prev: Bells and Whistles,  Up: Top
  649. MS-DOS
  650. ******
  651.   If you have any experience with Dvipsk under DOS, kb@cs.umb.edu would
  652. like to hear about it.
  653. File: dvips.info,  Node: Installation,  Next: Problems,  Prev: MS-DOS,  Up: Top
  654. Installation
  655. ************
  656.   To compile and install Dvipsk:
  657.   1. Edit the file `make/paths.make' if you want to make changes to the
  658.      installation directories or paths that will have effect across
  659.      different runs of `configure'.  Alternatively, override the Make
  660.      variables on the command line when you run Make.
  661.      Exception: to reliably change the top-level `prefix', you must give
  662.      `configure' the option `-prefix=PREFIX', instead of changing the
  663.      value in `paths.make'.
  664.   2. Edit `kpathsea/texmf.cnf.in' to change the local paths to match
  665.      your local setup.  *Note Default paths: (kpathsea)Default paths,
  666.      for more details on changing the paths. A copy is in
  667.      `kpathsea/INSTALL'.  See `kpathsea/HIER' for an explanation of the
  668.      default setup.
  669.      If the paths do not match where the files actually are, the
  670.      programs will probably start up Very, Very, Slowly, and/or not be
  671.      able to find the fonts or other input files.
  672.   3. `sh configure' (in the top-level directory).  This makes
  673.      system-dependent `#define's' in `*/c-auto.h' (from the
  674.      corresponding `c-auto.h.in') and creates a `Makefile' (from the
  675.      corresponding `Makefile.in', by doing `@VAR@' and `ac_include'
  676.      substitutions).
  677.      Perhaps the most common desire is to compile with optimization
  678.      instead of or as well as debugging.  You can change the options
  679.      passed to the compiler by changing `CFLAGS', either for
  680.      `configure' or `make'.  For example:
  681.           prompt$ env CFLAGS="-g -O" configure
  682.           prompt$ make
  683.      or
  684.           prompt$ configure
  685.           prompt$ make CFLAGS="-g -O"
  686.      *Note Running `configure' scripts: (autoconf)Invoking configure,
  687.      for detailed `configure' options.  (A copy is in
  688.      `kpathsea/CONFIGURE'.)
  689.   4. `make' (still in the top-level directory). Barring configuration
  690.      and compiler bugs, this will compile all the programs.  *Note
  691.      Common problems: (kpathsea)Common problems, for system-dependent
  692.      problems (this section is also in `kpathsea/INSTALL').
  693.      This also creates the `texmf.cnf' and `paths.h' files that define
  694.      the default search paths.
  695.   5. Check the paths in `MakeTeXPK', unless you do not want automatic
  696.      font generation.  *Note Font Generation::.  The `MakeTeXPK' in the
  697.      distribution will overwrite the installed file only if the latter
  698.      contains the string `original MakeTeXPK --'.
  699.      Dvipsk, unlike the original dvips, *requires* `MakeTeXPK' to echo
  700.      the generated filename (and nothing else) to standard output
  701.      (standard error can be used for commentary).  For more details, or
  702.      in general if `MakeTeXPK' fails, *note Unable to Generate Fonts::..
  703.      By default, `MakeTeXPK' installs the new PK fonts under
  704.      `/usr/local/lib/texmf/fonts/tmp/pk'.  For the simplest
  705.      installation, create that directory and make it publically
  706.      writable.  *Note Font Generation::, for alternatives.
  707.   6. Update the device parameters (available memory, resolution, etc.)
  708.      in `config.ps'.  This file is installed as the system-wide
  709.      configuration file.  *Note Config File Options::.  The `config.ps'
  710.      in the distribution will overwrite the installed file only if the
  711.      latter contains the string `original config.ps --'.
  712.      If you need support for more than one device, create configuration
  713.      files for each and install them in the directory named by the Make
  714.      variable `configdir'. See the `-P' option in *Note Invoking
  715.      dvips::.
  716.   7. Install the programs and supporting macros, fonts, and data files
  717.      with `make install'. If you want to install only the executables,
  718.      do `make install-exec'; for only the data files, `make
  719.      install-data'. And if you don't want to install the fonts (perhaps
  720.      because your directory structure is different from the default),
  721.      but do want everything else, set the Make variable
  722.      `install_fonts=false'.
  723.   8. Install additional fonts, if you want to.
  724.      A few Type 1 fonts (Utopia, Charter, Courier, Nimbus, Antiqua, ...)
  725.      have been contributed to the X Consortium, and thus are freely
  726.      available. You can get TeX distributions for them from
  727.      `ftp.cs.umb.edu' in `pub/tex', and from the CTAN hosts in
  728.      `tex-archive/fonts'.
  729.      If you have a commercial Unix system, it may have come with
  730.      additional PostScript fonts.  If so, you can make them available
  731.      to Dvips by (1) copying or linking them with the appropriate
  732.      filenames; and (2) running `afm2tfm' (*note afm2tfm::.) to make
  733.      TFM and VF files so the fonts will be available in the same
  734.      encoding as the fonts distributed with Dvips. Also check
  735.      `psfonts.map' to be sure the fonts are listed there (*note
  736.      Non-resident Fonts::.).
  737.      Here are the typical locations for vendor-supplied fonts:
  738.     DEC Ultrix
  739.           `/usr/lib/DPS/outline/decwin'
  740.     DEC OSF/1
  741.           `/usr/lib/X11/fonts/Type1Adobe'
  742.     IBM AIX
  743.           `/usr/lpp/DPS/fonts/outlines'
  744.     NeXT
  745.           `/NextLibrary/Fonts/outline'
  746.     SGI IRIX
  747.           `/usr/lib/DPS/outline/base'
  748.     Sun Solaris
  749.           `/usr/openwin/lib/X11/fonts/Type1/outline'
  750.      The NeXT system supplies more fonts than the others, but the sets
  751.      are overlapping.  See the distributed `psfonts.map' for which
  752.      fonts each system supplies.
  753.   9. `make distclean'.  This removes all files created by the build.
  754.   *Note Debug Options::, for runtime debugging options that may help
  755. track down problems.
  756.   *Note Reporting bugs: (kpathsea)Reporting bugs, for the bug reporting
  757. address and information. (Also at the end of `kpathsea/INSTALL'.)
  758. File: dvips.info,  Node: Problems,  Next: Color,  Prev: Installation,  Up: Top
  759. Diagnosing problems
  760. *******************
  761.   You've gone through all the trouble of installing dvips, carefully
  762. read all the instructions in this manual, and still can't get something
  763. to work.  This is all too common, and is usually caused by some broken
  764. PostScript application out there.  The following sections provide some
  765. helpful hints if you find yourself in such a situation.
  766.   In all cases, you should attempt to find the smallest file that causes
  767. the problem.  This will not only make debugging easier, it will also
  768. reduce the number of possible interactions among different parts of the
  769. system.
  770. * Menu:
  771. * Debug Options::               To see low-level operations.
  772. * No Output::                   No Output At All
  773. * Small or Inverted::           Output Too Small or Inverted
  774. * Printer Errors::
  775. * 400 DPI::                     400 dpi is used instead of 300 dpi
  776. * Long Documents Fail::         Long Documents Fail To Print
  777. * Including Graphics Fails::
  778. * Unable to Generate Fonts::
  779. File: dvips.info,  Node: Debug Options,  Next: No Output,  Up: Problems
  780. Debug Options
  781. =============
  782.   The `-d' flag to dvips is very useful for helping to track down
  783. certain errors.  The parameter to this flag is an integer that tells
  784. what errors are currently being tracked.  To track a certain class of
  785. debug messages, simply provide the appropriate number given below; if
  786. you wish to track multiple classes, sum the numbers of the classes you
  787. wish to track.  To track all classes, you can use `-1' (output is
  788. extremely voluminous).  Another useful value is `3650', which tracks
  789. everything having to do with file searching and opening.
  790.   The classes are:
  791.      specials
  792.      paths
  793.      fonts
  794.      pages
  795.      headers
  796.      font compression
  797.      files
  798.      memory
  799.      Kpathsea `stat' calls
  800.      Kpathsea hash table lookups
  801.      Kpathsea path element expansion
  802.      Kpathsea path searches
  803. File: dvips.info,  Node: No Output,  Next: Small or Inverted,  Prev: Debug Options,  Up: Problems
  804. No Output At All
  805. ================
  806.   If you are not getting any output at all, even from the simplest
  807. one-character file (for instance, `\ \bye'), then something is very
  808. wrong.  Practically any file sent to a PostScript laser printer should
  809. generate some output, at the very least a page detailing what error
  810. occurred, if any.  Talk to your system administrator about downloading a
  811. PostScript error handler.  (Adobe distributes a good one called
  812. `ehandler.ps'.)
  813.   It is possible, especially if you are using non-Adobe PostScript, that
  814. your PostScript interpreter is broken.  Even then it should generate an
  815. error message.  I've tried to work around as many bugs as possible in
  816. common non-Adobe PostScript interpreters, but I'm sure I've missed a
  817.   If dvips gives any strange error messages, or compilation on your
  818. machine generated a lot of warnings, perhaps the dvips program itself is
  819. broken.  Carefully check the types in `dvips.h' and the declarations in
  820. the `Makefile', and try using the debug options to determine where the
  821. error occurred.
  822.   It is possible your spooler is broken and is misinterpreting the
  823. structured comments.  Try the `-N' flag to turn off structured comments
  824. and see what happens.
  825. File: dvips.info,  Node: Small or Inverted,  Next: Printer Errors,  Prev: No Output,  Up: Problems
  826. Output Too Small or Inverted
  827. ============================
  828.   If some documents come out inverted or too small, your spooler is not
  829. supplying an end of job indicator at the end of each file.  (This
  830. happens a lot on small machines that don't have spoolers.)  You can
  831. force dvips to do this with the `-F' flag, but note that this generates
  832. files with a binary character (control-D) in them.  You can also try
  833. using the `-s' flag to enclose the entire job in a save/restore pair.
  834. File: dvips.info,  Node: Printer Errors,  Next: 400 DPI,  Prev: Small or Inverted,  Up: Problems
  835. Error Messages From Printer
  836. ===========================
  837.   If your printer returns error messages, the error message gives very
  838. good information on what might be going wrong.  One of the most common
  839. error messages is `bop undefined'.  This is caused by old versions of
  840. Transcript and other spoolers that do not properly parse the setup
  841. section of the PostScript.  To fix this, turn off structured comments
  842. with the `-N' option, but make sure you get your spooling software
  843. updated.
  844.   Another error message is `VM exhausted'.  (Some printers indicate
  845. this error by locking up; others quietly reset.)  This is caused by
  846. telling dvips that the printer has more memory than it actually does,
  847. and then printing a complicated document.  To fix this, try lowering the
  848. parameter to `m' in the configuration file; use the debug option to
  849. make sure you adjust the correct file.
  850.   Other errors may indicate that the graphics you are trying to include
  851. don't nest properly in other PostScript documents, or any of a number of
  852. other possibilities.  Try the output on a QMS PS-810 or other Adobe
  853. PostScript printer; it might be a problem with the printer itself.
  854. File: dvips.info,  Node: 400 DPI,  Next: Long Documents Fail,  Prev: Printer Errors,  Up: Problems
  855. 400 DPI Is Used Instead Of 300 DPI
  856. ==================================
  857.   This common error is caused by not editing the `config.ps' file to
  858. reflect the correct resolution for your site.  You can use the debug
  859. flags (`-d64') to see what files are actually being read.
  860. File: dvips.info,  Node: Long Documents Fail,  Next: Including Graphics Fails,  Prev: 400 DPI,  Up: Problems
  861. Long Documents Fail To Print
  862. ============================
  863.   This is usually caused by incorrectly specifying the amount of memory
  864. the printer has in `config.ps'; see the description above.
  865.