EnglishFrenchSpanish

Ad


OnWorks favicon

gladtex - Online in the Cloud

Run gladtex in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command gladtex that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


gladtex - generate html with LaTeX equations embedded as images

SYNOPSIS


gladtex [options] <FILE1> [<FILE2> ...]

DESCRIPTION


Reads a 'htex' file (html with LaTeX maths embedded in <EQ></EQ>) and produces html with
equations substituted by images.

QUICK START


Write 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.

OPTIONS


You can optain the command-line help using gladTeX without options.

-a Save text alternatives for images which are too long for the alt attribute into a
single separate file and link images to it. In <img alt/>-attributes, you can only
have up to 255 characters. Since equations with line breaks / long equations don't fit
in there, this switch allows outsourcing in a file called desc.html in the directory
specified with -d or the current directory by default.

-b colour
Set background colour in RGB manner. This option can also be set indivdually for each
equation by writing <EQ BGCOLOR="..."> in the htex file. For PNG format with
transparency on, this option has no effect. For GIF format (which does not support
alpha channel, as far as I know), antialiasing is done from the foreground color (-c
option) to the background colour, so the background colour should be set even with
transparency on.

-c colour
Set foreground colour in RGB manner. For instance "-c 00FFFF" gives yellow text. This
option can also be set indivdually for each equation by writing <EQ COLOR="..."> in
the htex file. See also -b option.

-d path
Store image files in the path given. The image links in the generated html file(s)
will be made relative. If you need absolute links, use the -u option in addition.

-e env
Use the specified LaTeX environment instead of "displaymath" when generating the
image. This option can also be set individually for each equation by writing <EQ
ENV="env">.

-f format
Use the specified image format in output files. Formats supported may depend on
compile-time decisions. At the time of writing, png and gif are the ones supported.

-i class
Assign the specified CSS class name to images whose environment is "math". Defaults
to "inlinemath".

-l class
Assign the specified CSS class name to images whose environment is "displaymath".
Defaults to "displaymath".

-p string
Add this string to the LaTeX preamble when generating the equations. For example,
"string" may be a \usepackage{} command. Note that if you need this for only a few
equations, you can also write <EQ PREAMBLE="..."> in the htex file.

-r dpi
Set resolution of output images, larger numbers produce larger images. 100 dpi is
default. This is most often a bit larger than surrounding text, but as LaTeX output is
really intended for hires output, details will often disappear at lower resolutions.
Do some experimenting. This option can also be set indivdually for each equation by
writing <EQ DPI="..."> in the htex file.

-s n
Set oversampling factor. Larger values will increase antialiasing verbosity, but is
slower. The default is 4. A value of 1 turns off antialiasing, which I don't
recommend.

-t Disable transparent background. With this option, the background colour (-b option) is
solid.

-u url
Set absolute url to the image files folder. Use this together with -d option if you
can't use relative links for some reason.

-v Verbose mode, give extra feedback. Gladtex is pretty silent without.

eqn2img UTILITY


The 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 write

echo '\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.

-f format
Use the specified image format in output files. If "format" is just a question sign
"?", eqn2img will print a list of supported formats and quit.

-s n
Set oversampling factor (see description of same option for gladTeX).

-o name
Set output filename. Without this option, the image is written to stdout.

-c colour
Set foreground colour in RGB manner.

-b colour
Set background colour in RGB manner.

-t Turn transparency off.

-v Verbose mode, give some feedback.

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 DETAILS


Gladtex 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.

THANKS


I am grateful to all users who have provided feedback. The current version of gladTeX
incorporates suggestions from a number of helpful users.

COPYRIGHT


Project homepage at http://gladtex.sourceforge.net

Copyright (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

Use gladtex online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Phaser
    Phaser
    Phaser is a fast, free, and fun open
    source HTML5 game framework that offers
    WebGL and Canvas rendering across
    desktop and mobile web browsers. Games
    can be co...
    Download Phaser
  • 2
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 3
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 4
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 5
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 6
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • More »

Linux commands

  • 1
    abidiff
    abidiff
    abidiff - compare ABIs of ELF files
    abidiff compares the Application Binary
    Interfaces (ABI) of two shared libraries
    in ELF format. It emits a meaningful
    repor...
    Run abidiff
  • 2
    abidw
    abidw
    abidw - serialize the ABI of an ELF
    file abidw reads a shared library in ELF
    format and emits an XML representation
    of its ABI to standard output. The
    emitted ...
    Run abidw
  • 3
    copac2xml
    copac2xml
    bibutils - bibliography conversion
    utilities ...
    Run copac2xml
  • 4
    copt
    copt
    copt - peephole optimizer SYSNOPIS:
    copt file.. DESCRIPTION: copt is a
    general-purpose peephole optimizer. It
    reads code from its standard input and
    writes an ...
    Run copt
  • 5
    gather_stx_titles
    gather_stx_titles
    gather_stx_titles - gather title
    declarations from Stx documents ...
    Run gather_stx_titles
  • 6
    gatling-bench
    gatling-bench
    bench - http benchmark ...
    Run gatling-bench
  • More »

Ad