TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Concise Problem Statement

Given an input of a *.tex (LaTeX) file, I want to output a "tight" *.svg file. By "tight", I mean a svg file that does not show the full page -- rather, just the rendered TeX file with a minimal border around it.

Context

I have some LaTeX math equations that I would like to convert into svg. I do not want the svg files to be full 8.5x11 pages. I want my svg files to be the size of the bounding box of my math equations.

I would prefer a full automated, command line solution (i.e. no interactive editing in an external program.)

Thanks!

share|improve this question
    
Welcome to TeX.SE. You should have a look at the standalone package as that might be what you are after. See for example Crop entire document around figure. – Peter Grill Apr 13 '12 at 4:18
    
@Peter: The standalone package looks like half of what I need. How do I output svg? – user13546 Apr 13 '12 at 4:22
    
For convertion, see Convert PDF to SVG. Inkscape as a GUI and command-line tool is the way to go. There are other means also. – Werner Apr 13 '12 at 4:24
3  
You can convert PDF to SVG as per Exporting all equations from a document as individual svg files – Peter Grill Apr 13 '12 at 4:24
up vote 4 down vote accepted

I think dvisvgm does exactly what you're looking for. It converts DVI files to SVG with tight bounding boxes. The tool is also part of TeX Live 2010 and above.

share|improve this answer
1  
dvisvgm + standalone did the trick. Thanks! – user13546 Apr 15 '12 at 1:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.