Currently I prepare pdfs from svg before compiling then doc, so I do have "svgs in xetex". I even automated the thing in bash, so I'm pretty happy. Nevertheless, all problems should be solved, and all issues cleared -- so if someone aware of XeTeX internals thinks something is wrong -- it sould be reported and fixed.

Edit 2:

The script I'm using is too opinioned. Here's basic simple script which does the job:

I called it bk_XeLaTeXs_simple.bash. In order to build a doc just run this one in the dir of your master tex file. This script assumes the first tex file in the dir to be a master tex file, but you can also set it with the -t/--tex option.

The script looks for a svg files, and compares each of them with a corresponding pdf file: if svg is newer (or pdf does not exists), then script uses inkscape to re-generate pdf file. So to load an svg file called x-y-sigma.svg one would write:

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 HosnyNov 30 '12 at 19:42

Can you please copy paste your bash script @Adobe , i can offer some bounty on that :) ?
–
reyman64Feb 5 at 7:19

@reyman64 I'll do it in an hour, no need for a bounty.
–
AdobeFeb 5 at 8:15

1 Answer
1

There are two issues; the XeTeX string comparing primitive is called \strcmp not \pdfstrcmp, so that is easy to fix (a more portable way is to use \pdf@strcmp from pdftexcmds package, which handle engine differences).

The other problem is the lack of a XeTeX implementation of \pdffilemoddate. I opened a XeTeX ticket, for when I have time to look into it, but patches are welcomed of course.