Re: TeX lexers

From: anton <averbit....at.yandex.ru>
Date: Tue, 21 Jun 2011 09:01:19 -0700 (PDT)

Hi Robert,

may I ask for what purposes do you use Latex?

anton

On 21 Jun., 13:09, Robert <ro....at.web.de> wrote:
> Mitchell,
>
> On Mon, Jun 20, 2011 at 6:47 PM, mitchell <c....at.caladbolg.net> wrote:
>
> [...]> You are overwriting the tex lexer's _tokenstyles. Your latex lexer needs to
> > be like this:
>
> > local tex = l.load('tex')
> > _rules = tex._rules
> > _rules[1] = { 'whitespace', ws }
> > _rules[2] = { 'comment', comment }
> > _rules[3] = { 'environment', environment }
> > table.insert(_rules, 4, { 'parts', parts })
> > _tokenstyles = tex._tokenstyles
> > _tokenstyles[#_tokenstyles + 1] = { 'parts', l.style_class }
> > _tokenstyles[#_tokenstyles + 1] = { 'environment', l.style_tag }
>
> Thanks, this worked. I pushed the current versions, that do not share
> with the tex lexer anymore. It seems too much overhead.
>
> If anyone likes to test these, I'd appreciate if the choice of styles
> for the environments makes sense in other people's themes.
> Or should we maybe have default styles for headers and environments?
> These are probably quite common, for example in Markdown.
>
Received on Tue 21 Jun 2011 - 12:01:19 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:11:36 EST