For some reason,
\textbf{\begin{comment}X\end{comment}
Y}
does not compile for me, with various errors. In the following MWE, the error is
File ended while scanning use of \next.
\documentclass{article}
\usepackage{verbatim}
\begin{document}
Works (X not shown): \begin{comment}X\end{comment}
Works (Y bold): \textbf{%
Y}
Does not compile: \textbf{\begin{comment}X\end{comment}
Y}
\end{document}
Is this supposed not to work, and if so, why?
commentenvironment inlatexdiffto hide deleted text. Specifically, when deleting several paragraphs of text, some line breaks always remain even with https://tex.stackexchange.com/a/135947, and I have found no other way to hide those. – bers Sep 21 '17 at 08:25latexdiff --exclude-textcmd="textbf"fixed the concrete problem, but I still wonder why a comment cannot be parsed within\textbf. – bers Sep 21 '17 at 08:31