ECN No Name Newsletter: September, 1987

The ECN No Name Newsletter is no longer being published. This is an archived issue.

[previous article] [next article]

Painting Landscapes

Kent De La Croix

Have you ever had a table that was too wide to fit on a normal 8.5 inch wide page and wished you could print it sideways? Well now you can! Troff output is normally printed in what is called portrait orientation. However, most laser printers also have the capability to print output sideways across the page in what is called landscape orientation. We now have software in place that allows troff output to be printed in landscape orientation on both Apple LaserWriters and Imagen laser printers.

                      figure presented here

Imagen Laser Printer

To print your landscape oriented output on an Imagen Laser Printer you need to process the troff output using the "L" option of the appropriate conversion program for the printer you are using. The conversion program must be run on the machine to which the printer is connected. This can be accomplished using the ns command. Here is a list showing which machine each printer is connected to and which conversion program to use with each printer:

          Printer Machine Conversion Program

          ei      ee      di300 -t -L
          ei3     ed      di300 -t -L
          gi      gb      di300 -t -L
          gi2     gb      di300 -t -L
          ci      cb      di240 -t -L
          mi      ma      di300 -t -L
          msi     ed      di300 -t -L
          msi2    eg      di300 -t -L
          pi2     pc      di300 -t -L
          ti      ma      di300 -t -L

The output from the conversion program should then be sent directly to the printer using the "l" option of lpr. BE SURE to change the ns command in the following examples to go to the correct machine and use the appropriate conversion program for your printer.

To have your troff document printed in landscape mode you first need to format your text for output on 11 inch wide by 8.5 inch long pages. When using the MM macros to print your landscape oriented output, you need to set the L and W number registers which may be done on the mmt command line. The L register controls the length of the pages and should be set to 8.5i. The W register controls the line length, not including the margins, and should be set to something like 9i, as in the following:

  mmt. -Ti300 -t -p -e -rL8.5i -rW9i wide-material |
    ns ed -S di300 -t -L | lpr -Pei3 -l

would print the file "wide-material", containing text, tables (- t), drawings (-p), and equations (-e) sideways on the "ei3" Imagen Laser Printer.

Alternatively, if you normally include the command ".so /usr/lib/tmac/tmac.m" in your text files, you can set the L and W number registers by placing commands similar to:

        .nr L 8.5i
        .nr W 9i

BEFORE the ".so /usr/lib/tmac/tmac.m" command in your file. You could then use the nmt command to format your text file, as below:

  nmt. -Ti300  -t  -p  -e wide-material |
    ns ed -S di300 -t -L | lpr -Pei3 -l

which would again format the file "wide-material" for output on the "ei3" Imagen Laser Printer.

If you are using the MS macro package you can set the page length and line length by including:

        .pl 8.5i
        .nr LL 9i

near the top of your text file to set the page length to 8.5 inches and the line length, not including the margins, to 9 inches. Remember, these commands will not take effect until after a ".LP" or ".PP" command is processed. You could then use the mst command to format your file "wide-material" with the command:

  mst. -Ti300  -t  -p  -e wide-material |
    ns ed -S di300 -t -L | lpr -Pei3 -l

Please note that you may see the error message "PO + LL wider than 7.54i" printed to your terminal while your text is being formated. This warning message is there for older versions of troff which couldn't handle lines longer than 7.54 inches. Our current troff has no problems with long lines; so this error message can be ignored.

Apple LaserWriter

The Apple LaserWriter also has the capability to print in landscape orientation. To send output in landscape mode to the Apple LaserWriter you need to process the troff output using the "p/land.pro" option of the psdit command. You would then send the output from psdit directly to the printer using the "l" option of lpr.

Assuming we are using the same 3 examples used earlier (for the Imagen Laser Printer), the commands would be modified as follows:

  mmt. -Tpsc -t -p -e -rL8.5i -rW9i
    wide-material | psdit -p/land.pro |
    lpr -Pxa -l

  nmt. -Tpsc -p -e -t wide-material |
    psdit -p/land.pro | lpr -Pxa -l

  mst. -Tpsc -p -t -e wide-material |
    psdit -p/land.pro | lpr -Pxa -l

These commands would print the file "wide-material" sideways on the "xa" Apple LaserWriter.


webmaster@ecn.purdue.edu
Last modified: Saturday, 01-Nov-97 12:26:55 EST

[HTML Check] HTML