Hi,

can this be made into a package?

That'd be great!

Thanks

bye

Toscho

On 30.11.2012 11:01, Boris Kheyfets wrote:
Hello XeTeX users,

There's a solution to use svg in tex. Here's a minimial working (with
pdflatex) example:

\documentclass{article}

\usepackage{graphicx}
\usepackage{color}
\usepackage{epstopdf}

\newcommand{\executeiffilenewer}[3]{%
  \ifnum\pdfstrcmp{\pdffilemoddate{#1}}%
  {\pdffilemoddate{#2}}>0%
  {\immediate\write18{#3}}\fi%
}

\newcommand{\includesvg}[1]{%
  \executeiffilenewer{#1.svg}{#1.pdf}%
  {inkscape -z -D --file=#1.svg %
  --export-pdf=#1.pdf --export-latex}%
  \input{#1.pdf_tex}%
}

\begin{document}

\begin{figure}
   \def\svgwidth{200pt}
   \includesvg{first7BrZns}% it is first7BrZns.svg!
\end{figure}

\end{document}

Compilation with:

|pdflatex -shell-escape tex-file|

(the full paper is here
<http://www.tex.ac.uk/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf>)

But in xelatex:

|xelatex -shell-escape -8bit tex-file|

gives error:

|! Undefined control sequence.
\executeiffilenewer  #1#2#3->\ifnum  \pdfstrcmp
                                               {\pdffilemoddate  
{#1}}{\pdffil...
l.19\includesvg{svgfig}|

What is wrong? How do I make it working?

(I also posted the question at tex.se
<http://tex.stackexchange.com/questions/84837/svg-from-inkscape-doesnt-work-in-xelatex>).

--
Boris








--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
   http://tug.org/mailman/listinfo/xetex



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex

Reply via email to