My goal is to have an image created with gastex
and include an image (a png
,jpg
,pdf
,.. image) into the gastex
one. For example, draw an automaton with a smiley picture in a state.
I've read around about including images using latex
+dvipdf
. From what I've seen (here) it's not possible to include images using these two tools. My problem is that gastex
compiles only with these two tools and not with pdflatex
. So I'm stuck..
This is my code (red-x.jpg
is a standard jpg image):
\documentclass{beamer}
\usepackage{gastex}
\usepackage{graphicx}
\begin{document}
\begin{frame}
\begin{picture}(40,20)(-25,-28)
\gasset{Nw=6,Nh=6,Nmr=10} %nWidth nHeight
\node(A)(25,0){}
\node[linewidth=0.4,linecolor=orange](B)(12,-10){}
\end{picture}
\begin{figure}
\includegraphics{red-x.jpg}
\end{figure}
\end{frame}
\end{document}
In order to compile with latex
+dvipdf
you need to use: \includegraphics[bb=0 0 20 20]{red-x.jpg}
. Using xelatex
, the gastex
image does not show and only the red-x
shows.
Suggestion?
Best Answer
Try using jpeg2ps to convert
red-x.jpg
into aneps
file (note that this is not a 'true' conversion; it just puts a postscript wrapper around the bitmap image). Using your example withworked for me.