In a previous question, motivated from my use of nbconvert, I asked about including a pdf file when the \includegraphics command explicitly referenced a svg file. Now nbconvert uses no more pdflatex but uses xelatex instead, and this is relevant...
Ulrike Fischer's accepted answer to the question referenced above,
...
\usepackage{etoolbox}
\makeatletter
\preto\Gin@extensions{svg,}
\DeclareGraphicsRule{.svg}{pdf}{.pdf}{\noexpand\Gin@base.pdf}
\makeatother
...
works like a charm with both pdflatex and lualatex but fails with xelatex, e.g.
$ cat text1.tex
\documentclass{standalone}
\usepackage{graphicx,etoolbox}
\makeatletter
\preto\Gin@extensions{svg,}
\DeclareGraphicsRule{.svg}{pdf}{.pdf}{\noexpand\Gin@base.pdf}
\makeatother
\begin{document} \includegraphics{trab1_conv.svg} \end{document}
$ xelatex text1
...
! LaTeX Error: Cannot determine size of graphic in trab1_conv.pdf (no BoundingBox).
...
No pages of output.
Transcript written on text1.log.
$
To make me more confused, trab1_conv.pdf is a perfectly sane pdf,
$ perl -pi.bak -e s/conv.svg/conv.pdf/ text1.tex
$ xelatex text1
...
<use "trab1_conv.pdf" > [1] (./text1.aux) )
Output written on text1.pdf (1 page).
Transcript written on text1.log.
$
It is easy to circumvent the problem (just generate the .tex file and run pdflatex on it) but I'd like to understand what is happening between XeLaTeX an \declareGraphicsRule.
Tia — g
ps: the recipe to produce the external files is
latex trab1_conv.tex ; pdf2svg trab1_conv.pdf trab1_conv.svg
where trab1_conv.tex produces a standalone image of your liking.