Pense-W3ete du LAMI-MANTRA


Printing in LaTeX

  • Basic printing:

    To print a file my_paper.dvi - as produced by LaTeX - you typically use the command

    dvips my_paper

    which sends the output to the default printer (environment variable PRINTER).

  • Choosing the printer: If you want to use another printer, the command takes the standard parameter -Pprinter_name as lpr does. The following commands print the file my_paper.dvi on all known printers at LAMI/MANTRA:

    There are a couple of particularities on the way special printers are handled:
  • Printing in a file:
    You can also generate PS files with the -ooutput_file option:

    dvips -o my_paper.ps my_paper

    This may also be useful when the output file is too large for the spool area. This is unfortunately often a problem on LAMI printers such as mantra. If you get the message "Copy file is too large" or if you suspect your PS file is above 1-1.5 Mbytes, follow the procedure below: (be careful not to delete ~/my_paper.ps until the printout is completed). This procedure is not typically not required for dilaser but essential for other LAMI/MANTRA printers. If you think it too complex, ask the LAMI system manager why... ;^)
    Note that the file as generated above is a 300dpi file. If you intend to print it on renoir, you must say that you want a 600dpi file:

  • Printing on the DeskJet850C PCL Colour Printer:
    If you wish to print slides on a PCL (i.e., non-PS) printer, you can generate the appropriate binary file from the PS file obtained as above. Once you have the PS file my_slides.ps, just convert it with

    ps2pcl my_slides

    It generates a file my_slides.pcl that should be sent as-is to the printer. For this you can connect the printer to any PC, transfer the file on the PC by ftp, and finally send the file from the MS-DOS shell with

    copy /b my_slides.pcl prn:

    If anybody knows how to send the file directly through a Mac, please let us know!

  • Printing ranges of pages:
    There are several options to print ranges of pages. Basically there are two ways to identify pages in a document: sequential numbering (1, 2, 3, etc.) and TeX numbering (the numbers displayed by LaTeX when compiling, typically written on the document itself, shown by dvips when converting, and in ghostview on the left margin).
    You can print sequential pages 10 to 15 inclusive (from the tenth to the fifteenth page from the beginning of the document, no matter if the first page is numbered 0 or -1, for instance) with:

    dvips -p10 -n6 my_paper

    where -p specifies the page to begin printing and -n the number of pages to print from there.
    Otherwise you may print pages 10 to 15 of your document (the pages with these numbers printed on it, which may be or may be not the same as above) with

    dvips -pp10-15 my_paper

    For more details, read the manual of dvips.


    Pour des commentaires et modifications adressez-vous à : Paolo Ienne López