|
NAMEgladtex - generate html with LaTeX equations embedded as imagesDESCRIPTIONReads a 'htex' file (html with LaTeX maths embedded in <EQ></EQ>) and produces html with equations substituted by images.QUICK STARTWrite HTML code as usual, but use LaTeX equations within the tags <EQ>..</EQ>. Don't use .html extension, .htex is recommended. Now, run:gladtex -v myfile.htex Or, to process multiple files: gladtex -v *htex The -v option is not mandatory, but gives you more feedback. If there are no LaTeX errors, this will generate the file myfile.html (or similar) and numerous eqn???.png files, which contain images of your equations. The HTML file generated is a copy of yours, but the equations are substituted by links to the image files. If you prefer gif files, add the option "-f gif". gladTeX tries to avoid regenerating identical image files. To achieve this, a cache file (gladtex.cache) is used, containing the equations used for generating each image. If you delete the image files before rerunning gladTeX, you should also delete the cache file (gladTeX never deletes an image file). If your HTML contains more than a couple of equations, it is a good idea to place equation images in a separate directory with the -d option. With this option turned on, the cache file is also moved to that directory. OPTIONSTo see an updated list of options, default values and supported image formats, in case of changes after the time of writing this, run gladTeX with no options.
eqn2img UTILITYThe gladTeX script just parses your html-code and feeds the equations to the C program eqn2img. This takes care of running LaTeX, dvi2ps and ghostscript. Furthermore, it finds the baseline of the equation (guided by a dot that is inserted into the equation), antialiases and writes the image in the final format. All this is independent from the gladTeX script, for instance you may writeecho '\sqrt{2}' | eqn2img > sqrt.png to produce an image of the squareroot of two. For normal operation of gladTeX, you never use this utility directly, but in any case, here are (some of) the options.
All messages are written to stderr. Furthermore, a text string specifying the dimensions is written to stdout, unless the image is being written to stdout. In this case, the dimension string is written to stderr. Note that eqn2img will only process one file at a time. PARSING DETAILSGladtex is not case sensitive, so <eQ> is allright. Any <eq> tag must be closed by a </eq>. Whitespace between "<eq" and ">" is allowed. Certain options (such as "COLOR=...") may be present in the tag, see the Options section above. Whitespace is not allowed anywhere else, so "< eq>", "< /eq>" and "</eq >" are all illegal. I'm not quite sure how this agrees with html standards/conventions.THANKSI am grateful to all users who have provided feedback. The current version of gladTeX incorporates suggestions from a number of helpful users.COPYRIGHTProject homepage at http://gladtex.sourceforge.netCopyright (C) 1999-2010 Martin G. Gulbrandsen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Visit the GSP FreeBSD Man Page Interface. |