4

I'd like to strike through some text in a paper with package ulem's \sout{}. However, when the text to be struck through contains multiple cites like \cite{a,b}, the compiler gives some error messages like Undefined control sequence. I'm using the TeXLive 2014, and this problem exists for latex as well as xelatex. How to solve this without resorting to tikz? I do not like the cancel package with its sloping lines.

As an MWE,

\documentclass{article}
\usepackage{ulem}

\begin{document}

Works: \sout{Lorem ipsum dolor sit amet~\cite{a}}

Compile error: \sout{Lorem ipsum dolor sit amet~\cite{a,b}}

\begin{thebibliography}{99}
\bibitem{a} Paper a
\bibitem{b} Paper b
\end{thebibliography}

\end{document}

1 Answer 1

7

use \mbox{} enter image description here

\documentclass{article}
\usepackage{ulem}

\begin{document}

Works: \sout{Lorem ipsum dolor sit amet~\mbox{\cite{a}}}

Compile error: \sout{Lorem ipsum dolor sit amet~\mbox{\cite{a,b}}}

\begin{thebibliography}{99}
\bibitem{a} Paper a
\bibitem{b} Paper b
\end{thebibliography}

\end{document}
3
  • 1
    answer would be more obviously valid with a visual. Mar 6, 2015 at 16:06
  • nice idea to put the citations in a box! Thanks. Mar 6, 2015 at 16:22
  • @touhami What for? :-). Any way, you are welcome. :-)
    – user11232
    Mar 8, 2015 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.