2

I have something like this

\documentclass[xcolor=svgnames]{beamer}
\usecolortheme[named=Crimson]{structure} 
\usetheme[height=7mm]{Rochester} 
...
\begin{document}
\begin{frame}
In fact
\begin{align*}
  ``Formula''
\end{align*}
\end{frame}
\end{document}

(the Formula needs to be in math mode) and I get

enter image description here

What am I doing wrong?

  • Try ending with " (single character) instead of two '. – Fran Jan 12 '14 at 20:41
  • 2
    Better, load the amsmath package and use \text{``Formula''} – Alan Munn Jan 12 '14 at 20:45
  • @Fran: That actually looks like it works, but then I loose the coloring of the code in Emacs. – Thomas Jan 12 '14 at 20:46
  • @AlanMunn: That seemed to do it! So I did \text{``} Formula \text{''}. – Thomas Jan 12 '14 at 20:47
  • @Thomas That's not quite the idea. See my answer. (Unless you intend that Formula is actually a math expression (but then why would you want quotation marks around it...)) – Alan Munn Jan 12 '14 at 20:49
6

Because you are inside math mode, the single quote character has a different meaning. Since quotation marks proper are part of the text, a better way to do this is to use the amsmath \text command. Since you want to put an actual math expression inside the quotation marks you need to put just the quotes themselves in the \text{} macro. If this is something you might do often, then turning it into a macro might be a good idea too.

\documentclass[xcolor=svgnames]{beamer}
\usecolortheme[named=Crimson]{structure} 
\usetheme[height=7mm]{Rochester} 
\usepackage{amsmath}
\begin{document}
\begin{frame}
\begin{align*}
  \text{``}a^2 + b^2 = c^2\text{''}
\end{align*}
\end{frame}
\end{document}

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.