I want to write different text in the middle of a sentence in a beamer
presentation and its corresponding beamerarticle
. But it seems that \mode<...>{...}
introduces a new paragraph and breaks the sentence.
Please look at the code and results:
\documentclass[ignorenonframetext]{beamer}
%\documentclass{article}
%\usepackage{beamerarticle}
\begin{document}
\begin{frame}{This is a frame}
This is some text in \texttt{beamer} and \texttt{article} modes.
This is some text in \mode<article>{\texttt{article}}\mode<beamer>{\texttt{beamer}} mode.
\end{frame}
\end{document}
This is the result in beamer
mode. It looks like \mode<beamer>{text}
introduces \par
(or something similar) before and after text
.
while \mode<article>{text}
just introduces \par
after text
.
In any case I would like t have some mechanism to alternate text without introducing paragraph breaks. Is it possible?
Best Answer
Here's an alternative way to achieve the same end: replace your
\mode
with\only
. I tend to think of\mode
as something for Big Chunks and don't think I've ever used it within a frame. That's purely subjective, but based on the question it would appear that inadvertently stumbled on a Good Practice.Overlay specifications as used by
\only
,\alt
, and\temporal
(amongst others) can include "output type" specifications. Quite often I'll do some complicated overlay stuff, for example I might want to iterate through approximations of\pi
. In my presentation, I'd want something like:But in
handout
ortrans
mode, these all get processed and the overlay specification collapses so that they all appear. That isn't what I want. So I actually do:and so on. This suppresses the text completely in
handout
andtrans
modes.In your example, you can make use of this facility and have:
This produces: