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



gladtex - generate html with LaTeX equations embedded as images


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


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


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.


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

-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

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

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


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.


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


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
    Fork of TeamWinRecoveryProject(TWRP)
    with many additional functions, redesign
    and more Features:Supports Treble and
    non-Treble ROMsUp-to-date Oreo kernel,
    Download OrangeFox
  • 2
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 3
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 4
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    Download XISMuS
  • 5
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 6
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 7
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • More »

Linux commands

  • 1
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    Run acl_gran
  • 2
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    Run acl_grant
  • 3
    cpupower idle-set - Utility to set cpu
    idle state specific kernel options
    SYNTAX: cpupower [ -c cpulist ]
    idle-info [options] DESCRIPTION: The
    cpupower idle-se...
    Run cpupower-idle-set
  • 4
    cpupower-info - Shows processor power
    related kernel or hardware
    configurations ...
    Run cpupower-info
  • 5
    g15daemon - provides access to extra
    keys and the LCD available on the
    logitech G15 keyboard. DESCRIPTION:
    G15Daemon allows users access to all
    extra keys by d...
    Run g15daemon
  • 6
    laditools - tools to control and
    monitor LADI (JACK and ladish) systems ...
    Run g15ladi
  • More »