[SVN] Questions while updating LaTeX.plist

Brad Miller bonelake at mac.com
Fri Apr 22 02:03:19 UTC 2005


Nevermind, I've got it!

         {
             begin = "(\\\\textbf)\\{";
             end = "\\}";
             captures = {
               1 = { name = "keywords.markup.inline"; };

             };
             patterns = (
                 {
                     match = "[a-zA-Z]+";
                     name = "keywords.markup.latex.textbf";
                 },
             );
         },

Now I can style the \textbf one way, and the argument a different way.  
And I take it that the captures are necessary to style the begin end 
parts?

Thats cool, now if I only really understood what I was doing :-)  
Seriously though I've been figuring this all out by trial and error, 
did I miss something along the way that would help me be more efficient 
with the language definition syntax?

Thanks,

Brad

On Apr 21, 2005, at 8:43 PM, Brad Miller wrote:

> That's a good start but, the pattern that I have below colors the 
> \textbf part and the braces like a function but also lets me color 
> style the argument as bold and black.  That was the part I was trying 
> to figure out how to match whats between the begin and end.
>
> Brad
>
> On Apr 21, 2005, at 8:13 PM, Allan Odgaard wrote:
>
>> On Apr 22, 2005, at 0:56, Brad Miller wrote:
>>
>>> So I started another pass through the LaTeX.plist file to get a 
>>> better color scheme working in b6.
>>>
>>> Whats the best way to translate this into the new syle:
>>>         {
>>>             begin = "\\\\textbf\\{";
>>>             elementFontStyle = (plain);
>>>             elementForegroundColor = "#9700cc";
>>>             end = "\\}";
>>>             fontStyle = (bold);
>>>             foregroundColor = "#000000";
>>>             name = "keywords.functions.latex.textbf";
>>>         },
>>>
>>> Is doing  a regular expression with multiple captures the right way 
>>> to handle this or is there an easier/more preferred way?
>>
>> If you change it to this:
>>    {  begin = "(\\\\textbf)\\{"; end = "\\}";
>>       captures = {
>>          1 = { name = "keywords.functions.latex.textbf"; };
>>       };
>>    },
>>
>> Then only the \textbf part should by styled like a function.
>>
>> _______________________________________________
>> textmate-dev mailing list
>> textmate-dev at lists.macromates.com
>> http://lists.macromates.com/mailman/listinfo/textmate-dev
>>
> Brad Miller, PhD
> Assistant Professor
> Luther College
> http://www.cs.luther.edu/~bmiller
> jabber:  bnmnetp at jabber.org
> _______________________________________________
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-dev
>
Brad Miller, PhD
Assistant Professor
Luther College
http://www.cs.luther.edu/~bmiller
jabber:  bnmnetp at jabber.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2838 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate-dev/attachments/20050421/6e3fb312/attachment.bin>


More information about the textmate-dev mailing list