# [TxMt] New LaTeX sectioning structure

Alex Ross ajross at cs.pdx.edu
Tue May 27 05:41:52 UTC 2008

> As far as I can tell, nothing is broken in the current system (of
> LaTeX or of TextMate). I just wanted to experiment with a different
> way of doing things.

If there's one thing I've learned about LaTeX it is “don't try to
change anything.”  Or maybe “change things at your peril (you will
die).”

But if you want to add \begin{sect}{} to the symbols list have a look
at the Symbol List preference item.  You add a regex clause to the
symbolTransformation variable to match that form.  One drawback will
be that there's no way to figure out the depth of the current
section...  Something like the following should work:

s/^\begin{sect\*}?(?:$[^]]*$)?\{(.+)\}/  \$1/; # \begin{sect}

As for modifying the Show Outline command... I don't think a simple
modification will suffice as it is based on the same regular
expressions that the Symbol List is.  You'd have to rewrite the whole
thing maintaining a stack to remember how deep you are...