In my master thesis, I have several complicated titles that are longer than one line and that are not hyphenated but go further than the textwidth (see MWE below).
Additionally, while the hyphenation seems to work ok in most cases in the TOC, in some cases were the title is just a little bit too long, the page numbers are out of alignment (I was not able to reproduce this in a simple example, see picture). How can I fix this? For the compound numbers I use the bpchem
package.
\documentclass[a4paper, 11pt, titlepage]{article}
\usepackage[T1]{fontenc}
\begin{document}
\section{Experimental}
\subsection{4,4''-bis[2-(4-methoxy-2,6-dimethylphenyl)ethynyl]-5,5''-bis(methoxymethoxy)-2,2':6',2''-terpyridine }
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{document}
Best Answer
Section 3.2 of the bpchem manual shows how to add extra hyphenation to an IUPAC name. The short version is that you need to add additional
\-
and\|
where hyphenation is allowed. Aside from that, you may need to adjust the default ToC margins so that if a word runs slightly long due to hyphenation rules, it won't interfere with the page numbers. This can be done at a lower level with the\@pnumwidth
and\@tocrmarg
lengths, or you can use a package liketocloft
to handle it at a higher level. A complete example including the ToC: