Blob


1 .TH HTMLROFF 1
2 .SH NAME
3 htmlroff \- HTML formatting and typesetting
4 .SH SYNOPSIS
5 .B htmlroff
6 [
7 .B -iuv
8 ]
9 [
10 .B -m
11 .I name
12 ]
13 [
14 .B -r
15 .I aN
16 ]
17 [
18 .I file
19 \&...
20 ]
21 .SH DESCRIPTION
22 .I Htmlroff
23 accepts
24 .MR troff (1)
25 input in the named
26 .I files
27 and formats it as HTML for viewing in a web browser.
28 .PP
29 If no
30 .I file
31 argument is given,
32 .I htmlroff
33 reads the standard input.
34 An argument consisting of a single minus
35 .RB ( - )
36 is taken to be
37 a file name corresponding to the standard input.
38 The options are:
39 .TP
40 .B -i
41 Read standard input after the input files are exhausted.
42 .TP
43 .BI -m name
44 Process the macro file
45 .BI \*9/tmac/tmac. name
46 before the input
47 .IR files .
48 .TP
49 .BI -r aN
50 Set register
51 .I a
52 (one character name) to
53 .IR N .
54 .TP
55 .B -u
56 Generate UTF output.
57 By default,
58 .I htmlroff
59 converts Unicode runes into the corresponding
60 HTML entity sequences
61 .RB ( α ,
62 .BR   ,
63 and so on).
64 .I Htmlroff
65 invokes
66 .MR tcs (1)
67 for the conversion.
68 .TP
69 .B -v
70 Generate debugging output and warnings about suspicious input.
71 .PD
72 .PP
73 Most
74 .I troff
75 input files, especially those using the
76 .MR ms (7)
77 macros, can be used unaltered.
78 In general, the macro file
79 .B tmac.html
80 should be processed after processing other standard macro files,
81 as in
82 .B htmlroff
83 .B -ms
84 .BR -mhtml .
85 .PP
86 .MR Htmlroff (7)
87 describes the changes to the input language.
88 .PP
89 .MR Mhtml (7)
90 describes the new macros.
91 .SH EXAMPLES
92 Format the Plan 9 web page:
93 .IP
94 .EX
95 cd /usr/web/plan9
96 htmlroff -mhtml index.tr >index.html
97 .EE
98 .PP
99 Format a paper:
100 .IP
101 .EX
102 cd /sys/doc
103 pic auth.ms | tbl | eqn | htmlroff -ms -mhtml >auth.html
104 .EE
105 .SH FILES
106 .TP
107 .B \*9/troff/font/devutf/utfmap
108 Mapping from
109 .I troff
110 two-character names like
111 .B \e(*a
112 to Unicode characters like α.
113 .SH SOURCE
114 .B \*9/src/cmd/htmlroff
115 .SH "SEE ALSO
116 .MR tcs (1) ,
117 .MR troff (1) ,
118 .MR htmlroff (7) ,
119 .MR mhtml (7)