] >
In much the same way as glossing a file, you can transform your object XHTML code into either HTML or LaTeX. There are again two ways to do this, each of which call the glosser using either the gloss-xhtml2html.bat batch file or the gloss-xhtml2tex.bat batch file. Once called, the glosser will convert your XHTML into either HTML or LaTeX, and place it in the same directory.
There may be several reasons for wanting to convert your XHTML into LaTeX; You might have wanted to write LaTeX all along but found the gloss language easier to understand, you might decide that the LaTeX language provides for better printed output. Alternatively, you might want to convert your code into HTML because there might be more support for this than XHTML in certain browsers. Whatever the reason, gloss gives you this option:
As mentioned above, and as with the glossing process, there is more than one way to transform your XHTML into LaTeX. Please note, if you are not using the jEdit plugin, then you must transform the object XHTML code and not the gloss source code.
Once converted, two extra files will be copied into the directory of the file being converted. These two files are called xhtml2tex.sty
and x2tconfig.sty
. xhtml2tex.sty is the main style file, providing default styles to your LaTeX file, and x2tconfig.sty is a secondary one intended for any additional modifications.
I will assume you are now familiar with the command prompt, if not please visit the section: Command Prompt Basics.
The gloss-transform command line works in much the same way as the gloss command line. You must first navigate to the directory of the XHTML file to be transformed, and then use the following command: gloss-xhtml2tex FILE.xhtml
This will convert FILE.xhtml to FILE.tex and also copy the two files from the gloss installation into the directory of the file being converted.
If you right click an XHTML file (with extension .xhtml) you will find that there are two menu items, convert to HTML, and convert to TeX. The latter will convert your XHTML file to LaTeX and copy over the two .sty files from the Gloss installation directory.
Please see the section: An Introduction to Legacy Systems for an overview of LaTeX, and to find out how to view your .tex files.
This process is almost exactly the same as converting to LaTeX (for the user at least, not the glosser), except now a stylesheet called html-mathml.css
is copied from the gloss directory to your working directory. This stylesheet is required as MathML is XML-based whereas HTML is not. Therefore a browser reading HTML would get confused if it suddenly came across some XML in the form of MathML. Instead, the MathML is converted to an alternative HTML compliant format, which although allowing for viewing in HTML, will lose some of its functionality.
The command is now gloss-xhtml2tex FILE.xhtml
gloss-xhtml2html FILE.xhtml
Which will convert FILE.xhtml to FILE.html in the same directory as FILE.xhtml.
Again, by right-clicking an XHTML file you get the option to convert to HTML. Do this and the file with name, say, FILE.xhtml will be converted to FILE.html and the stylesheet will be copied over.
This page is copyright. Web page design and creation by GLOSS.