From 4c1e602b9ad5049a0ef6edcfbcaf0970fa2d6e86 Mon Sep 17 00:00:00 2001 From: Arjun P Date: Mon, 15 Jul 2024 16:18:09 +0100 Subject: [PATCH] Detect and error out when there is a comment in a comment --- tex/setup.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tex/setup.tex b/tex/setup.tex index 65d9414..0941287 100644 --- a/tex/setup.tex +++ b/tex/setup.tex @@ -97,10 +97,18 @@ \newcommand\InFloat[2]{\ifnum\@floatpenalty<0\relax#1\else#2\fi} \makeatother +\newboolean{inComment} +\setboolean{inComment}{false} + \ifx\paperversion\paperversiondraft \newcommand\createtodoauthor[2]{ \def\tmpdefault{emptystring} \expandafter\newcommand\csname #1\endcsname[2][\tmpdefault]{% comment to avoid spurious whitespace + \ifthenelse{\boolean{inComment}}{ + \PackageError{paper-template}{Comments in comments not supported}{} + }{} + \setboolean{inComment}{true} + \def\tmp{##1}% comment to avoid spurious whitespace \InFloat{ \smash{ @@ -118,6 +126,7 @@ }% comment to avoid spurious whitespace }% comment to avoid spurious whitespace }% comment to avoid spurious whitespace + \setboolean{inComment}{false} } } \else