Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 about extra } or missing endgroup.

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}
share|improve this question
    
Don't put greetings and a signature, as the latter is automatically inserted. For the code, indent each line by four spaces. –  egreg May 9 '11 at 21:11
1  
Try removing the space before \end{frame} (assuming that this is real and not an artefact from posting here) –  Joseph Wright May 9 '11 at 21:11

1 Answer 1

up vote 11 down vote accepted

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

share|improve this answer
7  
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. –  Martin Scharrer May 9 '11 at 21:25
    
Thanks! That was it. How strange. –  Peter Flom May 9 '11 at 22:28
    
what's the point of adding the [fragile] option ? –  Suresh May 10 '11 at 3:10
    
That's scary... thanks! Unbelievable is the perfect translation for "not easy findable" in this case. –  vmassuchetto Jun 10 '12 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 '12 at 18:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.