[Tex/LaTex] Formatting capital letters in math mode

charactersformattingmath-mode

This is perhaps a simple question, but I would like to print a capital I in my LaTeX document (beamer specifically) inside a $...$ construct. I would like my I to appear more substantial by having the horizontal lines at top and bottom, however this is not what I am getting.

Any suggestions?

Best Answer

Math fonts in beamer are set in serif by default. To change this, see How to get beamer math to look like article math (use the mathserif class option). On a case-by-case basis, you could use $...\mathrm{I}...$ to obtain a serif-style I:

enter image description here

\documentclass{beamer}% http://ctan.org/pkg/beamer
\begin{document}
\begin{frame}
  I \quad $I$ \quad $\mathrm{I}$ \quad $\textrm{I}$
\end{frame}
\end{document}

Of course, if you're using this "I" on a more frequent and contextual-specific basis, consider using a macro like

\newcommand{\upshapeI}[1]{\textrm{\upshape I}}

The above suggestions follows the principles in Consistent typography.