8

One of the section of my thesis is called: representation of $\mathfrak{g}_2$, but every heading package transforms it in representation of $\mathfrak{G}_2$ (capital Gothic letter).

How can i solve this problem?

  • I think \MakeTextUppercase from textcase package is intended exactly for this. – Manuel Jul 4 '14 at 8:57
  • There is a completely non-TeXnical solution to your problem: Follow traditional style guides and avoid formulae and symbols from formulae in the chapter titles and headings. – jknappen Jan 26 '16 at 16:34
9

LaTeX's standard classes use \MakeUppercase to convert the letters of section titles to uppercase. The conversion does not know about arguments, math, ...

Workarounds:

  • The letter "g" can be hidden inside a macro, e.g.:

    \documentclass{article}
    \usepackage{amssymb}
    \DeclareRobustCommand{\mathfrakg}{\mathfrak{g}}
    \pagestyle{headings}
    \begin{document}
    \section{Test $\mathfrakg_2$}
    \end{document}
    

    Result

    \DeclareRobustCommand prevents \makefrakg from expanding inside \MakeUppercase.

  • Converting back to lowercase:

    \documentclass{article}
    \usepackage{amssymb}
    \pagestyle{headings}
    \begin{document}
    \section{Test $\mathfrak{\lowercase{g}}_2$}               
    \end{document}
    

    First \MakeUppercase will change g to G. Later \lowercase is executed and converts G back to g.

4

Use the textcase package:

\documentclass{article}
\usepackage{amssymb}
\usepackage[overload]{textcase}
\pagestyle{headings}
\begin{document}
\section{Test $\mathfrak{g}_2$}
\end{document}

enter image description here

However, the best is to avoid the dreaded automatic uppercasing done by the standard classes, which is, in my opinion, the biggest flaw in their design. When headers contain math, uppercase is out of the question.

\documentclass{article}
\usepackage{amssymb}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\itshape\nouppercase{\leftmark}}
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}

\begin{document}
\section{Test $\mathfrak{g}_2$}
\end{document}

enter image description here

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.