4

While preparing a beamer presentation, I need to format a little string like 21.02.2012 exactly like the description-labels appear.
I tried by using usebeamertheme/color/font of description item - but this seems not to be working. I'm searching for a portable solution, thus when using another theme for the presentation, the result ever looks like those description labels.
For better understanding a MWE:

\listfiles
\documentclass[xetex]{beamer}
\usepackage{polyglossia}\setdefaultlanguage[spelling=new,babelshorthands=true]{german}
\begin{document}
\begin{frame}
\begin{description}[longest label]
  \item [first label] describtive text
  \item [second label] describtive text
\end{description}
The \underline{underlined text} should look like those description labels (first, second) above.\newline
Working with the solution from \emph{ejoerns}: 
The \underline{\usebeamercolor*[fg]{description item}underlined text} should look like those description labels (first, second) above.
\end{frame}
\end{document}
  • 1
    A simple hack would be to use \def\insertdescriptionitem{Text}\usebeamertemplate**{description item} – ejoerns Feb 21 '12 at 17:05
  • @ejoerns - your hack looks cool - but I do not unterstand the working behaviour (what about those two stars?). Anyhow - thanks! – Bastian Ebeling Feb 21 '12 at 18:59
  • @BastianEbeling: MWE's are always helpful, regardless of how minimal they may be. – Werner Feb 21 '12 at 19:00
  • 1
    The \insertdescriptionitem{} cmd sets the template text. The \usebeamertemplate inserts the template. Here the first star says to load color and font definition and put everything in a group to prevent side effects. The second star resets the color (fg or bg) that is not defined by the template to the normal text color. It might not be necessary here. – ejoerns Feb 21 '12 at 19:12
3

As far as I know only the color is changed. Thus it would be enough to use

\usebeamercolor*[fg]{description item} Text
  • This is already the solution: I always tried like \usebeamercolor{description item} Text, which is not working... – Bastian Ebeling Feb 21 '12 at 18:38
  • Without the [fg] option, it does only set the colors fg and bg to the color defined in the template. Thus an additional \color{fg} or \color{bg} would have the same effect as shown above. – ejoerns Feb 21 '12 at 19:03
  • Thanks for the explanation: I used it (years ago) and forgot about that... :-( – Bastian Ebeling Feb 21 '12 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.