Skip to content

Commit

Permalink
Detect and error out when there is a comment in a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Superty committed Jul 15, 2024
1 parent 5e6d68d commit 4c1e602
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tex/setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -118,6 +126,7 @@
}% comment to avoid spurious whitespace
}% comment to avoid spurious whitespace
}% comment to avoid spurious whitespace
\setboolean{inComment}{false}
}
}
\else
Expand Down

0 comments on commit 4c1e602

Please sign in to comment.