[SVN] Revision 1189 (Latex)

Brad Miller bmiller at luther.edu
Tue Jun 14 14:20:01 UTC 2005


On Jun 14, 2005, at 8:44 AM, Allan Odgaard wrote:

> On Jun 14, 2005, at 15:03, Brad Miller wrote:
>
>
>> To change the style of \section command I must use  
>> support.function.section.latex.  Is this a bug in b12 or am I  
>> remembering wrong?
>>
>
> At least there shouldn't be a bug. The problem is that the style  
> for support.function overrules the declaration.section style.
>
Of course.  The fog is starting to clear out of my brain now.  Thanks  
for bringing me back up to speed.

>
>> I do not understand the use of the declaration scope for this.
>>
>
> Okay -- declaration is probably a wrong name, but declaration  
> (alone) is _not_ ment to be styled. Declaration refers to a larger  
> semantic unit in the text, for example declaration.function  
> (prototype), declaration.tag (tag with attributes) etc.
>
> So meta would probably have been a better scope name.
So  a large regular expression with some captures that handles a  
function defintion is all together called delcaration.function and  
the individual parts are named as appropriate.  for example
def foo(bar)

The whole line is scoped as declaration.function
def is keyword.other?
foo is entity.name.function
bar is variable.parameter

Given that I do think that for Latex meta might be a better scope  
name, since we would not style the whole thing.
I will make that change.

>
>
>> In looking at the wiki I see that entity.name.section gives  
>> \section{name} as an example.  Is the intent of the example to say  
>> that "name" should be scoped as entity.section.name this makes  
>> good sense.  So what should the \section command be scoped as?   
>> support.function.. seems a reasonable choice although  
>> keyword.control also seems a possibility.
>>
>
> support.function is for all functions from the “support  
> library” (in the context of LaTeX, TeX is the language, and the  
> LaTeX commands are functions from the “support library”).
>
> So basically I wanted to markup all “commands” as that.
>
> keyword.control is for flow-control. In LaTeX though I made label,  
> cite, and ref be keyword.control because they're not entirely  
> unlike labels and goto (which we have as keyword.control in other  
> languages).
OK, of course TeX has flow control as well \ifx, \else, \fi, \input,  
of course these are rarely used in the main body of the text.  Most  
of the time they are used in the preamble or main driver file.  And,  
they are not properly Latex commands they are TeX commmands.  So, I  
propose we start a small TeX.plist file to begin collecting some of  
the useful preamble stuff and we can simply include the TeX stuff in  
the LaTeX file.  This would also help out any future effort for Context.

>
> Following this analogy, I made the argument to the commands  
> variable.parameter, but come to think of it, that was probably  
> wrong, since we only use that when declaraing the parameter  
> variable (in the function prototype) in other languages, and not  
> when actually calling the function.
>
> As for this, for text{bf|it|tt} we already have markup.* and for  
> section/chapter entity.name.section makes sense -- as for all other  
> commands, I guess they shouldn't actually be scoped as anything  
> specific, but instead be subject to the other rules of text.latex  
> (using recursion).
>
I'll go ahead and modify the section matching rule to have the  
section names be entity.section.name then.

Brad

> _______________________________________________
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-dev
>




More information about the textmate-dev mailing list