Re: [NTG-context] How to enable the use of the blackboard font in modern ConTeXt

2021-10-23 Thread Gerben Wierda via ntg-context
On 23 Oct 2021, at 15:15, Pablo Rodriguez via ntg-context  
wrote:
> 
> On 10/23/21 3:00 PM, Gerben Wierda via ntg-context wrote:
>> By the way, neither does \blackboard{Q} work. But \rationals works in
>> the case of the letter Q.
> 
> Hi Gerben,
> 
> it only seems to work inside math:
> 
>  \starttext
>  \dorecurse{26}{$\blackboard\characters{\recurselevel}
>  \Characters{\recurselevel}$}
>  \stoptext
> 
> I hope it helps,

Yes, the new \blackboard command works, so $\blackboard{Q}$ works. Thanks.

Feature request: make sure that the new \blackboard switches math mode on/off 
if necessary. Not a big deal though. The fix is simple. Adding the info about 
math mode might also be helpful here: 
https://wiki.contextgarden.net/Blackboard_bold 
<https://wiki.contextgarden.net/Blackboard_bold>

G

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

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

2021-10-23 Thread Mikael Sundqvist via ntg-context
On Fri, Oct 22, 2021 at 9:22 AM Hans Hagen  wrote:
>
> On 10/21/2021 10:31 PM, Mikael Sundqvist via ntg-context wrote:
>
> > It works very nicely. I played with the test file you sent me, and I
> > find that in the .lfg file, the up parameter set to 0.06 instead of
> > 0.1 looks better to me.
> there are no ssty's for the quadruple prime in that font but if you need
> primes so badly you probably shouldn't use it anyway i guess (there are
> only super-textsize ssty variants for the 1/2/3 and their reverse)
>
> anyway, as you desperately need these quads (why check otherwise),
> adding this to the lfg blob helps:
>
> local four = characters[0x2057]
> if four then
>  local one = characters[okay]
>  local owd = .75*one.width
>  local off = .6*one.height
>  four.width = 4*owd
>  four.commands = {
>  { "offset", 0, off, okay },
>  { "offset",   owd, off, okay },
>  { "offset", 2*owd, off, okay },
>  { "offset", 3*owd, off, okay },
>  }
> else
>  -- we don't add (but we could), just patch, and there's no
>  -- reverse quad either
> end
>
> and no one will notice (unless you wikify al this)
>
> 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
> -----

Hi!

As I wrote, I do not use the quadruple primes (I used your file), but
I must confess that I'm impressed that you fix it so quickly. :)

In any case, a big thank you for fixing the primes in the libertinus font!!

/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] Bloody PDF boxes and cr*p marks!

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

On 10/12/2021 6:18 PM, Henning Hraban Ramm via ntg-context wrote:



Am 12.10.2021 um 13:15 schrieb Hans Hagen :

On 10/12/2021 12:36 PM, Henning Hraban Ramm via ntg-context wrote:

Comrades!
There must have been a time when PDF boxes (i.e. CropBox, TrimBox, BleedBox) 
worked as they should, but it must have been a short time.


I long ago lost track of what all that means ... decades of pdf ... different 
viewers, different interpretations ... validators complaining about things 
missing ... i guess that bit (like annotations) will always be in flux (also 
because specs came before implementations i guess).


Hm, you implemented these boxes only in 2015, there was not much change in that 
regard since then.


Way earlier but it wasn't enabled ... (I'm not going to check ancient 
tex live dvd's).


addtopageattributes("CropBox",box) -- mandate for rendering
addtopageattributes("TrimBox",box) -- mandate for pdf/x
 -- addtopageattributes("BleedBox",box)
 -- addtopageattributes("ArtBox",box)

I remember discussing it with (I think) Pablo and it definityely came up 
when we were dealing with these 'standards'.



* BleedBox must be TrimBox plus bleed.


a relative new one, probably also sensitive for interpretation by renderer, imo 
worthless


Not worthless; workflow systems in printshops rely on BleedBox and TrimBox. 
It’s not about rendering, but imposition and even postprocessing (cutting etc.).


* ArtBox is neglectable for whole layouts (same as TrimBox might make sense), 
just interesting in \externalfigure.


also worthless


I agree.


With
\setuppaper[A4][A4,oversized]
I’d expect ConTeXt to set...
* MediaBox and CropBox to the bigger format
* TrimBox to the page format (A4)
* BleedBox also to the page format, while no bleed is defined


well, that's an assumption ... who knows what a printer (driver) does ...


Who sends PDF files directly to a printer (driver)? I know it only from 
automated, professional workflows.
Usually printer drivers gets fed by PDF viewers, and I know none that even 
*can* print something different than CropBox.


afaik some printers accept pdf (hard to check) but I the fact that a 
viewer does something doesn't mean it did years ago (just like at how 
crippled tounicode has been / is supported over time)



Beware, \setupbleeding refers only to stretching of images (\externalfigure)!


fwiw, that bleeding options is mostly there to communicate with mp


Good to know. I just browsed the Details manual, didn’t try it yet, since I 
scale and move my “bleeding” images differently.


i actually need to pick up that bit ... (some code in my local styles i 
need to check) because it can be handy for cover pages (but then i also 
need to check if i don't break something



* to define trimoffset, I must know the difference between paper size and sheet size 
("oversized" adds 15 mm).


oversized is a convenience feature, in prepress one would define a real, target 
size, not rely on a convenience value


But it’s convenient ;) I usually just need a format that is big enough for the 
crop marks, and “oversized” does that.


sure, i use it too


% ... and no dependency on interactionscreen!


that's a historic fact ... special pdf features triggered by that command .. 
basically tex only has a page size


Of course, but it doesn’t make sense any more, and defining the boxes wouldn’t 
hurt anyone. (I’m quite sure, but let them beat me ;))


maybe, but it's also a bit about otr/backend timing, so i need to sit 
down on it



Yes, that would mean a backward incompatible change. But how many of us rely on 
the strange current behavior?
Please let us fix this!


the problem is as usual documentation and indeed we can have some backward 
compatibility issue here ... i honestly have no clue how viewers and printers 
react (so if something would be added/changed it would be option driven)


I wouldn’t expect printers (office printing devices) to react at all; I hope 
that printers (printshop workers) will react positively to correct boxes in our 
PDFs ;)


oh, i'm often surprised about printing houses .. (the best were some 
comment on a file having rgb bitmaps while it actually had cmyk outlines 
and validators/fixers inlining xforms while setting lines to 0pt widths) 
.. and some still use acrobat 4 -)



In some cases it makes sense to have different values on e.g. inner and outer 
edges; I feat that would add a plethora of additional parameters 
(leftbleedoffset, innerbleedoffset...).
Maybe give a list like in CSS? bleedoffset={3mm,3mm,3mm,0mm} – top, right, 
bottom, left order implied; not very “ConTeXt style”.

probably spreads need some treatment (imposition)


Multiple pages on a sheet are not considered by the PDF specs.


yes but what of context imposes


(i'm pretty sure that changes will themselves introduce new issues)


Probable.


anyway, we can look at it once we're all on lmtx because i'm not going to 
change mkiv i

Re: [NTG-context] Bloody PDF boxes and cr*p marks!

2021-10-12 Thread Henning Hraban Ramm via ntg-context

> Am 12.10.2021 um 13:15 schrieb Hans Hagen :
> 
> On 10/12/2021 12:36 PM, Henning Hraban Ramm via ntg-context wrote:
>> Comrades!
>> There must have been a time when PDF boxes (i.e. CropBox, TrimBox, BleedBox) 
>> worked as they should, but it must have been a short time.
> 
> I long ago lost track of what all that means ... decades of pdf ... different 
> viewers, different interpretations ... validators complaining about things 
> missing ... i guess that bit (like annotations) will always be in flux (also 
> because specs came before implementations i guess).

Hm, you implemented these boxes only in 2015, there was not much change in that 
regard since then.

>> * BleedBox must be TrimBox plus bleed.
> 
> a relative new one, probably also sensitive for interpretation by renderer, 
> imo worthless

Not worthless; workflow systems in printshops rely on BleedBox and TrimBox. 
It’s not about rendering, but imposition and even postprocessing (cutting etc.).

>> * ArtBox is neglectable for whole layouts (same as TrimBox might make 
>> sense), just interesting in \externalfigure.
> 
> also worthless

I agree.

>> With
>> \setuppaper[A4][A4,oversized]
>> I’d expect ConTeXt to set...
>> * MediaBox and CropBox to the bigger format
>> * TrimBox to the page format (A4)
>> * BleedBox also to the page format, while no bleed is defined
> 
> well, that's an assumption ... who knows what a printer (driver) does ...

Who sends PDF files directly to a printer (driver)? I know it only from 
automated, professional workflows.
Usually printer drivers gets fed by PDF viewers, and I know none that even 
*can* print something different than CropBox.

>> Beware, \setupbleeding refers only to stretching of images (\externalfigure)!
> 
> fwiw, that bleeding options is mostly there to communicate with mp

Good to know. I just browsed the Details manual, didn’t try it yet, since I 
scale and move my “bleeding” images differently.

>> * to define trimoffset, I must know the difference between paper size and 
>> sheet size ("oversized" adds 15 mm).
> 
> oversized is a convenience feature, in prepress one would define a real, 
> target size, not rely on a convenience value

But it’s convenient ;) I usually just need a format that is big enough for the 
crop marks, and “oversized” does that.

>> % ... and no dependency on interactionscreen!
> 
> that's a historic fact ... special pdf features triggered by that command .. 
> basically tex only has a page size

Of course, but it doesn’t make sense any more, and defining the boxes wouldn’t 
hurt anyone. (I’m quite sure, but let them beat me ;))

>> Yes, that would mean a backward incompatible change. But how many of us rely 
>> on the strange current behavior?
>> Please let us fix this!
> 
> the problem is as usual documentation and indeed we can have some backward 
> compatibility issue here ... i honestly have no clue how viewers and printers 
> react (so if something would be added/changed it would be option driven)

I wouldn’t expect printers (office printing devices) to react at all; I hope 
that printers (printshop workers) will react positively to correct boxes in our 
PDFs ;)

>> In some cases it makes sense to have different values on e.g. inner and 
>> outer edges; I feat that would add a plethora of additional parameters 
>> (leftbleedoffset, innerbleedoffset...).
>> Maybe give a list like in CSS? bleedoffset={3mm,3mm,3mm,0mm} – top, right, 
>> bottom, left order implied; not very “ConTeXt style”.
> probably spreads need some treatment (imposition)

Multiple pages on a sheet are not considered by the PDF specs.

> (i'm pretty sure that changes will themselves introduce new issues)

Probable.

> anyway, we can look at it once we're all on lmtx because i'm not going to 
> change mkiv in that aspect

Ok

Hraban

___
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] SciTE configuration Mac

2021-10-10 Thread Hans Hagen via ntg-context

On 10/8/2021 6:39 PM, MANUEL GONZALEZ SUAREZ via ntg-context wrote:

Hi everyone:
Could someone send me a minimal configuration for the SciTE editor of 
the files needed to work with ConTeXt? I work with MaC OS Big Sur.
There are some scite related files in the distribution that you can look 
at (context/data/scite). In principle the built-in lexers (called 
internal there) should work with context (using the keyword lists). The 
external lexers depend on the scintillua dll/so and the latest updats 
drops that (for various reasons) and I now use the OnStyle lua feature 
of scite. However, it still do't work out of the box because they assume 
lpeg to be built in. On my machine I have a version with a few lines 
patch that does that and this is what I'm currently testing with (i can 
put a scite.zip somewhere if needed but that won't help you on osx; if 
lpeg ever makes it into stock scite it should work there too).


You can try to copy the files that ships with context in the scite home 
path and add


import context/scite-context-user

to the global properties files and see what happens

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] SciTE configuration Mac

2021-10-08 Thread MANUEL GONZALEZ SUAREZ via ntg-context
Hi everyone:
Could someone send me a minimal configuration for the SciTE editor of the files 
needed to work with ConTeXt? I work with MaC OS Big Sur.
Thanks.
M. González.
___
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] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context

On 10/5/2021 4:58 PM, Thomas A. Schmitz via ntg-context wrote:


Hi all,

I hope the following example is not too convoluted:

\useMPlibrary [txt]

\define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}}

\setupbodyfont [ss,9pt]

\starttext

\startuseMPgraphic{empedocles}
%numeric a ; a = 6.56cm ;
%numeric b ; b = 1.1 ;
save S; path S[] ;
S[1] = fullcircle scaled 8cm rotated 306 ;
S[2] = S[1] scaled 1.1 ;
S[3] = S[1] scaled 1.23 ;
S[4] = S[1] scaled 1.3 ;
S[5] = S[1] scaled 1.43 ;
S[6] = S[1] scaled 1.5 ;
S[7] = S[1] scaled 1.6 ;
z[1] = point 1 along S[7] ;
z[2] = point 1 along S[1] ;
z[3] = point 0.1 along S[7] ;
z[4] = point 0.1 along S[1] ;
z[5] = point 0.2 along S[7] ;
z[6] = point 0.2 along S[1] ;
z[7] = point 0.3 along S[7] ;
z[8] = point 0.3 along S[1] ;
z[9] = point 0.4 along S[7] ;
z[10] = point 0.4 along S[1] ;
z[11] = point 0.5 along S[7] ;
z[12] = point 0.5 along S[1] ;
z[13] = point 0.6 along S[7] ;
z[14] = point 0.6 along S[1] ;
z[15] = point 0.7 along S[7] ;
z[16] = point 0.7 along S[1] ;
z[17] = point 0.8 along S[7] ;
z[18] = point 0.8 along S[1] ;
S[8] = z[1] -- z[2] ;
S[9] = z[3] -- z[4] ;
S[10] = z[5] -- z[6] ;
S[11] = z[7] -- z[8] ;
S[12] = z[9] -- z[10] ;
S[13] = z[11] -- z[12] ;
S[14] = z[13] -- z[14] ;
S[15] = z[15] -- z[16] ;
S[16] = z[17] -- z[18] ;
z[19] = S[3] intersection_point S[8] ;
z[20] = S[3] intersection_point S[16] ;
S[18] = S[3] cutbefore z[20] cutafter z[19] ;
z[21] = S[5] intersection_point S[8] ;
z[22] = S[5] intersection_point S[16] ;
S[19] = S[5] cutbefore z[22] cutafter z[21] ;
z[23] = S[12] intersection_point S[3] ;
S[20] = S[3] cutbefore z[20] cutafter z[23] ;
for i = 1 upto 16:
 draw S[i] withcolor 0.7white ;
endfor ;
draw z[23] -- z[20] withcolor red ;
draw S[20] withcolor blue ;
label.bot(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
20.000 = 0}"), z[10]) ;
label.llft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
2.000}"), z[8]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
4.000}"), z[6]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
6.000}"), z[4]) ;
label.ulft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
8.000}"), z[2]) ;
label.urt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
12.000}"), z[18]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
14.000}"), z[16]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
16.000}"), z[14]) ;
label.lrt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
18.000}"), z[12]) ;
draw followtext(S[18], "\strut\hbox to 2em{\EmpArrow}\hskip2em 
RUHEPAUSE\hskip4em\strut") ;
draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT 
(SPHAIROS)\hskip2em\strut") ;

\stopuseMPgraphic

\useMPgraphic{empedocles}

\stoptext

I have a big problem and some smaller questions, for those who are 
better at math and at metafun than I am:


1. The big problem: for the next followtext, I need the circular arc 
between points z[23] and z[20]. But however I place the cutbefore and 
cutafter, I don't get the proper part of the circle. I'm looking at the 
right intersection points, as the red line shows, but the blue line 
shows that I'm not getting the right section of the circle. How can I 
get this section into the path S[20]?


2. Math... :-) Is there a better way to define three circles that are at 
exactly the same distance than my naive "scaled 1.3" and "scaled 1.5"?


3. TeX and metafun: is there a better way to have the followtext exactly 
centered between the two circles rather than just fiddle with the scale 
factor?


4. Or is there a better approach to my problem altogether? I'm trying to 
reproduce an illustration from a book, so I'm very open to suggestions 
here. I looked at the example in the metafun manual chapter 10.4, but 
I'm not sure if using an overlay and multiple \followtokens would be 
easier. Especially since there is the scary remark "This definition is 
not the right one!" in this chapter without any further explanation.


I hope you all had a wonderful meeting last week. I was sad I couldn't 
come, I was in Paris for a conference, the first after 18 months, so I 
couldn't skip this one.

Because you know how to rotate and scale:

\startuseMPgraphic{empedocless}
path p, q, r ;
pair a ;

p := fullcircle scaled 10cm ;
drawarrow p  withpen pencircle scaled 1mm withcolor red ;
drawpoint 0 of p withpen pencircle scaled 1mm withcolor blue ;
q := p cutafter (point .4 along p) ;
drawarrow q  withpen pencircle scaled .5mm withcolor green ;
draw followtext(q, "\strut TEXT ONE") ;

p := fullcircle scaled 8cm ;
drawarrow p  withpen pencircle scaled 1mm withcolor cyan ;
drawpoint 0 of p withpen pencircle scaled 1mm withcolor mage

[NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context


Hi all,

I hope the following example is not too convoluted:

\useMPlibrary [txt]

\define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}}

\setupbodyfont [ss,9pt]

\starttext

\startuseMPgraphic{empedocles}
%numeric a ; a = 6.56cm ;
%numeric b ; b = 1.1 ;
save S; path S[] ;
S[1] = fullcircle scaled 8cm rotated 306 ;
S[2] = S[1] scaled 1.1 ;
S[3] = S[1] scaled 1.23 ;
S[4] = S[1] scaled 1.3 ;
S[5] = S[1] scaled 1.43 ;
S[6] = S[1] scaled 1.5 ;
S[7] = S[1] scaled 1.6 ;
z[1] = point 1 along S[7] ;
z[2] = point 1 along S[1] ;
z[3] = point 0.1 along S[7] ;
z[4] = point 0.1 along S[1] ;
z[5] = point 0.2 along S[7] ;
z[6] = point 0.2 along S[1] ;
z[7] = point 0.3 along S[7] ;
z[8] = point 0.3 along S[1] ;
z[9] = point 0.4 along S[7] ;
z[10] = point 0.4 along S[1] ;
z[11] = point 0.5 along S[7] ;
z[12] = point 0.5 along S[1] ;
z[13] = point 0.6 along S[7] ;
z[14] = point 0.6 along S[1] ;
z[15] = point 0.7 along S[7] ;
z[16] = point 0.7 along S[1] ;
z[17] = point 0.8 along S[7] ;
z[18] = point 0.8 along S[1] ;
S[8] = z[1] -- z[2] ;
S[9] = z[3] -- z[4] ;
S[10] = z[5] -- z[6] ;
S[11] = z[7] -- z[8] ;
S[12] = z[9] -- z[10] ;
S[13] = z[11] -- z[12] ;
S[14] = z[13] -- z[14] ;
S[15] = z[15] -- z[16] ;
S[16] = z[17] -- z[18] ;
z[19] = S[3] intersection_point S[8] ;
z[20] = S[3] intersection_point S[16] ;
S[18] = S[3] cutbefore z[20] cutafter z[19] ;
z[21] = S[5] intersection_point S[8] ;
z[22] = S[5] intersection_point S[16] ;
S[19] = S[5] cutbefore z[22] cutafter z[21] ;
z[23] = S[12] intersection_point S[3] ;
S[20] = S[3] cutbefore z[20] cutafter z[23] ;
for i = 1 upto 16:
draw S[i] withcolor 0.7white ;
endfor ;
draw z[23] -- z[20] withcolor red ;
draw S[20] withcolor blue ;
label.bot(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
20.000 = 0}"), z[10]) ;
label.llft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
2.000}"), z[8]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
4.000}"), z[6]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
6.000}"), z[4]) ;
label.ulft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
8.000}"), z[2]) ;
label.urt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
12.000}"), z[18]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
14.000}"), z[16]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
16.000}"), z[14]) ;
label.lrt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
18.000}"), z[12]) ;
draw followtext(S[18], "\strut\hbox to 2em{\EmpArrow}\hskip2em 
RUHEPAUSE\hskip4em\strut") ;
draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT 
(SPHAIROS)\hskip2em\strut") ;

\stopuseMPgraphic

\useMPgraphic{empedocles}

\stoptext

I have a big problem and some smaller questions, for those who are 
better at math and at metafun than I am:


1. The big problem: for the next followtext, I need the circular arc 
between points z[23] and z[20]. But however I place the cutbefore and 
cutafter, I don't get the proper part of the circle. I'm looking at the 
right intersection points, as the red line shows, but the blue line 
shows that I'm not getting the right section of the circle. How can I 
get this section into the path S[20]?


2. Math... :-) Is there a better way to define three circles that are at 
exactly the same distance than my naive "scaled 1.3" and "scaled 1.5"?


3. TeX and metafun: is there a better way to have the followtext exactly 
centered between the two circles rather than just fiddle with the scale 
factor?


4. Or is there a better approach to my problem altogether? I'm trying to 
reproduce an illustration from a book, so I'm very open to suggestions 
here. I looked at the example in the metafun manual chapter 10.4, but 
I'm not sure if using an overlay and multiple \followtokens would be 
easier. Especially since there is the scary remark "This definition is 
not the right one!" in this chapter without any further explanation.


I hope you all had a wonderful meeting last week. I was sad I couldn't 
come, I was in Paris for a conference, the first after 18 months, so I 
couldn't skip this one.


Thanks and best wishes

Thomas
___
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] MkIV missing?

2021-10-04 Thread Marcus Vinicius Mesquita via ntg-context
Thank you, Taco

Your suggestion resolved the issue for me.

Regards

Marcus Vinicius

On Mon, Oct 4, 2021 at 10:50 AM Taco Hoekwater via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi,
>
> Here is what I assume has happened:
>
> Hans gave LMTX its own "luametatex-cache” directory (around August 20).
> Previously, the cache for LMTX still used files under luatex-cache, just
> like MKIV. But since that change, the “context -—generate” call no longer
> updates files in luatex-cache, only in luametatex-cache.
>
>
> That is not a big problem unless something happens to clear any existing
> cache in that folder (like a re-install from scratch, say).
>
> Normally, one runs “context —-generate” to fix the cache and “context
> —-luatex” to run luatex Combined, that would be
>   “context —-generate —-luatex”.
> But the problem is that luatex cannot find “mtx-context.lua” exactly
> because of the missing cache that we are actually trying to create with
> that command line. Missing “mtx-context.lua” is usually fixed by running
> the more basic “mtxrun —generate”.
>
> However, “mtxrun -—generate”  does not currently support a "-—luatex”
> argument, so the only way I know of right now to get the luatex-cache
> restored|updated is to run the command below.
>
> (Incidentally, this sort of issue is why the core command is not “context
> -—generate” but “mtxrun -—generate”. It is unfortunate that that does not
> help in this case).
>
> Best wishes,
> Taco
>
> > On 4 Oct 2021, at 15:33, Taco Hoekwater via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > We are busy with this off-list.
> >
> > If it is urgent:
> >
> > luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate
> >
> > fixed it for me (you’ll need to adjust the path, of course)
> >
> > Best wishes,
> > Taco
> >
> >> On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context <
> ntg-context@ntg.nl> wrote:
> >>
> >> Same problem here, on a linux64, context current version: 2021.09.26
> 17:00
> >>
> >> Greetings
> >>
> >> Marcus Vinicius
> >>
> >> On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context <
> ntg-context@ntg.nl> wrote:
> >>
> >>> Am 04.10.2021 um 13:06 schrieb Hans Hagen :
> >>>
> >>> On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote:
> >>>> Hi,
> >>>> since a while, I can’t run MkIV any more, even after several runs of
> install.sh (and mtxrun --generate, of course).
>
> —
> Taco Hoekwater  E: t...@bittext.nl
> genderfluid (all pronouns)
>
>
>
>
> ___
> 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
>
> ___
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] MkIV missing?

2021-10-04 Thread Taco Hoekwater via ntg-context
Hi,

Here is what I assume has happened:

Hans gave LMTX its own "luametatex-cache” directory (around August 20). 
Previously, the cache for LMTX still used files under luatex-cache, just like 
MKIV. But since that change, the “context -—generate” call no longer updates 
files in luatex-cache, only in luametatex-cache. 


That is not a big problem unless something happens to clear any existing cache 
in that folder (like a re-install from scratch, say). 

Normally, one runs “context —-generate” to fix the cache and “context —-luatex” 
to run luatex Combined, that would be 
  “context —-generate —-luatex”. 
But the problem is that luatex cannot find “mtx-context.lua” exactly because of 
the missing cache that we are actually trying to create with that command line. 
Missing “mtx-context.lua” is usually fixed by running the more basic “mtxrun 
—generate”.

However, “mtxrun -—generate”  does not currently support a "-—luatex” argument, 
so the only way I know of right now to get the luatex-cache restored|updated is 
to run the command below.

(Incidentally, this sort of issue is why the core command is not “context 
-—generate” but “mtxrun -—generate”. It is unfortunate that that does not help 
in this case).

Best wishes,
Taco

> On 4 Oct 2021, at 15:33, Taco Hoekwater via ntg-context  
> wrote:
> 
> We are busy with this off-list.
> 
> If it is urgent: 
> 
> luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate
> 
> fixed it for me (you’ll need to adjust the path, of course)
> 
> Best wishes,
> Taco
> 
>> On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context 
>>  wrote:
>> 
>> Same problem here, on a linux64, context current version: 2021.09.26 17:00
>> 
>> Greetings
>> 
>> Marcus Vinicius
>> 
>> On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context 
>>  wrote:
>> 
>>> Am 04.10.2021 um 13:06 schrieb Hans Hagen :
>>> 
>>> On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote:
>>>> Hi,
>>>> since a while, I can’t run MkIV any more, even after several runs of 
>>>> install.sh (and mtxrun --generate, of course).

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] Headline with numbers in margin doubleside layout

2021-09-14 Thread juh via ntg-context
Thanks a lot Wolfgang for your help,


Am Mon, Sep 13, 2021 at 01:33:36PM +0200 schrieb Wolfgang Schuster via 
ntg-context:
> Like this?
> 
> \setuphead
>   [chapter]
>   [page=yes,
>    alternative=inmargin,
>    location=outer,
>    align=outer]
> 
> \setuppagenumbering
>   [alternative=doublesided]
> 
> \showframe
> 
> \starttext
> \dorecurse{10}{\expanded{\chapter{Chapter
> \convertnumber{word}{\recurselevel
> \stoptext

this looks interesting, but it's not quite what I want.

I think I would like to have a different solution on left and right
pages.


| 1. Headline on left  | 2. Headline on the right page  |
|page
|  |lorem ipsum, dolor  |
|lorem ipsum, dolor|sit amet|
|sit amet. ||


The text area stops at "dolor". So the long headline on page 2 should run into
the outermargin. 

Sorry, I must confess that I am still experimenting with my layout. The
outer margin is quite big so that the headline on right pages should run
into the margin to balance the look.

Is it possible to put headline in an area combined from margin+textarea?

juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] Headline with numbers in margin doubleside layout

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

juh via ntg-context schrieb am 13.09.2021 um 13:07:

Hi all,

I have a doubleside layout with a big outer margin.

When I set alternative=margin in setuphead the chapter numbers appear in
the left margin which is the outer margin on left pages, but the inner
margin on right pages.

While this looks good on left pages, there is much free space on right
pages.

I would like to use this space for headlines to balance the impression.

Is it possible to assign headlines to the textarea+margin somehow only
on right pages so that headlines would run into the outermargin o right
pages??


Like this?

\setuphead
  [chapter]
  [page=yes,
   alternative=inmargin,
   location=outer,
   align=outer]

\setuppagenumbering
  [alternative=doublesided]

\showframe

\starttext
\dorecurse{10}{\expanded{\chapter{Chapter 
\convertnumber{word}{\recurselevel

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


[NTG-context] Headline with numbers in margin doubleside layout

2021-09-13 Thread juh via ntg-context
Hi all,

I have a doubleside layout with a big outer margin.

When I set alternative=margin in setuphead the chapter numbers appear in
the left margin which is the outer margin on left pages, but the inner
margin on right pages.

While this looks good on left pages, there is much free space on right
pages.

I would like to use this space for headlines to balance the impression.

Is it possible to assign headlines to the textarea+margin somehow only
on right pages so that headlines would run into the outermargin o right
pages??

TIA
juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] Axis macro in MetaFun

2021-09-11 Thread kauśika cittūr via ntg-context
On Saturday, September 11, 2021 10:30:25 PM IST Hans Hagen wrote:
> On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote:
> > Dear All,
> > 
> > I am truly grateful for the new additions to MetaFun. It has greatly
> > helped me in producing neat drawings for my academic work. In this
> > connection, I have a few queries.
> > 
> > Currently I am using PGFPlots (with ConTeXt) to draw simple plots from CSV
> > data. I was wondering if there is any way to do the same in MetaFuns. That
> > is, is it possible to do something like the following in order to obtain
> > a line plot of the values in the 'data.csv' file? Also is it possible to
> > have the 'labels' be the identical for all points in a given list?
> > 
> > \startMPcode
> > 
> >draw lmt_axis [
> >
> >sx = 2mm, sy = 2mm,
> >nx = 80, ny = 40,
> >tx = 15, ty = 15,
> >
> >list = {
> >
> >  [
> >  
> >connect = true,
> >color = "darkblue",
> >close = true,
> >points = {data.csv},
> >labels = {"•"},
> >  
> >  ]
> >
> >},
> >
> >] withpen pencircle scaled 0.5mm;
> > 
> > \stopMPcode
> 
> It depends on how one has data in the csv, You can patch mlib-scn.lmt
> (line 659)
> 
>  if type(v) == "table" then
>  return injectpath(v,connector,close)
>  elseif type(v) == "string" then
>  local code = load("return " .. v)
>  if code then
>  return code()
>  end
>  else
>  return injectpair(0,0)
>  end
> 
> then a string represents a function:
> 
> \starttext
> 
> \startluacode
>  io.savedata("temp.csv", "x,y\n10,10\n20,40\n30,30\n")
> 
>  local mycsvsplitter = utilities.parsers.rfc4180splitter()
> 
>  function MP.MyPoints(name)
>  local data = io.loaddata(name)
>  local list = mycsvsplitter(data)
>  table.remove(list,1)
>  for i=1,#list do
>  list[i][1] = tonumber(list[i][1])
>  list[i][2] = tonumber(list[i][2])
>  end
>  mp.inject.path(list)
>  end
> 
> \stopluacode
> 
> \startMPcode
>draw lmt_axis [
>sx = 2mm, sy = 2mm,
>nx = 80, ny = 40,
>tx = 15, ty = 15,
> 
>list = {
>      [
>connect = true,
>color = "darkblue",
>close = true,
>points = "MP.MyPoints('temp.csv')",
>labels = {"•"},
>  ]
>},
>] withpen pencircle scaled 0.5mm;
> \stopMPcode
> 
> \stoptext
> 
> we can of course have some predefined and when we can agree on how these
> files loo, adding a "csv" is no big deal ... it's all about consistent
> interfacing
> 
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

Dear Hans,

Many thanks for your detailed guidance. I think for now this patch should 
suffice for my simple needs.

Best,
kauśika


___
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] Axis macro in MetaFun

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

On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote:

Dear All,

I am truly grateful for the new additions to MetaFun. It has greatly helped me
in producing neat drawings for my academic work. In this connection, I have a
few queries.

Currently I am using PGFPlots (with ConTeXt) to draw simple plots from CSV
data. I was wondering if there is any way to do the same in MetaFuns. That is,
is it possible to do something like the following in order to obtain a line
plot of the values in the 'data.csv' file? Also is it possible to have the
'labels' be the identical for all points in a given list?

\startMPcode
   draw lmt_axis [
   sx = 2mm, sy = 2mm,
   nx = 80, ny = 40,
   tx = 15, ty = 15,
   
   list = {

 [
   connect = true,
   color = "darkblue",
   close = true,
   points = {data.csv},
   labels = {"•"},
 ]
   },
   ] withpen pencircle scaled 0.5mm;
\stopMPcode



It depends on how one has data in the csv, You can patch mlib-scn.lmt 
(line 659)


if type(v) == "table" then
return injectpath(v,connector,close)
elseif type(v) == "string" then
local code = load("return " .. v)
if code then
return code()
end
else
return injectpair(0,0)
end

then a string represents a function:

\starttext

\startluacode
io.savedata("temp.csv", "x,y\n10,10\n20,40\n30,30\n")

local mycsvsplitter = utilities.parsers.rfc4180splitter()

function MP.MyPoints(name)
local data = io.loaddata(name)
local list = mycsvsplitter(data)
table.remove(list,1)
for i=1,#list do
list[i][1] = tonumber(list[i][1])
list[i][2] = tonumber(list[i][2])
end
mp.inject.path(list)
end

\stopluacode

\startMPcode
  draw lmt_axis [
  sx = 2mm, sy = 2mm,
  nx = 80, ny = 40,
  tx = 15, ty = 15,

  list = {
[
  connect = true,
  color = "darkblue",
  close = true,
  points = "MP.MyPoints('temp.csv')",
  labels = {"•"},
]
  },
  ] withpen pencircle scaled 0.5mm;
\stopMPcode

\stoptext

we can of course have some predefined and when we can agree on how these 
files loo, adding a "csv" is no big deal ... it's all about consistent 
interfacing



-
  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] (neo)vim support & Lua

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

On 9/9/2021 2:08 PM, Saša Janiška via ntg-context wrote:

Hello,

some months ago there was a 0.5 release (https://neovim.io/news/2021/07) of
Neovim which brings support for Lua language to a new level - "Lua as a
first-class scripting and configuration language". Moreover, Neovim now it also
has built-in LSP client...so, I wonder if there is some work planned to improve
Vim support for ConTeXt by taking advantage of those new development related to
Neovim?
It all depends on demand and usability. It is no big deal to write a 
script that gets some json request and returns a json reply using info 
that we already have in various places. We can even use lua9meta)tes as 
server fot that. I can do that - stepwise - when i get useable specs but 
someone else has to initiate that. I'm not a vim user myself.


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] error: (nodes): fuzzy token cleanup in whatsit node

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

I think I've just encountered a fragile bug. It is only reproducible
with exactly the same layout as the doc below. Any insertion or
removal of an item that changes the pagination would let the document
compile.

\defineitemgroup[choice][itemize]
\setupchoice[packed,columns,one]
\setupchoice[before={\blank[medium]}]

\starttext
.\blank[32*big]

\startitemize
\item 0

\startchoice[text]
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\stopitemize
\stoptext

test.log:

open source > level 1, order 1, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2021.03.05 19:11 MKIV  fmt: 2021.4.24
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/me/code/qs-cs/test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
pages   > flushing realpage 2, userpage 2, subpage 2
! error:  (nodes): fuzzy token cleanup in whatsit node with type
whatsit and subtype 29

Could anyone reproduce or explain this bug?

Thanks!

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
___


[NTG-context] error: (nodes): fuzzy token cleanup in whatsit node ...

2021-09-06 Thread Sylvain Hubert via ntg-context
% context version: 2021.03.05 19:11
% This seems to be a bug of a very subtle layout problem.
% Inserting or removing anything will likely to suppress the bug

\defineitemgroup[choice][itemize]
\setupchoice[packed,columns,one]
\setupchoice[before={\blank[medium]}]

\starttext
.\blank[32*big]

\startitemize
\item 0

\startchoice[text]
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\stopitemize
\stoptext

% ! error:  (nodes): fuzzy token cleanup in whatsit node with type
whatsit and subtype 29mtx-context | fatal error: return code: 256
___
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] Use MetaPost to distort images?

2021-09-05 Thread Henning Hraban Ramm via ntg-context

> Am 05.09.2021 um 10:10 schrieb Hans Hagen :
> 
> On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote:
>>> Am 04.09.2021 um 19:06 schrieb Hans Hagen :
>>> 
>>> On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote:
>>> 
>>>> I guess it’s on me to write a wiki page about GM.
>>> 
>>> you can then also add some comparison with im (i.e. what does it offer more 
>>> than gm)
>> Oh no...
>> IM and GM have a history, and I don’t want to get involved.
>> GM accuses IM of security issues, feature and dependency bloat, bad code 
>> quality, inefficiency, frequent API changes, license changes and whatnot.
> 
> ah, i think i remember ... i switched to gm just because im didn't run well 
> at that time on windows
> 
> personally i think that "accuses of .." show that down side of the open 
> source community (which includes the tex community btw) ... it gets even 
> worse when something sells itself for big money and then after a few years 
> spins off again attacking those who paid them ... i suppose that 
> unconstrianed social media also play a role in this (one reason why i'm not 
> really interested in discussions around this in public)

I hear you. Of course there are reasons to be opinionated and to fork some open 
source projects if they move into a direction that you don’t like. But that 
doesn’t mean you can’t be polite about it. And the GM maintainers focus too 
much on their hate for IM’s developer(s) for my taste. Maybe it helps them to 
stay focused and write better code if they have an enemy...

> (what to think of: https://www.youtube.com/watch?v=BhTQyeEdnzs)

The video doesn’t run for me, just read the description: I’m sure the problem 
exists, but it’s maybe exaggerated?

>> Dependencies according to MacPorts:
>> Full Name: GraphicsMagick @1.3.36_1+q8
>> Library Dependencies: libxml2, bzip2, xz, zlib, libpng, tiff, freetype, 
>> libiconv, libtool, lcms2, jasper, libjpeg-turbo, webp
> 
> makes me wonder if there is some simple image manipulation lib that just 
> deals with the pixels .. we don't need xml, freetype, libiconv, ...

Maybe use these libs (libpng etc.) directly? I don’t know what they can do.

Is there a Lua lib that parallels Python’s Pillow?
It also has a lot of dependencies to support image formats or add features, but 
most of them are optional, see 
https://pillow.readthedocs.io/en/latest/installation.html#building-from-source

>> Full Name: ImageMagick @6.9.11-60_1+x11
>> Library Dependencies: bzip2, djvulibre, xz, jbigkit, libjpeg-turbo, lcms2, 
>> libpng, libraw, tiff, webp, zlib, fftw-3, freetype, fontconfig, ghostscript, 
>> libiconv, libtool, openjpeg, openexr, expat, libxml2, libheif, pkgconfig, 
>> xorg-libX11, xorg-libXext, xorg-libXt
>> Runtime Dependencies: urw-fonts
> 
> hm, that looks bad ... maybe not have a look after all ... i get the 
> impression that many originally small programs get bloated by pulling in one 
> lib that then pulls in more,

Exactly. The criticism by the GM maintainers probably *is* justified.
(When I installed IM, actually all of the dependecies were already installed 
for other programs.)

> even if nothing of that is used or useful to the task (we sort of had that 
> when luatex used xpdf from which we only need the reading part but we could 
> not really complain about that because it has been so from the start but it 
> triggered quite a bit of updating)

It might make sense for some projects to dive into these libs and pull out and 
combine the parts that they really need. Even if that’s against the meaning of 
shared libraries and makes it harder to watch upstream for security fixes...

> keep in mind that we can just call them as programs using os.execute (or the 
> filter module or ...) ... no need to waste time in integration (apart from a 
> fun aspect)

Of course. I never wanted to suggest integrating GM, IM or whatever.

>> It’s probably not wise to run IM in a web server process for security and 
>> efficiency reasons, but if I run it only on my own computer there shouldn’t 
>> be a problem.
> 
> hm, why not? all it does in the end is "bits in - bits out"

Apparently there were bugs in IM that bite web developers – if you used IM via 
PHP and allowed users to upload arbitrary images (e.g. avatars), they could 
exploit buffer overflows or something like that to hack your system. Or at 
least stall it (DoS attack).

>> BTW, here’s my script:
>> Here are some results:
> 
> Did you try that with the filter module? It would make it more portable

I completely forgot I could do that (and I even know how).

Working on too many building sites at the same time...


Hraban


Re: [NTG-context] Use MetaPost to distort images?

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

On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote:




Am 04.09.2021 um 19:06 schrieb Hans Hagen :

On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote:


I guess it’s on me to write a wiki page about GM.


you can then also add some comparison with im (i.e. what does it offer more 
than gm)


Oh no...

IM and GM have a history, and I don’t want to get involved.

GM accuses IM of security issues, feature and dependency bloat, bad code 
quality, inefficiency, frequent API changes, license changes and whatnot.


ah, i think i remember ... i switched to gm just because im didn't run 
well at that time on windows


personally i think that "accuses of .." show that down side of the open 
source community (which includes the tex community btw) ... it gets even 
worse when something sells itself for big money and then after a few 
years spins off again attacking those who paid them ... i suppose that 
unconstrianed social media also play a role in this (one reason why i'm 
not really interested in discussions around this in public)


like: what is bad code quality ... i bet one can find examples of bad, 
inefficient, etc in gm too (it would be quite a claim to say one can't), 
and the more people touch the code ... also, what about the code quality 
of libs then ... one bug in those could affect lots of programs using 
them ... most is about trust .. and even more in 'working with people 
you like working with'


btw, 'bug' and 'many bugs' and 'big bug' are popular in subject titles 
and mail bodies, even it's small bugs or side effects or something that 
has to be tested but it might make people feel good


'security fix' is another one, which often just means: programming error 
e.g. array out of bounds; nowadays for me the way an email is written 
determines the reading order, but there is no good filter for that yet; 
same for (tech) websites: bluffing and barking agianst a tree (like your 
mentioned 'accuses' makes me go away immediately and discard whatever 
would follow)


(what to think of: https://www.youtube.com/watch?v=BhTQyeEdnzs)


OTOH IM offers much more features (e.g. the geometric transformations I 
inquired about), and you can find lots of interesting examples (including the 
scripts Bruce mentioned). I couldn’t find another CLI tool that can do most of 
these things, at least not with much more programming.


ok, i'll have a look later, maybe it can be compiled lean-and-mean


Dependencies according to MacPorts:

Full Name: GraphicsMagick @1.3.36_1+q8
Library Dependencies: libxml2, bzip2, xz, zlib, libpng, tiff, freetype, 
libiconv, libtool, lcms2, jasper, libjpeg-turbo, webp


makes me wonder if there is some simple image manipulation lib that just 
deals with the pixels .. we don't need xml, freetype, libiconv, ...



Full Name: ImageMagick @6.9.11-60_1+x11
Library Dependencies: bzip2, djvulibre, xz, jbigkit, libjpeg-turbo, lcms2, 
libpng, libraw, tiff, webp, zlib, fftw-3, freetype, fontconfig, ghostscript, 
libiconv, libtool, openjpeg, openexr, expat, libxml2, libheif, pkgconfig, 
xorg-libX11, xorg-libXext, xorg-libXt
Runtime Dependencies: urw-fonts


hm, that looks bad ... maybe not have a look after all ... i get the 
impression that many originally small programs get bloated by pulling in 
one lib that then pulls in more, even if nothing of that is used or 
useful to the task (we sort of had that when luatex used xpdf from which 
we only need the reading part but we could not really complain about 
that because it has been so from the start but it triggered quite a bit 
of updating)


keep in mind that we can just call them as programs using os.execute (or 
the filter module or ...) ... no need to waste time in integration 
(apart from a fun aspect)



It’s probably not wise to run IM in a web server process for security and 
efficiency reasons, but if I run it only on my own computer there shouldn’t be 
a problem.


hm, why not? all it does in the end is "bits in - bits out"



BTW, here’s my script:


#!/bin/bash
#INPUT=$1

OUTPUT=${INPUT/.JPG/.png}
OUTPUT=${OUTPUT/.jpg/.png}
OUTPUT=${OUTPUT/in\//out\/}

# random rotation ±1.5˚
ROTATION=`jot -r 1 -1.5 1.5`
echo $OUTPUT ${ROTATION}˚

# downscale, add a white border and a shadow, rotate, move down, add a piece of 
tape (tesa1.png), grayscale
convert "$INPUT" \
-auto-orient \
-resize 800x800 \
-bordercolor white -border 10 \
\( +clone -background black -shadow 80x3+2+2 \) +swap \
-background transparent \
-layers merge \
-rotate ${ROTATION} \
+repage  \
-gravity north \
-splice 0x10 \
\( tesa1.png -resize 200x50! \) -compose Multiply -composite \
-colorspace Gray \
"$OUTPUT"


Here are some results:
https://sedna.fiee.net/d/2c3218730f8341aab1fa/


Did you try that with the filter module? It would make it more portable

Hans

ps. It is still on my todo list to see of 

Re: [NTG-context] Fuzzy lines

2021-09-03 Thread Henning Hraban Ramm via ntg-context

> Am 13.05.2021 um 20:02 schrieb Henning Hraban Ramm :
> 
> Thank you, that is what I was asking for!
> 
> Unfortunately, the deviation of edge points is too big – try my attached test 
> file.

Hi Aditya et al.,

coming back to this: I found "fill" was not working, since do_sketchfill didn’t 
use sketchrandomized. That was an easy fix.

But I couldn’t fix the edge points issue: the less segments I use, the more 
some of the edge points deviate (see attachment with 10 segments; I used the 
setup from your theorems article).
Lower left and upper right are good, what happens with the others?

I just can’t understand the loop that splits the original path segments:

for t = 0 step 1/sketch_segments until 1-1/sketch_segments :
((point   (t*arclength(p)) on p) 
randomshifted s) .. controls
((postcontrol (t*arclength(p)) on p) 
randomshifted s) and
((precontrol  ((t+1/sketch_segments)*arclength(p)) on p) 
randomshifted s) ..
endfor

Would it make sense to check if a point is an edge point (without curve 
controls)?


Next question: Can I apply this to \framed and TABLE lines? (Probably only via 
backgrounds?)


Hraban




sketchtest2.pdf
Description: Adobe PDF document


mp-sketch.mp
Description: Binary data
___
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] "*.jpg is bugged", previously working

2021-09-01 Thread Henning Hraban Ramm via ntg-context

> Am 01.09.2021 um 23:50 schrieb Hans Hagen via ntg-context 
> :
> 
> On 9/1/2021 7:22 PM, Henning Hraban Ramm via ntg-context wrote:
>> Hi again,
>> was something changed WRT JPEG images?
>> Since a few versions some images that used to work are denied with the error 
>> message "... is bugged".
>> Maybe there *is* something wrong with them, but I don’t see a problem.
>> "file" gives:
>> JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
>> height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
>> width=2368], baseline, precision 8, 607x420, components 3
>> JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, 
>> segment length 16, Exif Standard: [TIFF image data, big-endian, 
>> direntries=9, manufacturer=FLIR Systems AB, model=FLIR ONE Pro, 
>> orientation=upper-left, xresolution=152, yresolution=160, resolutionunit=2, 
>> software=Common_dll v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, 
>> precision 8, 640x480, components 3
>> The latter is one of Harald’s infrared pictures.
>> I can send them off-list, if you like.
> 
> \starttext
>\externalfigure[20200910T115319.JPG][height=4cm]
>\externalfigure[old-paper-1140627-638x420.jpg][height=4cm]
> \stoptext
> 
> both show up ok
> 
> (fwiw: the jpg code didn't really change since the first release of lmtx)

It’s a problem with grph-downsample.lua (or maybe GM), I must research 
further...

\loadluafile[grph-downsample]

\setupexternalfigures[
  conversion=lowres.jpg,
resolution=72,
]

\starttext
  \externalfigure[20200910T115319][height=4cm]
  \externalfigure[old-paper-1140627-638x420][height=4cm]
\stoptext


Hraban



grph-downsample.lua
Description: Binary data
___
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] "*.jpg is bugged", previously working

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

On 9/1/2021 7:22 PM, Henning Hraban Ramm via ntg-context wrote:

Hi again,

was something changed WRT JPEG images?

Since a few versions some images that used to work are denied with the error message 
"... is bugged".

Maybe there *is* something wrong with them, but I don’t see a problem.

"file" gives:

JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
width=2368], baseline, precision 8, 607x420, components 3

JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment 
length 16, Exif Standard: [TIFF image data, big-endian, direntries=9, 
manufacturer=FLIR Systems AB, model=FLIR ONE Pro, orientation=upper-left, 
xresolution=152, yresolution=160, resolutionunit=2, software=Common_dll 
v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, precision 8, 640x480, 
components 3

The latter is one of Harald’s infrared pictures.

I can send them off-list, if you like.


\starttext
\externalfigure[20200910T115319.JPG][height=4cm]
\externalfigure[old-paper-1140627-638x420.jpg][height=4cm]
\stoptext

both show up ok

(fwiw: the jpg code didn't really change since the first release of lmtx)

-
  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] "*.jpg is bugged", previously working

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

On 9/1/2021 7:22 PM, Henning Hraban Ramm via ntg-context wrote:

Hi again,

was something changed WRT JPEG images?

Since a few versions some images that used to work are denied with the error message 
"... is bugged".

Maybe there *is* something wrong with them, but I don’t see a problem.

"file" gives:

JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
width=2368], baseline, precision 8, 607x420, components 3

JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment 
length 16, Exif Standard: [TIFF image data, big-endian, direntries=9, 
manufacturer=FLIR Systems AB, model=FLIR ONE Pro, orientation=upper-left, 
xresolution=152, yresolution=160, resolutionunit=2, software=Common_dll 
v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, precision 8, 640x480, 
components 3

The latter is one of Harald’s infrared pictures.

I can send them off-list, if you like.

well, we cannot dump that image from wet memory so ...

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] "*.jpg is bugged", previously working

2021-09-01 Thread Henning Hraban Ramm via ntg-context
Hi again,

was something changed WRT JPEG images?

Since a few versions some images that used to work are denied with the error 
message "... is bugged".

Maybe there *is* something wrong with them, but I don’t see a problem.

"file" gives:

JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
width=2368], baseline, precision 8, 607x420, components 3

JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment 
length 16, Exif Standard: [TIFF image data, big-endian, direntries=9, 
manufacturer=FLIR Systems AB, model=FLIR ONE Pro, orientation=upper-left, 
xresolution=152, yresolution=160, resolutionunit=2, software=Common_dll 
v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, precision 8, 640x480, 
components 3

The latter is one of Harald’s infrared pictures.

I can send them off-list, if you like.

Hraban
___
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] Gradient fill in embedded pdf disappear in externalfigure (on regular pages)

2021-08-29 Thread Benjamin Buchmuller via ntg-context
Hello list,

I have noticed that some gradients get lost when embedding an external figure 
from a pdf (Preview and Acrobat DC and in printer), although the original pdf 
works fine for me.

It seems to occur with color-to-color gradients (but not all), but not with 
color-to-alpha ones.

While preparing a MWE, I further realized that I get the correct output when 
between \startTEXpage ... \stopTEXpage

\starttext

Embedded via \type{\externalfigure}

PNG

\externalfigure[drawing.png][width=72.631mm,height=21.702mm]

\blank[big]

PDF

\externalfigure[drawing.pdf]

\startTEXpage  % this "works"
Embedded via \type{\externalfigure} in \type{\startTEXpage ... \stopTEXpage}

PNG

\externalfigure[drawing.png][width=72.631mm,height=21.702mm]

\blank[big]

PDF

\externalfigure[drawing.pdf]
\stopTEXpage

\stoptext

Any hints what I would need to change in order to get the gradients also in 
non-TEX-page mode?

I attach the two original files and the output produced with this MWE.

Thanks!


Benjamin



drawing.pdf
Description: Adobe PDF document


test.pdf
Description: Adobe PDF document
___
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] Handling of negative values in the statistical-charts?

2021-08-28 Thread Ramkumar KB via ntg-context
Hi,

I have added an 'advanced' type for line & bar graphs to handle the use
case for -ve y-values / 4th quadrant graphs. It works similar to 'basic'
but works for -ve y-values (i.e. for the 4th quadrant).

PFA the amended lua file (zip file) and sample of line graph.

\def\edudataone{-10,35.55,-20.0,33,31,-25,-32}
\def\yearlabelstwo{2013,2014,2015,2016,
2017}

\linechart[basic][
ylength=5,
xscale=1.6, yscale=0.1,
left=0.5,
distance=1.2,
linecolor=limegreen, linewidth=1.5,
dotscolor=islamicgreen,
dotswidth=8, dotslabels=yes,
axesunits=yes,
xunit=Year,
yunit=Number of graduates
(thousands)][
data={\edudataone},
xlabels={\yearlabelstwo}]

\linechart[advanced][
ylength=5,
xscale=1.6, yscale=0.1,
left=0.5,
distance=1.2,
linecolor=limegreen, linewidth=1.5,
dotscolor=islamicgreen,
dotswidth=8, dotslabels=yes,
axesunits=yes,
xunit=Year,
yunit=Number of graduates
(thousands)][
data={\edudataone},
xlabels={\yearlabelstwo}]

It will be fantastic to get some feedback on this from the original authors
and also next steps to add this across all the relevant charts.

Thank you,

best regards,
Ramkumar

On Sat, Aug 21, 2021 at 3:23 PM Ramkumar KB  wrote:

> Dear List,
>
> I have been exploring the use of the awesome statistical-charts
> <https://akela.mendelu.cz/~thala/statcharts/> module. So first of all, a
> big thanks to the authors of the same.
>
> I seem to have hit a snag when it comes to handling of -ve values. In my
> example (attached tex & pdf), the y-axis labels and the grids do not seem
> to be working on the -ve side (also, able to flip labels above x-axis for
> -ve values). This seems to be the case of column charts and bar charts (and
> I will test this for the other types of charts also).
>
> If this is a more generic issue across all the types, then I can
> contribute towards enhancing it (as any charts module should handle -ve
> values). Any tips or pointers would be really helpful.
>
> Thank you very much.
>
> best regards,
>
>
>


fourth_quadrant.pdf
Description: Adobe PDF document
<>
___
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] Strange new behaviour of the mailing list

2021-08-21 Thread Bruce Horrocks via ntg-context


> On 1 Aug 2021, at 15:16, Bruce Horrocks via ntg-context  
> wrote:
> 
>> 
>> On 31 Jul 2021, at 22:02, Henning Hraban Ramm via ntg-context 
>>  wrote:
>> 
>>> 
>>> Am 31.07.2021 um 21:19 schrieb Bruce Horrocks :
>>> 
>>> On 31 Jul 2021, at 14:56, Henning Hraban Ramm via ntg-context 
>>>  wrote:
>>>> 
>>>> Ah, I didn’t recognize you mean this.
>>>> 
>>>> Since the mail goes through the mailing list software, the sender must not 
>>>> be the original sender any more – ntg.nl is not allowed to send emails for 
>>>> a different domain. Many securely configured mail servers reject “faked” 
>>>> sender addresses, as they should. Look up DANE etc.
>>> 
>>> That's all well and good but it obscures the sender in your mail client. If 
>>> you look at the screen shot you can see that the older emails all display 
>>> the sender's name in the list. Under the new system (just the topmost 
>>> entry, shown selected) every email comes from "ntg-context@ntg.nl" which is 
>>> completely useless when you want to visually scan down the list for a 
>>> particular person.
>> 
>> It doesn’t make sense to argue about this, but it’s apparently a setting (or 
>> unchangeable behavior) of your Email app.
>> 
>> My Apple Mail 12.4 on Mojave shows the same message like attached (dark 
>> mode).
> 
> I'm on Big Sur and I don't get the "name via ntg-context" display for a 
> single message that your screen clip shows, so it looks like there has been a 
> change in behaviour of Apple's mail client as well.

Late reply, but for the benefit of anyone looking through the archive, I traced 
the cause of my problem to an entry in Contacts that had ntg-context@ntg.nl as 
the email address and no other details. Apple Mail decides to use this instead 
of the From: header when displaying the mailing list emails.

—
Bruce Horrocks
Hampshire, UK

___
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] Handling of negative values in the statistical-charts?

2021-08-21 Thread Ramkumar KB via ntg-context
Dear List,

I have been exploring the use of the awesome statistical-charts
<https://akela.mendelu.cz/~thala/statcharts/> module. So first of all, a
big thanks to the authors of the same.

I seem to have hit a snag when it comes to handling of -ve values. In my
example (attached tex & pdf), the y-axis labels and the grids do not seem
to be working on the -ve side (also, able to flip labels above x-axis for
-ve values). This seems to be the case of column charts and bar charts (and
I will test this for the other types of charts also).

If this is a more generic issue across all the types, then I can contribute
towards enhancing it (as any charts module should handle -ve values). Any
tips or pointers would be really helpful.

Thank you very much.

best regards,


columnchart_with_negative.pdf
Description: Adobe PDF document


columnchart_with_negative.tex
Description: Binary data
___
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] lmtx update

2021-08-19 Thread Hans Hagen via ntg-context

On 8/19/2021 10:07 PM, Aditya Mahajan via ntg-context wrote:

On Thu, 19 Aug 2021, Hans Hagen via ntg-context wrote:


Hi,

Here are the highlights of todays update:

- somewhat more compact tuc files, not for all documents, but it can
accumulate; also less memory used then; i could bring down an extreme
2000 page 5 column doc tuc file down to 5% -- it was 70 MB; for the
luametatex manual it reducec the tuc more than 30%; hard to tell if
there will be an associated performance hit, but i'm sure thomas will
complain if that's the case


I never realized that tuc files can grow so big. For big documents, would it 
make sense to simply read and write zipped tuc files?
normally they are not that large but when you enable for instance 
mechanisms that need positioning they can grow large .. zipping makes 
for less bytes but still large files and the overhead for serialization 
stays


(to some extend trying to make these things small is like compression 
but in a different way .. could be a nice topic for a ctx meeting)


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] lmtx update

2021-08-19 Thread Aditya Mahajan via ntg-context
On Thu, 19 Aug 2021, Hans Hagen via ntg-context wrote:

> Hi,
> 
> Here are the highlights of todays update:
> 
> - somewhat more compact tuc files, not for all documents, but it can 
> accumulate; also less memory used then; i could bring down an extreme 
> 2000 page 5 column doc tuc file down to 5% -- it was 70 MB; for the 
> luametatex manual it reducec the tuc more than 30%; hard to tell if 
> there will be an associated performance hit, but i'm sure thomas will 
> complain if that's the case

I never realized that tuc files can grow so big. For big documents, would it 
make sense to simply read and write zipped tuc files?

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] Size of root symbol

2021-08-18 Thread Hans Hagen via ntg-context

On 8/18/2021 6:06 PM, Aditya Mahajan via ntg-context wrote:

On Wed, 18 Aug 2021, Bruce Horrocks via ntg-context wrote:


Is there a simple way to get both root signs in this MWE to be the same size?

\starttext
\startformula
\sqrt[3]{4n} \ne \sqrt[3] {n}
\stopformula
\stoptext


Make the quantities whose roots are being taken to be of the same size.

\starttext

% The simplest solution:
\startformula
\sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n}
\stopformula

% More general
% \strut = \vphantom{(}, which is too big
\startformula
\sqrt[3]{\strut 4n} \ne \sqrt[3] {\strut n}
\stopformula

% We can define our own phantom sizes. You can play around with the numbers.
\define\filler{\vrule width 0pt height 2ex depth 0.3ex \relax}
\startformula
\sqrt[3]{\filler 4n} \ne \sqrt[3] {\filler n}
\stopformula

\stoptext

This is for Aditya to think about

\starttext

\unprotect

\defcsname\??mathradicalalternative Mine\endcsname#1%
  {\csname\??mathradicalalternative\v!normal\endcsname
 {\synchronizestrut{\mathradicalparameter\c!strut}\strut#1}}

% \defcsname\??mathradicalalternative Mine\endcsname#1%
%   {\rootradical
%  {\currentmathradicaldegree}
%  {\synchronizestrut{\mathradicalparameter\c!strut}\strut#1}}

\protect

\definemathradical[MyRoot] [strut=cap,alternative=Mine]
\definemathradical[MyRootX][strut=yes,alternative=Mine]

\startformula
\sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n}
\stopformula

\startformula
\MyRoot[3]{4n} \ne \MyRoot[3] {n}
\stopformula

\startformula
\MyRootX[3]{4n} \ne \MyRootX[3] {n}
\stopformula

\startformula
\sqrt[3]{\strut 4n} \ne \sqrt[3] {\strut n}
\stopformula

\stoptext

we can have strut but also think of enforcing ht / dp

(or we can have minima but that i'd rather add some options to the 
engine - we already have some but i never came to apply them yet)


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] Size of root symbol

2021-08-18 Thread Aditya Mahajan via ntg-context
On Wed, 18 Aug 2021, Bruce Horrocks via ntg-context wrote:

> Is there a simple way to get both root signs in this MWE to be the same size?
> 
> \starttext
> \startformula
> \sqrt[3]{4n} \ne \sqrt[3] {n}
> \stopformula
> \stoptext

Make the quantities whose roots are being taken to be of the same size.

\starttext

% The simplest solution:
\startformula
\sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n}
\stopformula

% More general
% \strut = \vphantom{(}, which is too big
\startformula
\sqrt[3]{\strut 4n} \ne \sqrt[3] {\strut n}
\stopformula

% We can define our own phantom sizes. You can play around with the numbers.
\define\filler{\vrule width 0pt height 2ex depth 0.3ex \relax}
\startformula
\sqrt[3]{\filler 4n} \ne \sqrt[3] {\filler n}
\stopformula

\stoptext

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] How not to display the header of the chapter page on the page with the table of contents ?

2021-08-15 Thread Fabrice Couvreur via ntg-context
Hi Pablo,
The second solution works as I want it to
Thanks
Fabrice

Le dim. 15 août 2021 à 18:33, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> a écrit :

> On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote:
> > A small note : this method works if I compile the project but if I
> > compile only one chapter, the header no longer appears.
>
> Hi Fabrice,
>
> I have never used projects and chapters (or whatever the right name is).
>
> I’m not sure I get what you’re experiencing: with a single chapter, do
> you have the fancy layout or not?
>
> It would make sense that the fancy chapter doesn’t appear only compiling
> a chapter. I guess there is no \startbodymatter...\stopbodymatter
> wrapping it.
>
> Another approach would be:
>
> \setuphead
>[chapter]
>[align=flushright,
> textcommand=\groupedcommand{\blank[medium]}{},
> numbercolor=darkgray,
> textstyle=ChapterTextStyle,
> numberstyle=ChapterNumberStyle,
> before=\startChapterFrame,
> after=\stopChapterFrame,
> header=high]
>
> \setuphead
>   [title]
>   [header=empty,
>align=,
>textcommand=,
>textstyle=,
>style=\tfc,
>before={\blank[2*big]},
>after={\blank[2*big]}]
>
> 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://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] How not to display the header of the chapter page on the page with the table of contents ?

2021-08-15 Thread Pablo Rodriguez via ntg-context
On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote:
> A small note : this method works if I compile the project but if I
> compile only one chapter, the header no longer appears.

Hi Fabrice,

I have never used projects and chapters (or whatever the right name is).

I’m not sure I get what you’re experiencing: with a single chapter, do
you have the fancy layout or not?

It would make sense that the fancy chapter doesn’t appear only compiling
a chapter. I guess there is no \startbodymatter...\stopbodymatter
wrapping it.

Another approach would be:

\setuphead
   [chapter]
   [align=flushright,
textcommand=\groupedcommand{\blank[medium]}{},
numbercolor=darkgray,
textstyle=ChapterTextStyle,
numberstyle=ChapterNumberStyle,
before=\startChapterFrame,
after=\stopChapterFrame,
header=high]

\setuphead
  [title]
  [header=empty,
   align=,
   textcommand=,
   textstyle=,
   style=\tfc,
   before={\blank[2*big]},
   after={\blank[2*big]}]

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


Re: [NTG-context] Strange new behaviour of the mailing list

2021-08-01 Thread Bruce Horrocks via ntg-context

> On 31 Jul 2021, at 22:02, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
>> 
>> Am 31.07.2021 um 21:19 schrieb Bruce Horrocks :
>> 
>> On 31 Jul 2021, at 14:56, Henning Hraban Ramm via ntg-context 
>>  wrote:
>>> 
>>> Ah, I didn’t recognize you mean this.
>>> 
>>> Since the mail goes through the mailing list software, the sender must not 
>>> be the original sender any more – ntg.nl is not allowed to send emails for 
>>> a different domain. Many securely configured mail servers reject “faked” 
>>> sender addresses, as they should. Look up DANE etc.
>> 
>> That's all well and good but it obscures the sender in your mail client. If 
>> you look at the screen shot you can see that the older emails all display 
>> the sender's name in the list. Under the new system (just the topmost entry, 
>> shown selected) every email comes from "ntg-context@ntg.nl" which is 
>> completely useless when you want to visually scan down the list for a 
>> particular person.
> 
> It doesn’t make sense to argue about this, but it’s apparently a setting (or 
> unchangeable behavior) of your Email app.
> 
> My Apple Mail 12.4 on Mojave shows the same message like attached (dark mode).

I'm on Big Sur and I don't get the "name via ntg-context" display for a single 
message that your screen clip shows, so it looks like there has been a change 
in behaviour of Apple's mail client as well.

—
Bruce Horrocks
Hampshire, UK

___
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] Multimedia, PDF and ConTeXt

2021-07-27 Thread Hans Hagen via ntg-context

On 7/27/2021 12:49 AM, Michal Vlasák via ntg-context wrote:


The viewers I tested were: Acrobat Reader DC, Foxit Reader, Sumatra PDF
on Windows and Evince, Okular, Xpdf, MuPDF, Firefox and Google Chrome on
Linux.


also add the new edge on windows .. there are subtle differences in 
interfaces; although it doesn't fit into this topic, printing is also 
somethign to pay attention to; browser based pdf's can crash (mem 
consumption), the sometimes present doubleside directive can also 
confuse viewers


when it comes to checking you need to keep in mind that some readers 
start top-down (collect objects), others bottom up (xref), some use a 
mix, some apply heuristics (irr xpdf did something with t1 fonts that 
made cut/paste an issue), some are tolerant, others more strict, 
treatment of updates objects can differ, but not always consistent ... 
so, that also makes testing annotations a problem


the command line program qpdf is one of the best programs to check (when 
luigi sand i were checking luatex pdf issues we used qpdf and mupdf mostly)



Now to the different mechanisms:

1) Sound objects

  - First appeared in PDF 1.2 (1996), but had since been deprecated (PDF
1.5, 2003) and became unsupported (PDF 2.0, 2017).

  - Only audio is supported.

  - "Raw" and in practice uncompressed PCM audio can be embedded (i.e.
".wav" format without the metadata).
Otherwise an external file may be used (this one has to be in a real
audio format - like ".wav" - i.e. with metadata).

  - Users usually don't have raw audio. So embedding requires
preprocessing. Some control using PDF actions is possible.

  - Not supported in ConTeXt.
  - None of the viewers supports the external files. Only Acrobat Reader
supports the embedded raw audio.


amazing right? all that talk of accessibility and no proper easy audio 
support



2) Movie objects

  - First appeared in PDF 1.2 (1996), but had since been deprecated (PDF
1.5, 2003) and became unsupported (PDF 2.0, 2017).

  - Both video and audio is supported.

  - Any source (embedded, external and URL file).

  - In all regards superior to sound objects. Is still relatively simple
and allows some customization and control (media player controls, PDF
actions).

  - This is the backing mechanism for including video and audio in
ConTeXt (\externalfigure, \useexternalsoundtrack).

  - Supported only in Evince and Okular (with their usual quirks, see
below). Notably Acrobat Reader does no longer support this mechanism.


this all became an issue when they dropped the quicktime plugin 
(probably also relates to the usual big companies competing politics)



3) Multimedia ("Renditions")

  - First appeared in PDF 1.5 (2003). Adobe Acrobat considers them
"legacy".

  - Both video and audio supported (as well as other unspecified types of
multimedia, like images and Flash, but not really, see below).

  - In theory all source types should be possible.

  - This mechanism was supposed to replace sound and movie objects. Hence
their deprecation. The mechanism is complex (the spec is 10 times
longer than that for movie objects). It expects the PDF viewers to
work with plugins and introduces ways for determining if a media file
is really playable in some plugin. It is allowed to even include
more media files (to serve as fallback should the primary one be
unsupported by the viewer). Other complexity is that the concept of
the rectangle where the media will be played ("screen") is separated
from the media itself ("rendition"). In theory this allows mixing and
matching them, but in practice is a lot of unnecessary complexity, at
least in my opinion.


I fully agree. As with many of these annotation pdf things it's probably 
reversed engeneered from some application or plugin, not the result of 
clear design. It also evolves when there is no way to generate it (tex 
is often one of the first to do that and then we run into specs not 
fitting reality). Kind of making equipment that should work on mars and 
test it on earth (if at all).



This mechanism allows multimedia player controls, as well as PDF
actions. The PDF action can be either one of the predefined ones or
entirely specified in JavaScript (extra API is available for this).


brings us to javascript ... it would be interesting to have the 'minimal 
useful' set of support needed; mupdf has javascript but nto realaly for 
annotations (for instance the ability to control layers and widget 
states would be nice ... it's trivial to program in viewers i bet)



  - This is the mechanism behind \useexternalrendering. This has been
used for Flash (.swf files) and "manual" audio + video insertion as
far as I can tell.

  - Evince and Okular support this (with usual quirks), but not for
external files (Evince segfaults). Acrobat and Foxit su

[NTG-context] Solution: LMTX initial (drop cap) in combination with indenting

2021-07-22 Thread Gerben Wierda

> On 21 Jul 2021, at 22:38, Nicola  wrote:
> 
> On 2021-07-21, Gerben Wierda  <mailto:gerben.wie...@rna.nl>> wrote:
>>> On 19 Jul 2021, at 09:56, Nicola  wrote:
>>> 
>>> On 2021-07-18, Gerben Wierda  wrote:
>>>> PS. switching \kap and \bf has an interesting result, the first
>>>> character of the words is not in bold. This did not happen with
>>>> lettrine in mkii
>>> 
>>> I do not have an answer to your question, but I'd like to point out that
>>> you can keep using lettrine with ConTeXt LMTX, if you wish. You just
>>> need to add the modules manually, currently:
>>> 
>>>   https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
>> 
>> I’ve tried this. Installed the modules and then I get with
> 
> I was sure that I had used lettrine with MKIV in a document of mine, but
> after your reply I double checked that and, in fact, I was using
> lettrine only with MKII. On the plus side, I have recovered my settings
> for MKIV (which work with LMTX as well).
> 
> I think that the `distance` parameter of \setupinitials does what you
> want. Besides, if your font provides real small capitals, you may use
> \definefirstline.
> 
> This is how I set up things in one of my documents:
> 
> 
> \definefontfeature[default][default][protrusion=quality,expansion=quality,onum=no,lnum=yes]
> 
> % \definefirstline below requires a font that implements small capitals as
> % a feature (Latin Modern does not). I have used this:
> % \definefontfamily[mainfont][serif][Sorts Mill Goudy] [
> %   tf=name:Sorts Mill Goudy Regular,
> %   it=name:Sorts Mill Goudy Italic,
> % ]
> % If you don't have the font above, try this:
> \setupbodyfont[heros]
> 
> \setupbodyfont[mainfont,11pt]
> 
> \definemeasure[CAindent][12pt]
> \setupindenting[yes,\measure{CAindent}]
> 
> % Every chapter body text starts with a drop cap:
> \defineinitial[normal][
>  n=3,
>  m=1,
>  distance=18pt, % <== Add this 
>  state=start
> ]
> 
> % Special case: drop cap starting with a quote
> \defineinitial[quote][
>  n=3,
>  m=2,
>  distance=13pt,
>  hoffset=5pt, % Move drop cap a bit to the left
>  method=none
> ]
> 
> % Some initials may need special adjustments, depending on the font
> \defineinitial[Q][
>  voffset=2\lineheight,
>  n=3,
>  m=1,
>  distance=18pt,
>  state=start
> ]
> 
> % Full first line in small caps
> \definefirstline[smallcapsfirstline][
>  alternative=line,
>  style=smallcaps,
> ]
> 
> % First n words in small caps (three in this case)
> \definefirstline[smallcapsfirstlinethree][
>  alternative=word,
>  n=3,
>  style=smallcaps,
> ]
> 
> \starttext
> \setfirstline[smallcapsfirstlinethree]
> \setinitial[normal] Suppose we have a system for the approval of
> loans. \input knuth
> \blank[2*big]
> 
> \setfirstline[smallcapsfirstline]
> \setinitial[quote] “Suppose we have a system for the approval of
> loans.” \input knuth
> \blank[2*big]
> 
> \setfirstline[smallcapsfirstline]
> \setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? quam diu
> etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata iactabit
> audacia?
> 
> \stoptext
> 
> 
> I hope this will give you some ideas!
> 
> References:
> 
>https://wiki.contextgarden.net/Command/setupinitial 
> <https://wiki.contextgarden.net/Command/setupinitial>
>https://wiki.contextgarden.net/Command/definefirstline 
> <https://wiki.contextgarden.net/Command/definefirstline>
>https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy 
> <https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy>
> 
> Nicola

Hi Nicola,

Thanks. This solves the indentation of the initial itself. What remains is the 
indentation of the text immediately after, e.g. the 'uppose we’. Minimum 
example (also visible in your example):


% This combination of indenting and initial does not work properly, the text 
following the initial should be unindented
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
% Every chapter body text starts with a drop cap:

\defineinitial[normal][n=3,m=1,hoffset=\measure{CAindent},state=start]

\starttext
\setinitial[normal] S {\bf{\kap uppose we}} have a system for the approval of
loans. \input knuth
\stoptext


The ‘uppose we’ should not be indented more than the lines directly

Re: [NTG-context] Use of lettrine module in LMTX

2021-07-21 Thread Nicola
On 2021-07-21, Gerben Wierda  wrote:
>> On 19 Jul 2021, at 09:56, Nicola  wrote:
>>
>> On 2021-07-18, Gerben Wierda  wrote:
>>> PS. switching \kap and \bf has an interesting result, the first
>>> character of the words is not in bold. This did not happen with
>>> lettrine in mkii
>>
>> I do not have an answer to your question, but I'd like to point out that
>> you can keep using lettrine with ConTeXt LMTX, if you wish. You just
>> need to add the modules manually, currently:
>>
>>https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
>
> I’ve tried this. Installed the modules and then I get with

I was sure that I had used lettrine with MKIV in a document of mine, but
after your reply I double checked that and, in fact, I was using
lettrine only with MKII. On the plus side, I have recovered my settings
for MKIV (which work with LMTX as well).

I think that the `distance` parameter of \setupinitials does what you
want. Besides, if your font provides real small capitals, you may use
\definefirstline.

This is how I set up things in one of my documents:


\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=no,lnum=yes]

% \definefirstline below requires a font that implements small capitals as
% a feature (Latin Modern does not). I have used this:
% \definefontfamily[mainfont][serif][Sorts Mill Goudy] [
%   tf=name:Sorts Mill Goudy Regular,
%   it=name:Sorts Mill Goudy Italic,
% ]
% If you don't have the font above, try this:
\setupbodyfont[heros]

\setupbodyfont[mainfont,11pt]

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]

% Every chapter body text starts with a drop cap:
\defineinitial[normal][
  n=3,
  m=1,
  distance=18pt, % <== Add this 
  state=start
]

% Special case: drop cap starting with a quote
\defineinitial[quote][
  n=3,
  m=2,
  distance=13pt,
  hoffset=5pt, % Move drop cap a bit to the left
  method=none
]

% Some initials may need special adjustments, depending on the font
\defineinitial[Q][
  voffset=2\lineheight,
  n=3,
  m=1,
  distance=18pt,
  state=start
]

% Full first line in small caps
\definefirstline[smallcapsfirstline][
  alternative=line,
  style=smallcaps,
]

% First n words in small caps (three in this case)
\definefirstline[smallcapsfirstlinethree][
  alternative=word,
  n=3,
  style=smallcaps,
]

\starttext
\setfirstline[smallcapsfirstlinethree]
\setinitial[normal] Suppose we have a system for the approval of
loans. \input knuth
\blank[2*big]

\setfirstline[smallcapsfirstline]
\setinitial[quote] “Suppose we have a system for the approval of
loans.” \input knuth
\blank[2*big]

\setfirstline[smallcapsfirstline]
\setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? quam diu
etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata iactabit
audacia?

\stoptext


I hope this will give you some ideas!

References:

https://wiki.contextgarden.net/Command/setupinitial
https://wiki.contextgarden.net/Command/definefirstline
https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy

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


Re: [NTG-context] drop cap (initial) and indentation

2021-07-19 Thread Pablo Rodriguez
On 7/18/21 11:54 PM, Gerben Wierda wrote:
> With the following minimal example:
> [...]
> both the initial and the bold stuff after it is indented. With hoffset I
> can move the initial, but not what comes after. I have been
> experimenting but haven’t found a way to solve this.

Hi Gerben,

this might be what you need:

  % Every chapter body text starts with a drop cap:
  \setupindenting[yes, medium]

  \starttext
  \chapter{Chapter}

  \placeinitial So it was. \input knuth

  \placeinitial So it was. \input knuth

  \noindentation
  \placeinitial So it was. \input knuth
  \stoptext

Sectioning commands never indent next paragraph by default. You have to
type either \setuphead[chapter][indentnext=yes] or
\setupheads[indentnext=yes] to enable it.

If every chapter starts with an initial,
\setuphead[chapter][after={\blank[2*big]\placeinitial}] enables this
automatically (\blank[2*big] is the default command after chapter).

> [...]
> PS. switching \kap and \bf has an interesting result, the first
> character of the words is not in bold. This did not happen with lettrine
> in mkii,

Please, avoid adding questions after a multiline signature (because the
lines might be look like belonging to the signature, and not as a
question to the list).

This might help in LMTX:

  \definefontfeature[allcaps][uppercasing=yes]
  \starttext
  \startTEXpage[offset=1em]
  {\feature[+][allcaps]\bf uppose we}
  \stopTEXpage
  \stoptext

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


Re: [NTG-context] mp-geo Metapost package with ConTeXt

2021-07-18 Thread Henning Hraban Ramm

> Am 17.07.2021 um 20:50 schrieb Hans Hagen :
> 
> On 7/17/2021 2:42 PM, Arthur Rosendahl wrote:
>> On Sat, Jul 17, 2021 at 12:53:33PM +0200, Hans Hagen wrote:
>>> Just as an example, the context meeting is att the attached location:
>>> 
>>>   50°45’7” / 5°35’19”
>>> 
>>> https://www.openstreetmap.org/export#map=18/50.75175/5.58883
>>   If you want official data you can try the Belgian cadastre:
>> https://data.gov.be/en/dataset/tt098dcb-f5c7-49b8-8e0b-7c3811630d85 :-)
> Yet another format? No way. I managed to go big so for instance the area 
> where the colorado user group is located:
> 
>  https://www.openstreetmap.org/export#map=12/40.5117/-104.9496
> 
> produces a 122 MB osm file
> 
>  https://overpass-api.de/api/map?bbox=-105.1817,40.4096,-104.9493,40.6272
> 
> that gets turned into a 15 MB metapost file that becomes an 8.7 MB pdf file. 
> Unfortunately it takes 36 seconds to be produced (9 seconds xml loading, 17 
> seconds map processing, 3 seconds mp -- which is not that bad -- and some 
> 2.56 seconds pdf production) plus some 3 GB memory but that's still under my 
> limit. Maybe a decent modern desktop can do it in half that time, who knows.
> 
> Of course the rather detailed colorfull image is a challenge for the pdf 
> viewer but (sumatra) it manages and one can then zoom in a lot. I tried the 
> whole of slovenia to prove myself to mojca but overran my quota for that api 
> (and I'm not in the mood to install all kind of stuff here).

I downloaded a few countries for you:
https://sedna.fiee.net/d/328d53f6a3e04b23aee2/

Hraban
___
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] mp-geo Metapost package with ConTeXt

2021-07-17 Thread Hans Hagen

On 7/17/2021 2:42 PM, Arthur Rosendahl wrote:

On Sat, Jul 17, 2021 at 12:53:33PM +0200, Hans Hagen wrote:

Just as an example, the context meeting is att the attached location:

   50°45’7” / 5°35’19”

https://www.openstreetmap.org/export#map=18/50.75175/5.58883


   If you want official data you can try the Belgian cadastre:
https://data.gov.be/en/dataset/tt098dcb-f5c7-49b8-8e0b-7c3811630d85 :-)
Yet another format? No way. I managed to go big so for instance the area 
where the colorado user group is located:


  https://www.openstreetmap.org/export#map=12/40.5117/-104.9496

produces a 122 MB osm file

  https://overpass-api.de/api/map?bbox=-105.1817,40.4096,-104.9493,40.6272

that gets turned into a 15 MB metapost file that becomes an 8.7 MB pdf 
file. Unfortunately it takes 36 seconds to be produced (9 seconds xml 
loading, 17 seconds map processing, 3 seconds mp -- which is not that 
bad -- and some 2.56 seconds pdf production) plus some 3 GB memory but 
that's still under my limit. Maybe a decent modern desktop can do it in 
half that time, who knows.


Of course the rather detailed colorfull image is a challenge for the pdf 
viewer but (sumatra) it manages and one can then zoom in a lot. I tried 
the whole of slovenia to prove myself to mojca but overran my quota for 
that api (and I'm not in the mood to install all kind of stuff here).


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] Rolling out a pandoc-context publication workflow in an organization

2021-07-02 Thread Hans Hagen

On 7/2/2021 9:38 AM, Jan U. Hasecke wrote:


Am 02.07.21 um 01:07 schrieb Bruce Horrocks:
One option you might try, if your cooperative has a web-server 
available to editors, is to store your own ConTeXt repository. That 
way you can update the LMTX version when you are ready to.


This works because "install.sh" can have a "--server" parameter 
supplied. By default it goes to lmtx.pragma-ade.com/install-lmtx but 
if you were to copy the install-lmtx directory and host the copy on 
your own server at the same path, then you could 'freeze' your LMTX 
version until you were ready to change.



Thanks for this hint.

This might solve one more problem. We would like to pin the installation 
to a version that is known too work.


BTW: Are there plans to use a GitHub repository or an alternative to it? 
As that would ease pinning a bit.

All uploads end up here too alsk kind of an archive:

official: https://bitbucket.org/phg/context-mirror/src/beta/
experimental : https://github.com/mojca/context2

The official oen can be checked out, the experimental one is a 
playground because for quite a while Mojca and I have some ideas for a 
more extensive install on github which would then involve:


-- core context code (with luametatex in source tree too: 
tex/texmf-context in the distribution


-- the minimal set of resources: tex/texmf in the distribution

-- binaries (which is the more complex part)

-- modules: texmf/modules

So, basically several repositories alongside (totaling to the amoutn we 
now have in the zips). We then have doif-it-yourself-zips, the garden 
installer, the lmtx self updater and install-from-github as 
alternatives. I have a sort of proof of concept for it. We looked into 
the binary bit and things have changed a bit over the years so maybe 
it's more doable now.


One of the complications is always that it depends on helper programs:

- zips are easy as all systems have it (ok, some linux distributions 
don't install unzip but one can easily add it)


- the garden install needs a matching rsync (we need to ship on for 
windows and sometimes a mismatch will require an update on other 
platforms); it reminds me that we have to swap the cygwin bins by mingw 
bins; anyway. one problem is that organizations block the port


- the lmtx installer needs a (luametatex) binary which is no big deal; 
it uses http and there might be organizations that demand https and ssl 
keeps evolving so in the long run it can fail to update older 
installations (it anyway means that we need to also ship e.g. curl or 
libcurl (the later works ok for us); no big deal but more work)


- a github install demands that git is installed; that itself is a big 
piece of software (a small git binary for windows is already 200 MB due 
to all the dependencies while actually we only need a stupid fetch); the 
gh binary is still 25M but might be a solution, apart from the fact that 
we then expect users to have a recent bin ... will a 5 year old 
installation update?); of course users can also decide to completely do 
it themselves (check out etc) but for a local project-specific run one 
doesn't want all those gigs


So, each approach has pros and cons, and we need to prevent lock into 
some specific technology.


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] Heading for endnotes / grouped by chapter endnotes

2021-06-30 Thread Hans Hagen

This is the right test:

\setuphead[part][placehead=yes]

\setupnotations
  [endnote]
  [way=bypart]

\setupnotes
  [endnote]
  [location=list]

\starttext

\part{First Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\part{Second Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\page

\setuplist
  [part]
  [after={\blank[samepage,big]\placelist[endnote]}]

\blank

\placelist
  [part]
  [criterium=all]

\blank

\placelist
  [endnote]
  [criterium=text]

\stoptext


-
  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] Heading for endnotes / grouped by chapter endnotes

2021-06-30 Thread Hans Hagen

On 6/30/2021 4:57 PM, denis.ma...@unibe.ch wrote:


Cool. Thanks. So again something to be wikified.

Two questions related to this relying on the list mechanism:

1. You use this to flush the notes

\setuplist

    [part]

    [after={\blank[samepage,big]\placelist[endnote][criterium=part]}]

\placelist

    [part]

[criterium=all]

Will this interfere with how parts are displayed in the regular table of 
contents?


sure but you can group

\start
  .. flush the list
\stop

although it's not really needed when you do this at the end of the document

2. Does this treat endnotes just like a list entry, with page numbers 
and so?


indeed


And, something seems to e wrong with the numbering of the notes:

The endnote marks in the text are correct.


i need to check that, we actually need a dedicated list handler

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] Heading for endnotes / grouped by chapter endnotes

2021-06-30 Thread denis.maier


> -Ursprüngliche Nachricht-

> Von: Hans Hagen 

> Gesendet: Mittwoch, 30. Juni 2021 11:28

> An: Maier, Denis Christian (UB) ; mailing list for

> ConTeXt users 

> Betreff: Re: AW: [NTG-context] Heading for endnotes / grouped by chapter

> endnotes

>

> On 6/30/2021 10:06 AM, denis.ma...@unibe.ch wrote:

> >> -Ursprüngliche Nachricht-

> >> Von: Hans Hagen 

> >> Gesendet: Dienstag, 29. Juni 2021 16:20

> >> An: mailing list for ConTeXt users ; Maier, Denis

> >> Christian

> >> (UB) 

> >> Betreff: Re: [NTG-context] Heading for endnotes / grouped by chapter

> >> endnotes

> >>

> >> On 6/29/2021 12:53 PM, denis.ma...@unibe.ch wrote:

> >>> Hi,

> >>>

> >>> may I reask the question from below? Would be really great if

> >>> something grouped endnotes were possible...

> >>

> >> i need some lines to the code base for that (everything is actually

> >> already in place to support that)

> >>

> > [...]

> >

> > That looks very promising. Would be great if that missing piece could be

> added!

> it's in the latest



Cool. Thanks. So again something to be wikified.

Two questions related to this relying on the list mechanism:



1. You use this to flush the notes

\setuplist

   [part]

   [after={\blank[samepage,big]\placelist[endnote][criterium=part]}]



\placelist

   [part]

   [criterium=all]

Will this interfere with how parts are displayed in the regular table of 
contents?



2. Does this treat endnotes just like a list entry, with page numbers and so?



And, something seems to e wrong with the numbering of the notes:

[cid:image001.png@01D76DD1.032A3850]



The endnote marks in the text are correct.



Best,

Denis





>

>

> -

>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] Heading for endnotes / grouped by chapter endnotes

2021-06-29 Thread Hans Hagen

On 6/29/2021 12:53 PM, denis.ma...@unibe.ch wrote:

Hi,

may I reask the question from below? Would be really great if something 
grouped endnotes were possible...


i need some lines to the code base for that (everything is actually 
already in place to support that)



\setuphead[part][placehead=yes]

\setupnotes
  [endnote]
  [way=bypart]

\setupnotes
  [endnote]
  [location=list]

\starttext

\part{First Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\part{Second Part}

asdf\endnote{asdf}
jklö\endnote{jklö}

\page

\setuplist
  [part]
  [after={\blank[samepage,big]\placelist[endnote][criterium=part]}]

\placelist
  [part]
  [criterium=all]

% \placelist
%   [endnote]
%   [criterium=text]

\stoptext

You can always ask for alist of notes but in this case there have not 
yet notes been flushed so that's what i need to add.


Hans



Best

Denis

*Von:*ntg-context  *Im Auftrag von 
*denis.ma...@unibe.ch

*Gesendet:* Donnerstag, 24. Juni 2021 13:05
*An:* ntg-context@ntg.nl
*Betreff:* [NTG-context] Heading for endnotes / grouped by chapter endnotes

Hi,

I have two questions regarding endnotes:

1. Is there a way to add a heading automatically to the endnotes placed 
with \placenotes[endnote]?


2. I reset the endnote number at each part. Is there a way to insert the 
title of the corresponding part heading to the endnotes?


I have searched the wiki and the mailing list, and I’ve found two 
relevant questions, but no answers.


https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html 
<https://www.mail-archive.com/ntg-context@ntg.nl/msg68490.html>


https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html 
<https://www.mail-archive.com/ntg-context@ntg.nl/msg34163.html>


Best,

Denis

===

\setuphead[part][placehead=yes]

\setupnotation

   [endnote]

   [way=bypart]

\starttext

\part{First Part}

asdf\endnote{asdf}

jklö\endnote{jklö}

\part{Second Part}

asdf\endnote{asdf}

jklö\endnote{jklö}

\placenotes[endnote]

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




--

-
  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] Soft-hyphen in Antykwa.

2021-06-26 Thread Rik Kabel



On 6/26/2021 18:38, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska Condensed 
(in headings in the margin), I now have no hyphen at a word break, and 
see the following in the log:


fonts   > checking > char ­ (U+000AD) in font
'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  ver: 
2021.06.25 22:49 LMTX).




More information, sorry for the lack of detail in the first post.

1. The problem appears to be associated with tagging. Set the state to 
stop, or remove the line, and the hyphen appears.


2. When HeadFont is libertinus, there is no problem.

Sample document:

\definefontfamily  [HeadFont]
   [rm]
   [Antykwa Torunska Cond]
\setuphead [chapter]
   [style=\HeadFont\tfa]
\setuphead [section]
   [alternative=margintext,
before={\blank[big]\blank},
insidesection={\blank[-line]\setupindenting[next]},
style=\HeadFont\tf]
\setupindenting[yes,
small]
\setuptagging  [state=start]
\setupbodyfont [libertinus,12pt]
\starttext
  \startchapter[title=Testing Antykwa Torunska Condensed breaks]
\input klein
\startsection  [title=Abracadabra]
  \input knuth
\stopsection
  \stopchapter
\stoptext

--
Rik
___
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] injectors not working in LMTX?

2021-06-25 Thread Hans Hagen

On 6/24/2021 6:44 PM, Rik Kabel wrote:

In March, Pablo wrote:

the following sample (from
https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort)
doesn’t get right output with LMTX (current latest from 2021.03.25 14:04):

   \showinjector
   \setinjector[register][3][\column]
   \setinjector[list][2][{\blank[3*big]}]
   \starttext
 \placelist[section][criterium=text]
 \blank[3*big]
 \placeregister[index][criterium=text]
 \page
 \startsection[title=Alpha] first \index{first}
 \startsection[title=Beta] second \index{second}
 \startsection[title=Gamma] third \index{third}
 \startsection[title=Delta] fourth \index{fourth}
   \stoptext

MkIV compiles this source fine, so I think this might be a bug.

Many thanks for your help,

Pablo

In trying to tune a toc, I discovered that this is still an issue.


fixed in next upload

-
  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] injectors not working in LMTX?

2021-06-24 Thread Rik Kabel

In March, Pablo wrote:

   the following sample (from
   https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort)
   doesn’t get right output with LMTX (current latest from 2021.03.25 14:04):

  \showinjector
  \setinjector[register][3][\column]
  \setinjector[list][2][{\blank[3*big]}]
  \starttext
\placelist[section][criterium=text]
\blank[3*big]
\placeregister[index][criterium=text]
\page
\startsection[title=Alpha] first \index{first}
\startsection[title=Beta] second \index{second}
\startsection[title=Gamma] third \index{third}
\startsection[title=Delta] fourth \index{fourth}
  \stoptext

   MkIV compiles this source fine, so I think this might be a bug.

   Many thanks for your help,

   Pablo

In trying to tune a toc, I discovered that this is still an issue.

--
Rik
___
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] dictionary example

2021-06-13 Thread jbf
I worked out a solution - not quite what you are suggesting, but it 
works perfectly, and I can get ahead with the dictionary.


1st, I defined a paragraph based on subsubject. This enabled me to do 
away with the description I was using earlier and greatly simplifies 
each dictionary entry:


\definehead[entry][subsubject]
\setuphead [entry]
   [
 number=no,
 textdistance=3pt,
 alternative=text,
 align=raggedright,
 style=\bf,
 before={\vskip 0.5\lineheight}
  ]

2nd, note the before={\vskip 0.5\lineheight}. A bit of a hack one has to 
admit, but it solves the problem of reducing the gap between each entry.


All good.

Julian

On 13/6/21 5:48 pm, Hans Hagen wrote:

On 6/13/2021 1:52 AM, jbf wrote:
Assuming that the default space before and after a head (e.g. 
subsubject) is something like \blank[2*big], if there is a way I can 
change that default behaviour just for that particular head, then I 
can solve my problem. Is there such a possibility?

\definehead[mysubject][subject]

and then set up mysubject differently

\startmysubject[title={}]  etc

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
___ 


___
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] dictionary example

2021-06-13 Thread Hans Hagen

On 6/13/2021 1:52 AM, jbf wrote:
Assuming that the default space before and after a head (e.g. 
subsubject) is something like \blank[2*big], if there is a way I can 
change that default behaviour just for that particular head, then I can 
solve my problem. Is there such a possibility?

\definehead[mysubject][subject]

and then set up mysubject differently

\startmysubject[title={}]  etc

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] dictionary example

2021-06-12 Thread jbf
Assuming that the default space before and after a head (e.g. 
subsubject) is something like \blank[2*big], if there is a way I can 
change that default behaviour just for that particular head, then I can 
solve my problem. Is there such a possibility?


Julian

On 12/6/21 11:25 pm, Wolfgang Schuster wrote:

jbf schrieb am 12.06.2021 um 12:39:
I am wondering if someone has tried a two-column dictionary layout 
with ConTeXt. What is confounding me at the moment is the gap between 
entries in the columns. My MWE is below. Try as I may, I seem unable 
to get rid of those gaps! I obviously want each entry to follow on 
from the other. I'm obviously not doing things right! If someone has 
already set up a dictionary and has a model they could share I'd be 
grateful. I'm attaching a screenshot of the result from the code below.


The gaps between the entries are the subsubject titles where you omit 
the title. Omitting the title for a heading doesn't mean no space is 
inserted, to change this you can use the 'placehead=hidden' setting 
but I guess your goal is to add a mark entry for each description.


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] upload / some new math stuff

2021-06-11 Thread Fabrice Couvreur
th family slots.
Your font
set is lacking at least the parameter mentioned earlier.
mtx-context | fatal error: return code: 256

Le ven. 11 juin 2021 à 09:55, Mikael Sundqvist  a écrit :

> On Thu, Jun 10, 2021 at 11:35 PM Hans Hagen  wrote:
> >
> > Hi,
> >
> > I played a bit with these newcomputermodern fonts. They are extended
> > versions of latin modern and come in:
> >
> > - 10pt (serif, sane, mono, math)
> > - book (serif, sane, mono, math)
> > -  8pt (partial)
> >
> > I made a typescript for the 10pt regular and book (as I see no reason to
> > configure 8pt).  So, assuming that one installs these fonts:
> >
> > \setupbodyfont[newcomputermodern-book]
> > \setupbodyfont[newcomputermodern]
> >
> > should work ok. The book variant is quite nice. I didn't look into the
> > provided math alternates (context supports that but I didn't define them
> > for this font ... input from math lovers is welcome).
> >
> > Now, this font also implements, as cambria does, upright integrals and
> > as that has comes on my radar every year when I ponder these integrals I
> > decided that it was about tiem to deal with it properly. It is no big
> > deal to implement them gropwing (after all one can see them as left
> > delimiter) but the main issue are these super and subscripts.
> >
> > \setupbodyfont[newcomputermodern-book]
> > % \setupbodyfont[cambria]
> >
> > \starttext
> >
> > \startformula
> >  x = \integral^1_2 \mathinner{\vrule height 10mm depth 10mm width
> 5mm} =
> >  x = \integral^1_2 \mathinner{\vrule height 20mm depth 20mm width
> 5mm} =
> >  x = \integral^1_2 \mathinner{\vrule height 30mm depth 30mm width
> 5mm} =
> >  x = \integral^1_2 \mathinner{x} =
> >  x = \integral^1_2 x
> > \stopformula
> >
> > \startformula
> >  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth
> > 10mm width 5mm} =
> >  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth
> > 20mm width 5mm} =
> >  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 30mm depth
> > 30mm width 5mm} =
> >  x = \int\Umathadaptsize^1_2 \mathinner{x} =
> >  x = \int\Umathadaptsize^1_2 x
> > \stopformula
> >
> > \def\rab{\Umathchar"1"00"007C }
> >
> > $
> >  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth
> > 10mm width 5mm} =
> >  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth
> > 20mm width 5mm} =
> >  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 30mm depth
> > 30mm width 5mm} =
> >  x = \int\Umathadaptsize^1_2 x =
> >  x = \rab\Umathadaptsize^1_2^^1__2 \mathinner{\vrule height 30mm
> > depth 30mm width 5mm}
> > $
> >
> > \stoptext
> >
> > After playing with several solutions (delimiters, fences, radicals etc)
> > I just settled for a few line extension to the engine (there was already
> > plenty in place in luametatex for that anyway) and it seem to work ok.
> >
> > This \Umathadaptsize is a bit like the limits related suffixes (and uses
> > the same scanner logic). It basically flags an operator as something
> > that should grow cf what follows. I can add some fine tuning if needed
> > (can also be dealt with at the macro end, as with other mechanisms, but
> > this is just a first test of useability).
> >
> > (I might also extend another mechanism to deal with it but putting
> > scripts on top or after is already handles pretty well by regular
> > mechanisms, so ...)
> >
> > Of course only a few fonts provide these upright growing integrals
> > (makes me wonder about summation and product).
> >
> > Concerning the newcm fonts: for some reason the book variants (otf
> > files) are about twice as large (in filesize) but what we use (cached)
> > is the same size (only bboxes differ) so there is something fishy in the
> > otf. I can imagine that at some point we add the 10pt/book ones to the
> > standard mkiv distribution and maybe only the subset to the lmtx
> > distribution but for now these book ones are too big for that, but it
> > all depende on them being used.
> >
> > Happy testing (hopefully there are no side effects).
> >
> > Hans
> >
>
> Hi!
>
> The book version looks nice, indeed! (I am one of those who still use
> the MetaFont version of computer modern (in LaTeX), with some
> parameters set so that it becomes less thin. Looks very nice when
> printed. I guess this book version will also look better, and replac

Re: [NTG-context] upload / some new math stuff

2021-06-11 Thread Mikael Sundqvist
On Thu, Jun 10, 2021 at 11:35 PM Hans Hagen  wrote:
>
> Hi,
>
> I played a bit with these newcomputermodern fonts. They are extended
> versions of latin modern and come in:
>
> - 10pt (serif, sane, mono, math)
> - book (serif, sane, mono, math)
> -  8pt (partial)
>
> I made a typescript for the 10pt regular and book (as I see no reason to
> configure 8pt).  So, assuming that one installs these fonts:
>
> \setupbodyfont[newcomputermodern-book]
> \setupbodyfont[newcomputermodern]
>
> should work ok. The book variant is quite nice. I didn't look into the
> provided math alternates (context supports that but I didn't define them
> for this font ... input from math lovers is welcome).
>
> Now, this font also implements, as cambria does, upright integrals and
> as that has comes on my radar every year when I ponder these integrals I
> decided that it was about tiem to deal with it properly. It is no big
> deal to implement them gropwing (after all one can see them as left
> delimiter) but the main issue are these super and subscripts.
>
> \setupbodyfont[newcomputermodern-book]
> % \setupbodyfont[cambria]
>
> \starttext
>
> \startformula
>  x = \integral^1_2 \mathinner{\vrule height 10mm depth 10mm width 5mm} =
>  x = \integral^1_2 \mathinner{\vrule height 20mm depth 20mm width 5mm} =
>  x = \integral^1_2 \mathinner{\vrule height 30mm depth 30mm width 5mm} =
>  x = \integral^1_2 \mathinner{x} =
>  x = \integral^1_2 x
> \stopformula
>
> \startformula
>  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth
> 10mm width 5mm} =
>  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth
> 20mm width 5mm} =
>  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 30mm depth
> 30mm width 5mm} =
>  x = \int\Umathadaptsize^1_2 \mathinner{x} =
>  x = \int\Umathadaptsize^1_2 x
> \stopformula
>
> \def\rab{\Umathchar"1"00"007C }
>
> $
>  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth
> 10mm width 5mm} =
>  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth
> 20mm width 5mm} =
>  x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 30mm depth
> 30mm width 5mm} =
>  x = \int\Umathadaptsize^1_2 x =
>  x = \rab\Umathadaptsize^1_2^^1__2 \mathinner{\vrule height 30mm
> depth 30mm width 5mm}
> $
>
> \stoptext
>
> After playing with several solutions (delimiters, fences, radicals etc)
> I just settled for a few line extension to the engine (there was already
> plenty in place in luametatex for that anyway) and it seem to work ok.
>
> This \Umathadaptsize is a bit like the limits related suffixes (and uses
> the same scanner logic). It basically flags an operator as something
> that should grow cf what follows. I can add some fine tuning if needed
> (can also be dealt with at the macro end, as with other mechanisms, but
> this is just a first test of useability).
>
> (I might also extend another mechanism to deal with it but putting
> scripts on top or after is already handles pretty well by regular
> mechanisms, so ...)
>
> Of course only a few fonts provide these upright growing integrals
> (makes me wonder about summation and product).
>
> Concerning the newcm fonts: for some reason the book variants (otf
> files) are about twice as large (in filesize) but what we use (cached)
> is the same size (only bboxes differ) so there is something fishy in the
> otf. I can imagine that at some point we add the 10pt/book ones to the
> standard mkiv distribution and maybe only the subset to the lmtx
> distribution but for now these book ones are too big for that, but it
> all depende on them being used.
>
> Happy testing (hopefully there are no side effects).
>
> Hans
>

Hi!

The book version looks nice, indeed! (I am one of those who still use
the MetaFont version of computer modern (in LaTeX), with some
parameters set so that it becomes less thin. Looks very nice when
printed. I guess this book version will also look better, and replace
the MetaFont setup!)

Is there an option available to always get upright integrals?

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


[NTG-context] upload / some new math stuff

2021-06-10 Thread Hans Hagen

Hi,

I played a bit with these newcomputermodern fonts. They are extended 
versions of latin modern and come in:


- 10pt (serif, sane, mono, math)
- book (serif, sane, mono, math)
-  8pt (partial)

I made a typescript for the 10pt regular and book (as I see no reason to 
configure 8pt).  So, assuming that one installs these fonts:


\setupbodyfont[newcomputermodern-book]
\setupbodyfont[newcomputermodern]

should work ok. The book variant is quite nice. I didn't look into the 
provided math alternates (context supports that but I didn't define them 
for this font ... input from math lovers is welcome).


Now, this font also implements, as cambria does, upright integrals and 
as that has comes on my radar every year when I ponder these integrals I 
decided that it was about tiem to deal with it properly. It is no big 
deal to implement them gropwing (after all one can see them as left 
delimiter) but the main issue are these super and subscripts.


\setupbodyfont[newcomputermodern-book]
% \setupbodyfont[cambria]

\starttext

\startformula
x = \integral^1_2 \mathinner{\vrule height 10mm depth 10mm width 5mm} =
x = \integral^1_2 \mathinner{\vrule height 20mm depth 20mm width 5mm} =
x = \integral^1_2 \mathinner{\vrule height 30mm depth 30mm width 5mm} =
x = \integral^1_2 \mathinner{x} =
x = \integral^1_2 x
\stopformula

\startformula
x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth 
10mm width 5mm} =
x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth 
20mm width 5mm} =
x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 30mm depth 
30mm width 5mm} =

x = \int\Umathadaptsize^1_2 \mathinner{x} =
x = \int\Umathadaptsize^1_2 x
\stopformula

\def\rab{\Umathchar"1"00"007C }

$
x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth 
10mm width 5mm} =
x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth 
20mm width 5mm} =
x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 30mm depth 
30mm width 5mm} =

x = \int\Umathadaptsize^1_2 x =
x = \rab\Umathadaptsize^1_2^^1__2 \mathinner{\vrule height 30mm 
depth 30mm width 5mm}

$

\stoptext

After playing with several solutions (delimiters, fences, radicals etc) 
I just settled for a few line extension to the engine (there was already 
plenty in place in luametatex for that anyway) and it seem to work ok.


This \Umathadaptsize is a bit like the limits related suffixes (and uses 
the same scanner logic). It basically flags an operator as something 
that should grow cf what follows. I can add some fine tuning if needed 
(can also be dealt with at the macro end, as with other mechanisms, but 
this is just a first test of useability).


(I might also extend another mechanism to deal with it but putting 
scripts on top or after is already handles pretty well by regular 
mechanisms, so ...)


Of course only a few fonts provide these upright growing integrals 
(makes me wonder about summation and product).


Concerning the newcm fonts: for some reason the book variants (otf 
files) are about twice as large (in filesize) but what we use (cached) 
is the same size (only bboxes differ) so there is something fishy in the 
otf. I can imagine that at some point we add the 10pt/book ones to the 
standard mkiv distribution and maybe only the subset to the lmtx 
distribution but for now these book ones are too big for that, but it 
all depende on them being used.


Happy testing (hopefully there are no side effects).

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] Special layouts don't recognise placeinitial

2021-05-24 Thread Eduardo Bohoyo

Thank you, Hans. This tweak works perfectly on a provisional basis.

However, from my relative ignorance of ConTeXt and LMTX, I have a 
question: Why is it better at the moment to include this code in 
cont-new.mkxl instead on the preamble of my document?


I insist, I do not question this detail. I speak from the lack of 
knowledge of a user who wants to learn a little more.


Eduardo Bohoyo

El 23/5/21 a las 13:07, Hans Hagen escribió:

On 5/23/2021 2:41 AM, Eduardo Bohoyo wrote:
My question will be very simple: Is there a trick to make 
\placeinitial command work within makeup pages?


One of my pages inside the /frontmater/ is a quote page within an 
special layout. Before using LMTX, when I could use the Lettrine 
module, that quote started with a capital letter. But now that I use 
\placeinitial, the first letter no longer changes: it remains a 
simple initial capital letter.
On the other hand, when I use \placeinitial for each first paragraph 
in the chapters of my book, the result is as expected. That is, the 
command works fine as long as it stays within the general layout.

This is the code I'm referring to:

\startmakeup[standard][doublesided=yes]

\setuplayout[backspace=176pt,width=194pt]
\setupinterlinespace[line=22pt]
\style[tfa]

\startalignment[hanging,flushleft,nothyphenated]
\placeinitial Ahora, vosotros que amáis, dejadme que os formule una 
pregunta: ¿quién sufre más por  ello,  Arcite  o  Palamón? ¿El  que  
ve  a  su  dama  diariamente,  pero  está  encerrado para  siempre,  
o  el  que  es  libre  de  ir  donde  le plazca, pero  no  verá  
nunca  más  a  su  dama?  Aquellos  de vosotros que  podáis,  elegid  
entre  las  dos  situaciones  a voluntad; yo,  por  mi  parte, 
continuaré como he empezado.

\stopalignment

\startalignment[hanging,flushright,nothyphenated]
\blank[0.8cm,force]{\tfa\sc  Geofrey Chaucer,\hspace[big]}
\blank[0.1cm,force]{\tfa\em The Canterbury Tales \hspace[big]}
\stopalignment

\stopmakeup

You can add this to cont-new.mkxl (assuming lmtx)

\unprotect

\permanent\tolerant\protected\def\flushinitial
  {\typo_initial_handle}

\protect

and then

    \placeinitial  \flushinitial Ahora, ...

will work. More clever automated solutions are likely to interfere and 
have side effects for embedded cases so this is the best I can come up 
with now.


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

2021-05-23 Thread Jairo A. del Rio
Thank you a lot for the explanation! It makes more sense now and
definitively is something very promising to play with. Wrt the module
itself, is it possible to consider language-dependent labels? I noticed
"\sin" is "sin" when it should be "sen" once the module is loaded.

Jairo

El dom, 23 de may. de 2021 a la(s) 09:35, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 5/23/2021 3:45 PM, Jairo A. del Rio wrote:
> > El dom, 23 de may. de 2021 a la(s) 04:51, Hans Hagen (j.ha...@xs4all.nl
> > <mailto:j.ha...@xs4all.nl>) escribió:
> >
> > On 5/22/2021 11:34 PM, Jairo A. del Rio wrote:
> >  > Hi. Is \thewithproperty documented elsewhere? Is this a new
> > primitive?
> >  > It looks interesting.
> > In the case of the \sin trick particular case \let\computer\the would
> > also work; i added the \thewithproperty feature just because
> i
> > expect that users can come up with variants (like \drawme\sin ...)
> > which
> > then would adapt behaviour (via \dowithproperty2).
> >
> >
> > Having flags for computing and drawing would be awesome. I think it
> > would nicely extend ConTeXt's drawing features...
> >
> > So, indeed it's a new primitive but (for now) only used with these
> lua
> > hacks. Actually it's no big deal to reimplement \thewithoutunit
> as
> >
> >
> > So, is this Lua-specific?
>
> it relates to teh way tex sees things ... thihnk of
>
>\dimen0=10pt
>
> where \dimen expects a number, optional equal and value
>
> while
>
>\the\dimen0
>
> the '\the' expects all kind of things, with '\dimen' being one of then
> in which case its value is serialized
>
> in order to implement 'new primitives' using lua (like some that need to
> be implemented for compatibility reasons due to the backend differences)
> we need to be able to distinguish between setting and getting a value
>
> so in that sense it's indeed lua specific: a specific class of lua
> functions knows if it's triggered by serialization
>
> and that is what we 'kind of' abuse here and also why i did add this
> additional 'pseudo prefix' so that we ca ndo more clever things if we
> want to
>
> > \thewithoutunit{\dowithproperty1\the}
> >
> > and then
> >
> > \thewithcmunit{\dowithproperty2\the}
> >
> > to serialize the dimension in cm but normally i need to "wonder for a
> > while if it makes sense".
> >
> > Btw, adding primitives (related to the token related bits and pieces
> of
> > the engine) only makes sense if the gain is in
> >
> > -- avoiding clumsy code: although that can hurt someones pride and
> joy
> > over a nice and complex macro doing the same ... don't worry, i threw
> > away plenty of code by now
> >
> > -- significant performance gain: which is seldom the case (there
> really
> > is not much to gain, at least not in context which is rather
> optimized
> > already)
> >
> > -- giving way less noise in tracing: which for me is a good reason
> > (tracing changed a bit anyway)
> >
> > -- not adding much code to the engine or the need to refactor:
> although
> > for some luametatex extensions some internals had to change
> > fundamentally
> >
> > a good example is the extended macro argument handling: less clumsy
> tex
> > code, a bit of performance gain and easier full expansion, way less
> > tracing, but it violates the last argument because it did lead to
> some
> > refactoring (i also had to make sure the extra overhead didn't slow
> > down
> > macro definitions and expansion)
>
> > I did the following and I have two questions:
> >
> > 1. What if I want to have more than one property? Say \plusone for
> > computation and \plustwo for drawing.
>
> you can do that but keep in mind that \compute is then an 'official'
> context one (bound to 1) and any other number can conflict with other
> context numbers in the future, so best start at 1000 or so for private
> ones
>
> > 2. What does 'usage="value"' mean in the implement function (looks new,
> > but I'm prolly wrong)?
>
> indeed, it is already there for a while and it lets the function
> definition follow a different route ... basically one that can follow
> \the; I suppose that I can also make 'property' a valid usage (alias)
>
> (btw often features like this are described in articles or wrapups inm
> documents in the distribution or even mentioned here but as usu

Re: [NTG-context] mathfun

2021-05-23 Thread Hans Hagen

On 5/23/2021 3:45 PM, Jairo A. del Rio wrote:
El dom, 23 de may. de 2021 a la(s) 04:51, Hans Hagen (j.ha...@xs4all.nl 
<mailto:j.ha...@xs4all.nl>) escribió:


On 5/22/2021 11:34 PM, Jairo A. del Rio wrote:
 > Hi. Is \thewithproperty documented elsewhere? Is this a new
primitive?
 > It looks interesting.
In the case of the \sin trick particular case \let\computer\the would
also work; i added the \thewithproperty feature just because i
expect that users can come up with variants (like \drawme\sin ...)
which
then would adapt behaviour (via \dowithproperty2).


Having flags for computing and drawing would be awesome. I think it 
would nicely extend ConTeXt's drawing features...


So, indeed it's a new primitive but (for now) only used with these lua
hacks. Actually it's no big deal to reimplement \thewithoutunit as


So, is this Lua-specific?


it relates to teh way tex sees things ... thihnk of

  \dimen0=10pt

where \dimen expects a number, optional equal and value

while

  \the\dimen0

the '\the' expects all kind of things, with '\dimen' being one of then 
in which case its value is serialized


in order to implement 'new primitives' using lua (like some that need to 
be implemented for compatibility reasons due to the backend differences) 
we need to be able to distinguish between setting and getting a value


so in that sense it's indeed lua specific: a specific class of lua 
functions knows if it's triggered by serialization


and that is what we 'kind of' abuse here and also why i did add this 
additional 'pseudo prefix' so that we ca ndo more clever things if we 
want to



    \thewithoutunit{\dowithproperty1\the}

and then

    \thewithcmunit{\dowithproperty2\the}

to serialize the dimension in cm but normally i need to "wonder for a
while if it makes sense".

Btw, adding primitives (related to the token related bits and pieces of
the engine) only makes sense if the gain is in

-- avoiding clumsy code: although that can hurt someones pride and joy
over a nice and complex macro doing the same ... don't worry, i threw
away plenty of code by now

-- significant performance gain: which is seldom the case (there really
is not much to gain, at least not in context which is rather optimized
already)

-- giving way less noise in tracing: which for me is a good reason
(tracing changed a bit anyway)

-- not adding much code to the engine or the need to refactor: although
for some luametatex extensions some internals had to change
fundamentally

a good example is the extended macro argument handling: less clumsy tex
code, a bit of performance gain and easier full expansion, way less
tracing, but it violates the last argument because it did lead to some
refactoring (i also had to make sure the extra overhead didn't slow
down
macro definitions and expansion)



I did the following and I have two questions:

1. What if I want to have more than one property? Say \plusone for 
computation and \plustwo for drawing.


you can do that but keep in mind that \compute is then an 'official' 
context one (bound to 1) and any other number can conflict with other 
context numbers in the future, so best start at 1000 or so for private 
ones


2. What does 'usage="value"' mean in the implement function (looks new, 
but I'm prolly wrong)?


indeed, it is already there for a while and it lets the function 
definition follow a different route ... basically one that can follow 
\the; I suppose that I can also make 'property' a valid usage (alias)


(btw often features like this are described in articles or wrapups inm 
documents in the distribution or even mentioned here but as usual with 
tex these things only make sense trigger usage when one really needs it)



\permanent\protected\def\drawme{\thewithproperty\plussix} %better than 666


or 31415 to fit in the tex numbering


\startluacode
local interfaces = interfaces
local implement = interfaces.implement
local context = context
local drawme_code = 6
local drawing = [==[
draw fullcircle scaled 10mm;
draw fullcircle shifted up scaled 5mm;
draw fulltriangle shifted (up+1/2right) scaled 5mm;
]==]


local function chicken(value)
if value == "value" or value == drawme_code then


no need to check for "value" unless you also want:

\the\chicken


context.metafun.start()
context.metafun(drawing);
context.metafun.stop()
--elseif then ...
else
context("Chicken!")
end
end

implement{
name = "chicken",
public = true,
usage = "value", --What does it do?
overload = true,
actions = chicken
}

\stopluacode

\starttext\chicken\ and \drawme\chicken\stoptext
indeed an example of usage, and as with the mathfun, it saves a ton of 
macros like \drawchicken and so


so now you next challenge is to pass arguments so here a next phase

\permanent\protected\def\drawme{\t

Re: [NTG-context] mathfun

2021-05-23 Thread Jairo A. del Rio
El dom, 23 de may. de 2021 a la(s) 04:51, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 5/22/2021 11:34 PM, Jairo A. del Rio wrote:
> > Hi. Is \thewithproperty documented elsewhere? Is this a new primitive?
> > It looks interesting.
> In the case of the \sin trick particular case \let\computer\the would
> also work; i added the \thewithproperty feature just because i
> expect that users can come up with variants (like \drawme\sin ...) which
> then would adapt behaviour (via \dowithproperty2).
>

Having flags for computing and drawing would be awesome. I think it would
nicely extend ConTeXt's drawing features...

So, indeed it's a new primitive but (for now) only used with these lua
> hacks. Actually it's no big deal to reimplement \thewithoutunit as
>

So, is this Lua-specific?

   \thewithoutunit{\dowithproperty1\the}
>
> and then
>
>\thewithcmunit{\dowithproperty2\the}
>
> to serialize the dimension in cm but normally i need to "wonder for a
> while if it makes sense".
>
> Btw, adding primitives (related to the token related bits and pieces of
> the engine) only makes sense if the gain is in
>
> -- avoiding clumsy code: although that can hurt someones pride and joy
> over a nice and complex macro doing the same ... don't worry, i threw
> away plenty of code by now
>
> -- significant performance gain: which is seldom the case (there really
> is not much to gain, at least not in context which is rather optimized
> already)
>
> -- giving way less noise in tracing: which for me is a good reason
> (tracing changed a bit anyway)
>
> -- not adding much code to the engine or the need to refactor: although
> for some luametatex extensions some internals had to change fundamentally
>
> a good example is the extended macro argument handling: less clumsy tex
> code, a bit of performance gain and easier full expansion, way less
> tracing, but it violates the last argument because it did lead to some
> refactoring (i also had to make sure the extra overhead didn't slow down
> macro definitions and expansion)
>
> 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
> -
>

I did the following and I have two questions:

1. What if I want to have more than one property? Say \plusone for
computation and \plustwo for drawing.

2. What does 'usage="value"' mean in the implement function (looks new, but
I'm prolly wrong)?

\permanent\protected\def\drawme{\thewithproperty\plussix} %better than 666

\startluacode

local interfaces = interfaces

local implement = interfaces.implement

local context = context


local drawme_code = 6


local drawing = [==[

draw fullcircle scaled 10mm;

draw fullcircle shifted up scaled 5mm;

draw fulltriangle shifted (up+1/2right) scaled 5mm;

]==]


local function chicken(value)

if value == "value" or value == drawme_code then

context.metafun.start()

context.metafun(drawing);

context.metafun.stop()

--elseif then ...

else

context("Chicken!")

end

end


implement{

name = "chicken",

public = true,

usage = "value", --What does it do?

overload = true,

actions = chicken

}

\stopluacode

\starttext\chicken\ and \drawme\chicken\stoptext

Thank you in advance.

Jairo
___
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] Special layouts don't recognise placeinitial

2021-05-23 Thread Hans Hagen

On 5/23/2021 2:41 AM, Eduardo Bohoyo wrote:
My question will be very simple: Is there a trick to make \placeinitial 
command work within makeup pages?


One of my pages inside the /frontmater/ is a quote page within an 
special layout. Before using LMTX, when I could use the Lettrine module, 
that quote started with a capital letter. But now that I use 
\placeinitial, the first letter no longer changes: it remains a simple 
initial capital letter.
On the other hand, when I use \placeinitial for each first paragraph in 
the chapters of my book, the result is as expected. That is, the command 
works fine as long as it stays within the general layout.

This is the code I'm referring to:

\startmakeup[standard][doublesided=yes]

\setuplayout[backspace=176pt,width=194pt]
\setupinterlinespace[line=22pt]
\style[tfa]

\startalignment[hanging,flushleft,nothyphenated]
\placeinitial Ahora, vosotros que amáis, dejadme que os formule una 
pregunta: ¿quién sufre más por  ello,  Arcite  o  Palamón? ¿El  que  ve  
a  su  dama  diariamente,  pero  está  encerrado para  siempre,  o  el  
que  es  libre  de  ir  donde  le  plazca, pero  no  verá  nunca  más  
a  su  dama?  Aquellos  de  vosotros que  podáis,  elegid  entre  las  
dos  situaciones  a  voluntad; yo,  por  mi  parte, continuaré como he 
empezado.

\stopalignment

\startalignment[hanging,flushright,nothyphenated]
\blank[0.8cm,force]{\tfa\sc  Geofrey Chaucer,\hspace[big]}
\blank[0.1cm,force]{\tfa\em The Canterbury Tales \hspace[big]}
\stopalignment

\stopmakeup

You can add this to cont-new.mkxl (assuming lmtx)

\unprotect

\permanent\tolerant\protected\def\flushinitial
  {\typo_initial_handle}

\protect

and then

\placeinitial  \flushinitial Ahora, ...

will work. More clever automated solutions are likely to interfere and 
have side effects for embedded cases so this is the best I can come up 
with now.


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

2021-05-23 Thread Hans Hagen

On 5/22/2021 11:34 PM, Jairo A. del Rio wrote:
Hi. Is \thewithproperty documented elsewhere? Is this a new primitive? 
It looks interesting.
In the case of the \sin trick particular case \let\computer\the would 
also work; i added the \thewithproperty feature just because i 
expect that users can come up with variants (like \drawme\sin ...) which 
then would adapt behaviour (via \dowithproperty2).


So, indeed it's a new primitive but (for now) only used with these lua 
hacks. Actually it's no big deal to reimplement \thewithoutunit as


  \thewithoutunit{\dowithproperty1\the}

and then

  \thewithcmunit{\dowithproperty2\the}

to serialize the dimension in cm but normally i need to "wonder for a 
while if it makes sense".


Btw, adding primitives (related to the token related bits and pieces of 
the engine) only makes sense if the gain is in


-- avoiding clumsy code: although that can hurt someones pride and joy 
over a nice and complex macro doing the same ... don't worry, i threw 
away plenty of code by now


-- significant performance gain: which is seldom the case (there really 
is not much to gain, at least not in context which is rather optimized 
already)


-- giving way less noise in tracing: which for me is a good reason 
(tracing changed a bit anyway)


-- not adding much code to the engine or the need to refactor: although 
for some luametatex extensions some internals had to change fundamentally


a good example is the extended macro argument handling: less clumsy tex 
code, a bit of performance gain and easier full expansion, way less 
tracing, but it violates the last argument because it did lead to some 
refactoring (i also had to make sure the extra overhead didn't slow down 
macro definitions and expansion)


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] Special layouts don't recognise placeinitial

2021-05-22 Thread Eduardo Bohoyo
My question will be very simple: Is there a trick to make \placeinitial 
command work within makeup pages?


One of my pages inside the /frontmater/ is a quote page within an 
special layout. Before using LMTX, when I could use the Lettrine module, 
that quote started with a capital letter. But now that I use 
\placeinitial, the first letter no longer changes: it remains a simple 
initial capital letter.
On the other hand, when I use \placeinitial for each first paragraph in 
the chapters of my book, the result is as expected. That is, the command 
works fine as long as it stays within the general layout.

This is the code I'm referring to:

\startmakeup[standard][doublesided=yes]

\setuplayout[backspace=176pt,width=194pt]
\setupinterlinespace[line=22pt]
\style[tfa]

\startalignment[hanging,flushleft,nothyphenated]
\placeinitial Ahora, vosotros que amáis, dejadme que os formule una 
pregunta: ¿quién sufre más por  ello,  Arcite  o  Palamón? ¿El  que  ve  
a  su  dama  diariamente,  pero  está  encerrado para  siempre,  o  el  
que  es  libre  de  ir  donde  le  plazca, pero  no  verá  nunca  más  
a  su  dama?  Aquellos  de  vosotros que  podáis,  elegid  entre  las  
dos  situaciones  a  voluntad; yo,  por  mi  parte, continuaré como he 
empezado.

\stopalignment

\startalignment[hanging,flushright,nothyphenated]
\blank[0.8cm,force]{\tfa\sc  Geofrey Chaucer,\hspace[big]}
\blank[0.1cm,force]{\tfa\em The Canterbury Tales \hspace[big]}
\stopalignment

\stopmakeup


Eduardo Bohoyo

___
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] \switchtobodyfont issue

2021-05-22 Thread Pablo Rodriguez
On 5/22/21 1:10 PM, Wolfgang Schuster wrote:
> [...]
> You can't use x and a with \switchtobodyfont, only small and big are
> possible.
>
> \starttext
> a
> \switchtobodyfont[small]
> a
> \switchtobodyfont[big]
> a
> \stoptext
Many thanks for your fast reply, Wolfgang.

This works fine with standard sizes:

  \starttext
  a
  \switchtobodyfont[x]
  a
  \stoptext

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


Re: [NTG-context] \switchtobodyfont issue

2021-05-22 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 22.05.2021 um 12:51:

Dear list,

I have the following sample:

   \setupbodyfont[11.25pt]
   \starttext
   a
   \switchtobodyfont[x]
   a
   \switchtobodyfont[a]
   a
   \stoptext

How can I get both \switchtobodyfont working in both appearances?



You can't use x and a with \switchtobodyfont, only small and big are 
possible.


\starttext
a
\switchtobodyfont[small]
a
\switchtobodyfont[big]
a
\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] Fuzzy lines

2021-05-13 Thread Henning Hraban Ramm


> Am 13.05.2021 um 20:26 schrieb Thomas A. Schmitz :
> 
> On 5/13/21 8:02 PM, Henning Hraban Ramm wrote:
>> Unfortunately, the deviation of edge points is too big – try my attached 
>> test file.
>> Strangely, if I include the MP code in a ConTeXt document,
> 
> I find the discussion interesting. Could you send complete documents, like 
> Aditya did? When I try to compile your files, I get all sorts of errors, so I 
> suspect they are not complete. Would be appreciated if you could send a 
> ConTeXt document. I'm still not quite sure what you're looking for...

Hi Thomas,

for my test files you only also need Aditya’s latest mp-sketch.mp, now attached.

Find also attached my (somewhat simplified) attempt on a cover for a new 
workbook series.
In the original I’m using the commercial "Supernett Cn" font family that also 
looks quite sketchy.

Hraban




mp-sketch.mp
Description: Binary data


sketchtest.mp
Description: Binary data


covertest.tex
Description: Binary data
___
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] Fuzzy lines

2021-05-13 Thread Thomas A. Schmitz

On 5/13/21 8:02 PM, Henning Hraban Ramm wrote:

Unfortunately, the deviation of edge points is too big – try my attached test 
file.

Strangely, if I include the MP code in a ConTeXt document,


I find the discussion interesting. Could you send complete documents, 
like Aditya did? When I try to compile your files, I get all sorts of 
errors, so I suspect they are not complete. Would be appreciated if you 
could send a ConTeXt document. I'm still not quite sure what you're 
looking for...


Thomas

\setupbodyfont[20pt]

\showframe

\startuseMPgraphic{fuzzy}

path p ; p := (0,0) -- (0,OverlayHeight) -- (OverlayWidth,OverlayHeight) --
(OverlayWidth,0) -- cycle ;

pickup pencircle scaled .5pt ;

for i=1 upto 20 :
 draw p enlarged -5pt randomized 15pt withcolor blue ;
endfor ;

\stopuseMPgraphic

\defineoverlay [Fuzzy] [\useMPgraphic{fuzzy}]

\startTEXpage


\framed [height=20cm,width=12cm,frame=on,background=Fuzzy,align={middle,lohi}]
{Test}

\stopTEXpage

test.pdf
Description: Adobe PDF document
___
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] Fuzzy lines

2021-05-13 Thread Henning Hraban Ramm


> Am 13.05.2021 um 19:17 schrieb Aditya Mahajan :
> 
> On Thu, 13 May 2021, Henning Hraban Ramm wrote:
> 
>> 
>>> Am 13.05.2021 um 18:36 schrieb Aditya Mahajan :
>>> 
>>>> Now I want to draw that path several times.
>>>> 
>>>> If I understand it right, I can’t put that into "sketchdraw" because that 
>>>> leaves the end open for path additions like "withcolor".
>>> 
>>> A slightly different approach is needed. See attached. I also added a bit a 
>>> error protection in case someone sets sketch_passes to be negative by 
>>> mistake. 
>> 
>> Thank you so much!
> 
> Here is a different effect ... more of a trembling hand drawing than a 
> sketch. You can play around with sketch_amount to see some variation. 
> 
> In this, rather than using the default randomized path (which randomizes the 
> points of a path), I split the path into 20 segments, and randomize each 
> segment. 

Thank you, that is what I was asking for!

Unfortunately, the deviation of edge points is too big – try my attached test 
file.

Strangely, if I include the MP code in a ConTeXt document, the transparency 
doesn’t work (it multiplies, but at 100%); I must add "withtransparency 
("multiply", 0.2)" to my draw command. I’ll try to come up with a MWE. 
(Transparency of an image also doesn’t work in that document.)

My test file also includes the noise overlay after Jairo’s suggestions. Maybe 
you want to implement that, too?
At the moment it still doesn’t respect the pen size, and the number of patterns 
per path is fixed.

Hraban




sketchtest.mp
Description: Binary data
___
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] What is the ConTeXt way to handle this \vbox trick?

2021-05-09 Thread Hans Hagen

On 5/8/2021 10:05 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,

Consider the following MWE (for a sequential multiple-choice exam), 
using some old and ugly TeX code:


===
\setupbodyfont[schola]
\noheaderandfooterlines
\setupwhitespace[big]

\def\CHOICE#1#2{\leavevmode\vbox{\tabskip=0pt\everycr={}
     \halign{\strut\hfil##\hfil\cr#1\cr#2\cr}}}

\starttext
(Religion * Biology * Cosmology * Physics) is part of the subject matter 
of World Philosophies.


(Religion * Biology * Cosmology * Physics) is part of the subject matter 
of World Philosophies.


(\CHOICE{1}{Religion}\ * \CHOICE{X}{Biology} *
\CHOICE{2}{Cosmology}\ * \CHOICE{X}{Physics}) is part of the subject 
matter of World Philosophies.

\stoptext
===

Result is attached. Question:

What is the most elegant ConTeXt way to get the same result as the above 
code, with equal or better control? Thank you in advance.

you can use some old, probaly never really used,  mechanism ...

\defineruby[auto]  [align=auto,color=darkred]
\defineruby[left]  [align=flushleft,color=darkred]
\defineruby[right] [align=flushright,color=darkred]
\defineruby[spread][stretch=yes]

\setupinterlinespace[22pt]

\starttext

\startbuffer
\dorecurse{20}{\ruby{XYZ}{a|bc|d} }\par
\dorecurse{20}{\ruby{PQR}{p|q|r} }\par
\dorecurse{20}{\ruby{XYZ}{1|22|333} }\par
\dorecurse{20}{\ruby{XYZ}{111|222|333} }\par
\dorecurse{20}{\ruby{XYZ}{foobar} }\par
\dorecurse{20}{\ruby{XYZ}{fooledbar} }\par
\dorecurse{20}{\ruby[spread]{XYZ}{fooledbar} }\par
\dorecurse{20}{\ruby{extremely}{wide} }\par
\dorecurse{20}{\ruby{wide}{extremely} }\par
 stopbuffer

\testfeatureonce{1}{\start \setupinterlinespace[16pt] 
\setupruby[location=none]   \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[16pt] 
\setupruby[location=right]  \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=auto,color=darkred]\getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=flushleft,color=darkgreen] \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=flushright,color=darkblue] \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=middle,color=darkyellow]   \getbuffer \stop \page}


\stoptext

-
  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] What is the ConTeXt way to handle this \vbox trick?

2021-05-08 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Consider the following MWE (for a sequential multiple-choice exam), using  
some old and ugly TeX code:


===
\setupbodyfont[schola]
\noheaderandfooterlines
\setupwhitespace[big]

\def\CHOICE#1#2{\leavevmode\vbox{\tabskip=0pt\everycr={}
\halign{\strut\hfil##\hfil\cr#1\cr#2\cr}}}

\starttext
(Religion * Biology * Cosmology * Physics) is part of the subject matter  
of World Philosophies.


(Religion * Biology * Cosmology * Physics) is part of the subject matter  
of World Philosophies.


(\CHOICE{1}{Religion}\ * \CHOICE{X}{Biology} *
\CHOICE{2}{Cosmology}\ * \CHOICE{X}{Physics}) is part of the subject  
matter of World Philosophies.

\stoptext
===

Result is attached. Question:

What is the most elegant ConTeXt way to get the same result as the above  
code, with equal or better control? Thank you in advance.


Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

choice-mwe.pdf
Description: Adobe PDF document
___
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] Page building and vertical stretching

2021-04-22 Thread denis.maier
Hi,

in addition to my previous mails about \setupalign[height], a further question 
related to page building :
I'm trying to understand how ConTeXt builds pages, and how this can be 
influenced. Regarding the example below, the aim is to have pages that always 
end at the same place.
Now, how will ConTeXt use stretching? Blanks are set to flexible, and the 
interlinespacing is set to stretch. (But different values for blockquotes.)
In which order will ConTeXt proceed? Interlinespacing first, then blanks? Or 
the other way round? Or both at the same time?
And, can this be influenced somehow?

Best,
Denis


\setuppapersize[A5][A5]
\showframe

\setupblank[big,flexible]

\setupinterlinespace[stretch=0.03]
\setuptolerance[vertical,stretch]
\setupalign[height]

\setuphead
[section,subject]
[
before={\blank[2*big,flexible]},
after={\blank[big,flexible]},
]

\setupdelimitedtext[blockquote]
   [
   
before={\tfx\setupinterlinespace[stretch=0.05]},
   
spacebefore={medium,flexible},
   left=
   ]

\starttext

\input knuth

\section{A section heading}

\input knuth\par
\blank
\input knuth\par

\startblockquote
\input knuth\par
\stopblockquote

\input knuth\par

\startblockquote
\input knuth\par
\stopblockquote

\input knuth\par

\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] register for biblical citations

2021-04-16 Thread jbf
Hans, thanks for your ingenious solution but there is still a way to go 
I suspect!


I implemented (copy-paste) precisely the solution offered and I get an 
index but with some strange results ! Notice that in my previous own 
solution (but only as far as 26 books!) I at least got an index in the 
order of the biblical books, but using the luacode you offered, I get a 
seemingly random result (see below).


I extended your example by a few books. so:

\startluacode
sorters.definitions["biblical"] = {
    method  = interfaces.variables.before,
    replacements = {
    { "Gen",  string.char(1) },
    { "Ex",   string.char(2) },
    { "Lev",  string.char(3) },
    { "Deut", string.char(4) },
    { "Lam",  string.char(5) },
    { "Dan",  string.char(6) },
    { "Joel",  string.char(7) },
    { "Ps",  string.char(8) },
    { "Prov",  string.char(9) },
    { "Sir",  string.char(10) },
    { "Mt",  string.char(11) },
    { "Mk",  string.char(12) },

    },
}
\stopluacode

But the result I get (just showing you a dozen or so, and you will see 
that Gen doesn't even turn up in this list ... it does, but much later!):


Mk 2:19-20 with parallels (PES) 146
Mt 3:8-10 (PES) 135
Prov 3:11-12 (PES) 139, 172
Sir 4:17-18 (PES) 139
Mt 5:5 (PES) 146
Mt 5:6 (MAC) 123
Mt 5:16 (MAC) 121
Mt 6:1-6, 16-18 (MAC) 121
Mt 6:1-6, 16-18 (PES) 145
Mt 7:13-14 (PES) 146
Sir 10:9 (PES) 142
Mt 11:12 (PRO) 160
Mt 12:34 (MAC) 124, 137
Mt 12:36 (PES) 134
Mk 12:41-44 (MAC) 122
Sir 17:27 (PES) 142

I have no idea why this is happening. I changed nothing of what you gave 
me and removed anything I had previously. If you need an example of how 
\bibcit is being used in the text, just in case it helps (but I doubt 
it), here is one:


The widow’s mite pleased God because of her good intention, rather than 
the heap of money that the pharisees, urged on by self-love, threw into 
the treasury box (cf.  \bibcit{Mk 12:41-44 (MAC)}Mk 12:41-44).


So, not sure where to go from here. Could I perhaps return to my earlier 
question, which indicated that by using the keyword approach [a] [b] and 
so on, as far as [z] I was at least getting a passable result, but how 
could I continue past [z]? Could I have used [1], [2] etc which would 
allows me to get as far as 66 (if I were to need every biblical book)?


Julian

On 16/4/21 5:24 pm, Hans Hagen wrote:


On 4/15/2021 11:28 AM, jbf wrote:

My simple MWE:

\defineregister[bibcit]
\setupregister[bibcit][%
indicator=no,
before=]

text... \bibcit[a]{Gen 3:6 (MAC) }Gen 3:6

(and so one for each Genesis reference, then moving on to Leviticus 
with [b] etc.)



In other words, I have used the key option [] using the alphabet to 
change the order, with Genesis as [a], Exodus [b], Leviticus [c], and 
so on.


Problem 1: there are 26 letters in the English alphabet. There are 
many more biblical books (OT and NT) than 26, so what do I do when I 
reach z?


Problem 2: the (MAC) would not normally be required in any biblical 
citation, but in my case it is, as well as (PER), (PRO) and several 
other references. In other words, these indicate where, in  a set of 
documents, the particular citations are to be found. But I think they 
may affect the order of citations, so, for example, I get the 
following results for the first four books of the Bible:


Gen 3:6 (MAC)    120
Gen 4:2-8 (MAC) 123
Gen 39:6-20 (MAG)     127
Gen 17:1 (PES)   137
Gen 18:27 (PES) 140
Gen 28:10-12 (PES)    141
Ex 20:12 (MAG)  129
Lev 6:5-6 (PES)   136
Deut 6:5 (PES)    145
Lam 3:27 (MAG)  129

Notice that Gen 39:6-20 is out of order in terms of chapters and 
verses. It should come after Gen 28:10-12 (PES) but I do not know how 
to control that order. It may be that (MAG), which comes after (MAC) 
in alphabetical terms, is controlling the order, rather than chapter 
and verse which I really want to control the order.


I realise this is complicated, but I'm sure ConTeXt is up to it. I've 
got the basics right for getting at least 26 books in some sort of 
order, but after that??

cheat (crossed fingers that you have enough entries) :

\startluacode
sorters.definitions["biblical"] = {
    method  = interfaces.variables.before,
    replacements = {
    { "Gen",  string.char(1) },
    { "Ex",   string.char(2) },
    { "Lev",  string.char(3) },
    { "Deut", string.char(4) },
    { "Lam",  string.char(5) },
    },
}
\stopluacode

\defineregister[bibcit] \setupregister[bibcit][language=biblical,before=]

\starttext

test ... \bibcit{Gen 3:6}
test ... \bibcit{Gen 4:2-8}
test ... \bibcit{Gen 39:6-20}
test ... \bibcit{Gen 17:1}
test ... \bibcit{Gen 18:27}
test ... \bibcit{Gen 28:10-12}
test ... \bibcit{Ex 20:12}
test .

Re: [NTG-context] register for biblical citations

2021-04-16 Thread Hans Hagen

On 4/15/2021 11:28 AM, jbf wrote:

My simple MWE:

\defineregister[bibcit]
\setupregister[bibcit][%
indicator=no,
before=]

text... \bibcit[a]{Gen 3:6 (MAC) }Gen 3:6

(and so one for each Genesis reference, then moving on to Leviticus with 
[b] etc.)



In other words, I have used the key option [] using the alphabet to 
change the order, with Genesis as [a], Exodus [b], Leviticus [c], and so 
on.


Problem 1: there are 26 letters in the English alphabet. There are many 
more biblical books (OT and NT) than 26, so what do I do when I reach z?


Problem 2: the (MAC) would not normally be required in any biblical 
citation, but in my case it is, as well as (PER), (PRO) and several 
other references. In other words, these indicate where, in  a set of 
documents, the particular citations are to be found. But I think they 
may affect the order of citations, so, for example, I get the following 
results for the first four books of the Bible:


Gen 3:6 (MAC)    120
Gen 4:2-8 (MAC) 123
Gen 39:6-20 (MAG)     127
Gen 17:1 (PES)   137
Gen 18:27 (PES) 140
Gen 28:10-12 (PES)    141
Ex 20:12 (MAG)  129
Lev 6:5-6 (PES)   136
Deut 6:5 (PES)    145
Lam 3:27 (MAG)  129

Notice that Gen 39:6-20 is out of order in terms of chapters and verses. 
It should come after Gen 28:10-12 (PES) but I do not know how to control 
that order. It may be that (MAG), which comes after (MAC) in 
alphabetical terms, is controlling the order, rather than chapter and 
verse which I really want to control the order.


I realise this is complicated, but I'm sure ConTeXt is up to it. I've 
got the basics right for getting at least 26 books in some sort of 
order, but after that??

cheat (crossed fingers that you have enough entries) :

\startluacode
sorters.definitions["biblical"] = {
method  = interfaces.variables.before,
replacements = {
{ "Gen",  string.char(1) },
{ "Ex",   string.char(2) },
{ "Lev",  string.char(3) },
{ "Deut", string.char(4) },
{ "Lam",  string.char(5) },
},
}
\stopluacode

\defineregister[bibcit] \setupregister[bibcit][language=biblical,before=]

\starttext

test ... \bibcit{Gen 3:6}
test ... \bibcit{Gen 4:2-8}
test ... \bibcit{Gen 39:6-20}
test ... \bibcit{Gen 17:1}
test ... \bibcit{Gen 18:27}
test ... \bibcit{Gen 28:10-12}
test ... \bibcit{Ex 20:12}
test ... \bibcit{Lev 6:5-6}
test ... \bibcit{Deut 6:5}
test ... \bibcit{Lam 3:27}

\blank[3*big] \placeregister[bibcit]

\stoptext

but is shows that it's not impossible to come up with a solution

-
  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] injectors not working in LMTX?

2021-03-25 Thread Pablo Rodriguez
Hans,

the following sample (from
https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort)
doesn’t get right output with LMTX (current latest from 2021.03.25 14:04):

  \showinjector
  \setinjector[register][3][\column]
  \setinjector[list][2][{\blank[3*big]}]
  \starttext
\placelist[section][criterium=text]
\blank[3*big]
\placeregister[index][criterium=text]
\page
\startsection[title=Alpha] first \index{first}
\startsection[title=Beta] second \index{second}
\startsection[title=Gamma] third \index{third}
\startsection[title=Delta] fourth \index{fourth}
  \stoptext

MkIV compiles this source fine, so I think this 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Summing up ligature prevention tests

2021-03-24 Thread denis.maier
Hi,
Trying to sum up what we currently have regarding ligature prevention, it looks 
like we have three mechanisms available:

1. \replaceword[set][input][output]
Ex.: \replaceword[ligs][Auflage][Au{fl}age]
Replaces a word input with the corresponding output.
Doesn't work at the moment with LMTX.
Can be used for words with multiple wrong ligatures (Auflaufform).
Does not take derived forms into account (e.g., replacements for Auflage and 
Auflagen must both be defined).

2. \blockligatures
Works as a font feature to block certain ligatures
Works also for derived forms of a given word (e.g., \blockligatures[Au:fl:age] 
will also block the fl-ligature in "Auflagen").
Currently, can't be used when multiple ligatures should be suppressed. 
\blockligatures[Au:fl:au:ff:orm] blocks the fl-ligature, but the ff-ligature 
still shows up. This here seems to works though:
\blockligatures [
Au:fl:auf,
au:ff:orm,
]
Don't know if there are unwanted side-effects to that approach.

3. \startexceptions
Works via hyphenation exceptions. To define exceptions for "Auflage" and 
"Auflaufform" use:
\startexceptions[de]
au{f-}{l}{fl}(f\zwnj l)age
Au{f-}{l}{fl}(f\zwnj l)au{f-}{f}{ff}(f\zwnj f)orm
\stopexceptions

This does not work automatically for derived forms; you'll have to define 
plural and other forms as well.
As this works with hyphenation exceptions you'll have to add legal hyphenation 
points as well, so for "Auflage", you will actually need:
\startexceptions[de]
au{f-}{l}{fl}(f\zwnj l)a-ge
\stopexceptions

IMO, the \blockligatures is the cleanest, both conceptually and syntax wise. 
Being able to implicitely disable derived forms is a big plus, but of course 
there may be drawbacks I don't see now. The only downsides I see currently is 
that you need workarounds to block multiple ligatures in a single words, of 
which there might not be too many. And, it's kind of an "all or nothing" 
approach as you cannot define sets of blocked ligatures. (But that may not be a 
relevant use case anyway.)

Anything, I've missed? Other aspects to think about here? How about performance 
issues? (The blockligatures-mechanism resulted in this: with a word list of 
about 2200 words it took a bit more than five seconds to process 23 A5 pages 
than 2.5 seconds without the blocked ligatures. I'll test with the other 
methods later or tomorrow.)

Denis



___
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] Multiple Layouts

2021-03-13 Thread Jeroen
I have the following document, but I want a different
\setuplayout[backspace] for the titlepage and copyright space. What is
the best way to achieve this?





\setupcolors
  [state=start]

\usecolors
  [xwi]

\usetypescriptfile
  [euler]

\definetypeface
  [mainface][rm][serif][pagella][default]

\definetypeface
  [mainface][tt][mono][dejavu][default]

\definetypeface
  [mainface][mm][math][pagellaovereuler][default]

\setupbodyfont
  [mainface,11.5pt]

\setuppapersize
  [A4,
   portrait]

\setuplayout
  [backspace=19mm,
   width=176mm,
   topspace=7mm,
   header=10mm,
   headerdistance=3mm,
   height=middle,
   footerdistance=5mm,
   footer=9mm,
   bottomspace=11mm]

\setuphead
  [chapter]
  [style={\bfb},
   before={\vskip 0mm},
   after={\vskip-\parskip}]

\setuphead
[section]
[style=bold,
   before={\vskip 6mm},
   after={\vskip 2mm}]

\setuppagenumbering
  [alternative=doublesided]

\setupheadertexts
  []

\setupfooter
  [style=\it]

\setupfootertexts
  [{Footer Title} \hfill \pagenumber]

\definemakeup
  [titlepage]
  [align=left]

\definemakeup
  [copyrightpage]

\setupmakeup
  [copyrightpage]
  [align={right,bottom},
   top=\vfill,
   pagestate=stop,
   style=smallbodyfont]

\definealternativestyle
  [authorstyle]
  [\rm\tfb]
  []

\definealternativestyle
  [titlestyle]
  [{\rm\bfd\color[red]}]
  []

\definealternativestyle
  [subtitlestyle]
  [\rm\tfb]
  []

\definealternativestyle
  [publisherstyle]
  [\rm\bfb]
  []


\starttext

\startmakeup[titlepage]
\authorstyle{The Author}
\blank[13*big]
\titlestyle{Title 1}
\blank[5*small]
\titlestyle{Title 2}
\blank[2*big]
\subtitlestyle{Subtitle}
\blank[47*big]
\publisherstyle{Publisher}
\stopmakeup

\startmakeup[copyrightpage]
Title \crlf
Subtitle
\blank
Geprint in Country. \crlf
Document Reference ABC-ABC-001. \crlf
Eerste draft versie, gepubliceerd op \date. \crlf
Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10.
\blank
\startalignment[flushmiddle]
Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf
Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een
geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op
enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of
op enige andere manier zonder voorafgaande schriftelijk bevestigde
toestemming van Publisher.
\stopalignment
\stopmakeup

\startcolumns[2]

\startchapter[title={Bryson and Tufte}]

\dorecurse{5}{
  \startsection[title={Bryson}] \input{bryson} \stopsection
  \startsection[title={Tufte}] \input{tufte} \stopsection}

\stopchapter

\startchapter[title={Zapf and Ward}]

\dorecurse{5}{
  \startsection[title={Zapf}] \input{zapf} \stopsection
  \startsection[title={Ward}] \input{ward} \stopsection}

\stopchapter

\stopcolumns

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


[NTG-context] (no subject)

2021-03-13 Thread Jeroen
I have the following document, but I want a different
\setuplayout[backspace] for the titlepage and copyright space. What is
the best way to achieve this?





\setupcolors
  [state=start]

\usecolors
  [xwi]

\usetypescriptfile
  [euler]

\definetypeface
  [mainface][rm][serif][pagella][default]

\definetypeface
  [mainface][tt][mono][dejavu][default]

\definetypeface
  [mainface][mm][math][pagellaovereuler][default]

\setupbodyfont
  [mainface,11.5pt]

\setuppapersize
  [A4,
   portrait]

\setuplayout
  [backspace=19mm,
   width=176mm,
   topspace=7mm,
   header=10mm,
   headerdistance=3mm,
   height=middle,
   footerdistance=5mm,
   footer=9mm,
   bottomspace=11mm]

\setuphead
  [chapter]
  [style={\bfb},
   before={\vskip 0mm},
   after={\vskip-\parskip}]

\setuphead
[section]
[style=bold,
   before={\vskip 6mm},
   after={\vskip 2mm}]

\setuppagenumbering
  [alternative=doublesided]

\setupheadertexts
  []

\setupfooter
  [style=\it]

\setupfootertexts
  [{Footer Title} \hfill \pagenumber]

\definemakeup
  [titlepage]
  [align=left]

\definemakeup
  [copyrightpage]

\setupmakeup
  [copyrightpage]
  [align={right,bottom},
   top=\vfill,
   pagestate=stop,
   style=smallbodyfont]

\definealternativestyle
  [authorstyle]
  [\rm\tfb]
  []

\definealternativestyle
  [titlestyle]
  [{\rm\bfd\color[red]}]
  []

\definealternativestyle
  [subtitlestyle]
  [\rm\tfb]
  []

\definealternativestyle
  [publisherstyle]
  [\rm\bfb]
  []


\starttext

\startmakeup[titlepage]
\authorstyle{The Author}
\blank[13*big]
\titlestyle{Title 1}
\blank[5*small]
\titlestyle{Title 2}
\blank[2*big]
\subtitlestyle{Subtitle}
\blank[47*big]
\publisherstyle{Publisher}
\stopmakeup

\startmakeup[copyrightpage]
Title \crlf
Subtitle
\blank
Geprint in Country. \crlf
Document Reference ABC-ABC-001. \crlf
Eerste draft versie, gepubliceerd op \date. \crlf
Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10.
\blank
\startalignment[flushmiddle]
Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf
Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een
geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op
enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of
op enige andere manier zonder voorafgaande schriftelijk bevestigde
toestemming van Publisher.
\stopalignment
\stopmakeup

\startcolumns[2]

\startchapter[title={Bryson and Tufte}]

\dorecurse{5}{
  \startsection[title={Bryson}] \input{bryson} \stopsection
  \startsection[title={Tufte}] \input{tufte} \stopsection}

\stopchapter

\startchapter[title={Zapf and Ward}]

\dorecurse{5}{
  \startsection[title={Zapf}] \input{zapf} \stopsection
  \startsection[title={Ward}] \input{ward} \stopsection}

\stopchapter

\stopcolumns

\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] arbitrary context commands in xml file

2021-03-08 Thread denis.maier
Indeed. That's very useful. Thanks!

Von: ntg-context  Im Auftrag von Duncan Hothersall
Gesendet: Montag, 8. März 2021 14:06
An: Hans Hagen 
Cc: mailing list for ConTeXt users 
Betreff: Re: [NTG-context] arbitrary context commands in xml file



On Mon, 8 Mar 2021 at 12:46, Hans Hagen 
mailto:j.ha...@xs4all.nl>> wrote:
> I'd like to second Denis' request for support for XML processing
> instructions to execute ConTeXt code, rather than elements which can
> cause big problems if one is working to a fixed schema. It would be a
> boon to be able to drop in  in an XML source.
one of the things that can already be done ...

\def\xmltexdirective#1#2{\doif{#1}{command}{#2}}

\xmlinstalldirective{tex}{xmltexdirective}

 
 

(the #2 is something without spaces btu one can work around that)

Aha. Useful, thanks!
___
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] arbitrary context commands in xml file

2021-03-08 Thread Duncan Hothersall
On Mon, 8 Mar 2021 at 12:46, Hans Hagen  wrote:

> > I'd like to second Denis' request for support for XML processing
> > instructions to execute ConTeXt code, rather than elements which can
> > cause big problems if one is working to a fixed schema. It would be a
> > boon to be able to drop in  in an XML source.
> one of the things that can already be done ...
>
> \def\xmltexdirective#1#2{\doif{#1}{command}{#2}}
>
> \xmlinstalldirective{tex}{xmltexdirective}
>
>  
>  
>
> (the #2 is something without spaces btu one can work around that)
>

Aha. Useful, thanks!
___
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] arbitrary context commands in xml file

2021-03-08 Thread Hans Hagen

On 3/8/2021 12:48 PM, Duncan Hothersall wrote:



On Mon, 8 Mar 2021 at 10:21, <mailto:denis.ma...@ub.unibe.ch>> wrote:


 > -Ursprüngliche Nachricht-
 > Von: Hans Hagen mailto:j.ha...@xs4all.nl>>
 > Gesendet: Freitag, 5. März 2021 23:17
 > An: mailing list for ConTeXt users mailto:ntg-context@ntg.nl>>; Maier, Denis
 > Christian (UB) mailto:denis.ma...@ub.unibe.ch>>;
 > wolfgang.schuster.li...@gmail.com
<mailto:wolfgang.schuster.li...@gmail.com>
 > Betreff: Re: [NTG-context] arbitrary context commands in xml file


[...]

 > >
 > > Here, I was thinking if something like this could be easier:
 > >
 > > 
 > you can also do this:
 >
 > 
 >
 > \startxmlsetups xml:testpage
 >    \testpage[\xmlatt{#1}{n}]
 > \stopxmlsetup
 >
 > and register that one (as in previous examples)

Thanks,. That's a good idea, but it will also make the XML invalid.

Denis

I'd like to second Denis' request for support for XML processing 
instructions to execute ConTeXt code, rather than elements which can 
cause big problems if one is working to a fixed schema. It would be a 
boon to be able to drop in  in an XML source.

one of the things that can already be done ...

\def\xmltexdirective#1#2{\doif{#1}{command}{#2}}

\xmlinstalldirective{tex}{xmltexdirective}




(the #2 is something without spaces btu one can work around that)


-
  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] arbitrary context commands in xml file

2021-03-08 Thread Duncan Hothersall
On Mon, 8 Mar 2021 at 10:21,  wrote:

> > -Ursprüngliche Nachricht-
> > Von: Hans Hagen 
> > Gesendet: Freitag, 5. März 2021 23:17
> > An: mailing list for ConTeXt users ; Maier, Denis
> > Christian (UB) ;
> > wolfgang.schuster.li...@gmail.com
> > Betreff: Re: [NTG-context] arbitrary context commands in xml file
>
>
> [...]
>
> > >
> > > Here, I was thinking if something like this could be easier:
> > >
> > > 
> > you can also do this:
> >
> > 
> >
> > \startxmlsetups xml:testpage
> >\testpage[\xmlatt{#1}{n}]
> > \stopxmlsetup
> >
> > and register that one (as in previous examples)
>
> Thanks,. That's a good idea, but it will also make the XML invalid.
>
> Denis
>

I'd like to second Denis' request for support for XML processing
instructions to execute ConTeXt code, rather than elements which can cause
big problems if one is working to a fixed schema. It would be a boon to be
able to drop in  in an XML source.

Duncan
___
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 reduce the inter-item space

2021-02-26 Thread Alain Delmotte

  
  
Thanks, that answered all my
requirements.
I suppose that the rule "not mixing
keywords and assignment in the same argument" is valid for all
setups having multiples commands.
Thanks,
Alain

Le 25/02/2021 à 23:46, Wolfgang
  Schuster a écrit :

Alain
  Delmotte schrieb am 25.02.2021 um 22:48:
  
  Hi!


I am trying to reduce the space inter two items in a
\start...\stopitemize.


I did setup in the beginning of the file:


\setupitemize[joinedup,packed,leftmargin=2em]



but I find that the inter-item space is too big for what I want
to create.


Is it possible to reduce that space?

  
  
  
  You can't put keywords and assignments in the same argument of a
  setup command, use separate arguments for each of them and it
  works.
  
  
  \setupitemize [each] [joinedup,packed] [leftmargin=2em]
  
  
  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] How to reduce the inter-item space

2021-02-26 Thread Alain Delmotte

  
  
This is ok.
There is still space before the items'
block. This could be handy.
Thanks,
Alain

Le 25/02/2021 à 23:17, jbf a écrit :


  
  Or maybe 
  
  inbetween={\blank[small]}
  Julian
  
  
  On 26/2/21 8:48 am, Alain Delmotte
wrote:
  
  

Hi!
I am trying to reduce the space
inter two items in a \start...\stopitemize.
I did setup in the beginning of
the file:
\setupitemize[joinedup,packed,leftmargin=2em]

  but I find that the inter-item space is too big for what I
  want to create.
Is it possible to reduce
  that space?


Thanks,


--
Alain




___
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] How to reduce the inter-item space

2021-02-26 Thread Alain Delmotte

  
  
This partly helps, because it suppress
the space before the items (first level) and the lines are at
the margin and there is still space between a first and a second
level itemize.
Thanks,
Alain

Le 25/02/2021 à 23:07, jbf a écrit :


  
  Check https://wiki.contextgarden.net/Enumerations
Would \setupitemize[nowhite] help?
  Julian
  On 26/2/21 8:48 am, Alain Delmotte
wrote:
  
  

Hi!
I am trying to reduce the space
inter two items in a \start...\stopitemize.
I did setup in the beginning of
the file:
\setupitemize[joinedup,packed,leftmargin=2em]

  but I find that the inter-item space is too big for what I
  want to create.
Is it possible to reduce
  that space?


Thanks,


--
Alain




___
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] How to reduce the inter-item space

2021-02-25 Thread Wolfgang Schuster

Alain Delmotte schrieb am 25.02.2021 um 22:48:

Hi!

I am trying to reduce the space inter two items in a \start...\stopitemize.

I did setup in the beginning of the file:

\setupitemize[joinedup,packed,leftmargin=2em]


but I find that the inter-item space is too big for what I want to create.

Is it possible to reduce that space?



You can't put keywords and assignments in the same argument of a setup 
command, use separate arguments for each of them and it works.


\setupitemize [each] [joinedup,packed] [leftmargin=2em]

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] How to reduce the inter-item space

2021-02-25 Thread jbf
Check https://wiki.contextgarden.net/Enumerations 
<https://wiki.contextgarden.net/Enumerations> Would 
\setupitemize[nowhite] help?


|Julian|
On 26/2/21 8:48 am, Alain Delmotte wrote:


Hi!

I am trying to reduce the space inter two items in a 
\start...\stopitemize.


I did setup in the beginning of the file:

\setupitemize[joinedup,packed,leftmargin=2em]


but I find that the inter-item space is too big for what I want to create.

Is it possible to reduce that space?


Thanks,


--

Alain



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


[NTG-context] How to reduce the inter-item space

2021-02-25 Thread Alain Delmotte

  
  
Hi!
I am trying to reduce the space inter
two items in a \start...\stopitemize.
I did setup in the beginning of the
file:
\setupitemize[joinedup,packed,leftmargin=2em]

  but I find that the inter-item space is too big for what I want to
  create.
Is it possible to reduce
  that space?


Thanks,


--
Alain


  

___
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] Help figuring why long document stops short in xml export

2021-02-24 Thread Christoph Hintermüller
Hi

On Wed, 2021-02-24 at 11:24 +0100, Hans Hagen wrote:
> On 2/24/2021 10:42 AM, Christoph Hintermüller wrote:
> 
> > I'm sorry to be so clue less to not be able to provide more
> > information. The document it self is too big to be posted and i do
> > not
> > want to make it public anyway, but if required i can provide a
> > share
> > link.
> 
> You can try to comment some code to see where it fails/succeeds: make
> a 
> copy and start wiping stuff. Normally that quickly reveals where it
> goes 
> wrong.
> 



I hoped so too. But the only i figured that it stops between two
sections. If i comment the whole set of sections which seem to contain
offending content. Than it simply stops at some later section. And if i
remove the set before the one seemingly offending it still stops at the
section it stopped in the first instant. If there happens to be some
pattern i'm not experienced enough to notice it.



> Indeed some real data is needed to see where it fails.
> 


May i later send a sharing link to the full sources from our university
systems, may be you immediately see what makes it hickup.

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Hans Hagen

On 2/24/2021 10:42 AM, Christoph Hintermüller wrote:


I'm sorry to be so clue less to not be able to provide more
information. The document it self is too big to be posted and i do not
want to make it public anyway, but if required i can provide a share
link.
You can try to comment some code to see where it fails/succeeds: make a 
copy and start wiping stuff. Normally that quickly reveals where it goes 
wrong.


Indeed some real data is needed to see where it fails.

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] Help figuring why long document stops short in xml export

2021-02-24 Thread Christoph Hintermüller
Hi
What command line parameters, trackers etc I should activate when i
want to figure why my document lacks content worth of several pages in
xml export while the pdf which is created in parallel contains all
pages. 

I'm using 

mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: /tex/texmf-
context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.02.14 16:39
mtx-context | main context file: /tex/texmf-
context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.02.14 16:39


Would switching to lmtx may be helpful in at least figuring why or be
the only known solution?

The Document it self is my lecture notes which are about 125 Pages
long. The xml export ends at Page 63. 

Are there any known commands which can cause exporter to give up early
and thus should in export be avoided or be put in mode dependent block
hiding them form exporter.

Any hint what i should, would have to check and how to hopefully grabe
any hint where to amend the document to get full output. 

Currently i have not made images mode dependent (pdf:metapost,
xml:png/svg). Could that be a reason why exporter finally ends document
early?

I'm sorry to be so clue less to not be able to provide more
information. The document it self is too big to be posted and i do not
want to make it public anyway, but if required i can provide a share
link.

Best
Christoph Hintermüller
 

___
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] \blackrule and margin

2021-02-19 Thread Hans Hagen

On 2/19/2021 4:02 PM, Ursula Hermann wrote:

Dear List,
i have the little following example:

\setuppapersize[A8,landscape]
\setuplayout[leftmargin=2.5cm,
              leftmargindistance=0.2cm,
              backspace=2.9cm,
              width=4cm]
\showframe
\starttext
\blackrule
\margintext{Me}
\blackrule[color=black, height=0.5ex, width=1cm]
\stoptext
\startformula
a^n + b^n = c^n.
\stopformula
\stoptext
What i want is a\blackrule over the margintext, but i do not get what I 
wantend.

\definemargindata  [MyInMargin][inleft]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=fit]

\starttext
\inmargin[][topframe=on,bottomframe=on,rulethickness=1pt,width=fit]{Me}
\startformula
a^n + b^n = c^n.
\stopformula
\blank[3*big]
\MyInMargin{You}
\startformula
a^n + b^n = c^n.
\stopformula
\stoptext


-
  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] meeting, journal etc. (was: midi)

2021-02-04 Thread Henning Hraban Ramm

> Am 04.02.2021 um 04:25 schrieb Fabrice L :
>>> Thanks ! Yes, I can do and article with pleasure. Just give me more 
>>> indications about the level (perhaps some examples) and length of the paper.
>> 
>> Well, the range of level and length of articles in our (ConTeXt group’s) 
>> journal is quite big.
> 
> OK. Maybe I could start with an article explaining the approach to do the 
> video, highlighting problems and solutions, and then we can discuss on this ?

That would be great. Just send it to my personal address hra...@fiee.net

>>> I would be delighted and honoured to present at a ConTeXt meeting, but they 
>>> are usually in Europe and I’m in Canada, so this could be really 
>>> challenging. 
>> 
>> I understand. This fall we’ll meet in Belgium again, and in 2022 in Germany.
>> Maybe we could include you remotely? Last time we had “online” talks by Taco 
>> – personally is better.
> 
> Why not ? ;-)

We had long discussions about online participation in the meeting. The regulars 
like the “intimate” atmosphere, and that doesn’t work online. We don’t want to 
stream anything publicly, but at least allow “known” members of the community 
to participate remotely.
We’ll further discuss this within the CG board, I guess.

Hraban
___
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] midi

2021-02-03 Thread Fabrice L


> Le 3 févr. 2021 à 16:29, Henning Hraban Ramm  a écrit :
> 
> 
>> Am 03.02.2021 um 22:14 schrieb Fabrice L :
>>>> 
>>>> https://youtu.be/3x03g-eHFC8
>>> 
>>> Great! Would you please write an article about that for our journal? Or 
>>> first present it at the ConTeXt meeting?
>> 
>> Thanks ! Yes, I can do and article with pleasure. Just give me more 
>> indications about the level (perhaps some examples) and length of the paper.
> 
> Well, the range of level and length of articles in our (ConTeXt group’s) 
> journal is quite big.
> 
> Many of the documentation files in the distribution started as meeting talks 
> and journal/proceedings articles.

OK. Maybe I could start with an article explaining the approach to do the 
video, highlighting problems and solutions, and then we can discuss on this ?

> 
>> I would be delighted and honoured to present at a ConTeXt meeting, but they 
>> are usually in Europe and I’m in Canada, so this could be really 
>> challenging. 
> 
> I understand. This fall we’ll meet in Belgium again, and in 2022 in Germany.
> (I couldn’t afford joining a meeting overseas myself.)
> Maybe we could include you remotely? Last time we had “online” talks by Taco 
> – personally is better.

Why not ? ;-)
> 
> Hraban

Thanks for all these propositions. 
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
> ___

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

2021-02-03 Thread Henning Hraban Ramm

> Am 03.02.2021 um 22:14 schrieb Fabrice L :
>>> 
>>> https://youtu.be/3x03g-eHFC8
>> 
>> Great! Would you please write an article about that for our journal? Or 
>> first present it at the ConTeXt meeting?
> 
> Thanks ! Yes, I can do and article with pleasure. Just give me more 
> indications about the level (perhaps some examples) and length of the paper.

Well, the range of level and length of articles in our (ConTeXt group’s) 
journal is quite big.

Many of the documentation files in the distribution started as meeting talks 
and journal/proceedings articles.

> I would be delighted and honoured to present at a ConTeXt meeting, but they 
> are usually in Europe and I’m in Canada, so this could be really challenging. 

I understand. This fall we’ll meet in Belgium again, and in 2022 in Germany.
(I couldn’t afford joining a meeting overseas myself.)
Maybe we could include you remotely? Last time we had “online” talks by Taco – 
personally is better.

Hraban
___
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] \doassign variable - updates not picked up

2021-01-22 Thread Wolfgang Schuster

Werner Hennrich schrieb am 22.01.2021 um 09:48:

Hello everyone,

I'm using ConTeXt  (ver: 2020.09.20 23:02 LMTX) and have to have 
conditional page headers based on specific content criteria. To achive 
this I'd like to get some global variables in TeX, change their values 
several times throughout the document and have my macro for the header 
read them and act accordingly (like skip the header at all, change a 
color, etc).


As a basis for this I established the following pattern in an iolated 
test case:


\def\setHeaderVar[#1]{
\doassign[header][myvar=#1]
\message{setHEADER: '#1'}
}
\def\getHeaderVar{\headermyvar}
\setupheadertexts[\setups{page:header}]
\startsetups page:header
HEADER: myvar=\getHeaderVar
\stopsetups
\starttext
\setHeaderVar[initval]
page: 1
\page
\setHeaderVar[a]
page: 2
\page
\setHeaderVar[b]
page: 3
\page
\setHeaderVar[]
page: 4
\page
\setHeaderVar[]
page: 5
\stoptext

This works as expected and the header-macro prints the updated value. 
But when I put the same pattern in my big environment-file, I can see 
the variable being updated with different values (console), but the 
header always puts out just the variable's initial value - so the 
variable is read but it's updates aren't picked up by the header macro. 
Peeking into console, log & tuc didn't raise any idea yet as to what is 
going wrong...


Any idea what is happening and how I can fix this?


I guess you set the value in a local group and at the end of the group
your setting is forgotten, a simple change you can make is to replace
\doassign with \getgparameters which makes global settings.


A alternative to your current approach is to use the variables mechanism
to set and access values (you still have to ensure all values you set
are global).

\setupheadertexts[\getvariable{header}{text}]

\starttext

\setgvariables[header][text=First page]
Page 1

\page

\setgvariables[header][text=Last page]
Page 2

\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] Missing images in Wiki?

2021-01-22 Thread Andres Conrado Montoya Acosta
; As a basis for this I established the following pattern in an iolated
> test case:
>
> \def\setHeaderVar[#1]{
> \doassign[header][myvar=#1]
> \message{setHEADER: '#1'}
> }
> \def\getHeaderVar{\headermyvar}
> \setupheadertexts[\setups{page:header}]
> \startsetups page:header
> HEADER: myvar=\getHeaderVar
> \stopsetups
> \starttext
> \setHeaderVar[initval]
> page: 1
> \page
> \setHeaderVar[a]
> page: 2
> \page
> \setHeaderVar[b]
> page: 3
> \page
> \setHeaderVar[]
> page: 4
> \page
> \setHeaderVar[]
> page: 5
> \stoptext
>
> This works as expected and the header-macro prints the updated value.
> But when I put the same pattern in my big environment-file, I can see
> the variable being updated with different values (console), but the
> header always puts out just the variable's initial value - so the
> variable is read but it's updates aren't picked up by the header macro.
> Peeking into console, log & tuc didn't raise any idea yet as to what is
> going wrong...
>
> Any idea what is happening and how I can fix this?
>
> Any hints on how I can track this down?
>
> Thanks a lot,
> Werner Hennrich, Vienna AT
>
>
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210122/b5413c6c/attachment-0001.htm
> >
>
> --
>
> Subject: Digest Footer
>
>
> ___
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
>
> --
>
> End of ntg-context Digest, Vol 199, Issue 53
> 
>


-- 
Andrés Conrado Montoya
http://chiquitico.org
___
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] \doassign variable - updates not picked up

2021-01-22 Thread Werner Hennrich

Hello everyone,

I'm using ConTeXt  (ver: 2020.09.20 23:02 LMTX) and have to have
conditional page headers based on specific content criteria. To achive
this I'd like to get some global variables in TeX, change their values
several times throughout the document and have my macro for the header
read them and act accordingly (like skip the header at all, change a
color, etc).

As a basis for this I established the following pattern in an iolated
test case:

   \def\setHeaderVar[#1]{
   \doassign[header][myvar=#1]
   \message{setHEADER: '#1'}
   }
   \def\getHeaderVar{\headermyvar}
   \setupheadertexts[\setups{page:header}]
   \startsetups page:header
   HEADER: myvar=\getHeaderVar
   \stopsetups
   \starttext
   \setHeaderVar[initval]
   page: 1
   \page
   \setHeaderVar[a]
   page: 2
   \page
   \setHeaderVar[b]
   page: 3
   \page
   \setHeaderVar[]
   page: 4
   \page
   \setHeaderVar[]
   page: 5
   \stoptext

This works as expected and the header-macro prints the updated value.
But when I put the same pattern in my big environment-file, I can see
the variable being updated with different values (console), but the
header always puts out just the variable's initial value - so the
variable is read but it's updates aren't picked up by the header macro.
Peeking into console, log & tuc didn't raise any idea yet as to what is
going wrong...

Any idea what is happening and how I can fix this?

Any hints on how I can track this down?

Thanks a lot,
Werner Hennrich, Vienna AT


___
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] SILE typesetter and other projects

2021-01-03 Thread Hans Hagen

On 1/3/2021 6:26 PM, Jairo A. del Rio wrote:
Probably the false equivalence TeX = LaTeX which is common to see in 
many forums and sites on the web: TeX is said not to be able to do X 
just because LaTeX can't. It's upsetting. groff looks interesting, tho.
FWIW: I never looked into all these system (althouygh i remember reading 
about some postscript related thing decades ago). Just keep in mind that 
'the problem doesn't change' no matter what tools are there .. it's no 
big deal to deal with the 80% but the left over bits often are the 
complication. All this typeseting is very much about perception and 
often playing around and then the question is: what system suits that best.


So there's the issue of interfacing ... I always found the curious tex 
mix interesting (read: if I had to do typesetting and defining styles in 
lua or c of java or html.css ... any such programming language ... i'd 
looked for another hobby long ago). Of course is some project comes 
around that need those approaches and that can pay the bills, I'd pay 
attention to it but till then ... so my main objective is to modernize 
this 'good old workhorse tex' because it kind of had/has set the 
standard. And it's kind of fun.


(It's also why discussions about context versus latex or plain are 
wasted on me: I simply never run into the other systems and/or demands 
related to them, so instead of keeping track I spent non-tex time on 
reading and listening music instead -)


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] xrightarrow specific size issue

2021-01-02 Thread Johann Birnick
On Sat, 2021-01-02 at 17:08 +0100, Wolfgang Schuster wrote:
> Johann Birnick schrieb am 02.01.2021 um 17:04:
> > On Sat, 2021-01-02 at 14:30 +, Bruce Horrocks wrote:
> > > I'm not sure which manual you are looking in to find a reference to the
> > > ability to add a specific dimension.
> > > 
> > > In the source I can only find named sizes of 'none', 'normal', 'small',
> > > 'medium' and 'big'. You can 'kludge' these by extending the length of the
> > > text
> > > using hard spaces. Alternatively there is \rightarrowfill which you might
> > > be
> > > able to put into a frame of the desired width?
> > > 
> > > \starttext
> > > $1\xrightarrow[none]{blah} 1$
> > > \par
> > > $2\xrightarrow[normal]{blah} 2$
> > > \par
> > > $3\xrightarrow[small]{blah} 3$
> > > \par
> > > $4\xrightarrow[medium]{blah} 4$
> > > \par
> > > $5\xrightarrow{~~~blah~~~} 5$
> > > \par
> > > $6\xrightarrow[big]{blah} 6$
> > > \par
> > > $7\rightarrowfill 7$
> > > \par
> > > \stoptext
> > > 
> > > --
> > > Bruce Horrocks
> > > Hampshire, UK
> > In particular the documentation
> > https://dl.contextgarden.net/myway/matharrows.pdf shows exactly the example
> > 
> > \xrightarrow[50]
> > 
> > and the says the options are:
> > 
> > none small medium big normal DIMENSION
> > 
> > I'm sure I've seen the same options (i.e. including DIMENSION) in other
> > documentations aswell, but I can't find them now.
> > 
> > I assume this was removed with LMTX... is it possible to introduce it again?
> 
> No, the change already happened in MkIV when Hans rewrote the arrows code.
> 
> Wolfgang

And it's not planned to make specific sizes possible?

Johann

___
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] xrightarrow specific size issue

2021-01-02 Thread Wolfgang Schuster

Johann Birnick schrieb am 02.01.2021 um 17:04:

On Sat, 2021-01-02 at 14:30 +, Bruce Horrocks wrote:

I'm not sure which manual you are looking in to find a reference to the
ability to add a specific dimension.

In the source I can only find named sizes of 'none', 'normal', 'small',
'medium' and 'big'. You can 'kludge' these by extending the length of the text
using hard spaces. Alternatively there is \rightarrowfill which you might be
able to put into a frame of the desired width?

\starttext
$1\xrightarrow[none]{blah} 1$
\par
$2\xrightarrow[normal]{blah} 2$
\par
$3\xrightarrow[small]{blah} 3$
\par
$4\xrightarrow[medium]{blah} 4$
\par
$5\xrightarrow{~~~blah~~~} 5$
\par
$6\xrightarrow[big]{blah} 6$
\par
$7\rightarrowfill 7$
\par
\stoptext

--
Bruce Horrocks
Hampshire, UK

In particular the documentation
https://dl.contextgarden.net/myway/matharrows.pdf shows exactly the example

\xrightarrow[50]

and the says the options are:

none small medium big normal DIMENSION

I'm sure I've seen the same options (i.e. including DIMENSION) in other
documentations aswell, but I can't find them now.

I assume this was removed with LMTX... is it possible to introduce it again?


No, the change already happened in MkIV when Hans rewrote the arrows code.

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
___


<    1   2   3   4   5   6   7   8   9   10   >