troff2html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .TH TROFF2HTML 1
  2. .SH NAME
  3. troff2html \- convert troff output into HTML
  4. .SH SYNOPSIS
  5. .B troff2html
  6. [
  7. .B -t
  8. .I title
  9. ] [
  10. .I file
  11. \ ...
  12. ]
  13. .SH DESCRIPTION
  14. .I Troff2html
  15. reads the
  16. .IR troff (1)
  17. output in the named
  18. .IR files ,
  19. default standard input,
  20. and converts them into HTML.
  21. .PP
  22. .I Troff2html
  23. does a tolerable job with straight
  24. .B troff
  25. output, but it is helped by annotations, described below.
  26. Its main use is for
  27. .B man2html
  28. (see
  29. .IR httpd (8)),
  30. which converts
  31. .IR man (1)
  32. pages into HTML
  33. and depends on a specially annotated set of
  34. .IR man (6)
  35. macros, invoked by
  36. .B troff
  37. .BR -manhtml .
  38. .PP
  39. .B Troff
  40. output lines beginning
  41. .IP
  42. .EX
  43. x X html \f1...
  44. .EE
  45. .LP
  46. which are introduced by placing
  47. .B \eX'html\ \f1...\fP'
  48. in the
  49. .IR input ,
  50. cause the rest of the line to be interpolated into the HTML produced.
  51. Several such lines are recognized specially by
  52. .IR troff2html .
  53. The most important are the pair
  54. .IP
  55. .EX
  56. x X html manref start cp 1
  57. x X html manref end cp 1
  58. .EE
  59. .PP
  60. which are used to create HTML anchors of the form
  61. .IR cp (1)
  62. pointing to
  63. .BR /magic/man2html/1/cp .
  64. .PP
  65. .I Troff2html
  66. is new and experimental; in time, it may improve and subsume
  67. .IR ms2html (1).
  68. On the one hand, because it uses the input,
  69. .B ms2html
  70. can handle
  71. .IR pic (1),
  72. .IR eqn (1),
  73. etc., which
  74. .I troff2html
  75. does not handle at all; on the other hand,
  76. .B ms2html
  77. understands only
  78. .IR ms (6)
  79. documents and is easily confused by complex
  80. .B troff
  81. constructions.
  82. .I Troff2html
  83. has the reverse properties: it does not handle the preprocessors but its output
  84. is reliable and (modulo helper annotations) is independent of macro package.
  85. .SH SEE ALSO
  86. .IR troff (1),
  87. .IR ms2html (1),
  88. .B man2html
  89. in
  90. .IR httpd (8).
  91. .SH BUGS
  92. .B Troff
  93. and HTML have different models, and they don't mesh well in all cases.
  94. .BR Troff 's
  95. indented paragraphs are not well served in HTML, and the output of
  96. .I troff2html
  97. shows this.