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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
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