The following gives an example of the steps which might be followed to generate an SGML SUN from existing source in a LaTeX document and prologues of associated source files. An actual conversion might skip some of the steps below or use some more, but this should provide a useful reference for how to proceed. More discussion of the steps can be found in the previous subsections and in the code2sgml and latex2sgml command descriptions.
First, generate marked up prologues:
code2sgml
to mark them up as SGML;
if you want to generate copies of the source files marked up in
SGML to be used in future as the primary source, do
but if you want to make a one-off conversion just for the sake of generating this copy of the SUN, docode2sgml this.f > new/this.f code2sgml that.f > new/that.f code2sgml other.f > new/other.f code2sgml -d this.f that.f other.f > new/routines.sgml
code2sgml -D this.f that.f other.f > routines.sgml
code2sgml
wrote to
standard error.(this will print errors to standard output if there is a problem - see the parse documentation for details).parse -s routines.sgml
code2sgml
is expecting,
it may be worth tailoring the configuration
file before attempting the
conversion again;
use one of the default files
c2s.fortran
or c2s.script
which live in the same directory as
code2sgml
as a template:
cp /star/bin/sgml/c2s.fortran ./c2sconfig vi c2sconfig code2sgml -c c2sconfig -D this.f that.f other.f > routines.sgml
.hlp
files for use by the HLP system (SUN/124).
Because of the way that the files have been generated, they
will contain only ASCII-like content.
If you want to include more sophisticated content,
for instance LaTeX representations of mathematics,
the new prologues can be altered.
If they will be used for generating HLP files (viewed on a character
terminal) as well as the SUN descriptions, then alternative
forms of such parts should be retained using the
span element, e.g.
<span media='tty'> <verbatim> x**n + y**n = z**n </verbatim> </span> <span media='print,screen'> <mequation> x^n + y^n = z^n </mequation> </span>
The prologues having been marked up, the main text of the SUN must now be converted to SGML. This can be a somewhat iterative process depending on the success of the various stages.
\includegraphics
-type commands,
are contained within LaTeX figure
environmentslatex2sgml -R routines.sgml sun321.tex
latex2html
itself complains
about (the first part of the screen output of latex2sgml
)sun321.translog
file, especially lines
beginning with `4:
' or lower numbers.(this invocation ignores warnings about missing Summary subdocument entities, which are harmless)parse -s sun321.sgml |& grep -v :W:
and if appropriate the HLP file too:sgml2docs --html sun321.sgml sgml2docs --latex sun321.sgml
The results can then be compared with the pre-SGML end user documentation. It is inevitable that they will not be identical; some of this may be addressed by modifying the SGML source, but since the SGML system is still under development there may be things it was possible to do in LaTeX which are, by design or otherwise, not possible with the current SGML DTDs. Anything which constitutes a serious problem should be fed back into the design discussions for future development of the SGML project.sgml2hlp routines.sgml > routines.hlp