Re: [NTG-context] lua-widow-control module error in LMTX

2022-04-28 Thread Max Chernoff via ntg-context

On 2022-04-28 3:30 a.m., Henning Hraban Ramm wrote:
I’m afraid the above release introduced a bug; while the offical release 
ran through, I now get:


module  > lua-widow-control > Widow/orphan detected. Attempting 
to remove.

lua error   > lua error on line 112 in file de/c_intro.tex:

callback error: 
...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: attempt 
to perform arithmetic on a nil value (field 'height')

stack traceback:
 ...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: in 
function <...local/tex/luatex/lua-widow-control/lua-widow-control.lua:360>


On 2022-04-28 4:54 a.m., Eduardo Bohoyo wrote:

Here testing that beta version.

As you know, my book is in grid mode, but I get the same error message 
as Hraban when the compilation crashes.


However, when I comment grid again in my document, it does compile the pdf.


Well that's why it was a beta :) Looks like I made some questionable assumptions
about the order of the hlist/baselineskip nodes, so the module completely broke
with things as simple as section headings.

Hopefully this new beta should fix things:


https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-5e240b2ebb76f33c32ecbc673af09a1c64773033

Grid snapping is a little peculiar, so let me know if you find any more bugs.

And thanks for the bug reports.
-- Max
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] context module t-account in LMTX

2022-04-28 Thread Heinrich Paeßens via ntg-context
charming 藍

now I have a digital t-accounts stencil 


… and can write some review of Lombard Street 
 or else.

thanks
Heinrich 


> On 28. Apr 2022, at 17:10, Wolfgang Schuster via ntg-context 
>  wrote:
> 
> Heinrich Paeßens schrieb am 28.04.2022 um 16:39:
>> Many thanks Wolfgang, 
>> 
>> I can see the 'values' in a table like form, nothing but the values — how 
>> can I switch on the 'lines' of the table?
> 
> You can either add
> 
> \setuptaccount[mp=taccount:line]
> 
> or
> 
> \setuptaccount[mp=taccount:nose]
> 
> before the table.
> 
> 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] Space around figure

2022-04-28 Thread Alain Delmotte via ntg-context

  
  
Thanks Duncan!
Alain

Le 28/04/2022 à 13:05, Duncan
  Hothersall a écrit :


  
  
You should be able to change the space above and
  below a float with the spacebefore and spaceafter keys to
  \setupfloat. I think the default value is big for each, but
  you can override that with null. Something like
  
  
  \setupfloat[figure][spacebefore=,spaceafter=]
  
  
  Hope that helps.
  
  
  Duncan



  On Thu, 28 Apr 2022 at
11:41, Alain Delmotte via ntg-context 
wrote:
  
  

  Hi, 

  When one insert a figure in
  a text, I think that the default behaviour is to add
  space around the figure.
  Is tit possible to manage
  that space or suppress it?
  Thanks in advance,
  --
  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] context module t-account in LMTX

2022-04-28 Thread Wolfgang Schuster via ntg-context

Heinrich Paeßens schrieb am 28.04.2022 um 16:39:

Many thanks Wolfgang,

I can see the 'values' in a table like form, nothing but the values — 
how can I switch on the 'lines' of the table?


You can either add

    \setuptaccount[mp=taccount:line]

or

    \setuptaccount[mp=taccount:nose]

before the table.

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] Problem with a defined colour in MetaFun

2022-04-28 Thread Wolfgang Schuster via ntg-context

Keith McKay via ntg-context schrieb am 28.04.2022 um 12:05:


Hi,

In the MWE below I define an rgb colour, myColor1, using random 
numbers for the r, g and b components. I then use it to fill a 
unitsquare the size of the page, which works as expected. In the loop 
that follows I then use the defined colour, myColor1, along with white 
and the variable r to create shades of myColor1 as in the MWE below. 
However, myColor1 is not recognised in the loop and seems to be 
replaced by black, although if I use a predefined colour, in this case 
BurntSienna from the crayola collection, it works as expected.  I have 
tried a number of ways to get this to work as shown in the code but 
without success. I would be grateful for any suggestions.


Best Wishes

Keith McKay

MWE%

\setuppapersize[A4,portrait]

\usecolors[crayola]

\starttext

\dorecurse{10}{

\startMPpage

StartPage;

\definecolor[name="myColor1", r = uniformdeviate(1), g = 
uniformdeviate(1), b = uniformdeviate(1) ] ;




Remove the backslash in front of the definecolor command.

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] context module t-account in LMTX

2022-04-28 Thread Heinrich Paeßens via ntg-context
Many thanks Wolfgang, I can see the 'values' in a table like form, nothing but the values — how can I switch on the 'lines' of the table?Best regards, HeinrichI took your file t-taccount.mkxland——% !TEX program = lmtx\usemodule[t][taccount]\startTEXpage[offset=5pt]\starttaccount[title=Bilanz,lefttext=Aktiva,righttext=Passiva]    \startdebits        \debit{Gebäude}  {1.800}        \debit{Maschinen}{1.200}        \debit{Fuhrpark}   {500}        \debit{Rohstoffe}  {100}        \debittotal      {3.600}    \stopdebits    \startcredits        \credit{Eigenkapital}{1.400}        \credit{Schulden}    {2.200}        \credittotal         {3.600}    \stopcredits\stoptaccount\stopTEXpage——

tst-taccount.pdf
Description: Adobe PDF document
the log——resolvers       | formats | executing runner 'run luametatex format': /Users/hp/Library/context-osx-64/tex/texmf-osx-64/bin/luametatex --jobname="./tst-taccount.tex" --fmt=/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui  --c:autopdf --c:currentrun=1 --c:directives="system.showerror" --c:fulljobname="./tst-taccount.tex" --c:input="./tst-taccount.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall --c:texmfbinpath="/Users/hp/Library/context-osx-64/tex/texmf-osx-64/bin"system          > system          > ConTeXt  ver: 2022.04.15 20:20 LMTX  fmt: 2022.4.17  int: english/englishsystem          > system          > 'cont-new.mkxl' loadedopen source     > level 1, order 1, name '/Users/hp/Library/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'system          > beware: some patches loaded from cont-new.mkivclose source    > level 1, order 1, name '/Users/hp/Library/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'system          > files > jobname './tst-taccount', input './tst-taccount.tex', result './tst-taccount'fonts           > latin modern fonts are not preloadedlanguages       > language 'en' is activeopen source     > level 1, order 2, name './tst-taccount.tex'modules         > 'taccount' is loadedopen source     > level 2, order 3, name 't-taccount.mkxl'loading         > Context User Module / Miscellaneousclose source    > level 2, order 3, name 't-taccount.mkxl'system          > auto \starttext ... \stoptextfonts           > preloading latin modern fonts (second stage)fonts           > 'fallback modern-designsize rm 12pt' is loadedbackend         > xmp > using file '/Users/hp/Library/context-osx-64/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'pages           > flushing realpage 1, userpage 1, subpage 1close source    > level 1, order 3, name './tst-taccount.tex'mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.luamkiv lua stats  > used cache path: /Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32emkiv lua stats  > resource resolver: loadtime 0.010 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 10 found files, scanned paths: mkiv lua stats  > stored bytecode data: 504 modules (0.406 sec), 98 tables (0.020 sec), 602 chunks (0.426 sec)mkiv lua stats  > traced context: maxstack: 1627, freed: 0, unreachable: 1627mkiv lua stats  > cleaned up reserved nodes: 72 nodes, 11 lists of 439mkiv lua stats  > node memory usage: 15 attribute, 3 glue, 67 gluespec, 3 kern, 582 mathspec, 4 penalty, 2 tempmkiv lua stats  > node list callback tasks: 12 unique task lists, 9 instances (re)created, 59 callsmkiv lua stats  > used backend: pdfmkiv lua stats  > jobdata time: 0.002 seconds saving, 0.000 seconds loadingmkiv lua stats  > callbacks: file: 390, saved: 270, direct: 2, function: 1102, value: 2, message: 0, bytecode: 602, late 0, total: 2368 (0 per page)mkiv lua stats  > randomizer: initialized with value 0.56777543833852mkiv lua stats  > loaded tex modules: 1 requested, all found (t-taccount)mkiv lua stats  > loaded patterns: en::1, load time: 0.000mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otfmkiv lua stats  > font engine: otf 3.120, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.237 seconds mkiv lua stats  > font embedding time: 0.004 seconds, 1 fontsmkiv lua stats  > result saved in file: tst-taccount.pdf, compresslevel 1, objectcompresslevel 3mkiv lua stats  > positions: 4 collected, 0 deltas, 0 shared partials, 0 partial entriesmkiv lua stats  > used platform: osx-64, type: unix, binary subtree: texmf-osx-64mkiv lua stats  > used engine: luametatex version: 2.0946, functionality level: 20220405, format id: 647, compiler: clangmkiv lua stats  > tex properties: 740710 hash slots used of 2097152, 47886 control sequences, approximate memory usage: 38 MBmkiv lua stats  > lua properties: engine: lua 5.4, used memory: 56 MB, ctx: 

Re: [NTG-context] Problem with a defined colour in MetaFun

2022-04-28 Thread Fabrice L via ntg-context
Sorry, I was a little too enthusiastic, here here is the code :

> Le 28 avr. 2022 à 08:41, Fabrice L  a écrit :
> 
> Hi Keith,
> 
>> Le 28 avr. 2022 à 06:05, Keith McKay via ntg-context > > a écrit :
>> 
>> Hi,
>> 
>> In the MWE below I define an rgb colour, myColor1, using random numbers for 
>> the r, g and b components. I then use it to fill a unitsquare the size of 
>> the page, which works as expected. In the loop that follows I then use the 
>> defined colour, myColor1, along with white and the variable r to create 
>> shades of myColor1 as in the MWE below. However, myColor1 is not recognised 
>> in the loop and seems to be replaced by black, although if I use a 
>> predefined colour, in this case BurntSienna from the crayola collection, it 
>> works as expected.  I have tried a number of ways to get this to work as 
>> shown in the code but without success. I would be grateful for any 
>> suggestions.
>> 
>> Best Wishes
>> 
>> Keith McKay
>> 
>> MWE%
>> \setuppapersize[A4,portrait]
>> \usecolors[crayola]
>> \starttext
>> \dorecurse{10}{
>> \startMPpage
>> StartPage;
>> \definecolor[name="myColor1", r =  uniformdeviate(1), g = uniformdeviate(1), 
>> b = uniformdeviate(1) ] ;
>> fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor  "myColor1";
>> for i =2 step 2 until 10:
>> r := i/10;
>> fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) 
>> withcolor(r[\MPcolor{BurntSienna},white]);
>> fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) 
>> withcolor(r[\MPcolor{myColor1}, white]);
>> fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
>> withcolor(r[\MPcolor{"myColor1"}, white]);
>> %fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
>> withcolor(r[myColor1 ,  white]); This line causes an error.
>> endfor;
>> StopPage;
>> \stopMPpage
>> }
>> 
>> \stoptext
>> %%%end MWE%%%
>> 
> 
> Here is a solution, with works here, defining in another way the color «  
> myColor »:
> 
> \setuppapersize[A4,portrait]
> \usecolors[crayola]
> \starttext
> \dorecurse{2}{
> \startMPpage
> StartPage;
> color myColor ;
> myColor := (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1));
> fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor myColor;
> for i =2 step 2 until 10:
> r := i/10;
> fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) 
> withcolor(r[\MPcolor{BurntSienna},white]);
> fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) 
> withcolor(r[\MPcolor{myColor1}, white]);
> fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
> withcolor(r[\MPcolor{"myColor1"}, white]);
> %fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
> withcolor(r[myColor1 ,  white]); This line causes an error.
> endfor;
> StopPage;
> \stopMPpage
> }
> 
> \stoptext

I forgot to remove « myColor1 » from the others parts of the code. 
\setuppapersize[A4,portrait]
\usecolors[crayola]
\starttext
\dorecurse{10}{
\startMPpage
StartPage;
color myColor ;
myColor := (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1));
fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor myColor;
for i =2 step 2 until 10:
r := i/10;
fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) 
withcolor(r[\MPcolor{BurntSienna},white]);
fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) 
withcolor(r[myColor, white]);
fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
withcolor(r[myColor, white]);
%fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
withcolor(r[myColor1 ,  white]); This line causes an error.
endfor;
StopPage;
\stopMPpage
}

\stoptext


> 
> 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] Problem with a defined colour in MetaFun

2022-04-28 Thread Fabrice L via ntg-context
Hi Keith,

> Le 28 avr. 2022 à 06:05, Keith McKay via ntg-context  a 
> écrit :
> 
> Hi,
> 
> In the MWE below I define an rgb colour, myColor1, using random numbers for 
> the r, g and b components. I then use it to fill a unitsquare the size of the 
> page, which works as expected. In the loop that follows I then use the 
> defined colour, myColor1, along with white and the variable r to create 
> shades of myColor1 as in the MWE below. However, myColor1 is not recognised 
> in the loop and seems to be replaced by black, although if I use a predefined 
> colour, in this case BurntSienna from the crayola collection, it works as 
> expected.  I have tried a number of ways to get this to work as shown in the 
> code but without success. I would be grateful for any suggestions.
> 
> Best Wishes
> 
> Keith McKay
> 
> MWE%
> \setuppapersize[A4,portrait]
> \usecolors[crayola]
> \starttext
> \dorecurse{10}{
> \startMPpage
> StartPage;
> \definecolor[name="myColor1", r =  uniformdeviate(1), g = uniformdeviate(1), 
> b = uniformdeviate(1) ] ;
> fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor  "myColor1";
> for i =2 step 2 until 10:
> r := i/10;
> fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) 
> withcolor(r[\MPcolor{BurntSienna},white]);
> fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) 
> withcolor(r[\MPcolor{myColor1}, white]);
> fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
> withcolor(r[\MPcolor{"myColor1"}, white]);
> %fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
> withcolor(r[myColor1 ,  white]); This line causes an error.
> endfor;
> StopPage;
> \stopMPpage
> }
> 
> \stoptext
> %%%end MWE%%%
> 

Here is a solution, with works here, defining in another way the color «  
myColor »:

\setuppapersize[A4,portrait]
\usecolors[crayola]
\starttext
\dorecurse{2}{
\startMPpage
StartPage;
color myColor ;
myColor := (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1));
fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor myColor;
for i =2 step 2 until 10:
r := i/10;
fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) 
withcolor(r[\MPcolor{BurntSienna},white]);
fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) 
withcolor(r[\MPcolor{myColor1}, white]);
fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
withcolor(r[\MPcolor{"myColor1"}, white]);
%fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
withcolor(r[myColor1 ,  white]); This line causes an error.
endfor;
StopPage;
\stopMPpage
}

\stoptext

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] lua-widow-control module error in LMTX

2022-04-28 Thread Henning Hraban Ramm via ntg-context

Am 28.04.22 um 12:54 schrieb Eduardo Bohoyo via ntg-context:

Hi Max:

Here testing that beta version.

As you know, my book is in grid mode, but I get the same error message 
as Hraban when the compilation crashes.


However, when I comment grid again in my document, it does compile the pdf.


Oops, my book *was* accidentally in grid mode. It made no sense. No 
wonder I had troubles with spacing.


But I get the error with your beta release also without grid mode.

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] Space around figure

2022-04-28 Thread Duncan Hothersall via ntg-context
You should be able to change the space above and below a float with the
spacebefore and spaceafter keys to \setupfloat. I think the default value
is big for each, but you can override that with null. Something like

\setupfloat[figure][spacebefore=,spaceafter=]

Hope that helps.

Duncan

On Thu, 28 Apr 2022 at 11:41, Alain Delmotte via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi,
>
> When one insert a figure in a text, I think that the default behaviour is
> to add space around the figure.
>
> Is tit possible to manage that space or suppress it?
>
> Thanks in advance,
>
> --
>
> 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] lua-widow-control module error in LMTX

2022-04-28 Thread Eduardo Bohoyo via ntg-context

Hi Max:

Here testing that beta version.

As you know, my book is in grid mode, but I get the same error message 
as Hraban when the compilation crashes.


However, when I comment grid again in my document, it does compile the pdf.

Thanks,

Edu

El 28/4/22 a las 9:25, Max Chernoff escribió:

On 2022-04-27 3:59 p.m., Eduardo Bohoyo wrote:
When I uncomment grid=yes in my \setuplayout, lwc makes its real 
appearance on the scene.

So it looks like lwc was broken with grid snapping. This surprised me --
I originally wrote lwc *specifically* to use with grid snapping -- but it
looks like I quickly forgot about that goal and never actually tested it
with grids.

I suppose that in other documents than mine, i.e. less complex, this 
performance would be a success. But in my file it is, considering my 
current aesthetic requirements, a failure. This is because for me 
grid=yes is a non-negotiable part of my code.


I _think_ that I've fixed it now. Can you try the beta version at

https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-47ff19d9804f6ecea64dda59426664680d9756e0

please? Hopefully this solves the issue.

Do you want the new pdf with lwc actually acting on my file? Then you 
can get a better idea of what I mean by the end of some pages when I 
comment grid=yes (apart from the mischief that happens with the 
horizontal spaces in some paragraphs of the bibliographic section).


Or, if you prefer, and you need more feedback, I can send you my 
current code to use it as a test bench for " daring " texts.


I was able to reproduce the issue just by adding

    \setuplayout[grid=yes]

to my "standard" test files, so I shouldn't need anything else, provided
that the above beta actually fixes anything. If there are still lingering
issues, then having the TeX source would likely simplify things on my 
end.


-- Max

___
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] Space around figure

2022-04-28 Thread Alain Delmotte via ntg-context

  
  
Hi, 
  
When one insert a figure in a text, I
think that the default behaviour is to add space around the
figure.
Is tit possible to manage that space
or suppress it?
Thanks in advance,
--
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
___


[NTG-context] Problem with a defined colour in MetaFun

2022-04-28 Thread Keith McKay via ntg-context

Hi,

In the MWE below I define an rgb colour, myColor1, using random numbers 
for the r, g and b components. I then use it to fill a unitsquare the 
size of the page, which works as expected. In the loop that follows I 
then use the defined colour, myColor1, along with white and the variable 
r to create shades of myColor1 as in the MWE below. However, myColor1 is 
not recognised in the loop and seems to be replaced by black, although 
if I use a predefined colour, in this case BurntSienna from the crayola 
collection, it works as expected.  I have tried a number of ways to get 
this to work as shown in the code but without success. I would be 
grateful for any suggestions.


Best Wishes

Keith McKay

MWE%

\setuppapersize[A4,portrait]

\usecolors[crayola]

\starttext

\dorecurse{10}{

\startMPpage

StartPage;

\definecolor[name="myColor1", r = uniformdeviate(1), g = 
uniformdeviate(1), b = uniformdeviate(1) ] ;


fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor "myColor1";

for i =2 step 2 until 10:

r := i/10;

fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) 
withcolor(r[\MPcolor{BurntSienna},white]);


fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) 
withcolor(r[\MPcolor{myColor1}, white]);


fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
withcolor(r[\MPcolor{"myColor1"}, white]);


%fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) 
withcolor(r[myColor1 , white]); This line causes an error.


endfor;

StopPage;

\stopMPpage

}

\stoptext

%%%end MWE%%%

I am running:

system >

system > ConTeXt ver: 2022.04.20 19:18 LMTX fmt: 2022.4.26 int: 
english/english


system >

system > 'cont-new.mkxl' loaded
___
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] installing modules

2022-04-28 Thread Henning Hraban Ramm via ntg-context

Hi,
while the rsync installation shown in 
https://wiki.contextgarden.net/Modules#ConTeXt_LMTX works well, it 
doesn’t install all available modules listed in modules.contextgarden.net.

E.g. lua-widow-control and metaducks are missing.

Why, and how can we change that?
Has it to do with the t- prefix?

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] lua-widow-control module error in LMTX

2022-04-28 Thread Henning Hraban Ramm via ntg-context

Am 28.04.22 um 09:25 schrieb Max Chernoff via ntg-context:

I _think_ that I've fixed it now. Can you try the beta version at
 
https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-47ff19d9804f6ecea64dda59426664680d9756e0 


please? Hopefully this solves the issue.


Hi Max,
thank you for this module that I didn’t know.

I’m afraid the above release introduced a bug; while the offical release 
ran through, I now get:


module  > lua-widow-control > Widow/orphan detected. Attempting 
to remove.

lua error   > lua error on line 112 in file de/c_intro.tex:

callback error: 
...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: attempt 
to perform arithmetic on a nil value (field 'height')

stack traceback:
	...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: in 
function <...local/tex/luatex/lua-widow-control/lua-widow-control.lua:360>


My book is not in grid mode.


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] lua-widow-control module error in LMTX

2022-04-28 Thread Max Chernoff via ntg-context

On 2022-04-27 3:59 p.m., Eduardo Bohoyo wrote:
When I uncomment grid=yes in my \setuplayout, lwc makes its real 
appearance on the scene.

So it looks like lwc was broken with grid snapping. This surprised me --
I originally wrote lwc *specifically* to use with grid snapping -- but it
looks like I quickly forgot about that goal and never actually tested it
with grids.

I suppose that in other documents than mine, 
i.e. less complex, this performance would be a success. But in my file 
it is, considering my current aesthetic requirements, a failure. This is 
because for me grid=yes is a non-negotiable part of my code.


I _think_ that I've fixed it now. Can you try the beta version at


https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-47ff19d9804f6ecea64dda59426664680d9756e0

please? Hopefully this solves the issue.
 
Do you want the new pdf with lwc actually acting on my file? Then you 
can get a better idea of what I mean by the end of some pages when I 
comment grid=yes (apart from the mischief that happens with the 
horizontal spaces in some paragraphs of the bibliographic section).


Or, if you prefer, and you need more feedback, I can send you my current 
code to use it as a test bench for " daring " texts.


I was able to reproduce the issue just by adding

\setuplayout[grid=yes]

to my "standard" test files, so I shouldn't need anything else, provided
that the above beta actually fixes anything. If there are still lingering
issues, then having the TeX source would likely simplify things on my end.

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