the LyX preview does not work if I include a picture using
\includegraphics
inside a tikzpicture
environment.It works if I include the same picture on its own.
Here are two code snippets to insert inside a TeX code box in LyX
Code: Select all
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.4\textwidth]{example-image-a.jpg}};
\end{tikzpicture}
Code: Select all
\includegraphics[width=0.4\textwidth]{example-image-a.jpg}
I have verified that the tikz picture appears in preview if I substitute the image with text.
As far as I know the image
example-image-a.jpg
is part of the mwe
package so the two snippets should compile inside a LyX document if one puts the command \usepackage{tikz}
in the preamble.I have tried both with the standard article class and with the Koma article (I do not expect the class to be important for this).
Any ideas? Thanks in advance!