2

I am currently facing the following problem in the beamer-class for LaTeX: I would like to label a frame and simultaneously use a verbatim-environment. Most likely the solution is very easy but I do not figure out how to address this issue correctly. Next you find a MWE:

\documentclass[12pt,english,hideothersubsections]{beamer}
\usepackage{verbatimbox}
\begin{document}
\begin{frame}[label=supplemental][fragile]
\begin{verbbox}
TEXT
\end{verbbox}
\resizebox{0.95\textwidth}{!}{\theverbbox}
\end{frame}
\end{document}

The problem is that the pdf-output displays the "[fragile]"-element, too. However, if I simply combine both commands in one single bracket, i.e., the label- and the fragile-command, I get an error-message. If I delete either the first or the second []-command the results are not as I want them.

How can I fix this? Does anyone has an idea?

Thanks a lot in advance.

  • 1
    Welcome to TeX.sx! One single bracket is the way to go, if any. What was the syntax you tried with one single bracket (order of the parameters, separator...), and what was the error message? – T. Verron Jun 20 '14 at 14:05
  • 2
    Is [label=supplemental,fragile] what you want? – Sigur Jun 20 '14 at 14:05
  • That was my first idea, too. Unfortunately, I get an error using one single bracket for both alternatives: [fragile,label=supplemental] [label=supplemental,fragile] The error is as follows: ! File ended while scanning use of \next. <inserted text> \par <*> presentation_TEST_2.tex I suspect you have forgotten a }` – Phil Jun 20 '14 at 14:08
  • I cannot reproduce it. Are you compiling exactly the code as copy-pasted from the question (except for the modification for a single group of brackets)? – T. Verron Jun 20 '14 at 14:18
  • Yes, I am running exactly the code above. But neither with the MWE nor with my full presentation it is working. Actually, I do only get NO error message if I use the code above even though the result is not satisfying. – Phil Jun 20 '14 at 14:22
2

(The original problem was solved in comments, I'm only posting this to make the corrected MWE available somewhere in the page)

Only one group of braces should be used, beamer's frame uses keyval options, not optional parameters in the usual sense.

\documentclass[12pt,english,hideothersubsections]{beamer}
\usepackage{verbatimbox}
\begin{document}

\begin{frame}[label=supplemental,fragile]
 \begin{verbbox}
  Verbatim : % $ #
 \end{verbbox}
 \resizebox{0.95\textwidth}{!}{\theverbbox}
\end{frame}

\againframe{supplemental}

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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