[txmt-dev] Re: Problems defining scope: How can you print latex sections in a bigger font size?

Allan Odgaard mailinglist at textmate.org
Thu Jan 24 13:40:14 UTC 2013


On Oct 11, 2012, at 10:21 AM, Felix Schönbrodt <gmx at nicebread.de> wrote:

> […] when I change the scope definition to the following (adding \\ in front of "section"):
> 
> {   patterns = (
>     {   begin = '\\section\{';
>         end = '\}';
>         name = 'markup.heading.1.latex';
>     },
> );
> }
> 
> .. the scope is not applied.
> 
> Any ideas?

The problem is that \section{…} is already matched by the default grammar. So you would need to add your rule above the existing rule, to give it higher priority.

That said, the default marks the section line as ‘meta.function.section.latex’ so you can apply your font change to this scope, and it should work (no need to edit the grammar).

And sorry about the late reply…



More information about the textmate-dev mailing list