josephwright/beamer

Documentation about `\newenvironment`: tweaks needed?

dbitouze opened this issue · 1 comments

Does the following MCE, build from the current (3.68) documentation (page 86), give the expected result?

\documentclass{beamer}
\newenvironment<>{myboldblock}[1]{%
  \begin{actionenv}#2%
    \textbf{#1}
    \par}
  {\par%
  \end{actionenv}}
\begin{document}
\begin{frame}
  \begin{myboldblock}<2>
    This theorem is shown only on the second slide.
  \end{myboldblock}
\end{frame}
\end{document}

Indeed, the second slide looks like:

image

On the same page, it is written “Example: Text in the following environment is normally bold and italic on non-specified slides:” but I guess there's no italic in the involved examples:

\newenvironment<>{boldornormal}
{\begin{altenv}#1
{\begin{bfseries}}{\end{bfseries}}
{}{}}
{\end{altenv}}

and:

\newenvironment{boldornormal}
{\begin{altenv}
{\begin{bfseries}}{\end{bfseries}}
{}{}}
{\end{altenv}}

BTW, wouldn't be more advised to use bfseries as a declaration instead of an environment, e.g.:

\newenvironment<>{boldornormal}
{\begin{altenv}#1
    {\bfseries}{}
    {}{}}
  {\end{altenv}}

@dbitouze Thanks for the report! I added the missing title for the theorem and fixed the wording for the boldenormal environment.

@josephwright I left the \begin{bfseries}...\end{bfseries} in the example for now because I think it makes it easier to see where the environment starts and ends. What do you think? Should it be changed to something else? Using the center environment all the time would be a bit boring...