|
NAMEunroff-html-ms - back-end to translate `ms' documents to HTML 2.0SYNOPSISunroff [ -fhtml ] [ -ms ] [ file | option... ]OVERVIEWWhen called with the -fhtml and -ms options, the troff translator unroff loads the back-end for converting “ms” documents to the Hypertext Markup Language (HTML) version 2.0.Please read unroff(1) first for an overview of the Scheme-based, programmable troff translator and for a description of the generic options that exist in addition to -f and -m. The translation of basic troff requests, special characters, escape sequences, etc. as well as the HTML-specific options are described in unroff-html(1). For information about extending and programming unroff also refer to the Unroff Programmer's Manual. OPTIONSThe -ms extension provides a number of keyword/value options in addition to those listed in unroff(1) and unroff-html(1):
FILESunroff reads and parses an ”ms“ document composed of one ore more input files. As usual, the special file name `-' can be used to interpolate standard input. If no file name is given in the command line, unroff reads from standard input.The resulting HTML document is sent to standard output, unless a file name prefix is assigned to the document option. In the latter case, the split option controls splitting of the output into separate files at section boundaries as described under OPTIONS above. A number of other features, such as footnotes, also require that the document option is supplied, as separate output files are created for them (regardless of the value of split). In any case, the name of each output file consists of the value of document, followed by an optional suffix, followed by the extension “.html”. EXAMPLETo translate an “ms” document composed of several input files, unroff could be invoked like this:unroff -fhtml -ms document=thesis split=2\ intro.ms 1.ms 2.ms 3.ms app.ms DESCRIPTIONThe following -ms macros are translated (in addition to any user-defined macros):.AB .AE .AI .AU .B .B1 .B2 .BD .BX .CD .DE .DS .FA .FE .FS .I .ID .IP .LD .LG .LP .NH .PP .PX .QP .R .RE .RS .RT .SH .SM .TL .UL .UX .XA .XE .XS These predefined strings and number registers are recognized: \*- \*(DY \*(MO \*Q \*U \n(PN In addition, a number of macros are either silently ignored or cause a warning to be printed, because their function either cannot be mapped to HTML 2.0 elements or assumes a page structure: .AM .BT .CM .CT .DA .EF .EH .HD .KE .KF .KS .ND .NL .OF .OH .P1 .PT .TM .MC .1C .2C The font switching macros are based on changes to the fonts `R', `I', and `B', as explained under FONTS in unroff-html(1). Of course, this fails if the fonts (which are mounted on startup) are unmounted by explicit .fp requests. Upper or lower case letters are accepted as section numbers by .NH when the argument ``S'' is used to set new section numbers. This is useful for appendices and similar constructs. The translation rule for .IP employs a heuristic to determine whether to generate a definition list or an unordered list: if the first in a sequence of indented paragraph macros is called with a tag consisting of one of the special character \(bu or \(sq, a definition list is begun, otherwise an unordered list. Since exdented[sic] paragraphs cannot be expressed in HTML 2.0, a warning message is printed when a call to the macro .XP is encountered. All footnotes are concatenated and placed in a separate output file, and a corresponding section (with a user-defined header) holding the footnotes is appended to the document automatically. Use of the string `\**' generates a hypertext link to the beginning of the footnote created by the next call to .FS and .FE. The actual text generated by using `\**' as well as the footnote reference that appears in the footnote proper are controlled by two options as explained under OPTIONS above. A warning message is printed on termination if `\**' has been used but a corresponding footnote was not seen. As an alternative to `\**', the new request .FA can be used to produce a footnote anchor together with a hypertext link; the anchor is the argument to the macro (however, `\**' itself must not be used in a call to .FA). Likewise, a hypertext reference is created for each use of the table of contents macros .XS and .XE (optionally accompanied by calls to .XA). SEE ALSOunroff(1), unroff-html(1), troff(1), ms(5 or 7).Unroff Programmer's Manual. http://www.informatik.uni-bremen.de/~net/unroff Berners-Lee, Connolly, et al., HyperText Markup Language Specification—2.0, Internet Draft, Internet Engineering Task Force. BUGSThe macro .UL is currently mapped to a call to .I, as underlining is not supported by the HTML back-end of unroff 1.0.Footnote references and requests such as .sp that cause non-character-level markup to be generated must not be used inside a numbered header. When creating a hypertext anchor for .XS and .XE, there is nothing to put inside the <a> element; therefore a non-breaking space is used. Changing the number register format of `NH' to get roman or alphabetic section numbers does not work, obviously.
Visit the GSP FreeBSD Man Page Interface. |