aboutsummaryrefslogtreecommitdiffstats
path: root/man/prg2lout.txt
blob: 0ed3d113712fdab1d79a1ba0983745c9d0cb3640 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116


NAME
     prg2lout - convert computer program text into Lout

SYNOPSIS
     prg2lout -l language [ options ] files...

DESCRIPTION
     Reformat computer program text for input to the  Lout  docu-
     ment  formatting  system, taking care of comments, character
     strings, tab characters, etc.

     prg2lout reads the named program source files  and  produces
     output suitable for input to lout -s.  Thus,

          prg2lout -l C foo.c | lout -s | lpr

     will print the C program  foo.c  on  a  PostScript  printer.
     Each  file will start on a new page, preceded by its name in
     bold.

OPTIONS
     -llanguage
          (Compulsory.)  Files are written in  this  programmming
          language.  Run prg2lout -u to see the list of languages
          available.

     -pfixed
          Use a fixed width font (the default for C).

     -pvarying
          Use a varying-width italic font  with  non-italic  bold
          keywords (the default for Eiffel).

     -psymbol
          Use a varying-width italic font with mathematical  sym-
          bols and non-italic bold keywords.

     -n   Do not print the file name before each source file.

     -f font
          Select a font family.  The  default  is  -fCourier  for
          -pfixed, and -fTimes for -pvarying and -psymbol.

     -s size
          Select a Lout font size.  The default is -s9p  (meaning
          9  points)  for  -pfixed,  and  -s10p for -pvarying and
          -psymbol.  These work well with 80-character-wide  pro-
          grams.

     -v vsize
          Select a Lout vertical inter-line gap.  The default  is
          -v1.1fx  meaning  1.1 times the font size measured from
          baseline to baseline.

     -b num
          Select a blank line scale factor.  The default is -b1.0
          meaning no scaling.  A good alternative is 0.6.

     -t num
          Set the tab interval  to  num  characters  (default  is
          -t8).

     -T width
          Without  this  option,  prg2lout  simulates  tabs  with
          spaces.  With this option, prg2lout simulates tabs with
          Lout tabulation operators; width is the  width  of  one
          tab  interval  in  the  final  print,  measured in Lout
          units.  This guarantees alignment of characters follow-
          ing  tabs even with varying-width fonts, provided width
          is sufficiently large.  For  example,  -T0.5i  produces
          half-inch tab intervals.

     -L number
          Attach line numbers to the program text, beginning with
          number  or  1  if number is not given.  You may need to
          give  the  1  anyway  to prevent prg2lout from taking a
          following file name as a number.

     -N   Do not print line numbers on blank lines.

     -M   Like -N but do not assign line numbers to blank lines.

     -S filename
          Use  filename  as  the setup file instead of the system
          default  setup  file.  The  setup  file  determines the
          value  of  all formatting options not given to prg2lout
          as command line arguments.

     -u   Print usage information on stderr, including  available
          languages, and exit.

     -V   Print version information on stderr and exit.

  Raw Mode
     There is a raw mode usage of prg2lout invoked by a  -r  flag
     (must  be  the  first  argument).  This converts one program
     file into Lout-readable source without any heading or trail-
     ing information.  Synopsis:

          prg2lout -r -i infile -o out -e err -t num -T width

     Users should never need this mode; it is  invoked  automati-
     cally from within Lout by symbols supplied with the standard
     configuration (see reference).

SEE ALSO
     lout(1), lpr(1), ghostview(1).

REFERENCES
     Jeffrey H. Kingston, A User's Guide  to  the  Lout  Document
     Formatting System, Chapter 11.

AUTHOR
     Jeffrey H. Kingston