[NTG-context] textbackground for text of different size

2021-09-12 Thread Sylvain Hubert via ntg-context
Dear List,

the red highlight block in the following example is not covering the two
40pt characters:

\definetextbackground[important][frame=no,background=color,backgroundcolor=red]
\starttext
abc\important{123{\switchtobodyfont[40pt]45}xy}z
\stoptext

Is there an option that fixes this?

Thanks!

Best,
Sylvain
___
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] positioning of metapost figure

2021-09-12 Thread Sylvain Hubert via ntg-context
Thanks Hans!

On Sun, 12 Sept 2021 at 19:02, Hans Hagen  wrote:

> On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote:
> > Dear List,
> >
> > The following code draws a circle at the center of the page, ignoring
> > the "shifted" part.
> >
> > \startuniqueMPgraphic{concept}
> > draw fullcircle scaled 1cm shifted (10cm,10cm);
> > \stopuniqueMPgraphic
> > \defineoverlay[concept][\uniqueMPgraphic{concept}]
> > \setupbackgrounds[page][background=concept]
> > \starttext
> > .
> > \stoptext
> >
> > How should the metapost background figure be positioned correctly?
>
> \startuniqueMPgraphic{concept}
>  StartPage;
>  draw fullcircle scaled 1cm shifted (10cm,10cm);
>  draw Page withpen pencircle scaled 5mm;
>  StopPage;
> \stopuniqueMPgraphic
>
> -
>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] Setting up the double pages of part beginnings

2021-09-12 Thread Christian Dekant via ntg-context
Thank you, this works nicely. I put up a (minimal) working example of 
the adapted code (it inserts an empty page, if the peceding chapter ends 
on an even page) on the wiki, see


https://wiki.contextgarden.net/User_talk:Christian.Dekant

Is this interesting for other users as well? (Maybe on 
https://wiki.contextgarden.net/Titles?) If not ... I guess it will do no 
harm on my discussion page.


All the best
Christian

Am 11.09.21 um 13:25 schrieb Wolfgang Schuster:

Christian Dekant via ntg-context schrieb am 10.09.2021 um 19:25:

Dear List,

I am trying to set up double pages at the beginning of a new part in 
such a way that:
- on an odd/right-hand page there will be number and the title 
typeset in some fashion, and
- on the even/left-hand page there should be a full (printpaper)size 
image.


https://www.mail-archive.com/ntg-context@ntg.nl/msg94581.html

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


Re: [NTG-context] positioning of metapost figure

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote:

Dear List,

The following code draws a circle at the center of the page, ignoring 
the "shifted" part.


\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverlay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][background=concept]
\starttext
.
\stoptext

How should the metapost background figure be positioned correctly?


\startuniqueMPgraphic{concept}
StartPage;
draw fullcircle scaled 1cm shifted (10cm,10cm);
draw Page withpen pencircle scaled 5mm;
StopPage;
\stopuniqueMPgraphic

-
  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] positioning of metapost figure

2021-09-12 Thread Sylvain Hubert via ntg-context
Dear List,

The following code draws a circle at the center of the page, ignoring the
"shifted" part.

\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverlay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][background=concept]
\starttext
.
\stoptext

How should the metapost background figure be positioned correctly?

Thanks!

Best,
Sylvain
___
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] Image cropped

2021-09-12 Thread Wolfgang Schuster via ntg-context

Fabrice Couvreur via ntg-context schrieb am 12.09.2021 um 12:10:

Hi Wolfgang,
That's what I understood but the problem is that if I reduce the 
margin, the logo is too small in my opinion : what would you do ?


Place the logo with a layer or shift is inwards.

\setuplayout
  [width=middle,
   height=middle]

\setupfootertexts
  [margin]
  []
  [{\offset[x=-1cm,y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}]
  []
  [{\offset[x=1cm,y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}]

%\showframe

\starttext
\dorecurse{8}{\samplefile{knuth}}
\stoptext

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


Re: [NTG-context] Weird error when using \startformula inside lua

2021-09-12 Thread Sylvain Hubert via ntg-context
The problem also concerns \starttyping:

\starttext
.
\startluacode
context([[
\starttyping
\stoptyping
]])
\stopluacode
\stoptext

tex error   > runaway error: end of file encountered
mtx-context | fatal error: return code: 256

%

\starttext
.
\startluacode
context([[
\starttyping

foobar
\stoptyping
]])
\stopluacode
\stoptext

tex error   > tex error on line 5 in file ./test.tex:

lua error:

registered function call [1041]:
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: invalid
value (nil) at index 3 in table for '
concat'
stack traceback:
[C]: in function 'table.concat'
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: in
upvalue 'pickup'
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:677: in
function <...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:668>
(...tail calls...)


Sylvain

On Sat, 11 Sept 2021 at 05:12, Aditya Mahajan via ntg-context <
ntg-context@ntg.nl> wrote:

> I sometimes define lua functions for showing out worked out calculations.
> The following minimal example shows that
>
>   context([[\startformula ... \stopformula]])
>
> fails in LMTX with an error message:
>
> tex error   > tex error on line 3 in file ./test.tex: Undefined
> control sequence \undefined
>
> MWE:
>
> \startluacode
>   thirddata = thirddata or {}
>
>   local comment = [[
> This is a famous formula
> \startformula
>   a^2 + b^2 = c^2
> \stopformula
>   ]]
>
>   function thirddata.explanation()
>   context(comment)
>   end
>
> \stopluacode
>
> \starttext
> \ctxlua{thirddata.explanation()}
> \stoptext
>
> The actual use case is more complicated (where I use templates, so I don't
> want to convert everything to context.startformula() etc.). The example
> compiles with MkIV but not LMTX.
>
> Any idea what is going on?
>
> Thanks,
> 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
>
> ___
>
___
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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 9:45 AM, Wolfgang Schuster via ntg-context wrote:

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
    [default:test]
    [default]
    [cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka

With fonts like that we might end up in issues anyway:

\definefontfeature[default:test][default][mlxx=yes,wflm=yes]
\definedfont[file:iosevka.ttc(Iosevka)*default:test] :> <>

e.g.

WFLMWolfram Language (Mathematica)

so we get font specific 4 char feature names that themselves have script 
/ language specifications (like latin default and cyrillic serbian 
wolfram) ... these could have been ss* features (after all, cv and ss 
are wildcards and opentype has never been that consistent), not that it 
matters much because it gets processed anyway, but it's a clear signal 
that anyone can roll out adn use any feature name


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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 9:45 AM, Wolfgang Schuster via ntg-context wrote:

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
    [default:test]
    [default]
    [cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka


  \definefont
    [SomeFont]
    [name:iosevka*default:test]


@Marcel: I suggest to load ttc fonts with the file option.

\starttext
\definedfont[file:iosevka.ttc(Iosevka)*none]Iosevka
\stoptext

as it experimental anyway, i changed this trick to

\definefontfeature[default:test][default][cvxx={repeatlast:3}]

repeatmiddle and repeatfirst also supported (it also permits context 
users to play with runtime feature definitions using multiples that act 
as extensibles)


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] Image cropped

2021-09-12 Thread Fabrice Couvreur via ntg-context
Hi Wolfgang,
That's what I understood but the problem is that if I reduce the margin,
the logo is too small in my opinion : what would you do ?
Indeed the line is green but you will have understood: =)
Fabrice

Le sam. 11 sept. 2021 à 19:17, Wolfgang Schuster via ntg-context <
ntg-context@ntg.nl> a écrit :

> Fabrice Couvreur via ntg-context schrieb am 11.09.2021 um 17:52:
>
> Hi Wolfgang,
> The red frame is the print area ?
>
>
> The *green* frame are the margins of the A4 paper which is positioned in
> the middle of the A3 paper.
>
> The larger paper allows you to the see the part of the margins which are
> outside of the printable area.
>
> 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://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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Wolfgang Schuster via ntg-context

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
[default:test]
[default]
[cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka


  \definefont
[SomeFont]
[name:iosevka*default:test]


@Marcel: I suggest to load ttc fonts with the file option.

\starttext
\definedfont[file:iosevka.ttc(Iosevka)*none]Iosevka
\stoptext

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