# Mathematical expression in a section title with distinct font

I need to write a mathematical expression in a section title, for example this: \section{$Al_{2}O_{3}$}, but in this case it will appear in a math style (in italic font.) I don't know how could I force the latex to write it normal as a normal text, (as a bold and not italic letter).

• Answer: it depends on information you have chosen not to share. Please provide a minimal document which we can compile to reproduce what you see now. Discussion: this will greatly confuse your readers. I'm no mathematician but, as I understand it italic and upright have different semantic meanings. So do bold and normal weight. How, then, should your readers understand the expression? – cfr Oct 10 '15 at 21:30

You can use \textsubscript{2} etc. for the indices.

\documentclass{article}
\usepackage{fixltx2e} % for LaTeX older than early 2015
\usepackage{textcomp}
\begin{document}

\section{$Al_{2}O_{3}$}

\section{Al\textsubscript{2}O\textsubscript{3}}

\end{document}

• @Hajnus: Normally, you don't need fixltx2e any longer. The fixes from that package have been incorporated into the LaTeX core this year – user31729 Oct 10 '15 at 21:37
• I don't know why, but when I tried it without this usepackage it didn't work. – Alíz Oct 10 '15 at 21:39
• @Hajnus: Apparently you have an older LaTeX distribution. I will add the package to the solution – user31729 Oct 10 '15 at 21:40

This is not mathematics, but chemistry!

\documentclass{article}
\usepackage{chemformula}

\begin{document}

\section{\ch{Al2O3}}

\end{document}


• Yes, but in the general case it refer to a mathematics expression. Thank you for your answer. – Alíz Oct 10 '15 at 21:48
• @Hajnus If it's math, it should be typeset as math. Is the problem about boldface? Some styles make math bold in section titles (I wouldn't). In this case just do \section{\protect\boldmath $x+y=z$}` – egreg Oct 10 '15 at 21:49