7

I try to ignore changes of \section* in latexdiff, and while I am able to do so for \section, the same does not work for \section*.

This is a.tex:

\documentclass{article}
\begin{document}
    \section{Hello}
    Hi

    \section*{Bye}
    Cya
\end{document}

This is b.tex:

\documentclass{article}
\begin{document}
    Hi

    Cya
\end{document}

latexdiff --exclude-textcmd="section" a.tex b.tex > c.tex correctly excludes changes in \section; but replacing section by section* does not work for \section*.

8

Try escaping the asterisk using a backslash:

latexdiff --exclude-textcmd="section\*" a.tex b.tex > c.tex
0

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.