[texhax] tip: beamer: frame fragile frametitle and semiverbatim

Fehd, Ronald J. (CDC/CCHIS/NCHM) rjf2 at cdc.gov
Thu Aug 31 17:28:16 CEST 2006


now that I'm up&runnig with beamer
I have come across a couple of gotchas:

here is a simple usage of frame environment with title: Outline

\begin{frame}{Outline}
   \tableofcontents
   \end{frame}

if I cut&paste the above

\begin{frame}{Outline}

and add [fragile]

\begin{frame}[fragile]{Some program code}
\begin{semiverbatim}
FileName              \alert{SiteMacr} "...";
Options  SASautos =  (\alert{SiteMacr} SASautos)
         MautoSource; \alert{%PassInfoX;}

LibName  Library      "\alert{!ProjRoot}/sas7b";
\end{semiverbatim}

the verbatim text is justified: i.e. word wrapped

FileName \alert{SiteMacr} "..."; Options  SASautos = 
(\alert{SiteMacr} SASautos) MautoSource; \alert{%PassInfoX;}

solution: add frametitle

%NOTE: must use fragile AND frametitle w/semiverbatim
\begin{frame}[fragile]\frametitle{PassInfo: autoexec.sas}
\begin{semiverbatim}
\onslide<1->   FileName              \alert{SiteMacr} "...";
\onslide<2->   Options  SASautos =  (\alert{SiteMacr} SASautos)
\onslide<3->            MautoSource; \alert{%PassInfoX;}

\onslide<4->   LibName  Library      "\alert{!ProjRoot}/sas7b";
\end{semiverbatim}
\end{frame}

note: if there is a beamer listserve, faq, etc.
please let me know and I'll post this tip there.

Ron Fehd  the SAS macro maven  CDC Atlanta GA USA RJF2 at cdc dot gov



More information about the texhax mailing list