On May 27, 2008, at 1:14 AM, Will Robertson wrote:
Hi Charilaos,
Thanks for your reply.
On 27/05/2008, at 3:36 AM, Charilaos Skiadas wrote:
I believe you can already use \begin{section} and \begin {subsection} (And corresponding \end things), which might take you partly there without any changes, I think we support those variants.
This does work as LaTeX syntax, but not in the "Symbols List" or "Show Outline" of TextMate.
Making those two work with the Symbols List and Show Outline should be doable. You just need to add regular expressions to match them.
(Put another way, whatever method we may have had to make \begin {sect} work, we should definitely be able to use the same method for \begin{section} and \begin{subsection}).
Changing the bundle to support something which is not standard, bound to be confusing (for instance should the top level correspond to a \section or a \chapter? or a \part?) and not offering much enhanced functionality is not something I look forward to.
Oh, I wasn't trying to suggest this should be added to the default bundle :)
(I'd say that if the class support chapters, then the top level {sect} corresponds to a \chapter, else a \section.)
But how is TM to know if the class supports chapters or not? But that's a minor point really, the biggest problem is detecting the nesting, as Alex pointed out.
But it's not immediately obvious to me how to adjust the current definition to support this sort of style (for my own use). If it's not an easy adjustment to make to the current LaTeX bundle, no worries.
It should be possible to adjust it to make the \begin{section} parts work, for both the symbols list and the show outline command. The trick would be to just ignore the \end parts. I don't have much time this very moment, but I'll try to add something in the next couple of weeks.
There is of course a "Show outline" command, not sure how much that serves your needs. The safe moving of code around is the tricky part, if that's what you were hoping for. What exactly do you mean by "missing the nice outlining features"? In any case, I think it's preferable to make the current system work, instead of inventing a new system.
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.
Many thanks, Will
Haris Skiadas Department of Mathematics and Computer Science Hanover College