LyXExport display formulas to SVGs (or PNGs) from Lyx

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
MathBatman
Posts: 2
Joined: Sat Apr 09, 2016 2:57 pm

Export display formulas to SVGs (or PNGs) from Lyx

Post by MathBatman »

Hi all.

I have many .lyx files which contain many display formulas in them. I would like to "extract" all of these formulas as separate images - either SVG or PNG.

It should be automated since there is a LOT of them. How do I do it?

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Export display formulas to SVGs (or PNGs) from Lyx

Post by scottkosty »

The only thing I can think of would be to turn instant preview on, and have the script open the .lyx file in the GUI, wait a few seconds for instant preview to load, find the temporary folder and copy the images there, then kill the LyX process and move on to the next .lyx file. This is not an elegant approach though.
MathBatman
Posts: 2
Joined: Sat Apr 09, 2016 2:57 pm

Re: Export display formulas to SVGs (or PNGs) from Lyx

Post by MathBatman »

Thanks!! It works for me. I can join all of my latex files into one and then extract all of the images and "parse" them later on :)
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Export display formulas to SVGs (or PNGs) from Lyx

Post by scottkosty »

Glad it works! If you feel like posting your script that accomplishes this, it might help future users.
Post Reply