I'm using the beamer class to create a presentation. I'd like to include a gnuplot graph, but inside the frame environment, that seems to be impossible. When running pdflatex, I get the error
! File ended while scanning use of \next.
which I don't understand. Can you tell me how I solve this?
Example:
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[miktex]{gnuplottex} %I'm using miktex
\usepackage{epstopdf}
\usepackage{graphicx}
\begin{document}
\begin{frame}\frametitle{Gnuplot in Beamer Class}
\begin{figure}[htbp]
\centering
\begin{gnuplot}[terminal=cairolatex]
plot [0:2*pi] sin(x) with lines title 'sine'
\end{gnuplot}
\caption{A plot.}
\end{figure}
\end{frame}
\end{document}
\begin{frame}[fragile]– Jake Sep 25 '13 at 15:26pgfplotsinstead ofgnuplottex), so I think it might be best to close this as a duplicate. – Jake Sep 25 '13 at 16:58