I am trying to create a presentation using beamer
. In my presentation I need to include a picture created by LaTeXDraw software. I pasted the code to draw the picture inside the frame, but it is not being compiled with error report:
Undefined Control Sequence
\end{frame}
Here is the code:
\documentclass{beamer}
\usetheme{default}
\usepackage{epstopdf}
\usepackage{pstricks-add}
\begin{document}
\begin{frame}{First One}
% Generated with LaTeXDraw 2.0.8
% Fri Feb 28 12:28:30 BDT 2014
% \usepackage[usenames,dvipsnames]{pstricks}
% \usepackage{epsfig}
% \usepackage{pst-grad} % For gradients
% \usepackage{pst-plot} % For axes
\scalebox{1} % Change this value to rescale the drawing.
{
\begin{pspicture}(0,-1.38)(7.92,1.38)
\psdots[dotsize=0.12](0.06,1.3)
\psdots[dotsize=0.12](0.86,1.3)
\psdots[dotsize=0.12](0.46,0.9)
\psdots[dotsize=0.12](0.46,0.3)
\psline[linewidth=0.04cm](0.08,1.3)(0.46,0.92)
\psline[linewidth=0.04cm](0.46,0.9)(0.46,0.32)
\psline[linewidth=0.04cm](0.46,0.94)(0.86,1.3)
\psdots[dotsize=0.12](2.06,0.9)
\psdots[dotsize=0.12](2.64,0.9)
\psdots[dotsize=0.12](3.24,0.9)
\psdots[dotsize=0.12](3.84,0.9)
\psline[linewidth=0.04cm](2.08,0.9)(2.64,0.9)
\psline[linewidth=0.04cm](2.66,0.9)(3.26,0.9)
\psline[linewidth=0.04cm](3.26,0.9)(3.82,0.9)
\psdots[dotsize=0.12](4.84,1.3)
\psdots[dotsize=0.12](4.84,0.5)
\psdots[dotsize=0.12](5.44,0.9)
\psdots[dotsize=0.12](6.24,0.9)
\psline[linewidth=0.04cm](4.84,1.28)(4.84,0.52)
\psline[linewidth=0.04cm](4.84,1.32)(5.46,0.9)
\psline[linewidth=0.04cm](4.84,0.48)(5.46,0.92)
\psline[linewidth=0.04cm](5.46,0.9)(6.26,0.9)
\psdots[dotsize=0.12](7.06,1.3)
\psdots[dotsize=0.12](7.84,1.3)
\psdots[dotsize=0.12](7.84,0.5)
\psdots[dotsize=0.12](7.06,0.48)
\psline[linewidth=0.04cm](7.06,1.3)(7.86,1.3)
\psline[linewidth=0.04cm](7.86,1.3)(7.86,0.52)
\psline[linewidth=0.04cm](7.84,0.46)(7.06,0.46)
\psline[linewidth=0.04cm](7.06,0.48)(7.08,1.34)
\psdots[dotsize=0.12](2.26,-0.3)
\psdots[dotsize=0.12](2.26,-1.3)
\psdots[dotsize=0.12](1.24,-0.8)
\psdots[dotsize=0.12](3.22,-0.8)
\psline[linewidth=0.04cm](2.28,-0.3)(2.28,-1.26)
\psline[linewidth=0.04cm](1.22,-0.78)(2.32,-0.3)
\psline[linewidth=0.04cm](1.28,-0.8)(2.26,-1.28)
\psline[linewidth=0.04cm](2.3,-1.28)(3.2,-0.8)
\psline[linewidth=0.04cm](2.28,-0.28)(3.22,-0.8)
\psdots[dotsize=0.12](6.04,-0.08)
\psdots[dotsize=0.12](5.06,-1.3)
\psdots[dotsize=0.12](7.26,-1.3)
\psdots[dotsize=0.12](6.12,-0.8)
\psline[linewidth=0.04cm](6.04,-0.1)(5.04,-1.3)
\psline[linewidth=0.04cm](5.08,-1.3)(7.26,-1.28)
\psline[linewidth=0.04cm](7.26,-1.3)(6.04,-0.04)
\psline[linewidth=0.04cm](6.04,-0.04)(6.14,-0.78)
\psline[linewidth=0.04cm](5.04,-1.3)(6.12,-0.8)
\psline[linewidth=0.04cm](6.12,-0.8)(7.22,-1.26)
\end{pspicture}
}
\end{frame}
\end{document}
Everything between \begin{frame}
and \end{frame}
is crated by LaTeXDraw.
What is wrong?
Best Answer
It is a problem with
beamer
andpstricks-add
. However, you shouldn't use the export of LaTeXDraw, it is extremly lousy. This does the same:The output of the loaded files (at the end of the log file):
As an alternative you can load in your code
pstricks
instead ofpstricks-add
.