Preview package

Refer to this so post:

First, add the following to your LaTeX file. Include the other environments you want to include.


Burst the pdf file

pdftk yourfile.pdf burst

Then move the resulting files to a separate directory, and run the following to obtain:

for i in *.pdf do; convert -density 300 $i $i.png;

Extracting without numbers

For extracting without equation numbers, check out @Damiens’s answer from the SO post:

To extend the answer from @Kilgore:

To get rid of the equation numbers (AND you have an excellent backup of the original file(s)!), yon can do the following:


files=`find . | grep -e '\.tex$'`

for file in $files ; do

    echo "Stripping: $file"
    sed -i 's/begin{equation}/begin{equation*}/g'   $file
    sed -i 's/end{equation}/end{equation*}/g'   $file


The individual equations can be extracted using:


(Note the addition of the *)

To remove the excessive whitespace, use the following utility:

pdfcrop output.pdf

And, finally, you can split this into individual svg files

pdf2svg filename.pdf output-page%03d.svg all