1

The comment package provides for different comment environments which one can selectively in- or exclude via a switch in the preamble. I haven't found out yet how to get it to work in footnotes yet though:

\documentclass{article}
\usepackage{comment}
\excludecomment{note}
\begin{document}
Some text.
\footnote{A footnote.
\begin{note}
A note for myself within a footnote.
\end{note}
}
\end{document}

gives me the following error:

Excluding comment 'comment') Excluding comment 'note'
(./commentsinfootnote1.aux) Excluding 'note' comment.
! Argument of \xComment has an extra }.
<inserted text> 
                \par 
l.10 }
  • 2
    You can't use it inside the argument of other commands. – Ulrike Fischer Oct 29 '15 at 8:18
  • @UlrikeFischer It seems the version package can be used instead. – muk.li Oct 29 '15 at 8:52
3

The version package seems to be a drop-in replacement:

\documentclass{article}
\usepackage{version}
\excludeversion{note}
\begin{document}
Some text.
\footnote{A footnote.
\begin{note}
A note for myself within a footnote.
\end{note}
}
\end{document}
  • I can't get this MWE to compile: Argument of \note@NOTE has an extra } – Steven B. Segletes Oct 29 '15 at 9:49
  • @StevenB.Segletes Strange. That was the error message I got with the comment package. The version package seems to be able to handle this. – muk.li Oct 29 '15 at 9:56

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.