[Tex/LaTex] Math expression in header

header-footermath-modetufte

I'm trying to put short math expressions in my chapters or sections like this:

\chapter{Basic topological concepts in $\mathbb{R}^{n}$ }

The problem is that headers seem to ignore the math part and I can't find a workaround. Obviously I don't want to use an alternative title.

I'm working with the tufte-book class which can be found at this page
or the official site.

This code will reproduce the problem:

 \documentclass{tufte-book}
 \usepackage{amsmath,amsfonts,amsthm}
 \usepackage[utf8]{inputenc}

 \begin{document}
 \mainmatter
 \chapter{This chapter title $ \mathbb{R}^{n} $}
 \newpage 
 another page
 \newpage
 Page with header
 \end{document}

This is the header in this example

Edit: I forget that I made little changes in the fonts to the tufte-book class. In the original one the problem still happen but instead of showing a "\" it doesn't show anything:
enter image description here

Best Answer

The tufte-book class makes all headers lowercase, so the R becomes r and the blackboard bold font has no lowercase R.

As a solution you can do

\documentclass{tufte-book}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage[utf8]{inputenc}

\DeclareRobustCommand{\R}{\mathbb{R}}

\begin{document}
\mainmatter
\chapter{This chapter title $\R^{n}$}
\newpage
another page
\newpage
Page with header
\end{document}

But, in general, uppercase math letters will need to be protected in a similar way. For a small number of titles containing math it's just a nuisance.

enter image description here

Related Question