Giter Club home page Giter Club logo

pnglatex's Introduction

pnglatex

pnglatex is a small script that turns LaTeX formulas into png images.

$ pnglatex -f "E=mc^2"

E=mc^2

If the image was created using pnglatex you can also reverse the process.

$ pnglatex -r formula.png
E=mc^2

Installation

Download or clone the repository, then type

# chmod +x pnglatex
# cp pnglatex /usr/bin/pnglatex

Dependencies

pnglatex depends on dvipng, imagemagick, latex and optipng packages.

Tips

Piping is good.

$ cat formula.tex | pnglatex

Using xargs you can generate and open your image with a one-liner; for example:

$ pnglatex -f "E=mc^2" | xargs eog

Omitting -f option will start interactive mode.

$ pnglatex
Interactive mode (<Ctrl-D> to end):
E=mc^2

Logs can give you a good idea of what went wrong.

$ pnglatex -f "E=mc^2" -l out.log

Options

  • -b <color> Set the background color
  • -B <color> Set the border color
  • -d <dpi> Set the output resolution to the specified dpi
  • -e <environment> Set the environment for the formula (i.e. displaymath or eqnarray)
  • -f <formula> The LaTeX formula
  • -F <color> Set the foreground color
  • -h Print the help message
  • -H <header> Input file in header
  • -l <file> Log file
  • -m <margin> Set the margin
  • -M Strip meta information
  • -o <file> Specify the output file name
  • -O Optimize the image
  • -p <packages> A colon separated list of LaTeX package names
  • -P <padding> Set the padding
  • -r <file> Read an image and print the LaTeX formula
  • -s <size> Set the font size
  • -S Don't print image file name
  • -v Show version

pnglatex's People

Contributors

fierthraix avatar mneri avatar sanchez avatar shepard8 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.