Skip to content

A short shell script to compile LaTeX sources to cropped PNG images

Notifications You must be signed in to change notification settings

iblech/latex2png

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

latex2png

A short shell script to compile LaTeX sources to cropped PNG images.

Usage

# one-shot mode:
latex2png foo.tex

# or continuously regenerate the PNG images upon any changes to any .tex file
# in directory foo/
latex2png foo

The LaTeX source files can either be normal source files containing a proper header, or alternatively just contain a single block of commands (which are then rendered in a math environment).

Dependencies

  • pdflatex, pdfcrop, and pdftoppm. These programs are usually contained in packages with names like texlive-latex-base, texlive-extra-utils, and poppler-utils, respectively.
  • Optionally inotifywait from a package like inotify-tools.

Security considerations

Don't run latex2png on untrusted files.

In connection with remote filesystems

Some filesystems don't generate inotify events. In this case you should manually specify the checking interval when using latex2png in continuous mode:

LATEX2PNG_INTERVAL=60 latex2png foo  # check every 60 seconds

License

To the extent that this shell script exceeds a basic threshold of originality, it is dual-licensed, meaning that you can (and are invited to) use, redistribute and modify it under the terms of either:

  1. The GNU General Public License (GPL), version 3 or (at your option) any later version published by the Free Software Foundation.
  2. The LaTeX Project Public License (LPPL), version 1.3c or (at your option) any later version published by the LaTeX3 project.

About

A short shell script to compile LaTeX sources to cropped PNG images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages