Malabarba / latex-extra

A series of usability improvements for Emacs latex-mode.
GNU General Public License v3.0
69 stars 14 forks source link

latex/next-section and %section #30

Open thorstengrothe opened 5 years ago

thorstengrothe commented 5 years ago

I got some %section commands for structuring my document. This way the %sections are not seen by latex and I can fold them with latex-extra. But latex/next-section does not work with it. How can I register %section so that latex/next-section will see that this is a \section command?

I found this in the source code but I have no clue how the regex for %section works

(latex/section-hierarchy
     (quote
      ("\\\\headerbox\\_>"
       "\\\\subparagraph\\*?\\_>"
       "\\\\paragraph\\*?\\_>"
       "\\\\subsubsection\\*?\\_>"
       "\\\\subsection\\*?\\_>"
       "\\\\section\\*?\\_>"
       "%section\\*?\\_>" --> regex?
       "%%subsection\\*?\\_>" --> regex?
       "\\\\chapter\\*?\\_>"
       "\\\\part\\*?\\_>"
       "\\\\appendix\\_>\\|\\\\\\(begin\\|end\\){document}"
       "\\\\documentclass\\_>")))

Regards Thorsten

Malabarba commented 5 years ago

Hi there. The regexps you wrote look fine to me. Did they not work for you?