The simplest way to convert your document is via the htrun program included in the
distribution. htrun looks at your source, decides what kind of document it is, and
then calls the appropriate batch file to perform the translation. To convert
myfile.tex to HTML using htrun:
- Start a DOS session, switch to the directory containing your source.
- Issue the command
-
- htrun myfile n
where you must specify the name of your source file without an extension, and
n (0 < n < 3) is the number of LaTeX passes needed to compile your file. If
you omit n, the TrueTeX compiler runs three times, which is usually safe. In
general, n is the number of compilations you need to typeset your document
successfully within SWP.
- htrun will read your file, announce what it’s found, pause, and then call the
appropriate batch file to convert your document.
- If the TrueTeX compiler finds an error in your document, it will pause and ask
you what to do. If you respond x (for Exit), then the entire translation process
will stop, and no HTML will be produced. This is to prevent the compiler
running again, which would be a waste of time since you know you’ll have to fix
something.
See Appendix G for further configuration of this utility, including how to
eliminate the pause.
The advantage of using htrun is that it will automatically work with your source
file, no matter what type of document it is; in addition, it can facilitate
translation to alternative output formats like MathML (see section 18). In
many cases this command will be all you need to convert your document to
HTML.
Now that you’ve got the system up and running, here is where to find additional
information.
- You want to enable automatic conversion of .wmf pictures ? See section
14.5.
- You want to try a GUI interface to TeX4ht/SWP? See Appendix D.
- You’ve just upgraded SWP (or the new GhostScript, or ImageMagick),
and need to reset everything? See section 20.
- You want to customize your HTML? See section 13.
- You have older documents which explicitly refer to the TeX4ht/SWP
packages? Tex4ht/SWP will still process them correctly; see Appendix C
for more on the explicit-package approach.
- Your computer-algebra pictures don’t come out? See section 14.4.
- You want to use Irfan-View to automatically convert other picture types?
See Appendix A.
- You make extensive use of the HyperLink dialog? See section 15, and to
change the way it generates hypertext, Appendix B.
- You have a document that needs special treatment (options)? You can
provide them on the command line (see section 12.1.1) or via an explicit
package statement in the document itself, see Appendix C.3.
- You want to experiment with XML and Math-ML? See section 18.
- You’re a lawyer? Read Appendix J.