[SVN] LaTeX syntax coloring problem, new to b9 I think

Allan Odgaard allan at macromates.com
Thu May 19 05:20:32 UTC 2005

On May 19, 2005, at 7:00, Charilaos Skiadas wrote:

> \footnote{We have used here that $\gcd\left(\delf{g}{x},\delf{g}{y} 
> \right)=1$, which follows from the assumption that $Z$ is non- 
> singular.}
> It seems the first $ gets overlooked, and the text "$, which  
> follows from..." is considered string.latex.equation.linemath.$

Yes, this is the nested brackets problem. When I add the proper stack  
handling we'll just change all rules to include text.latex inside  

> On a related note, it seems the syntax as is does not understand  
> generic commands with multiple arguments, like "\delf{g}{x}" above  
> (user-defined). Is that just an oversight, or something inherently  
> difficult to achieve?

Probably both ;) starting with beta 9 it can be done with something  
like this though:

{   begin = "\\\\[A-Za-z]\\w*(?=\\{)"; end = "(?<=\\})";
     patterns = (
         { begin = "\\{"; end = "\\}"; }

More information about the textmate-dev mailing list