htmlroff 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. .IR 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 /sys/lib/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. .IR 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. .IR ms (6)
  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. .IR Htmlroff (6)
  87. describes the changes to the input language.
  88. .PP
  89. .IR Mhtml (6)
  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 /sys/lib/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 /sys/src/cmd/htmlroff
  115. .SH "SEE ALSO
  116. .IR tcs (1),
  117. .IR troff (1),
  118. .IR htmlroff (6),
  119. .IR mhtml (6)