# svg from inkscape — doesn't work in xelatex?

I want to make use of "svg in tex" technology.

Here's a tex:

\documentclass{article}
\usepackage{color}
\usepackage{graphicx}

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

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

\begin{document}
\begin{figure}
\centering
%\def\svgwidth{\columnwidth}
\includesvg{svgfig}
\caption{My SVG Image}
\end{figure}
\end{document}


One can take any svg image.

Then:

pdflatex -shell-escape tex-file


works, but

xelatex -shell-escape tex-file


and

xelatex -shell-escape -8bit tex-file


both give error:

! Undefined control sequence.

 XeTeX’s equivalent primitive is \strcmp not \pdfstrcmp, so it is a bug in the relevant package. – Khaled Hosny Nov 30 '12 at 14:37 @KhaledHosny: Now it gives: \executeiffilenewer ...m \strcmp {\pdffilemoddate. – Adobe Nov 30 '12 at 19:28 XeTeX does not have an equivalent primitive, I’m afraid. Unless you have hundreds of SVG images, may be you can just remove the \executeiffilenewer command and do the conversion on each run. – Khaled Hosny Nov 30 '12 at 19:42