CTAN Comprehensive TeX Archive Network

Directory support/gladtex

README.md

Glad

Glad is a preprocessor that enables the use of formulas within HTML files. The formulas, embedded in <eq>...</eq> tags, as if within $$..$$ in , is fed through latex and replaced by images.

Additionally all images get an alt-tag for alternative texts that contains the -equivalent of the image. This is handy for text-mode browsers or blind screen reader users.

This is a complete rewrite of the old Glad which was implemented in Perl and in C. The old version was not easily portable across platforms. The new version is purely implemented in Python, gets rid of the Ghostscript dependency and additionally offers the Glad functionality in a Python module called gleetex. to be embedded in other applications.

Features

  • both program and library: Glad and Glee (both Python)
  • easy-to-adjust font size of formulas through command-line switch
  • customisation of commands using a custom preamble
  • automated replacement of non-ascii characters through control sequences
  • usage as Pandoc filter for export in HTML-based formats as for instance Epub

License

  • (C) 1999-2010 Martin G. Gulbrandsen
  • (C) 2011-2013 Jonathan Daugherty (especially release 1.3)
  • (C) 2013-2018 Sebastian Humenda

This program is distributed under the LGPL-3, or at your option, any later version of the license; for details see the accompanying file COPYING.

The official project homepage is at http://humenda.github.io/Glad

Installation

Debian/Ubuntu

On all derivatives of Debian (as Ubuntu/Mint, etc.), installing Glad is as easy as

# apt-get install gladtex

Windows

If you want to use the program without the Python library, you should download a pre-compiled binary from https://github.com/humenda/Glad/releases.

Just unzip the archive and move the files to a directory within %PATH%.

From Source

The following is required for installing Glad:

  • Python >= 3.4
  • (2e), dvipng
  • the package preview.sty

Debian / Ubuntu

On Debian/Ubuntu systems the following commands will satisfy the dependencies:

# apt-get install python3-all texlive-fonts-recommended texlive-latex-recommended preview-latex-style dvipng

The package can then be installed using

# python3 setup.py install

Note: If your system ships python as the command for Python3 you have to use python in the above command instead.

OS X

You need to install a distribution on your Mac. Glad was successfully run with MacTex.

You can download a zip source archive from GitHub or use git:

$ git clone https://github.com/humenda/GladTeX.git

Use cd to change to the Glad source directory and issue

$ python setup.py install

Compilation On Windows

To compile Glad on Windows, yu need a Python3 installation. Assumed is python3.4, newer versions should work fine as well. Only the paths need to be adjusted

Install py2exe:

c:\python34\scripts\pip.exe install py2exe

Given that Glad is located in c:usersusergladtex:

cd c:\users\user\gladtex
c:\python34\python.exe setup.py install

That will install Glad as a library to c:\python34\lib and the script to c:\python34\scripts. It also allows py2exe to find the gleetex module. Now the executable can be build:

c:\python34\scripts\build_exe.exe -b 0 -c gladtex.py

That'll create a dist/ folder containing the executable. If you have other python applications in your project it is useful to read about the -b switch to share some python components included in the just-built executable.

Documentation

Please use man gladtex for further instructions or have a look at the file manpage.md.

Download the contents of this package in one zip archive (82.8k).

Glad equations in HTML

Glad is a utility that enables equations within HTML code. You write HTML code as usual, but in addition you can include equations within the special tags <EQ>..</EQ>, as if within $$..$$ in . Then you run gladtex, which replaces the equations by images. Features include image alignment (baseline of equations agree with baseline of text), GIF and PNG support, transparent backgrounds and antialiasing.

Additionally, Glad can aid the creation of accessible documents for the blind by providing the equation in the alt attribute of an image. It also comes with a library which allows embedding Glad into other applications.

PackageGladTeX
Repositoryhttp://humenda.github.io/GladTeX
Version3.0.0
LicensesGNU Lesser General Public License 3
Copyright1999–2010 Martin G. Gulbrandsen
2011–2013 Jonathan Daugherty
2013–2016 Sebastian Humenda
MaintainerSebastian Humenda
Martin G. Gulbrandsen (inactive)
TopicsConvert HTML
...
Guest Book Sitemap Contact Contact Author