ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: Questions about Scite lexers
Date: Wed, 13 Apr 2016 17:39:57 +0200	[thread overview]
Message-ID: <570E684D.8090900@wxs.nl> (raw)
In-Reply-To: <nellji$sna$1@ger.gmane.org>

On 4/13/2016 4:37 PM, Nicola wrote:
> I'm trying to define a custom scite lexer for a toy language I'm using.
> So far, I've copied a lexer from the distribution, changed its name and
> keywords, and it's all fine. I have a few questions, though:
>
> 1) my custom scite-context-lexer-xxxx.lua is found only if I put it in
> the distribution. It there a way to have it in my project's folder instead?

currently not but i can make that an option (fallback)

> 2) How do I customize colors?

for that i need to change a load command

> 3) Is it possible to embed TeX commands in \startscite..\stopscite
> environments, like /BTEX../ETEX in built-in typing?

hm, i suppose one can add the parsing of /BTEX .. /ETEX to the lexer and 
then intercept it but it's not built in (formatted comment might make 
sense)

> 4) Are scite lexers documented somewhere besides the source code?

no

> 5) May I rely on this feature to be stable?

yes (i use it myself)

> 6) It is my understanding that pret-xxx.lua files are obsolete. Is it
> correct? (If so, it would be nice to update the wiki to reflect that).

no, they are not obsolete (the scite lexers are often also syntax 
checkers so they are more strict) ... the pret files are more or less 
working in the same way (they date from before scite got that kind of 
lexers)

> To be clear, I'm not interested in using the Scite application. I just
> need to typeset formatted verbatim code. The vim module is fantastic and
> I already use it, but there are cases where I need a syntax not
> supported by Vim (and I'd rather avoid defining it on the Vim side)
> and/or need to embed TeX commands (anywhere, not only in comments).
>
> Nicola
>
>
> ___________________________________________________________________________________
>
> If your question is of interest to others as well, please add an entry
> to the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2016-04-13 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 14:37 Nicola
2016-04-13 15:39 ` Hans Hagen [this message]
2016-04-13 17:25   ` Nicola
2016-04-13 17:31     ` Wolfgang Schuster
2016-04-13 17:51   ` Alan BRASLAU
     [not found] <mailman.448.1460568766.1989.ntg-context@ntg.nl>
2016-04-13 20:39 ` Christoph Reller
2016-04-14  5:10   ` Christoph Reller
2016-04-14 17:49     ` Nicola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570E684D.8090900@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).