2

Edit 2017/08/23: Sorry, my first post wasn't compilable, here are MWE!

I'm having troubles using Beamer \alert in an itemize environment inside of a block environment... I want to have a block inside of which I only put an itemize, and the content of each item has to be highlighted. I tried the following:

\documentclass[t]{beamer}
\mode<presentation>{
  \usetheme{Frankfurt}}

\begin{document}

\begin{frame}
  \begin{block}{My block}
    \begin{itemize}
      \item \alert{Item1} (should be in red)
      \item \alert{Item2} (is in red)
    \end{itemize}
  \end{block}
\end{frame}

\end{document}

but the "Item1" appears as normal text in the output file.

I'm confused because it works perfectly if I add some text inside the block just before the itemize:

\documentclass[t]{beamer}
\mode<presentation>{
  \usetheme{Frankfurt}}

\begin{document}

\begin{frame}
  \begin{block}{My block}
    Some text
    \begin{itemize}
      \item \alert{Item1} (is in red)
      \item \alert{Item2} (is in red)
    \end{itemize}
  \end{block}
\end{frame}

\end{document}

or just before the first \alert

\documentclass[t]{beamer}
\mode<presentation>{
  \usetheme{Frankfurt}}

\begin{document}

\begin{frame}
  \begin{block}{My block}
    \begin{itemize}
      \item Some text \alert{Item1} (is in red)
      \item \alert{Item2} (is in red)
    \end{itemize}
  \end{block}
\end{frame}

\end{document}

or even if I put "almost nothing" (but still...) just before the first alert

\documentclass[t]{beamer}
\mode<presentation>{
  \usetheme{Frankfurt}}

\begin{document}

\begin{frame}
  \begin{block}{My block}
    \begin{itemize}
      \item \hspace{-3pt} \alert{Item1} (is in red)
      \item \alert{Item2} (is in red)
    \end{itemize}
  \end{block}
\end{frame}

\end{document}

In the meantime, I just noticed that everything is fine if I don't use the Frankfurt theme (but of course I would like to use it...)

Does anyone have a workaround? Thanks!

closed as off-topic by user36296, TeXnician, CarLaTeX, Martin Schröder, Stefan Pinnow Aug 13 '17 at 12:58

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Welcome to TeX.SE! Please make your code snippets compilable ... – Mensch Aug 12 '17 at 18:32
  • 3
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – CarLaTeX Aug 12 '17 at 18:49
  • 1
    If I complete your first code fragment to a compilable example, I get i.stack.imgur.com/yD1ws.png Can you please make a minimal working example (MWE) that allows us to reproduce this problem? – user36296 Aug 12 '17 at 18:56
  • 1
    @samcarter Thanks for you comment, I was using pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9.6210 64-bit) LaTeX2e <2016/03/31> patch level 3 ; I just updated my distribution (MiKTeX 2.9.6400, LaTeX2e <2017/04/15>) and everything is OK now! – Antonin Aug 13 '17 at 12:18
  • 4
    I'm voting to close this question as solved by update – user36296 Aug 13 '17 at 12:19

Browse other questions tagged or ask your own question.