# Stop memoir from making mathmode section names uppercase in header

I'm typesetting my thesis with memoir and in general I'm happy with the result. However, some of my section headers have math mode text like \section{The $\phi_{ij}$ matrix} which memoir comically turns into $\phi_{IJ}$ in the header. I'm new to memoir so I don't really know my way around.

Is there a way to tell it to leave mathmode in lower case when it prints the header?

I'm using XeLaTeX with TeX live downloaded yesterday via tlmgr. Full example, including possibly interfering packages:

\documentclass[12pt]{memoir}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage[margin=1.4in]{geometry}
\usepackage{graphicx}
\usepackage{changepage}
\usepackage{url}
\usepackage{hyperref}
\usepackage{subfig}
\usepackage{standalone}
\usepackage[section]{placeins}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{pdflscape}
\usepackage{supertabular}
\usepackage{nth}
\usepackage[normalem]{ulem}
\begin{document}

\chapter{This is a chapter}

\section{The $\phi_{ij}$ Matrix}

\chapter{Another chapter}

\section{Density - $\omega^j_c$}

\end{document}

This is how it looks:

-
Is that a sufficient level of detail? –  mmdanziger Jan 24 '12 at 21:12
Using \section{Density - \lowercase{$\omega^j_c$}} suppresses the capitalization. –  Werner Jan 24 '12 at 21:24
Ok, I guess that will work. But is there a way to tell memoir to wrap all mathmode lines in headers with \lowercase? –  mmdanziger Jan 24 '12 at 21:26
Just discovered an almost identical question with a different solution: tex.stackexchange.com/questions/40421/… –  mmdanziger Jan 24 '12 at 21:34

If you want uppercase headings, it's sufficient to say

that will change \MakeUppercase and \MakeLowercase into "math-aware" commands.

## Aside

• hyperref should be loaded last;
• It's a bit strange to load both longtable and supertabular
• memoir has its own way to set the line spacing and saying only \linespread{1.5} is quite defective in many situations
• When you have math in a section title, consider using \texorpdfstring: for instance

\section{Density --- \texorpdfstring{$\omega^j_c$}{omega j c}}

that avoids many messages by hyperref

-

actually, this does appear to be standard behavior of memoir. here are a few definitions from memoir.cls: