aboutsummaryrefslogtreecommitdiff
path: root/man/man1/htmlroff.1
blob: 92d0c65a88b136b1078c91aa043de32fd71e5d45 (plain)
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
117
118
119
.TH HTMLROFF 1
.SH NAME
htmlroff \- HTML formatting and typesetting
.SH SYNOPSIS
.B htmlroff
[
.B -iuv
]
[
.B -m
.I name
]
[
.B -r
.I aN
]
[
.I file
\&...
]
.SH DESCRIPTION
.I Htmlroff
accepts
.MR troff 1
input in the named 
.I files
and formats it as HTML for viewing in a web browser.
.PP
If no
.I file
argument is given, 
.I htmlroff
reads the standard input.
An argument consisting of a single minus
.RB ( - )
is taken to be
a file name corresponding to the standard input.
The options are:
.TP
.B -i
Read standard input after the input files are exhausted.
.TP
.BI -m name
Process the macro file
.BI \*9/tmac/tmac. name
before the input
.IR files .
.TP
.BI -r aN
Set register
.I a
(one character name) to
.IR N .
.TP
.B -u
Generate UTF output.
By default, 
.I htmlroff
converts Unicode runes into the corresponding
HTML entity sequences
.RB ( α ,
.BR   ,
and so on).
.I Htmlroff
invokes
.MR tcs 1
for the conversion.
.TP
.B -v
Generate debugging output and warnings about suspicious input.
.PD
.PP
Most 
.I troff
input files, especially those using the
.MR ms 7
macros, can be used unaltered.
In general, the macro file
.B tmac.html
should be processed after processing other standard macro files,
as in 
.B htmlroff
.B -ms
.BR -mhtml .
.PP
.MR Htmlroff 7
describes the changes to the input language.
.PP
.MR Mhtml 7
describes the new macros.
.SH EXAMPLES
Format the Plan 9 web page:
.IP
.EX
cd /usr/web/plan9
htmlroff -mhtml index.tr >index.html
.EE
.PP
Format a paper:
.IP
.EX
cd /sys/doc
pic auth.ms | tbl | eqn | htmlroff -ms -mhtml >auth.html
.EE
.SH FILES
.TP
.B \*9/troff/font/devutf/utfmap
Mapping from
.I troff
two-character names like
.B \e(*a
to Unicode characters like α.
.SH SOURCE
.B \*9/src/cmd/htmlroff
.SH "SEE ALSO
.MR tcs 1 ,
.MR troff 1 ,
.MR htmlroff 7 ,
.MR mhtml 7