Skip to content

Instantly share code, notes, and snippets.

@spion
Created October 3, 2013 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spion/6814044 to your computer and use it in GitHub Desktop.
Save spion/6814044 to your computer and use it in GitHub Desktop.
#!/bin/bash
rm -rf out 2>/dev/null
mkdir out
echo "
\documentclass{article}
\begin{document}
\thispagestyle{empty}
\LARGE
\$\$$1\$\$
\end{document}" | pdflatex -output-directory=out > /dev/null
pdfcrop --clip out/*.pdf out/*.pdf > /dev/null
pdf2svg out/*.pdf formula.svg > /dev/null
cat formula.svg
rm formula.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment