I am trying to have different section headers in different versions of a document using versions.sty (0.55). I get and error while compiling; here is a MWE :
%!TEX encoding = UTF-8 Unicode
%!TEX TS-program = pdflatexmk
\documentclass{article}
\usepackage{versions}
\includeversion{draft}
\begin{document}
\section{\begin{draft}This is a draft of\end{draft} Introduction}
Some text
\end{document}
The error is :
Argument of \@sect has an extra }.
<inserted text>
\par
l.9 ...This is a draft of\end{draft} Introduction}
Any suggestion? Thanks!
\section{\protect\begin{draft}This is a draft of\protect\end{draft} Introduction}
– user31729 Sep 21 '17 at 17:08\protect
... – user31729 Sep 21 '17 at 17:17\includeversion
but I get an error if I\excludeversion
. – A.G. Sep 21 '17 at 17:25