I want to make use of "svg in tex" technology.
Here's a tex:
\documentclass{article}
\usepackage{color}
\usepackage{graphicx}
\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}
\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.
\executeiffilenewer #1#2#3->\ifnum \pdfstrcmp
{\pdffilemoddate {#1}}{\pdffil...
l.19 \includesvg{svgfig}
\strcmpnot\pdfstrcmp, so it is a bug in the relevant package. – Khaled Hosny Nov 30 '12 at 14:37\executeiffilenewer ...m \strcmp {\pdffilemoddate. – Adobe Nov 30 '12 at 19:28\executeiffilenewercommand and do the conversion on each run. – Khaled Hosny Nov 30 '12 at 19:42