I need to show one subsubsection title in the main body of the text and another in the contents page. I have been using:
\subsubsection[contents title]{text title}
This had worked really well. Now one of the titles that I need in the contents has square brackets in and so gives me loads of error messages (I assume because the brackets are getting confused).
This is my minimum working example (\subsubsection[$[\text{PtL}^5\text{(ppy)Cl}]^+$]{Title in text}
is the line causing the problem):
\documentclass[12pt,a4paper,oneside]{memoir}
\begin{document}
\tableofcontents
\chapter{1}
\subsubsection{Title in text}
\subsubsection[$[\text{PtL}^5\text{(ppy)Cl}]^+$]{Title in text}
\end{document}
Thanks for your help, sorry, I'm still relatively new to LaTeX!!
]
is mistaken for the end of the optional argument. Use\subsubsection[{$[\text{PtL}^5\text{(ppy)Cl}]^+$}]{Title in text}