Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Christoph Reller
On Wed, Apr 13, 2016 at 10:39 PM Christoph Reller <
christoph.rel...@gmail.com> wrote:

> Nicola  wrote on Wed., 13. Apr. 2016 19:36:
>
>>
>> I have found an old document of mine, which uses a
>> (slightly customized) pret-c.lua, located inside the project's folder.
>> It compiles, but I don't get syntax highlighting. Is it because pret-c
>> is not searched in the project's directory?
>>
>
> Alternatively you can set the TEXMF_LOCAL environment variable to some
> directory where your "private" texmf-tree resides. Note that after this you
> have to run
> context --generate
> in order for context to find the modules in your texmf-tree.
> Also note that the compilation logfile written by context tells you what
> modules have been found in which locations.
>
> I hope this helps,
>
> Christoph
>

Sorry, the environment variable should be named TEXMFLOCAL, without the
underscore
Cheers,
Christoph
___
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
___

Re: [NTG-context] How to embed formatting commands into the syntax highlight code generated by scite module?

2016-04-13 Thread 李延瑞
2016-04-12 10:24 GMT+08:00 Aditya Mahajan :

>
> > i want to embed some formatting commands into code highlighted with
> scite or vim module, but i do not find its option like "escape=yes". Is
> there a way to do it?
> >
>
>  With the vim module, `escape=yes` should work in the comment region. See
> the documentation:
>

Thanks Aditya.

I need insert some pseudo-code into the verbatim text, so I want it to be
the same as "escape=yes" in \starttyping ... \stoptyping.

-- 
Best regards,

Li Yanrui (李延瑞)
___
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
___

Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Christoph Reller
Nicola  wrote on Wed., 13. Apr. 2016 19:36:

>
> I have found an old document of mine, which uses a
> (slightly customized) pret-c.lua, located inside the project's folder.
> It compiles, but I don't get syntax highlighting. Is it because pret-c
> is not searched in the project's directory?
>

Alternatively you can set the TEXMF_LOCAL environment variable to some
directory where your "private" texmf-tree resides. Note that after this you
have to run
context --generate
in order for context to find the modules in your texmf-tree.
Also note that the compilation logfile written by context tells you what
modules have been found in which locations.

I hope this helps,

Christoph

>
___
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
___

Re: [NTG-context] contextjit missing from win32

2016-04-13 Thread Pablo Rodriguez
On 04/13/2016 08:32 PM, Mojca Miklavec wrote:
> On 13 April 2016 at 20:01, Pablo Rodriguez wrote:
>> Hans,
>>
>> I downloaded the latest beta from the ConTeXt Suite yesterday for win32
>> and win64.
>>
>> I’m afraid that contextjit isn’t available for win32. I guess it might
>> be a bug.
> 
> Should contextjit come with ConTeXt or with W32TeX?

Hi Mojca,

according to this reply from Hans
(https://mailman.ntg.nl/pipermail/ntg-context/2015/081873.html), I’d say
the ConTeXt Suite should contain it.

Pablo
-- 
http://www.ousia.tk
___
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
___

Re: [NTG-context] contextjit missing from win32

2016-04-13 Thread Mojca Miklavec
On 13 April 2016 at 20:01, Pablo Rodriguez wrote:
> Hans,
>
> I downloaded the latest beta from the ConTeXt Suite yesterday for win32
> and win64.
>
> I’m afraid that contextjit isn’t available for win32. I guess it might
> be a bug.

Should contextjit come with ConTeXt or with W32TeX?

Mojca
___
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
___

[NTG-context] contextjit missing from win32

2016-04-13 Thread Pablo Rodriguez
Hans,

I downloaded the latest beta from the ConTeXt Suite yesterday for win32
and win64.

I’m afraid that contextjit isn’t available for win32. I guess it might
be a bug.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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
___

Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Alan BRASLAU
On Wed, 13 Apr 2016 17:39:57 +0200
Hans Hagen  wrote:

> > 5) May I rely on this feature to be stable?  
> 
> yes (i use it myself)

The following is slightly off-topic of the present thread...

Hans, we finally understood while at the ConTeXt conference at
Nasbinals that your syntax highlighting depend on a lexer that requires
an external library for the scite editor. This library is available for
Windows so you have no problem using this feature (not the formatting
highlighting feature in ConTeXt but the editor highlighting). However,
the libraries will require some work to port them to other systems, and
we failed in our short effort to simply compile it.

My question to the mailing list is where should we be going for this?
I see several options:
1) work further on porting the lua lexer library to scite on other
systems, and/or
2) work on porting Hans' lua rules to other editors, i.e. vim (and
emacs, for those so inclined).

It would be nice to have synchronization between our editors'
highlighting and that formatted by Context.

Alan
___
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
___

Re: [NTG-context] Move textrule closer to head

2016-04-13 Thread Tom Harrop

On 13/04/16 18:47, Pablo Rodriguez wrote:
Hi Tom, how about another rule? (From 
http://wiki.contextgarden.net/Titles#Titling_Style.) 
\setuphead[subsubsection] [after=\hrule\blank] I hope it helps, Pablo 


Ahh, it's perfect. I missed that page of the wiki! Thank you.
___
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
___

Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Wolfgang Schuster

Nicola 
13. April 2016 um 19:25


Thanks for your answers. I'd like to go with \definetyping then, because
I need /BTEX../ETEX. I have found an old document of mine, which uses a
(slightly customized) pret-c.lua, located inside the project's folder.
It compiles, but I don't get syntax highlighting. Is it because pret-c
is not searched in the project's directory?
The names of the files has changed and you have to look into 
buff-imp-xxx.mkiv|lua

for the syntax highlighters.

Wolfgang
___
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
___

Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Nicola

On 2016-04-13 15:39:57 +, Hans Hagen said:



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)


Thanks for your answers. I'd like to go with \definetyping then, because
I need /BTEX../ETEX. I have found an old document of mine, which uses a
(slightly customized) pret-c.lua, located inside the project's folder.
It compiles, but I don't get syntax highlighting. Is it because pret-c
is not searched in the project's directory? (According to
http://wiki.contextgarden.net/Verbatim#Pretty_printing the file should
be found.) This is a minimal version:

\setupinteraction  [state=start]
\setupcolors   [state=start]
\setuptyping   [option=color]
\definetyping  [C][option=C, tab=4]
\definecolor   [Ccomment][darkblue]
\definetyping  [CPP]
  [option=C,tab=2,
  bodyfont=small]
\starttext
\startC
int main() { return 0; } // Comment
\stopC
\startCPP
int main() { return 0; } // Comment
\stopCPP
\stoptext

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
___

Re: [NTG-context] RTL section heads

2016-04-13 Thread Mohammad Hossein Bateni
Thanks, Hans!  The update worked (current version: 2016.04.13 16:46) and
the RTL problem seems gone.

On Wed, Apr 13, 2016 at 12:41 PM, Pablo Rodriguez  wrote:

> On 04/13/2016 05:14 PM, Mohammad Hossein Bateni wrote:
> > I updated my context standalone but it gives me current version:
> > 2016.*_04.10_* 23:52, which is buggy.  This is from 3 days ago.
>
> The server is experiencing some issues
> (https://mailman.ntg.nl/pipermail/ntg-context/2016/084979.html).
>
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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
>
> ___
>
___
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
___

Re: [NTG-context] Move textrule closer to head

2016-04-13 Thread Pablo Rodriguez
On 04/13/2016 06:10 PM, Tom Harrop wrote:
> Hello,
> 
> I'm a ConTeXt beginner. I'm working on a document where I would like a 
> textrule under my subsubsection headings. If I use after=\textrule, the 
> placement of the textrule is too far from the heading, and I haven't 
> found a way to move it closer to the heading either with \setuphead or 
> \setuptextrules.

Hi Tom,

how about another rule? (From
http://wiki.contextgarden.net/Titles#Titling_Style.)

   \setuphead[subsubsection]
 [after=\hrule\blank]

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___
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
___

Re: [NTG-context] RTL section heads

2016-04-13 Thread Pablo Rodriguez
On 04/13/2016 05:14 PM, Mohammad Hossein Bateni wrote:
> I updated my context standalone but it gives me current version:
> 2016.*_04.10_* 23:52, which is buggy.  This is from 3 days ago.

The server is experiencing some issues
(https://mailman.ntg.nl/pipermail/ntg-context/2016/084979.html).


Pablo
-- 
http://www.ousia.tk
___
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
___

[NTG-context] Move textrule closer to head

2016-04-13 Thread Tom Harrop

Hello,

I'm a ConTeXt beginner. I'm working on a document where I would like a 
textrule under my subsubsection headings. If I use after=\textrule, the 
placement of the textrule is too far from the heading, and I haven't 
found a way to move it closer to the heading either with \setuphead or 
\setuptextrules.


Here is an example:


\setuphead[subsubsection]
  [after=\textrule]

\starttext

\subsubsection{I would like less space between this heading and its 
textrule}


Here is some text.

\stoptext



I realise that the spacing looks pretty good in the PDF produced by this 
example, so you'll just have to believe me that it needs to be closer to 
the headings in my document.


I'd appreciate any help on this, including suggestions of 
alternative/better methods to do this.


Thanks for reading,

Tom
___
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
___

Re: [NTG-context] xml input

2016-04-13 Thread Meer, Hans van der
Just a thought.

\xmlprocessbuffer and \xmlprocessfile{id}... register the tree they read under 
id. Is there a way to merge several id's to one tree?

Hans van der Meer

On 13 Apr 2016, at 16:21, Meer, Hans van der 
> wrote:

I would like to process several input sources as one xml tree. Like this:







with the sources having the structure

...
...


and the code for  containing:
read from all sources given on -notes
afterwards process all content at once

Thus the content of the various source should be read into one tree to be 
processed, but I cannot get this done.
How to amalgam this separate sources into one?

Hans van der Meer





___
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
___

Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Hans Hagen

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-.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
___

Re: [NTG-context] RTL section heads

2016-04-13 Thread Mohammad Hossein Bateni
I updated my context standalone but it gives me current version: 2016.
*04.10* 23:52, which is buggy.  This is from 3 days ago.

On Wed, Apr 13, 2016 at 10:56 AM, Hans Hagen  wrote:

> On 4/13/2016 4:59 AM, Mohammad Hossein Bateni wrote:
>
>> As far as I remember, it was working fine with betas in December 2015
>> and January 2016.
>>
>
> i uploaded a new beta
>
>
>
> -
>   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
>
> ___
>
___
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
___

Re: [NTG-context] RTL section heads

2016-04-13 Thread Hans Hagen

On 4/13/2016 4:59 AM, Mohammad Hossein Bateni wrote:

As far as I remember, it was working fine with betas in December 2015
and January 2016.


i uploaded a new beta


-
  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
___

[NTG-context] Questions about Scite lexers

2016-04-13 Thread Nicola
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-.lua is found only if I put it in 
the distribution. It there a way to have it in my project's folder 
instead?


2) How do I customize colors?

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


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

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

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).


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
___

[NTG-context] xml input

2016-04-13 Thread Meer, Hans van der
I would like to process several input sources as one xml tree. Like this:







with the sources having the structure

...
...


and the code for  containing:
read from all sources given on -notes
afterwards process all content at once

Thus the content of the various source should be read into one tree to be 
processed, but I cannot get this done.
How to amalgam this separate sources into one?

Hans van der Meer




___
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
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Nicola

On 2016-04-13 13:33:27 +, Wolfgang Schuster said:


Nicola 13. April 2016 um 15:28
On 2016-04-13 12:47:56 +, Wolfgang Schuster said:



Nicola 13. April 2016 um 14:17
On 2016-04-13 11:53:51 +, Hans Hagen said:




Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document:

is there a light variant?


Also, can't the fallback mechanism be used?
Yes it can but you have to enable your custom typeface with 
\setupbodyfont which

wasn’t done in your example.



You're right, but I have done it in my original document.
Even with that, the fallback symbol does not show up:


\usemodule[vim]
\definefontfamily[slidesfont][mono][Latin Modern Mono Light]
\definefallbackfamily[slidesfont][mono][DejaVu Sans Mono][range={"0222A}]
\definevimtyping[pascal][syntax=pascal]
\setupbodyfont[slidesfont]
\starttext
\startpascal
 X := Y ∪ Z;
\stoppascal
\stoptext

You have to move the fallback setting before the font where you want to 
apply the fallback, i.e.


    \definefallbackfamily […] […] […]
    \definefontfamily […] […] […]



Great, it works!

Thanks to ConTeXt and this mailing list, I've cut down the time to 
prepare a presentation dramatically, while improving its quality and 
avoiding frustration (compared to LaTeX Beamer+listings).


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
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Wolfgang Schuster

Nicola 
13. April 2016 um 15:28

On 2016-04-13 12:47:56 +, Wolfgang Schuster said:


Nicola 13. April 2016 um 14:17

On 2016-04-13 11:53:51 +, Hans Hagen said:



Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document:


is there a light variant?


Also, can't the fallback mechanism be used?

Yes it can but you have to enable your custom typeface with 
\setupbodyfont which


wasn’t done in your example.


You're right, but I have done it in my original document.

Even with that, the fallback symbol does not show up:


\usemodule[vim]

\definefontfamily[slidesfont][mono][Latin Modern Mono Light]

\definefallbackfamily[slidesfont][mono][DejaVu Sans Mono][range={"0222A}]

\definevimtyping[pascal][syntax=pascal]

\setupbodyfont[slidesfont]

\starttext

\startpascal

X := Y ∪ Z;

\stoppascal

\stoptext


You have to move the fallback setting before the font where you want to 
apply the fallback, i.e.


\definefallbackfamily […] […] […]
\definefontfamily […] […] […]

Wolfgang
___
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
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Nicola

On 2016-04-13 12:47:56 +, Wolfgang Schuster said:

Nicola 13. April 2016 um 14:17 
On 2016-04-13 11:53:51 +, Hans Hagen said: 



Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document: 
is there a light variant? 

Also, can't the fallback mechanism be used? 
Yes it can but you have to enable your custom typeface with 
\setupbodyfont which

wasn’t done in your example.


You're right, but I have done it in my original document.
Even with that, the fallback symbol does not show up:

\usemodule[vim]
\definefontfamily[slidesfont][mono][Latin Modern Mono Light]
\definefallbackfamily[slidesfont][mono][DejaVu Sans Mono][range={"0222A}]
\definevimtyping[pascal][syntax=pascal]
\setupbodyfont[slidesfont]
\starttext
\startpascal
X := Y ∪ Z;
\stoppascal
\stoptext

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
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Wolfgang Schuster

Nicola 
13. April 2016 um 14:17
On 2016-04-13 11:53:51 +, Hans Hagen said:


Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document:

is there a light variant?

Also, can't the fallback mechanism be used?
Yes it can but you have to enable your custom typeface with 
\setupbodyfont which

wasn’t done in your example.

Wolfgang
___
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
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Nicola

On 2016-04-13 11:53:51 +, Hans Hagen said:


On 4/13/2016 11:19 AM, Nicola wrote:

Hi,
I am using the Vim module to typeset code, and I've found a situation
where I'd like to use some math symbols, but not in comments. I am not sure
whether it can be done. This is what I have tried:

\usemodule[vim]
\definefontfamily[slidesfont][mono][Latin Modern Mono Light]
\definefallbackfamily[slidesfont][mono][Xits][range={"0222A}]
\definevimtyping[pascal][syntax=pascal]
\starttext
\startpascal
X := Y ∪ Z;
\stoppascal
\stoptext

The ∪ symbol does not appear in the output. Am I completely off-track?


use dejavu mono instead of lm mono


Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document:

is there a light variant?

Also, can't the fallback mechanism be used?

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
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Hans Hagen

On 4/13/2016 11:19 AM, Nicola wrote:

Hi,
I am using the Vim module to typeset code, and I've found a situation
where I'd like to use some math symbols, but not in comments. I am not sure
whether it can be done. This is what I have tried:

\usemodule[vim]
\definefontfamily[slidesfont][mono][Latin Modern Mono Light]
\definefallbackfamily[slidesfont][mono][Xits][range={"0222A}]
\definevimtyping[pascal][syntax=pascal]
\starttext
\startpascal
X := Y ∪ Z;
\stoppascal
\stoptext

The ∪ symbol does not appear in the output. Am I completely off-track?


use dejavu mono instead of lm mono


-
  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
___

[NTG-context] Help with t-vim module and math

2016-04-13 Thread Nicola

Hi,
I am using the Vim module to typeset code, and I've found a situation
where I'd like to use some math symbols, but not in comments. I am not sure
whether it can be done. This is what I have tried:

\usemodule[vim]
\definefontfamily[slidesfont][mono][Latin Modern Mono Light]
\definefallbackfamily[slidesfont][mono][Xits][range={"0222A}]
\definevimtyping[pascal][syntax=pascal]
\starttext
\startpascal
X := Y ∪ Z;
\stoppascal
\stoptext

The ∪ symbol does not appear in the output. Am I completely off-track?

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
___

Re: [NTG-context] RTL section heads

2016-04-13 Thread Hans Hagen

On 4/13/2016 4:15 AM, Otared Kavian wrote:

Hi Hans and Mohammad Reza,

I can confirm that the wrong behaviour of numbers and digits in Right to Left 
(more specifically Persian) is recent: indeed with

ConTeXt  ver: 2015.05.18 12:26 MKIV current  fmt: 2015.6.18  int: 
english/english

from TeXLive 2015 the numbers and digits are rendered as they should. Is it 
related to some changes in LuaTeX?


maybe a bug .. i'll check it


Best regards: OK


On 13 Apr 2016, at 02:46, Mohammad Hossein Bateni  wrote:

Unfortunately when I use method=two for bidi, the numbers in the main body are 
written from right to left.  I'm starting to wonder whether it does anything 
nontrivial at all.

\usemodule[simplefonts]
\setmainfont[ALM Fixed][features=arabic,range=arabic]

\setupdirections[bidi=global,method=two]
\setupalign[r2l]

\starttext

سال ۲۰۱۶

2016

\stoptext


I'm pretty sure this used to work (for example in version 2016.01.18 22:21).  A 
similar piece of code is working fine on the website.  I'm using CONTEXT 
version: 2016.04.01 13:01.  I also verified that it is not working in version: 
2016.04.10 23:52.

On Mon, Apr 11, 2016 at 11:47 AM, Mohammad Hossein Bateni  
wrote:
Thanks, Hans!  This does solve the problem with the list of numbers.  And 
actually if I add a numberstyle field, I can the section heads the way I like.  
Here is the setup that worked.  (I will update Wiki later.)

\setupdirections[bidi=global,method=two]
\setupalign[r2l]

\def\LTR#1{{\lefttoright#1}}
\def\leftpersiandecimals#1{\LTR{\persiandecimals{#1}}}
\defineconversion[leftpersiandecimals][\leftpersiandecimals]
\setuphead[chapter,title,section,subject] 
[conversion=leftpersiandecimals,numberstyle=\righttoleft]

\defineseparatorset[dashsep][-,-,-,-]
\setuphead[section][sectionseparatorset=dashsep]

On Mon, Apr 11, 2016 at 10:46 AM, Hans Hagen  wrote:
On 4/11/2016 4:25 AM, Mohammad Hossein Bateni wrote:
Hans & Wolfgang,

Do you have suggestions here?  How can I get the behavior I want for the
section head numbers?

In fact, the following may be quite relevant.

\usemodule[simplefonts]
\setmainfont[ALM Fixed][features=arabic,range=arabic]

\setupdirections[bidi=global,method=default]
\setupalign[r2l]

\starttext

اعداد ۱، ۲، ۳ و ۴ را در نظر بگیرید.

اعداد 1، 2، 3 و 4 را در نظر بگیرید.

اعداد 1, 2, 3 و 4 را در نظر بگیرید.

\stoptext


I expect the numbers 1, 2, 3 and 4 to appear in the same order from
right to left.  However, the visual order that I observe (regardless of
whether I use Persian digits or English digits, or whether I use Persian
or English commas) is 4, 1, 2, 3 (from left to right).  Is this a bug in
the bidi code?  If so, are there any workarounds?

method=two

Thanks,
Hossein

On Fri, Apr 8, 2016 at 5:20 PM, Mohammad Hossein Bateni
> wrote:

 Hi,

 This is concerning an RTL text.  I have one chapter and 10 sections
 under that.  My goal is to achieve the following.
 1) The number 10 should appear correctly with '1' visually to the
 left of '0'.
 2) The chapter number should visually appear to the right of the
 section number.
 3) Chapter and section numbers should be separated with a dash.
   (This is ignored in this email and I will follow up about it in
 another thread.  To get a minimal working example, I also do not try
 to change the numbers to use Persian digits.)

 In particular, the headings will be visually something like the
 following (aligned to the right).
 elpmas 1
 txet 1-1
 txet 2-1
 txet 3-1
 ...
 txet 10-1

 Here's the first attempt.

 %% Attempt 1
 \setupalign[r2l]

 \starttext
 \placecontent

 \chapter{sample}
 \dorecurse{10}{\section{text}}
 \stoptext

 The result is:
 elpmas 1
 txet 1-1
 ...
 txet 01-1


 Then I add "\setupdirections[bidi=global,method=default]" to the
 beginning and I get the most strange result (number right-aligned
 but texts left-aligned):
 sample1
 text   1.1
 ...
 text 1.10


 A third attempt gives almost what I want (without period as the
 separator).

 %% Attempt 3
 \setupalign[r2l]

 \def\LTR#1{{\lefttoright#1}}
 \def\leftnumbers#1{\LTR{\numbers{#1}}}
 \defineconversion[leftnumbers][\leftnumbers]
 \setuphead[chapter,title,section,subject] [conversion=leftnumbers]

 \starttext
 \placecontent

 \chapter{sample}
 \dorecurse{10}{\section{text}}
 \stoptext


 The big problem is that in my RTL documents, I always have the
 setupdirections command, which messes things up here.  (This makes
 it difficult to one section name with English title, which should
 still be typeset on the right-hand side of the page.)  Note that in
 attempt 2 above, there were