1996-09-09 14:15:28 +00:00
|
|
|
.Dd September 9, 1995
|
1995-10-07 22:28:34 +00:00
|
|
|
.Os FreeBSD 2.1
|
1995-05-09 23:58:06 +00:00
|
|
|
.Dt SGMLFMT 1
|
|
|
|
.Sh NAME
|
|
|
|
.Nm sgmlfmt
|
|
|
|
.Nd Formats SGML files tagged according to the linuxdoc DTD.
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
1995-08-31 00:14:02 +00:00
|
|
|
.Fl f Ar format
|
|
|
|
.Op Fl links
|
1995-10-07 22:28:34 +00:00
|
|
|
.Op Fl ssi
|
1995-08-31 00:14:02 +00:00
|
|
|
.Op Fl i Ar name ...
|
|
|
|
.Ar file
|
1995-05-09 23:58:06 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command reads SGML files tagged according to the linuxdoc DTD,
|
|
|
|
validates them using the
|
|
|
|
.Xr 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:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
|
|
|
|
.Ed
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pp
|
|
|
|
Options for
|
1995-08-31 00:14:02 +00:00
|
|
|
.Nm
|
|
|
|
include the following:
|
1995-05-09 23:58:06 +00:00
|
|
|
.Bl -tag -width Ds
|
1995-08-31 00:14:02 +00:00
|
|
|
.It Fl f Ar format
|
|
|
|
Determines the output format which can be one of the following:
|
|
|
|
.Bl -tag -width Ds
|
1996-09-08 20:40:52 +00:00
|
|
|
.It Ar ascii
|
|
|
|
Generates a single output file with the extension
|
|
|
|
.Pa .ascii
|
|
|
|
suitable for viewing on an ASCII terminal.
|
1995-08-31 00:14:02 +00:00
|
|
|
.It Ar html
|
1995-05-09 23:58:06 +00:00
|
|
|
Generates a set of linked HTML files suitable for use with an
|
|
|
|
HTML browser. A top level file,
|
|
|
|
.Pa file.html ,
|
|
|
|
contains the title, author, date, abstract and brief table of
|
|
|
|
contents for the document. A file
|
|
|
|
.Pa file_toc.html
|
|
|
|
contains a complete table of contents. A series of files named
|
1995-08-29 01:02:12 +00:00
|
|
|
.Pa file1.html ,
|
|
|
|
.Pa file2.html ...
|
|
|
|
.Pa filen.html
|
1995-05-09 23:58:06 +00:00
|
|
|
contain the actual text of the document.
|
1996-09-08 20:40:52 +00:00
|
|
|
.It Ar koi8-r
|
|
|
|
Generates a single output file with the extension
|
|
|
|
.Pa .koi8-r
|
|
|
|
suitable for viewing on an terminal supporting the KOI8-R
|
|
|
|
character encoding.
|
1995-08-31 00:14:02 +00:00
|
|
|
.It Ar latex
|
1995-05-09 23:58:06 +00:00
|
|
|
Generates a single output file with the extension
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pa .latex
|
1995-05-09 23:58:06 +00:00
|
|
|
suitable for processing with LaTeX. Note that the LaTeX style
|
|
|
|
file
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pa /usr/share/sgml/FreeBSD/linuxdoc.sty
|
1995-05-09 23:58:06 +00:00
|
|
|
must be accessible to LaTeX for correct processing.
|
1996-09-08 20:40:52 +00:00
|
|
|
.It Ar latin1
|
1995-05-09 23:58:06 +00:00
|
|
|
Generates a single output file with the extension
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pa .latin1
|
|
|
|
suitable for viewing on an terminal supporting the ISO8859-1
|
|
|
|
character encoding.
|
1996-09-09 14:15:28 +00:00
|
|
|
.It Ar ps
|
|
|
|
Generates a single output file with the extension
|
|
|
|
.Pa .ps
|
|
|
|
suitable for printing or display on a PostScript compatible device.
|
1996-09-08 20:40:52 +00:00
|
|
|
.It Ar roff
|
1995-05-09 23:58:06 +00:00
|
|
|
Generates a single output file with the extension
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pa .roff
|
1995-05-09 23:58:06 +00:00
|
|
|
suitable processing with
|
|
|
|
.Xr groff 1 .
|
|
|
|
This is actually an intermediate conversion used by the
|
1996-09-08 20:40:52 +00:00
|
|
|
.Fl f Ar ascii ,
|
|
|
|
.Fl f Ar latin1 ,
|
|
|
|
.Fl f Ar koi8-r ,
|
|
|
|
and
|
|
|
|
.Fl f Ar ps
|
|
|
|
format options.
|
1995-08-31 00:14:02 +00:00
|
|
|
.El
|
|
|
|
.It Fl i Ar name
|
|
|
|
Pretend that
|
|
|
|
.Dl <!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
|
|
|
|
.Fl 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
|
|
|
|
.Dl <!ENTITY % name "IGNORE">
|
|
|
|
and will use
|
|
|
|
.Li %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.
|
1995-10-07 22:28:34 +00:00
|
|
|
.It Fl links
|
|
|
|
When used with the
|
|
|
|
.Fl f Ar html
|
1996-09-29 17:34:05 +00:00
|
|
|
option, this option generates a shell script named
|
|
|
|
.Pa file.ln .
|
|
|
|
For each
|
1995-10-07 22:28:34 +00:00
|
|
|
.Li <label id="foo">
|
1996-09-29 17:34:05 +00:00
|
|
|
in the document source,
|
|
|
|
.Pa file.ln
|
1995-10-07 22:28:34 +00:00
|
|
|
generates a symbolic link
|
|
|
|
.Pa foo.html
|
|
|
|
pointing to the numbered
|
|
|
|
.Pa .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.
|
1996-01-30 13:52:50 +00:00
|
|
|
When creating a symbolic link, any occurrence of a slash (/) in label
|
|
|
|
is replaced with percent (%), while any occurrence of a space is replaced
|
1995-10-07 22:28:34 +00:00
|
|
|
with an underscore (_).
|
|
|
|
.It Fl ssi
|
|
|
|
When used with the
|
|
|
|
.Fl f Ar html
|
|
|
|
option, hooks will be placed to have an http server include a
|
|
|
|
custom header and footer on the document using the server side
|
|
|
|
include mechanism. This mechanism is supported by the Apache and
|
|
|
|
NCSA http servers and possibly others. Included files are named
|
|
|
|
.Pa file.hdr
|
|
|
|
and
|
|
|
|
.Pa file.ftr
|
|
|
|
for the header and footer of the
|
|
|
|
.Pa file.html .
|
|
|
|
Other pages include file are named
|
|
|
|
.Pa file.ftr1 ,
|
|
|
|
.Pa file.ftr2 ...
|
|
|
|
.Pa file.ftrn
|
|
|
|
where the number corresponds to the depth of the file from
|
|
|
|
.Pa file.html .
|
1995-05-09 23:58:06 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
If the input file name ends with
|
|
|
|
.Pa .sgml ,
|
|
|
|
the extension may be omitted on the command line.
|
|
|
|
In all cases, the output files are created in the current working
|
|
|
|
directory.
|
|
|
|
.Sh FILES
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pa /usr/share/sgml/FreeBSD/linuxdoc.dtd
|
1995-05-09 23:58:06 +00:00
|
|
|
- the linuxdoc DTD.
|
|
|
|
.Pp
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pa /usr/share/sgml/transpec
|
|
|
|
- directory containing translation specification files for
|
|
|
|
.Xr instant 1 .
|
1995-05-09 23:58:06 +00:00
|
|
|
.Pp
|
1996-09-08 20:40:52 +00:00
|
|
|
.Pa /usr/share/sgml/FreeBSD/linuxdoc.sty
|
1995-05-09 23:58:06 +00:00
|
|
|
- the LaTeX style used in documents produced with the
|
1996-09-08 20:40:52 +00:00
|
|
|
.Fl f Ar latex
|
1995-05-09 23:58:06 +00:00
|
|
|
format option.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr sgmls 1 ,
|
1996-09-08 20:40:52 +00:00
|
|
|
.Xr instant 1 ,
|
|
|
|
.Xr transpec 5 ,
|
1995-05-09 23:58:06 +00:00
|
|
|
.Xr groff 1
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
1996-09-08 20:40:52 +00:00
|
|
|
command appeared in Version 2.0.5 FreeBSD UNIX.
|
1995-05-09 23:58:06 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command was written by John Fieber
|
|
|
|
.Aq jfieber@FreeBSD.org .
|
|
|
|
The linuxdoc DTD was written by Matt Welsh
|
|
|
|
.Aq mdw@cs.cornell.edu
|
|
|
|
and based on the Qwertz DTD written by Tom Gordon
|
|
|
|
.Aq thomas.gordon@gmd.de .
|