DragonFly On-Line Manual Pages
SGMLFMT(1) DragonFly General Commands Manual SGMLFMT(1)
NAME
sgmlfmt - Formats SGML files tagged according to the linuxdoc DTD.
SYNOPSIS
sgmlfmt -f format [-links] [-i name ...] [-e encoding] [-hdr file]
[-ftr file] file
DESCRIPTION
The sgmlfmt command reads SGML files tagged according to the linuxdoc
DTD, validates them using the sgmls(1) parser and then converts them to
the specified output format. The input file must include the following
document type declaration before any uncommented text:
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
Options for sgmlfmt include the following:
-f format
Determines the output format which can be one of the following:
ascii Generates a single output file with the extension .ascii
suitable for viewing on an ASCII terminal.
html Generates a set of linked HTML files suitable for use
with an HTML browser. A top level file, file.html,
contains the title, author, date, abstract and brief
table of contents for the document. A file file_toc.html
contains a complete table of contents. A series of files
named file1.html, file2.html ... filen.html contain the
actual text of the document.
koi8-r Generates a single output file with the extension .koi8-r
suitable for viewing on an terminal supporting the KOI8-R
character encoding.
latex Generates a single output file with the extension .latex
suitable for processing with LaTeX.
latin1 Generates a single output file with the extension .latin1
suitable for viewing on an terminal supporting the
ISO8859-1 character encoding.
ps Generates a single output file with the extension .ps
suitable for printing or display on a PostScript
compatible device.
roff Generates a single output file with the extension .roff
suitable processing with groff(1). This is actually an
intermediate conversion used by the -f ascii, -f latin1,
-f koi8-r, and -f ps format options.
-e encoding
When used with the -f html output format, this specifies the
document encoding recorded in the <HEAD> element of the generated
HTML files. The default is iso-8859-1.
-i name
Pretend that
<!ENTITY % name INCLUDE >
occurs at the start of the document type declaration subset in
the document entity. Since repeated definitions of an entity are
ignored, this definition will take precedence over any other
definitions of this entity in the document type declaration.
Multiple -i options are allowed. If the declaration replaces the
reserved name INCLUDE then the new reserved name will be the
replacement text of the entity. Typically the document type
declaration will contain
<!ENTITY % name IGNORE >
and will use %name; in the status keyword specification of a
marked section declaration. In this case the effect of the
option will be to cause the marked section not to be ignored.
-links When used with the -f html option, this option generates a shell
script named file.ln. For each <label id="foo"> in the document
source, file.ln generates a symbolic link foo.html pointing to
the numbered .html file containing the reference. Since the
number of the file containing a particular section can change
when a document is modified, this provides a convenient hook by
which separate documents can provide links into another document
without the links becoming invalid when the target document is
modified. When creating a symbolic link, any occurrence of a
slash (/) in label is replaced with percent (%), while any
occurrence of a space is replaced with an underscore (_).
-hdr file
-ftr file
When used with the -f html option, the contents of the specified
files will be inserted into the generated HTML files at the top (
-hdr) and bottom ( -ftr) of the page.
If the input file name ends with .sgml, the extension may be omitted on
the command line. In all cases, the output files are created in the
current working directory.
FILES
/usr/local/share/sgml/transpec - directory containing translation
specification files for instant(1).
SEE ALSO
groff(1), instant(1), sgmls(1), transpec(5)
AUTHORS
The sgmlfmt command was written by John Fieber <jfieber@FreeBSD.org>.
The linuxdoc DTD was written by Matt Welsh <mdw@cs.cornell.edu> and based
on the Qwertz DTD written by Tom Gordon <thomas.gordon@gmd.de>.
January 17, 1997