[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59638: 13.0.9; reftex-toc counts incorrectly if section is commented
From: |
Tassilo Horn |
Subject: |
bug#59638: 13.0.9; reftex-toc counts incorrectly if section is commented out |
Date: |
Mon, 28 Nov 2022 07:00:22 +0100 |
User-agent: |
mu4e 1.9.3; emacs 29.0.50 |
Uwe Brauer <oub@mat.ucm.es> writes:
Hi Uwe,
> \section{First}
> %\section{Second}
> \section{Third}
>
> \end{document}
>
> reftex-toc
>
> Results in
>
> 1 First
> 3 Third
>
> Which is wrong, the counting should give
>
> 1 First
> 2 Third
>
> It gets worse if the document contains a lot of commented out sections.
> Any idea what to do?
I'd call it a feature. I mean, when you have commented out sections,
you'll most probably intend to uncomment them again. Otherwise, you
could just delete them, no?
Anyway, you could also try to change reftex-section-pre-regexp from
"\\\\" to "[^%]+[ \t]*\\\\" which might do the trick.
Bye,
Tassilo