15

OK, I've been staring at this for an hour. I know there's an error in this frame, as the document compiles fine if I put \end{document} in the frame before this. But this frame gives an error

File ended while scanning use of \next

Where is it?????

\begin{frame}[fragile]
\frametitle{PROC TEMPLATE for a fancy graph (part 1)}
\begin{alltt}
proc template;
 define statgraph scatdens2;
 begingraph;   *BEGIN DEFINING THE GRAPH;
   entrytitle "Scatter plot with density plots";
    *CREATE A TITLE;
   layout lattice/columns = 2 rows = 2
    columnweights = (.8 .2) rowweights = (.8 .2)
      columndatarange = union rowdatarange = union;
   *LAYOUT LATTICE...SETS UP A GRID OF GRAPHS;
   *COLUMNWEIGHTS AND ROWWEIGHTS SETS
    THE RELATIVE SIZE OF THE INDIVIDUAL COLUMNS AND ROWS;
 \end{alltt}
 \end{frame}
1

1 Answer 1

19

Believe it or not, the error was caused by the space before \end{frame}.

4
  • 11
    Oh, I believe you. frame is a pseudo-environment, i.e. a macro in disguise which collects everything till \end{frame}. With the fragile option it turns on verbatim mode in addition and then looks for the <new line>\end{frame} verbatim. With the space it doesn't find it and therefore takes everything until the end of the document where an error is raised, except of course if there is such a line later in the document. May 9, 2011 at 21:25
  • what's the point of adding the [fragile] option ?
    – Suresh
    May 10, 2011 at 3:10
  • That's scary... thanks! Unbelievable is the perfect translation for "not easy findable" in this case. Jun 10, 2012 at 17:59
  • @ViniciusMassuchetto After more than one year I don't remember precisely what I did to pinpoint the error. I was probably helped by the fact that I never indent environments. :) Only the code in definitions and sometimes the contents of the environments, particularly "continuation lines" in tabulars.
    – egreg
    Jun 10, 2012 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .