Graphics, Figures & TablesProblem with framed semi-verbatim Text in Overlay

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
sgu
Posts: 5
Joined: Sun Jun 30, 2013 6:25 am

Problem with framed semi-verbatim Text in Overlay

Post by sgu »

Hi all,

I try to put some code inside a \framebox and also use overlay specification in beamer but fail to get them to work together. Any suggestion is appreciated.

Code: Select all

\documentclass[compress]{beamer} 

\setbeamertemplate{navigation symbols}{}

\begin{document}

\begin{frame}[fragile]
  Some code here
  \begin{semiverbatim}
    \only<2>{\framebox[0.5\textwidth]{\textcolor{blue}{[begin]}
      Hello World!
    \textcolor{blue}{[end]}}}
 \end{semiverbatim}
\end{frame}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Problem with framed semi-verbatim Text in Overlay

Post by Stefan Kottwitz »

In this case just don't use the fragile option.

Stefan
LaTeX.org admin
sgu
Posts: 5
Joined: Sun Jun 30, 2013 6:25 am

Re: Problem with framed semi-verbatim Text in Overlay

Post by sgu »

I try to take out the fragile option, I can see the framebox but the text inside the framebox is treated as verbatim. Any other thoughts about fixing it? Thanks.
Post Reply