Subject: Re: bug#63083: 13.1.4; Table of contents should ignore commented out text

From: Arash Esbati <[email-masked]>
Date: Wed, 26 Apr 2023 10:58:45 +0200

Hugo Paquet <[email-masked]> writes:

> The command "C-c =" is supposed to scan the .tex file(s) and generate
> a table of contents.  But the table seems to include all sections,
> even those when the code "\section{....}" appears in a comment block.
> This makes the table of contents inconsistent with the resulting pdf.

I think this is by design; I'm not aware of any variable similar to
`reftex-label-ignored-macros-and-environments' for \section and such.  I
think the idea is to comment out the code with %, and then there was
also this bug report[1].

Maybe others have a good idea.

Best, Arash

Footnotes:
[1]  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59638