showyourwork / showyourwork-action

Build showyourwork articles on GitHub Actions
MIT License
2 stars 4 forks source link

Fix for aastex + strikeout in latexdiff #4

Closed rodluger closed 2 years ago

rodluger commented 2 years ago

The following tex document does not compile with pdflatex

\documentclass[twocolumn]{aastex631}
\RequirePackage[normalem]{ulem}
\begin{document}
\sout{Hello}
\end{document}

because with aastex631 we're still in vertical mode (vmode) at the beginning of every paragraph. This doesn't play well with \sout (strikeout), which doesn't work in vertical mode. So, when running latexdiff, if there's a deletion in the first character of any paragraph in the article, compiling the diff will fail.

This monkeypatch redefines \sout to force leaving vertical mode before trying to strikeout text.