Skip to content

Commit

Permalink
Reduce debugging noise
Browse files Browse the repository at this point in the history
  • Loading branch information
brucemiller committed Jan 19, 2025
1 parent 679c06d commit b2a3ef5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/LaTeXML/Engine/LaTeX.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -5744,7 +5744,6 @@ sub latexChangeCase {
else {
push(@toks, $tok, $next); } }
else {
Debug("SURPRISE: " . Stringify($tok));
push(@toks, $tok); } }
return Tokens(@toks); }); }

Expand Down
10 changes: 7 additions & 3 deletions lib/LaTeXML/Package.pm
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,13 @@ sub NewCounter {
NewCounter($within); }
my $cs = T_CS("\\c\@$ctr");
my $prevdefn = $STATE->lookupMeaning($cs);
if ($prevdefn && ((ref $prevdefn) eq 'LaTeXML::Core::Definition::Register')
&& (($$prevdefn{address} || '') =~ /^\\count/)) {
Info('unexpected', $cs, undef, "Counter $ctr was already allocated, skipping"); }
if ($prevdefn && ((ref $prevdefn) eq 'LaTeXML::Core::Definition::Register')) {
my $a = ($$prevdefn{address} || '') =~ /^\\count/;
## Note: it is quite reasonable to redefine counters,
## in order to change reseting & nesting. So, don't be noisy!
# Info('unexpected', $cs, undef,
# "Counter $ctr was already ".($a ? 'allocated':'defined').", skipping");
}
else {
Warn('unexpected', $cs, undef,
"Counter " . ToString($cs) . " was already defined as $prevdefn; redefining") if $prevdefn;
Expand Down

0 comments on commit b2a3ef5

Please sign in to comment.