It seems that \st{}
for crossing out a text (strike through) doesn't work on the section title. For example, this
\documentclass{article}
\usepackage{soul,color}
\begin{document}
\section{\st{Motivation}}\label{sec:theproblem}
In this section, we are going to explain the detail and you will see...
\end{document}
fails while it works fine with the body text
\documentclass{article}
\usepackage{soul,color}
\begin{document}
\section{Motivation}\label{sec:theproblem}
In this section, we are going to \st{explain the detail} and you will see...
\end{document}
BTW, yes the soul
package is included 🙂
UPDATE
UPDATE
Using \protect\st
works fine but the bug is, if you add \usepackage{hyperref}
, you will get this error
! Argument of \let has an extra }.
<inserted text>
\par
l.5 \section{\protect\st{Motivation}}
\label{sec:theproblem}
?
The problem has been addressed by Christian Hupfer in his answer.
Best Answer
Early version of this solution
Edit
I just tested: The
\st
macro is already robust.\protect
is not really needed.Edit Number Two
If
hyperref
is used, this runs into the typical problem with the bookmarks and hyperlinks. Use\texorpdfstring
to get around for such a woe ;-)