Re: [NTG-context] coloring the logfile

2019-08-28 Thread Henning Hraban Ramm

> Am 2019-08-28 um 21:54 schrieb Hans van der Meer :
> 
> Is it possible to force lines  written in the log with \writestatus to have a 
> specific color? The log can be very substantial and it would be nice to have 
> some lines brought to attention by a different color.

As a text file, the log can’t have colors.

Only the output to your terminal could have ANSI color codes.
I’d welcome this, too, but then we need additional configuration, color breaks 
easily on some shells, the feature should adhere to the usual shell variables 
etc. Don’t know it it would be worth the effort.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] coloring the logfile

2019-08-28 Thread Hans van der Meer
Is it possible to force lines  written in the log with \writestatus to have a 
specific color? The log can be very substantial and it would be nice to have 
some lines brought to attention by a different color.

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


Re: [NTG-context] ttf font not seen ?

2019-08-28 Thread Floris van Manen


On 26-08-19 22:11, Floris van Manen wrote:
> 
> On 26-08-19 21:27, Mohammad Hossein Bateni wrote:
>> I have had the same problem.  Unlike Mark IV Context, LMTX does not seem
>> to recognize fonts outside its tree.  Maybe there's some option to tweak
>> with.
>>
>> The workaround I found was to copy the TTF files under
>> "{context-lmtx-root}/tex/texmf/fonts/truetype/public/" and run "context
>> --generate".
>>
>> If you like to have mtxrun font commands to work properly, you need to
>> invoke "mtxrun --script font --reload" after that.
>>
>> Hope this helps.
> nope.
> does not work here.
> 
> can the native font paths be symbolically linked into the lmtx font tree ?



Is there a description available as how to include all font paths of the
underlaying system (ubuntu) into the font awareness of the new
luametatex system so they can be used?
Apparently there is a difference between the older (works) and the newer
(does not work) system.

thanks
Floris



pEpkey.asc
Description: application/pgp-keys
___
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] Syntax hightlighting

2019-08-28 Thread Hans Hagen

On 8/28/2019 8:14 PM, Fabrice L wrote:

Dear list,

I’m using colored verbatim code (for course notes). In the past, I 
modified verb-mp.mkii for the langage I need (SAS). This code works fine 
with MKII:


%——
\setupcolors[state=start]
\definetyping [MP] [option=MP]

\starttext
A example:
\startMP
draw (0,0) withpen pencircle 1in withcolor red ;
\stopMP
\stoptext
%——

I obtain a color syntax output (« draw » in red, « within » in green for 
example). This code does not work anymore in MKIV (every word is the 
same color, green). There should be a solution ?

Hard to say without your sas code as this just works:

\setupcolors[state=start]
\definetyping [MP] [option=MP]

\starttext

A example:

\startMP
draw (0,0) withpen pencircle 1in withcolor red ;
\stopMP

\usemodule[scite]

\startMP
draw (0,0) withpen pencircle 1in withcolor red ;
\stopMP

\stoptext

(I suppose that sas is abit like sql so pretty easy to write a lexer for 
it .. do you hav ean overview of the syntax that you use?)


Hans


-
  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] Syntax hightlighting

2019-08-28 Thread Fabrice L
Dear list,

I’m using colored verbatim code (for course notes). In the past, I modified 
verb-mp.mkii for the langage I need (SAS). This code works fine with MKII:

%——
\setupcolors[state=start]
\definetyping [MP] [option=MP]

\starttext
A example:
\startMP
draw (0,0) withpen pencircle 1in withcolor red ;
\stopMP
\stoptext
%——

I obtain a color syntax output (« draw » in red, « within » in green for 
example). This code does not work anymore in MKIV (every word is the same 
color, green). There should be a solution ?

Trying to find some help, in the maling list and the « verbatim_text » page on 
Context garden, I found some solutions, like pretty printing, which should work 
on MKIV, but "pret-mp.lua » is found nowhere (nor in the context source 
browser, nor in my recent distribution). 

I must admit I’m lost in all the solutions I found there and there (most of 
them never works out of the box on my installation). Can somebody refer me to a 
simple solution, which permit me to do colored verbatim code, such as I can 
modify a source to insert the keywords of the langage I use ?

Thanks !
Fabrice.
___
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] Problem of displaying a date with a macro

2019-08-28 Thread Aditya Mahajan

On Wed, 28 Aug 2019, Fabrice Couvreur wrote:


Hello,
The date display is incorrect : I get day 28 instead of day 2.
Thank you
Fabrice

\defineframed
   [headerframed]
   [frame=off,
height=fit,
width=fit]

 \definecolor[ColorA][0.8(white)]


 \startsetups [headertext]

   \setupheadertexts
 [{\startframed [headerframed]
 [foregroundstyle=bold,background=framewithshadow]
 \getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
 \stopframed}]

   \setupheadertexts
 [{\startframed [headerframed]
 [align=flushleft,foregroundstyle=]
  Lycée LA SALLE, Lille\\
  \getvariable{headertext}{location}
  \stopframed}]

 [{\startframed [headerframed]
 [align=flushright,foregroundstyle=]

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
 \stopframed}]

 \stopsetups

 \setvariable{headertext}{set}{\directsetup{headertext}}

\startuseMPgraphic{framewithshadow}
path p;
p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle;
fill p shifted (2,-2);
fill p withcolor 0.8white;
draw p;
setbounds currentpicture to p;
\stopuseMPgraphic

\defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}]

\starttext
\setvariables
  [headertext]
  [title={Devoir maison},
   number={6},
   day={02},
   month={09},
   year={2019},
   location={Seconde B},
   time={}]
\input knuth
\stoptext


There was a bug with the \date macro which I had reported a few days ago. 
This appears to be related to that. Should be fixed in the next beta.


Aditya___
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] hypertarget and hyperlink in ConTeXt?

2019-08-28 Thread Henning Hraban Ramm

> Am 2019-08-28 um 13:40 schrieb Jon Wong :
> 
> Hi all,
> 
> Any way to do hypertarget and hyperlink in ConTeXt?
> 
> From https://www.contextgarden.net/Command/textreference: I see that the name 
> of the anchor is also the displayed text (“houses”).

\setupinteraction[state=start] is essential.

ToC, footnotes and other references then work without further setup (you migt 
want to change the colors in \setupinteraction).

Otherwise, look for \at, \in, \about, \goto and ask more specifically if you 
need further help.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] hypertarget and hyperlink in ConTeXt?

2019-08-28 Thread Jon Wong
Hi all,

Any way to do hypertarget and hyperlink in ConTeXt?

From https://www.contextgarden.net/Command/textreference: 
 I see that the name of 
the anchor is also the displayed text (“houses”).

Regards
Jon

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

2019-08-28 Thread Henning Hraban Ramm
> Am 2019-08-28 um 10:36 schrieb Hans Hagen :
> 
> On 8/28/2019 10:04 AM, Henning Hraban Ramm wrote:
>>> Am 2019-08-19 um 16:06 schrieb Hans Hagen :
>>> 
>>> I've attached a document that I made last week. It's (currently) an lmtx 
>>> only feature. In acrobat, the 'marked' areas (some tracing option) are the 
>>> hyperlink. I have no clue how useful this is, maybe for maps or some 
>>> educational setting. I had it on my agenda to play with it anyway. I don't 
>>> think that viewers other than acrobat support it (even if it's already 
>>> quite old pdf stuff; they should anyway fall back on the rectangle) but who 
>>> knows ... I only tested sumatra (the okular that I have doesn't even seem 
>>> to handle the links at all). It's not really efficient in bytes because 
>>> it's (I think) meant for another usage. As with more features in the pdf 
>>> format I think it might have started as some hack, but it's documented so 
>>> ...
>> Hi Hans,
>> I tested Preview.app, Acrobat Reader DC, Acrobat Pro 9, PDF Studio Pro 2019, 
>> Foxit Reader and Skim on macOS Mojave.
> 
> Sumatra (mupdf) also doesn't support it.


>> The masked or non-rectangular link areas works only in Acrobat Reader and 
>> Pro.
>> The others handle the links as whole page rectangles. Skim doesn’t always 
>> jump to the right page.
>> I’ll send your example to the developers of PDF Studio.
> Ok, thanks. Maybe we should have a wiki page that sums up viewers and what 
> they support.

Like we have for editors:
https://wiki.contextgarden.net/Text_Editors

I’ve an overview in my (still upcoming…) book, see attachment. I really thought 
I didn’t compile that myself, but there’s no wiki page...
Like with the editors, it’s difficult to keep current; don’t even think about 
complete.
There are so many features where viewers differ...

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] Problem of displaying a date with a macro

2019-08-28 Thread Fabrice Couvreur
Hello,
The date display is incorrect : I get day 28 instead of day 2.
Thank you
Fabrice

\defineframed
[headerframed]
[frame=off,
 height=fit,
 width=fit]

  \definecolor[ColorA][0.8(white)]


  \startsetups [headertext]

\setupheadertexts
  [{\startframed [headerframed]
  [foregroundstyle=bold,background=framewithshadow]
  \getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
  \stopframed}]

\setupheadertexts
  [{\startframed [headerframed]
  [align=flushleft,foregroundstyle=]
   Lycée LA SALLE, Lille\\
   \getvariable{headertext}{location}
   \stopframed}]

  [{\startframed [headerframed]
  [align=flushright,foregroundstyle=]

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
  \stopframed}]

  \stopsetups

  \setvariable{headertext}{set}{\directsetup{headertext}}

\startuseMPgraphic{framewithshadow}
path p;
p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle;
fill p shifted (2,-2);
fill p withcolor 0.8white;
draw p;
setbounds currentpicture to p;
\stopuseMPgraphic

\defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}]

\starttext
\setvariables
   [headertext]
   [title={Devoir maison},
number={6},
day={02},
month={09},
year={2019},
location={Seconde B},
time={}]
\input knuth
\stoptext
___
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] experiment

2019-08-28 Thread Hans Hagen

On 8/28/2019 10:04 AM, Henning Hraban Ramm wrote:

Am 2019-08-19 um 16:06 schrieb Hans Hagen :

I've attached a document that I made last week. It's (currently) an lmtx only 
feature. In acrobat, the 'marked' areas (some tracing option) are the 
hyperlink. I have no clue how useful this is, maybe for maps or some 
educational setting. I had it on my agenda to play with it anyway. I don't 
think that viewers other than acrobat support it (even if it's already quite 
old pdf stuff; they should anyway fall back on the rectangle) but who knows ... 
I only tested sumatra (the okular that I have doesn't even seem to handle the 
links at all). It's not really efficient in bytes because it's (I think) meant 
for another usage. As with more features in the pdf format I think it might 
have started as some hack, but it's documented so ...


Hi Hans,
I tested Preview.app, Acrobat Reader DC, Acrobat Pro 9, PDF Studio Pro 2019, 
Foxit Reader and Skim on macOS Mojave.


Sumatra (mupdf) also doesn't support it.


The masked or non-rectangular link areas works only in Acrobat Reader and Pro.
The others handle the links as whole page rectangles. Skim doesn’t always jump 
to the right page.

I’ll send your example to the developers of PDF Studio.
Ok, thanks. Maybe we should have a wiki page that sums up viewers and 
what they support.


Hans

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


Re: [NTG-context] Frame with shadow for header

2019-08-28 Thread Fabrice Couvreur
Hi Mikael,
Thank you, it works.
Fabrice

Le mar. 27 août 2019 à 19:11, Henning Hraban Ramm  a écrit :

> And here’s the code for a fuzzy shadow:
> https://wiki.contextgarden.net/Drop_shadows
>
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
>
>
> ___
> 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] experiment

2019-08-28 Thread Henning Hraban Ramm
> Am 2019-08-19 um 16:06 schrieb Hans Hagen :
> 
> I've attached a document that I made last week. It's (currently) an lmtx only 
> feature. In acrobat, the 'marked' areas (some tracing option) are the 
> hyperlink. I have no clue how useful this is, maybe for maps or some 
> educational setting. I had it on my agenda to play with it anyway. I don't 
> think that viewers other than acrobat support it (even if it's already quite 
> old pdf stuff; they should anyway fall back on the rectangle) but who knows 
> ... I only tested sumatra (the okular that I have doesn't even seem to handle 
> the links at all). It's not really efficient in bytes because it's (I think) 
> meant for another usage. As with more features in the pdf format I think it 
> might have started as some hack, but it's documented so ...

Hi Hans,
I tested Preview.app, Acrobat Reader DC, Acrobat Pro 9, PDF Studio Pro 2019, 
Foxit Reader and Skim on macOS Mojave.

The masked or non-rectangular link areas works only in Acrobat Reader and Pro.
The others handle the links as whole page rectangles. Skim doesn’t always jump 
to the right page.

I’ll send your example to the developers of PDF Studio.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] How to use ConTeXt extensions with VS Code

2019-08-28 Thread Henning Hraban Ramm

> Am 2019-08-18 um 22:54 schrieb Hans Hagen :
> 
> On 8/18/2019 10:14 PM, Denis Maier wrote:
>> Hi,
>> I have seen ConTeXt comes with an extension for VS Code. How do you use 
>> that? I have tried the code in the readme, but this doesn't seem to work.
> there is an vscode-context.cmd file
> 
> this could also work:
> 
> >mtxrun --script vscode --start
> 
> (it's still somewhat experimental and i'm waiting till the editor has better 
> - easier - support for runners associated with suffixes, which currently is 
> kind of one-for-all)

For my ConTeXt editor overview:

Does VScode include a PDF viewer? Does it work with SyncTeX?

Why should one use the mtxrun call?

Does the ConTeXt extension also work with VScodium?


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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