Re: [NTG-context] Pretty printer for matlab

2019-02-21 Thread Otared Kavian
Hi Marco,

Thanks! I hadn't tries [syntax=scilab], but I just did it and it works exactly 
as expected!
However I could not edit the file scilab.vim which sits (on my machine) in
/usr/share/vim/vim80/syntax/scilab.vim

Meanwhile, out of curiosity I modified the two files 
buff-imp-lua.mkiv
buff-imp-lua.lua
written by Hans, by naming them (temporarily)
buff-imp-scilab.mkiv
buff-imp-scilab.lua
and then by saying 
\usemodule[buff-imp-scilab]
 \definetyping[scilab][option=SCILAB]
I could obtain an approximate good result… But since the keywords in Lua and 
Scilab are quite different, I could not change some of the settings (for 
instance in Lua the cosine function is called math.cos while in Scilab it is 
cos: I could not change appropriately the list of such keywords…).

I think for the time being it is simpler for me to use your solution with 
\usemodule[vim]
\definevimtyping[scilab][syntax=scilab]

Thanks again,
Best regards: OK

> On 21 Feb 2019, at 15:31, Marco Patzer  wrote:
> 
> On Thu, 21 Feb 2019 15:10:27 +0100
> Otared Kavian  wrote:
> 
>> Thanks for pointing to that module, which I didn't know because I
>> never use vim… I just tested it and seems fine, but I would need to
>> modify some of the keywords of Matlab in order to adapt them to
>> Scilab. However I didn't find where those keywords are defined in the
>> vim module.
> 
> They're not defined in the vim module. The vim module is just a way
> to use vim's syntax highlighting in context. The syntax should be
> defined in the vim files .vim in the vim directory, e.g.
> /usr/share/vim/vim81/syntax/.vim if I'm not mistaken.
> 
> Have you tried using “syntax=scilab”?
> 
> Marco
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Pretty printer for matlab

2019-02-21 Thread Marco Patzer
On Thu, 21 Feb 2019 15:10:27 +0100
Otared Kavian  wrote:

> Thanks for pointing to that module, which I didn't know because I
> never use vim… I just tested it and seems fine, but I would need to
> modify some of the keywords of Matlab in order to adapt them to
> Scilab. However I didn't find where those keywords are defined in the
> vim module.

They're not defined in the vim module. The vim module is just a way
to use vim's syntax highlighting in context. The syntax should be
defined in the vim files .vim in the vim directory, e.g.
/usr/share/vim/vim81/syntax/.vim if I'm not mistaken.

Have you tried using “syntax=scilab”?

Marco
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Pretty printer for matlab

2019-02-21 Thread Otared Kavian
Hi Marco,

Thanks for pointing to that module, which I didn't know because I never use vim…
I just tested it and seems fine, but I would need to modify some of the 
keywords of Matlab in order to adapt them to Scilab.
However I didn't find where those keywords are defined in the vim module.

Best regards: OK

> On 21 Feb 2019, at 14:43, Marco Patzer  wrote:
> 
> On Thu, 21 Feb 2019 14:25:03 +0100
> Otared Kavian  wrote:
> 
>> Is there a pretty printer file to typeset Matlab codes?
> 
> How about Aditya's vim module? It supports Matlab:
> 
> \usemodule [vim]
> \definevimtyping [matlab] [syntax=matlab]
> \starttext
> \startmatlab
>  …
> \stopmatlab
> \stoptext
> 
> Marco
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Pretty printer for matlab

2019-02-21 Thread Marco Patzer
On Thu, 21 Feb 2019 14:25:03 +0100
Otared Kavian  wrote:

> Is there a pretty printer file to typeset Matlab codes?

How about Aditya's vim module? It supports Matlab:

\usemodule [vim]
\definevimtyping [matlab] [syntax=matlab]
\starttext
\startmatlab
  …
\stopmatlab
\stoptext

Marco
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Pretty printer for matlab

2019-02-21 Thread Otared Kavian
Hi all,

Is there a pretty printer file to typeset Matlab codes?
Actually I would like to modify such a file in order to define a typing 
environment to typeset portions of codes written for Scilab, which is a sort of 
free version of Matlab.

Thanks for any comment and help: OK
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Pretty printer

2017-03-28 Thread Hans Hagen

On 3/28/2017 10:33 AM, Procházka Lukáš Ing. wrote:

Hello,

I'd like to write my own pretty-printer (it should just highlight
words/members of a set-of-keywords with a color),
preferably as a Lua handler.

Following wiki:

http://wiki.contextgarden.net/Verbatim_text

I searched for verb*.* or pret*.* in the Ctx distribution (on my local
inst dir).

However, I found only some MkII related files, whilst I'm interested in
MkIV pretty printers ('pret-lua.*' for example).

Where to find a pretty printer source/module (for inspiration)?


buff-*

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Pretty printer

2017-03-28 Thread Procházka Lukáš Ing .

Hello,

I'd like to write my own pretty-printer (it should just highlight words/members 
of a set-of-keywords with a color),
preferably as a Lua handler.

Following wiki:

http://wiki.contextgarden.net/Verbatim_text

I searched for verb*.* or pret*.* in the Ctx distribution (on my local inst 
dir).

However, I found only some MkII related files, whilst I'm interested in MkIV 
pretty printers ('pret-lua.*' for example).

Where to find a pretty printer source/module (for inspiration)?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___