Let's say you have the SGML document foo.sgml
, which you want to format.
Here is a general overview of formatting the document for different output.
For a complete list of options, consult the man pages.
If you just want to capture your errors from the SGML conversion,
use the sgmlcheck
script. For example.
% sgmlcheck foo.sgml
If you see no output from an sgmlcheck run other than the ``Processing...'' message, that's good. It means there were no errors.
If you want to produce plain text, use the command:
% sgml2txt foo.sgml
You can also create groff source for man pages, which can be formatted with
groff -man
. To do this, do the following:
% sgml2txt --man foo.sgml
To create a LaTeX documents from the SGML source file, simply run:
% sgml2latex foo.sgml
If you want to produce PostScript output (via dvips
), use the
-p
option:
% sgml2latex --output=ps foo.sgml
Or you can produce a DVI file:
% sgml2latex --output=dvi foo.sgml
If you want to produce HTML output, do this:
% sgml2html --imagebuttons foo.sgml
This will produce foo.html
, as well as foo-1.html
,
foo-2.html
, and so on -- one file for each section of the
document. Run your WWW browser on foo.html
, which is the top
level file. You must make sure that all of the HTML files generated
from your document are all installed in the directory, as they
reference each other with local URLs.
The --imagebuttons option tells sgml2html to use graphic arrows as navigation buttons. The names of these icons are "next.gif", "prev.gif", and "toc.gif", and the SGML-tools system supplies appropriate GIFs in its library directory.
If you use sgml2html
without the -img
flag, HTML documents
will by default have the English labels ``Previous'', ``Next'', and
``Table of Contents'' for navigation. If you specify one of the
accepted language codes in a --language option, however, the labels
will be given in that language.
If you want to format your file for the GNU info browser, just run the following command:
% sgml2info foo.sgml
For LyX output, use the the command:
% sgml2lyx foo.sgml
If you want to produce RTF output, run the command:
% sgml2rtf foo.sgml
This will produce foo.rtf
, as well as foo-1.rtf
,
foo-2.rtf
, and so on---one file for each section of the document.