5

I want to export equations from latex to import them into powerpoint (if possible as vector grafic .svg). I use windows7 / Office 2010 and sharelatex. Since I would like to export every equation, I tried:

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{equation}
\begin{equation}
    \dot x = f(x(t))
\end{equation}
\begin{equation}
    x(t_0) = x_0
\end{equation}

But I have no idea, how to convert the pdf into a .svg file.

Would be great, if somebody could help.

0

2 Answers 2

1

I recommend you to convert into .eps encapsulated postscript: MS Office 2003 (on Windows XP SP2) handles .eps. I guess that MS 2007 on Win 7 handles too :)

The conversion process:

pdfcrop <pdf file without ext>.pdf
pdftops -f <page number> -l <page number> -eps "<pdf file without ext>-crop.pdf" 
rm  "<pdf file without ext>-crop.pdf"
mv  "<pdf file without ext>-crop.eps" <pdf file without ext>.eps

Not exactly that you asked, but works fine. Oh! And you have to got a nice cygwin!

3
  • @user:100231 can you please help me understand how to proceed with the conversion process? Do I write the instructions in cmd? Where should the file I want to convert to eps be? Many thanks.
    – Gunelle
    May 28, 2021 at 3:17
  • No, these are not Windows cmd commands. You have to use a POSIX-compatible programming and runtime environment like cygwin (or some Linux operating system).
    – Tom Solid
    May 29, 2021 at 3:57
  • Windows' cmd.exe is perfectly capable of running those commands. Only the last two will be del instead of rm and ren instead of mv.
    – Ben Voigt
    Jul 11, 2022 at 20:16
1

I would give a try to dvisvgm (part of TeXlive). You have to get a .dvi file with latex first and then you call dvisvgm.

% This is file t.tex
\documentclass{article}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{equation}
\begin{document}
\begin{equation}
    \dot x = f(x(t))
\end{equation}
\begin{equation}
    x(t_0) = x_0
\end{equation}
\end{document}

Then, in a shell:

latex t.tex
dvisvgm --no-fonts --page=1-2 t.dvi

This will create two files: t-1.svg and t-2.svg.

As a side note, Till Tantau, main author of tikz-pgf, has been working recently on a dvisvgm driver for tikz-pgf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .