a weird beamer feature…
As I was preparing my slides for my third year undergraduate stat course, I got a weird error that got a search on the Web to unravel:
! Extra }, or forgotten \endgroup. \endframe ->\egroup \begingroup \def \@currenvir {frame} l.23 \end{frame} \begin{slide} ?
which was related with a fragile environment
\begin{frame}[fragile] \frametitle{simulation in practice} \begin{itemize} \item For a given distribution $F$, call the corresponding pseudo-random generator in an arbitrary computer language \begin{verbatim} > x=rnorm(10) > x [1] -0.021573 -1.134735 1.359812 -0.887579 [7] -0.749418 0.506298 0.835791 0.472144 \end{verbatim} \item use the sample as a statistician would \begin{verbatim} > mean(x) [1] 0.004892123 > var(x) [1] 0.8034657 \end{verbatim} to approximate quantities related with $F$ \end{itemize} \end{frame}\begin{frame}
but not directly the verbatim part: the reason for the bug was that the \end{frame} command did not have a line by itself! Which is one rare occurrence where the carriage return has an impact in LaTeX, as far as I know… (The same bug appears when there is an indentation at the beginning of the line. Weird!) [Another annoying feature is wordpress turning > into > in the sourcecode environment…]
Related
This entry was posted on September 24, 2014 at 12:14 am and is filed under Books, Kids, Linux, R, Statistics, University life with tags Beamer, bootstrap, course, fragile environment, LaTeX, R, random number generation, rnorm(), slides, Statistics, Université Paris Dauphine, verbatim, \end{frame}. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
One Response to “a weird beamer feature…”
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
September 17, 2015 at 5:20 pm
That’s the weirdest LaTeX bug I’ve ever seen… and you just make me save a lot of time debugging it. Thanks a lot for blogging that !