GithubHelp home page GithubHelp logo

l2p's Introduction

L2P - Create pictures from LaTeX math expressions

L2P is a command-line tool to create PNG images of math expressions,
formatted in the LaTeX typesetting language.  While it can convert a
whole document, it is designed to easily generate images from just a
fragment of LaTeX code, without you needing to build a separate LaTeX
markup file.  A large set of options provide great control and finesse
over the resulting image.

EXAMPLES

l2p -i '$4x^2-7=\cos{2 \pi x}$' -o eqn4.png

Produce a PNG image, named 'eqn4.png', of the equation described by the
LaTeX expression '$4x^2 - 7 = \cos{2 \pi x}$'.


l2p -d 250 -i '$\nabla \cdot \mathbf{D} = \rho$' 

Produce a PNG image from the LaTeX code given with the -i argument
(which happens to be one of Maxwell's equations), at 250 dots per inch.
Since we did not specify an output file name with the -o option, the
image will be 'eqn.png' (the default).  


l2p -p amssymb -i '$\mho$' -o mho.png

Produce a PNG image of the Mho symbol (an upside-down capital omega),
saving the image in the file 'mho.png'.  We include the amssymb package,
which defines that symbol.


l2p -B 20x30 -i '$\sum_{n=0}^{\infty}\frac{(-\phi^2)^n}{(2n)!}$' -o cosine.png

Produce an image of the indicated infinite summation, padded with a
border that is 20 pixels on each side horizontally, and 30 pixels each
side vertically.  The color of this border region will be the same as
the rest of the image background.

Homepage: http://redsymbol.net/software/l2p/
Public source repository: http://github.com/redsymbol/l2p/tree/master
License: Public Domain, have at it

l2p's People

Contributors

redsymbol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

l2p's Issues

align fails

Wrapping multiline input with a \begin{align} ... \end{align} block fails to align equations by their equals sign. Example input that demonstrates the behavior:

\[ \begin{align} 
(a+b)^3 &= (a+b)^2(a+b)\\
&=(a^2+2ab+b^2)(a+b)\\
&=(a^3+2a^2b+ab^2) + (a^2b+2ab^2+b^3)\\
&=a^3+3a^2b+3ab^2+b^3
\end{align} \]

original bug report (refers to above example):
"I am having a problem using the \begin{align} tag. L2p appears not to obey the tag. I've tried both inline and display environments. In addition, the png images end up with strange vertical spacing if I attempt to separate lines by "" in the display environment."

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.