

troff                        Command                        troff




Extended text-formatting language

ttrrooffff [_o_p_t_i_o_n ...] [_f_i_l_e ...]

The command ttrrooffff  is the COHERENT typesetter and text-formatting
language.  It performs  typeset-quality text formatting, suitable
for  printing on  either the Hewlett-Packard  LaserJet II  or III
printers, or on any printer for which the PostScript language has
been implemented.

***** troff Input *****

ttrrooffff processes each given _f_i_l_e, or the standard input if none is
specified,  and  prints  the  formatted  result on  the  standard
output.  The input  must consist of text with formatting commands
embedded within it.

ttrrooffff provides  a full  suite of  commands that set  line length,
page  length and  page offset,  generate vertical  and horizontal
motions, indentation,  fill and  adjust output lines,  and center
text.  The  great flexibility of ttrrooffff lies  in its acceptance of
user-defined   macros   to   control  almost   all   higher-level
formatting.  For example, the formation of paragraphs, header and
footer areas,  and footnotes must all be  implemented by the user
via macros.

ttrrooffff uses a supeerset of  the commands and syntax used by nnrrooffff,
the other COHERENT  text-formatter: files prepared for the latter
usually can be processed through the former without requiring any
changes.  ttrrooffff differs from nnrrooffff in that nnrrooffff can perform only
monospaced formatting, whereas ttrrooffff can handle multiple fonts of
type,  both monospaced  and proportionally  spaced.  It  lets you
load font-width tables dynamically, so you can whatever fonts you
have loaded  into your printer at a given  time.  ttrrooffff also lets
you move  about the  page in increments  other than sixths  of an
inch vertically or tenths of an inch horizontally.

ttrrooffff  produces  output  either  in the  Hewlett-Packard  Printer
Control Language (PCL)  or PostScript, whichever you prefer.  The
former can  be printed on the  Hewlett-Packard LaserJet family of
laser printer, and can  use any PCL bitmapped ``soft font''.  The
latter can be printed on any printer that supports the PostScript
language, and can  use any font for which you  have an Adobe Font
Metric (AFM)  description.  The default is  PCL output; to obtain
PostScript, use the -pp command-line option.

***** Fonts *****

The  COHERENT  version  of  ttrrooffff  produces output  suitable  for
printing  on a  Hewlett-Packard LaserJet  or  HP-compatible laser
printer, using either PCL or PostScript.  ttrrooffff knows about three
fonts by default, as follows:




COHERENT Lexicon                                           Page 1




troff                        Command                        troff




     \fR  Times Roman
     \fI  Times Italic
     \fB  Times Bold


ttrrooffff also  recognizes the alternative  font names TTRR,  TTII and TTBB
for  the  same  three  Times  family  fonts.   The  default  font
information for ttrrooffff  is in file /uussrr/lliibb/rrooffff/ttrrooffff_ppccll/ffoonnttss.rr
or /uussrr/lliibb/rrooffff/ttrrooffff_ppss/ffoonnttss.rr, as described in detail below.

To use other  fonts, you must use the .llff  request (see below) to
load a _f_o_n_t  _w_i_d_t_h _t_a_b_l_e.  The font width table  is a binary file
that describes  the width of  each character in the  font and the
printer command  (escape sequence) needed to  tell the printer to
use the font.  The program ffwwttaabbllee builds a font width table from
a PCL bitmap font or  from a PostScript AFM description.  See its
Lexicon entry for details on its use.

ttrrooffff  output includes  a printer command  for each  desired font
change.  You must use  the hhpprr command to download bitmapped _s_o_f_t
_f_o_n_t_s  (fonts that  are always  resident in  the printer)  to the
printer before  printing ttrrooffff output  that uses the  soft fonts.
If a  specified font is not available in  the printer, the output
will not be what you expect.

***** Command-line Options *****

Command-line options  may be  listed in  any order.  They  are as
follows:

-dd      Debug: print each  request before execution.  This option
        is  very useful  when you are  writing and  debugging new
        macros.

-DD      Display  the available  fonts.  These  are all  the fonts
        that have  been loaded into ttrrooffff  with the .llff primitive
        (described below).

-ff _n_a_m_e Write the temporary file into file _n_a_m_e.

-ii _f_i_l_e_s
        Read  from the  standard  input after  reading the  given
        _f_i_l_e_s.

-kk      Keep: do not erase the temporary file.

-ll      Landscape  mode:  output  is  rotated  90  degrees,  with
        default  size 11  by  8.5 inches  rather than  8.5 by  11
        inches.

-mm_n_a_m_e  Include  the macro file  /uussrr/lliibb/ttmmaacc._n_a_m_e in  the input
        stream.




COHERENT Lexicon                                           Page 2




troff                        Command                        troff



-nn_N     Number the first page of output _N.

-pp      Produce output for a PostScript printer rather than for a
        HP-compatible printer.

-rr_a_N    Set number register _a to the value _N.

-xx      Do not  eject to  the bottom of  the last page  when text
        ends.   This  option lets  you  use ttrrooffff  interactively,
        which is especially useful when debugging macros.

If the environmental variable TTRROOFFFF is set when ttrrooffff is invoked,
its contents are  prefixed to the list of command-line arguments.
This allows  the user  to set commonly  used options once  in the
environment rather than on each ttrrooffff command line.

***** troff's Primitives *****

As noted earlier, ttrrooffff's command  set is a superset of that used
by nnrrooffff:  see the Lexicon entry on nnrrooffff  for information on the
commands  and escape  sequences shared by  ttrrooffff and  nnrrooffff. This
article describes  the primitives that ttrrooffff  does _n_o_t share with
nnrrooffff.

Please note that the basic ttrrooffff unit is one-tenth of a point.  A
printer's point is 1/12 of a  pica, which is in turn one-sixth of
an inch; therefore, there are 72 points and 720 ttrrooffff units in an
inch.

.ccoo _e_n_d_m_a_r_k
     Copy input to  output file directly, with no processing.  If
     _e_n_d_m_a_r_k  argument is  present, ttrrooffff  copies input  until it
     finds  a line  containing  _e_n_d_m_a_r_k followed  by  \nn.  If  no
     _e_n_d_m_a_r_k is  given, ttrrooffff copies input until  it finds a line
     containing  .ccoo\nn.  This directive  is useful  for embedding
     PostScript commands in an input file.

.ccss _X_X _N _M
     Set font _X_X to use constant character spacing.  The width of
     each character is _N divided by  36 ems.  If _M is present, it
     specifies  the width  of an  em;  otherwise,  _N  assumes the
     point size em for the given font.

.ffdd  Display the currently available fonts.

.ffpp _N _X_X
     Associate  font name  _X_X with numeric  font position  _N. The
     given _N  should be a number between  1 and 9.  Subsequently,
     the numeric font position  can be used in an escape sequence
     \ff_N to  select the font.  (This  nomenclature comes from the
     days when  phototypesetters used print wheels  that were set
     in fixed  positions on the device.)  The nnrrooffff primitive .rrff
     performs a similar task, and is more flexible in its syntax.




COHERENT Lexicon                                           Page 3




troff                        Command                        troff



.ffzz _X_X _N
     Fix the  point size of font  _X_X at _N. The  point size of the
     font will not be  affected by subsequent .ppss commands or \ss_N
     point size escapes.

.llff _X_X _f_i_l_e [_n]
     Load font width  table from _f_i_l_e and use it  for font _X_X. If
     _f_i_l_e     is      not     found,     ttrrooffff      looks     for
     /uussrr/lliibb/rrooffff/ttrrooffff_ppccll/ffwwtt/_f_i_l_e                          or
     /uussrr/lliibb/rrooffff/ttrrooffff_ppss/ffwwtt/_f_i_l_e (depending on whether the -pp
     option is used).

     The optional  third argument sets the  default point size of
     the loaded  font to _n. Note that  this argument takes effect
     only if ttrrooffff is running in -pp (PostScript) mode.

     For  example,  to  load the  font-width  table  for the  PCL
     bitmapped font ccnn009900rrppnn.uusspp  (which sets Century Roman, nine
     point, portrait mode) and name it font RRSS, use the command:

          .lf RS cn090rpn.usp

     To do the same thing under PostScript, use the command:

          .lf RS Century_R.fwt 9

     Thereafter, you can reference  font RRSS with either .fftt RRSS or
     \ff(RRSS.

     Note that the second  argument to this primitive must name a
     font-width table generated  by the COHERENT command ffwwttaabbllee,
     not the  font itself, although both may  have the same name.
     Look in directories  /uussrr/lliibb/rrooffff/ttrrooffff*/ffwwtt for the set of
     font-width tables  that are included with  COHERENT.  If you
     purchase  additional  PCL fonts,  you  must  use ffwwttaabbllee  to
     generate font-width tables for them.  Note, too, that if you
     are using  ttrrooffff in PCL  mode, you must both  load the font-
     width table  into ttrrooffff and use the command  hhpprr to load the
     font itself  into your printer: doing  one without the other
     will not produce the results you desire.

     Finally,  please note  that .llff  is  unique to  the COHERENT
     implementation  of  ttrrooffff, and  cannot  be  ported to  other
     implementations.

.ppss _N
     Set point size to _N. The default point size is 10 point.

.rrbb _f_i_l_e
     Read  input from  _f_i_l_e  and copy  it to  the output  without
     processing.   This directive is  useful for  including files
     containing PostScript routines in the output.

.ssss _N
     Set the minimum word spacing to _N divided by 36 ems.


COHERENT Lexicon                                           Page 4




troff                        Command                        troff




.vvss _Npp
     Set the vertical  spacing to _N points.  The default vertical
     spacing for ttrrooffff is 11 points.

***** Escape Sequences *****

ttrrooffff recognizes  the following escape sequences,  in addition to
those recognized by nnrrooffff:

\ss'NN'
     Set  the  point-size  escape sequence  to  _N.  Like the  .ppss
     primitive, it  changes the point size to  _N. The specified _N
     may have a  leading plus or minus sign to  make the new size
     relative to the current point size.

\XX_N_N Output  character _N_N  where _N_N  are two  hexadecimal digits.
     This is useful for forcing ttrrooffff to print characters outside
     the normal printable  range, e.g., those with the high-order
     bit set.   Note that this  escape sequence is  unique to the
     COHERENT  implementation of  ttrrooffff and  cannot be  ported to
     other implementations.

***** Example *****

The following example prints an enormous `E' on a Hewlett-Packard
LaserJet III:


     .sp |8i
     .ps 500
     .ce
     E


***** Printer Configuration *****

ttrrooffff  reads several  files in  directory /uussrr/lliibb/rrooffff/ttrrooffff_ppccll
(for  normal  ttrrooffff)  or /uussrr/lliibb/rrooffff/ttrrooffff_ppss  (for  PostScript
ttrrooffff)  to find printer-specific  information.  It  reads special
character definitions from file ssppeecciiaallss.rr. It reads font loading
requests from file ffoonnttss.rr.  It copies file .pprree at the beginning
of the  output.  It copies file  .ppoosstt at the end  of the output.
In landscape mode, ttrrooffff looks for files .pprree_llaanndd and .ppoosstt_llaanndd
instead.   You  can  change these  files  as  desired to  include
printer-specific commands in ttrrooffff output.

***** Files *****

/ttmmpp/rrooff* -- Temporary files
/uussrr/lliibb/ttmmaacc.* -- Standard macro packages
/uussrr/lliibb/rrooffff/ttrrooffff_ppccll/ -- Support files directory for PCL
/uussrr/lliibb/rrooffff/ttrrooffff_ppss/ -- Support files directory for PostScript
/uussrr/lliibb/rrooffff/ttrrooffff_*/.pprree --  Output prefix
/uussrr/lliibb/rrooffff/ttrrooffff_*/.pprree_llaanndd -- Output prefix, landscape mode


COHERENT Lexicon                                           Page 5




troff                        Command                        troff



/uussrr/lliibb/rrooffff/ttrrooffff_*/.ppoosstt -- Output suffix
/uussrr/lliibb/rrooffff/ttrrooffff_*/.ppoosstt_llaanndd -- Output suffix, landscape mode
/uussrr/lliibb/rrooffff/ttrrooffff_*/ffoonnttss.rr -- Font definitions
/uussrr/lliibb/rrooffff/ttrrooffff_*/ffwwtt/ -- Directory for font width tables
/uussrr/lliibb/rrooffff/ttrrooffff_*/ssppeecciiaallss.rr -- Special character definitions

***** See Also *****

ccooll, ccoommmmaannddss, ddeerrooffff, ffwwttaabbllee, hhpprr, mmaann, mmss, nnrrooffff
_n_r_o_f_f, _T_h_e _T_e_x_t-_F_o_r_m_a_t_t_i_n_g _L_a_n_g_u_a_g_e, tutorial

Adobe Systems Incorporated: _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.
Reading, Mass.: Addison-Wesley Publishing Company, Inc., 1988.

Adobe  Systems  Incorporated:  _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e  _T_u_t_o_r_i_a_l  _a_n_d
_C_o_o_k_b_o_o_k.  Reading,  Mass.:  Addison-Wesley  Publishing  Company,
Inc., 1988.

Emerson, S.L., Paulsell,  K.: _t_r_o_f_f _T_y_p_e_s_e_t_t_i_n_g _f_o_r _U_n_i_x _S_y_s_t_e_m_s.
Englewood  Cliffs, N.J.:  Prentice-Hall, Inc.,  1987  (ISBN 0-13-
930959-4).

Lawson,  A.:  _P_r_i_n_t_i_n_g _T_y_p_e_s:  _A_n  _I_n_t_r_o_d_u_c_t_i_o_n.  Boston:  Beacon
Press, 1971.   _A_n _e_x_c_e_l_l_e_n_t, _o_n_e-_v_o_l_u_m_e _i_n_t_r_o_d_u_c_t_i_o_n  _t_o _t_y_p_e _a_n_d
_t_y_p_e_s_e_t_t_i_n_g.

Tufte,  E.W.:  _T_h_e _V_i_s_u_a_l  _D_i_s_p_l_a_y  _o_f _Q_u_a_n_t_i_t_a_t_i_v_e  _I_n_f_o_r_m_a_t_i_o_n.
Cheshire, Conn.:  Graphics Press, 1983.   _S_u_p_e_r_b_l_y _i_n_t_r_o_d_u_c_e_s _t_h_e
_s_u_b_j_e_c_t  _o_f _g_r_a_p_h_i_c  _d_e_s_i_g_n.  _E_s_p_e_c_i_a_l_l_y  _u_s_e_f_u_l  _i_f _y_o_u  _w_i_s_h _t_o
_e_x_p_l_o_r_e _P_o_s_t_S_c_r_i_p_t.

University  of Chicago  Press:  _A _M_a_n_u_a_l  _o_f  _S_t_y_l_e _f_o_r  _A_u_t_h_o_r_s,
_E_d_i_t_o_r_s, _a_n_d  _C_o_p_y_w_r_i_t_e_r_s, ed. 12,  revised.  Chicago: University
of Chicago Press,  1969.  _S_t_i_l_l _t_h_e _b_e_s_t _o_n_e-_v_o_l_u_m_e _r_e_f_e_r_e_n_c_e _f_o_r
_c_o_p_y _e_d_i_t_o_r_s:  _i_f _y_o_u'_r_e _g_o_i_n_g _t_o _p_u_b_l_i_s_h  _m_a_n_u_a_l_s, _y_o_u _s_h_o_u_l_d _d_o
_i_t _r_i_g_h_t.

***** Notes *****

Like  nnrrooffff, ttrrooffff  should be  used with  the macro  packages mmss,
which is  found in  the file  /uussrr/lliibb/ttmmaacc.ss, and mmaann,  which is
found in the file /uussrr/lliibb/ttmmaacc.aann.

ttrrooffff output, unlike that of nnrrooffff, cannot be processed through a
terminal driver.

Laser  printers cannot  print on  an area near  each edge  of the
output page.  Output sent to the unprintable area will disappear.
On some  printers, the  _l_o_g_i_c_a_l _p_a_g_e  does not correspond  to the
_p_h_y_s_i_c_a_l _p_a_g_e,  so printed  ttrrooffff output  may be offset  from the
specified position on the physical page.






COHERENT Lexicon                                           Page 6


