[SVN] LaTeX syntax coloring

Brad Miller bonelake at mac.com
Mon May 9 21:50:35 UTC 2005


I just checked in a change that fixes the problem below.
Here's what was going on in the regular expression:
\part was being matched as a sectioning command becuase a sectioning  
command can have
\part
optionally followed by a *
optionally followed by a toc entry in []
followed by {section name}

The problem was in the toc entry matching. [.*] was a greedy match  
that was sucking up everything until the ] after the \sqrt.

The hack I put in to fix the problem for now was to say that a toc  
entry could include any characters except a [. My first though was  
that the .* inside the square-brackets should be non-greedy and I  
tried making the whole TOC part of the regular expression non-greedy  
but neither of those options worked for me.  I'm not sure why....

Brad

On May 9, 2005, at 11:54 AM, Charilaos Skiadas wrote:

>
> Thanks, this pretty much fixes the last two examples (modulo the  
> recursion). The problem with
> \part[4] $\sqrt[d]{n!}$
>
> still remains though...
>
> Well, you can't have everything in life, and given that with TM we  
> have almost everything, I'm content. :-)
>
> Thanks,
> Haris
> _______________________________________________
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-dev
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate-dev/attachments/20050509/71e282d1/attachment.html>


More information about the textmate-dev mailing list