Re: [NTG-context] Chapter in header, but not on title page

2020-02-15 Thread Pablo Rodriguez

On 2/15/20 9:16 PM, Henning Hraban Ramm wrote:
> I guess I’m stupid.
> I’d like to have my chapter title in the header on right pages, but
> not on the first page of a chapter, that always is a right page.
> Since I’d like to keep the page number in the header on these pages,
> I can’t use header=empty.
> What’s the right setup for me?

Hi Hraban,

I think this is what you intend:

\usemodule[visual]

\setuppagenumbering[alternative=doublesided, location=]
\setupheadertexts[chapter][pagenumber][pagenumber][chapter]
\definetext[chapter-first][header][][pagenumber]

\setuphead[chapter][%
  page={yes, header, right},
  header=chapter-first,
]

\starttext

\dorecurse{5}{
  \startchapter[title={\fakewords{2}{5}}]
  \dorecurse{5}{
\fakewords{100}{400}\par
  }
  \stopchapter
}
\stoptext

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


Re: [NTG-context] Lucida small caps

2020-02-15 Thread Hans Hagen

On 2/15/2020 4:34 PM, Mikael P. Sundqvist wrote:

Hi,

One can easily enable small caps when using lucida, see the old mail 
https://mailman.ntg.nl/pipermail/ntg-context/2018/090997.html .


Could this be added to the type script file?


best use \smallcaps or somethign equivalent

-
  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] Metapost and TikZ color code equivalent

2020-02-15 Thread Hans Hagen

On 2/15/2020 12:25 PM, Fabrice Couvreur wrote:

Hi Henri,
Why does the blue path not rotate 90 with the draw command but rotate 
with the fill command?


compare

draw  origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- 
(4.1cm,-0.05cm) -- (0.1cm,-0.05cm) -- cycle  rotated alpha withcolor red;
draw (origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- 
(4.1cm,-0.05cm) -- (0.1cm,-0.05cm) -- cycle) rotated alpha withcolor blue;





\startMPcode

   def match (expr alpha, pos) =
     fill unitsquare xscaled 4cm  yscaled 0.2cm rotated alpha shifted pos
     withcolor yellow ;
     fill origin -- (4cm,0) -- (4.1cm,-0.05cm) --  (0.1cm,-0.05cm) --
     cycle rotated alpha withcolor(.6yellow + black);
     draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
     -- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor blue;
      draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
     -- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor blue;
     draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
     rotated alpha;
     draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
     rotated alpha
     withshademethod "circular 1"
     withshadevector (0,1)
     withshadecolors (red,white);
     enddef;
   match(0,(0,0));
   match(90,(4.2cm,0));
   match(90,(0,0));
   match(0,(0,4.2cm));

\stopMPcode-

  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] Chapter in header, but not on title page

2020-02-15 Thread Henning Hraban Ramm
I guess I’m stupid.
I’d like to have my chapter title in the header on right pages, but not on the 
first page of a chapter, that always is a right page.
Since I’d like to keep the page number in the header on these pages, I can’t 
use header=empty.
What’s the right setup for me?

(In the MWE there’s still a page number in the center, that’s not my problem.)


\usemodule[visual]

\setuppagenumbering[alternative=doublesided]
\setupheadertexts[chapter][pagenumber][pagenumber][]

\setuphead[chapter][
  page=right,
]

\starttext

\dorecurse{5}{
  \startchapter[title={\fakewords{2}{5}}]
  \dorecurse{5}{
\fakewords{100}{400}\par
  }
  \stopchapter
}
\stoptext



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] Lucida small caps

2020-02-15 Thread Mikael P. Sundqvist
Hi,

One can easily enable small caps when using lucida, see the old mail
https://mailman.ntg.nl/pipermail/ntg-context/2018/090997.html .

Could this be added to the type script file?

/Mikael
___
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] mtxrun

2020-02-15 Thread Aditya Mahajan

On Sat, 15 Feb 2020, Floris van Manen wrote:


On 15-02-2020 06:40, Rudolf Bahr wrote:

I hope this helps you! At least in the case you're using linux.


it appears as that many of the files in the two path are sort of identical:

~/data/context

$ md5sum bin/mtxrun tex/texmf-linux-64/bin/luametatex
b95ca64fabcb3f09edd861c4b87671cc  bin/mtxrun
b95ca64fabcb3f09edd861c4b87671cc  tex/texmf-linux-64/bin/luametatex

$ md5sum bin/mtxrun.lua tex/texmf-linux-64/bin/mtxrun.lua
4d73c3608cc2463e80c59942b3db7158  bin/mtxrun.lua
4d73c3608cc2463e80c59942b3db7158  tex/texmf-linux-64/bin/mtxrun.lua


There is probably a reason for it ;-)


But mtxrun looks for location of texmfcnf file based on its location, so 
which file is invoked makes a difference.


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] mtxrun

2020-02-15 Thread Luca Donetti
> Hi Luca,
>
> > 1) always writing the full path of the correct executable,
>
> I don't know which operating system you're using. On linux instead of
> writing
> the full path I'm using the command "alias" in my ".bashrc" file. So,
> Adityas
> proposal on mtxrun (Date: Wed, 12 Feb 2020 00:24:21 -0500 (EST)) becomes:
>
> alias context='~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --autogenerate
> --script
>   context'
> with 'context-lmtx' being the directory, where I installed context.
> With this you invoke your context file with "context your-file.tex"
> I cancelled all context stuff in my PATH variable. Don't forget to 'source
> ~/.bashrc'
> afterwards.
>
>
Hi Rudolf, thank you for your suggestion.
I'm on linux but I'd prefer not to use this method, because I use context
both from the command line and from my editor (emacs with auctex) and I
have scripts that change my environment to be able to switch between
different context versions (lmtx, texlive, ...). In any case, I'll think
about this solution and it could be useful to other people, too.

LD
___
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] mtxrun

2020-02-15 Thread Luca Donetti
Thank you Aditya,

> My question is then how
> > do you usually run mtxrun:
> > 1) always writing the full path of the correct executable,
> > 2) avoid putting [lmtx path]/bin in PATH,
> > 3) putting [lmtx path]/bin _after_ [lmtx path]/tex/texmf-linux-64/bin in
> > the PATH
> >
>
> I always follow 2. I don't think that [lmtx path]/bin should ever be in
> the PATH except when updating the installation.
>
> Then I will go with option 2), and report back if I encounter any problem.
If this works well, then it could be useful to change the message shown at
the end of the installation process, as Rudolf already suggested in this
thread.

By the way, you seem to imply that [lmtx path]/bin should be in the PATH
during updates. I didn't know that and I'm sure I've updated several times
without it: I have different environments to be able to switch between
different versions of context (lmtx, the old one, that from texlive...), I
never check which one I'm in before updating lmtx and the installer does
not complain.

LD
___
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] Repeat backgrounds on slides

2020-02-15 Thread Jan U. Hasecke
\structureuservariable – this is really cool.

Thanks a lot Wolfgang.
juh

Am 14.02.20 um 19:53 schrieb Wolfgang Schuster:
> \setupexternalfigures[location=default]
> 
> \defineoverlay
>   [SlideBackground]
>   [\doifsomething
>  {\structureuservariable{background}}
>  {\externalfigure[\structureuservariable{background}][factor=max]}]
> 
> \setuppapersize[S6]
> \setupbackgrounds[page][background=SlideBackground]
> 
> %\setuppapersize[S6][S6,oversized]
> %\setupbackgrounds[paper][background=SlideBackground]
> %\setuplayout[location=middle]
> 
> \definehead[Slide][chapter]
> 
> \starttext
> 
> \startSlide[title=Cow][background=cow]
> \dorecurse{3}{\dontleavehmode\page}
> \stopSlide
> 
> \startSlide[title=Hacker][background=hacker]
> \dorecurse{3}{\dontleavehmode\page}
> \stopSlide
> 
> \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] Metapost and TikZ color code equivalent

2020-02-15 Thread Floris van Manen


On 15-02-2020 12:25, Fabrice Couvreur wrote:
> Hi Henri,
> Why does the blue path not rotate 90 with the draw command but rotate
> with the fill command?
> 

Why not draw the match as a picture first, then rotate and shift that
picture?
Also, if you use a local scale unit, it will be easier to stach the
matches together by merely applying a factor in match units.

.F


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] mtxrun

2020-02-15 Thread Floris van Manen


On 15-02-2020 06:40, Rudolf Bahr wrote:
> I hope this helps you! At least in the case you're using linux.

it appears as that many of the files in the two path are sort of identical:

~/data/context

$ md5sum bin/mtxrun tex/texmf-linux-64/bin/luametatex
b95ca64fabcb3f09edd861c4b87671cc  bin/mtxrun
b95ca64fabcb3f09edd861c4b87671cc  tex/texmf-linux-64/bin/luametatex

$ md5sum bin/mtxrun.lua tex/texmf-linux-64/bin/mtxrun.lua
4d73c3608cc2463e80c59942b3db7158  bin/mtxrun.lua
4d73c3608cc2463e80c59942b3db7158  tex/texmf-linux-64/bin/mtxrun.lua


There is probably a reason for it ;-)
.F


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] Metapost and TikZ color code equivalent

2020-02-15 Thread Fabrice Couvreur
Hi Henri,
Why does the blue path not rotate 90 with the draw command but rotate with
the fill command ?

\startMPcode

  def match (expr alpha, pos) =
fill unitsquare xscaled 4cm  yscaled 0.2cm rotated alpha shifted pos
withcolor yellow ;
fill origin -- (4cm,0) -- (4.1cm,-0.05cm) --  (0.1cm,-0.05cm) --
cycle rotated alpha withcolor(.6yellow + black);
draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
-- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor blue;
 draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
-- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor blue;
draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
rotated alpha;
draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
rotated alpha
withshademethod "circular 1"
withshadevector (0,1)
withshadecolors (red,white);
enddef;
  match(0,(0,0));
  match(90,(4.2cm,0));
  match(90,(0,0));
  match(0,(0,4.2cm));

\stopMPcode


Le sam. 15 févr. 2020 à 00:01, Fabrice Couvreur 
a écrit :

> Hi,
> Hi,
> I have corrected for the dimensions of the ellipse but I cannot achieve
> the same effect for the red color.
> Thank you.
> Fabrice
> \startMPcode
>   def match (expr pos) =
> fill unitsquare xscaled 4cm  yscaled 0.2cm shifted pos withcolor
> yellow;
> fill origin -- (4cm,0) -- (4.1cm,-0.05cm) --  (0.1cm,-0.05cm) -- cycle
>  withcolor(.6yellow + black);
> draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
> -- (0.1cm,-0.05cm) -- cycle;
> fill fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
> withcolor red;
> draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm);
> draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
>  withshademethod "circular"
>  withshadevector (0,1)
>  withshadecolors (red,white)
>   enddef;
>   match((0,0));
>
> \stopMPcode
>
>
>
> Le ven. 14 févr. 2020 à 16:43, Fabrice L  a
> écrit :
>
>> Hi,
>>
>> Le 13 févr. 2020 à 16:45, Fabrice Couvreur 
>> a écrit :
>>
>>
>> How to have the color defined by {yellow!60!black} with Metapost ?
>>
>>
>> color MyColor ; MyColor := .6[yellow,black] ;
>>
>> See metafun manual, section 1.13.
>>
>> Thank you.
>> Fabrice
>>
>>
>> Fabrice (another one !).
>>
>>
>> ___
>> 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
>>
>> ___
>>
>
___
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
___