Saturday, 20 June 2015

Long titles with math in LaTeX

Recently, while writing my dissertation I stumbled upon some difficulties with chapter and section titles.
The first problem was caused by too long headings, while the second by mathematics inside the pdf bookmarks when using hyperref .

The solution I found by googling around is what I also wrote in this Tex StackExchange answer:
\chapter[\texorpdfstring{TOC title $$inline math A$$
}{TOC in pdf bookmarks}
]{\chaptermark{header} Chapter title $$inline math A$$}