Re: [NTG-context] Update error on Raspberry Pi

2021-10-16 Thread Mojca Miklavec via ntg-context
Hi,

On Sat, 16 Oct 2021 at 23:28, Mojca Miklavec wrote:
>
> For some completely mysterious reason the new ISP's modem doesn't like
> the virtual machine running Debian 10 and I have no clue how to
> convince it to get network connectivity back.

Off-topic, but ... one hour afo the following comment was posted:
https://github.com/utmapp/UTM/issues/2280#issuecomment-945006193
and I discovered that an upgrade (still in beta) of the VM software
I'm using addressed two burning issues at the same time:
- they claim to have fixed some IPv6-related bug (and the network
magically works again)
- they now support auto-startup of VMs

So the situation with RPi support should hopefully become a tiny bit
better from this point on.
(Maybe the "old" modem, the one I received this summer, didn't have
proper IPv6 support.)

Mojca
___
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] Update error on Raspberry Pi

2021-10-16 Thread Mojca Miklavec via ntg-context
Hi,

On Sat, 16 Oct 2021 at 22:43, J. Hagen via ntg-context wrote:
>
> Looks like the pi bins and an osx one are behind (mojca then needs to kick 
> those vm's) ... I 'll check it tomorrow.

I'm sorry, the new binaries have been uploaded to the usual place
(Hans probably needs to regenerate the packages before they can be
used out-of-the-box again).

For some completely mysterious reason the new ISP's modem doesn't like
the virtual machine running Debian 10 and I have no clue how to
convince it to get network connectivity back.

(After reading the initial email from Luis I decided to try to connect
the main computer via my phone's hotspot and that worked, but I need
to find a permanent solution. Maybe I'll just set up some hardware
again. It's much slower than the VM, but better than not working at
all.)

Mojca

> Op 16 okt. 2021 15:12 schreef Luis Montgomery via ntg-context 
> :
>
> Hi,
> I try to update LMTX and the script sends me this error:
>
>
> resolvers   > lua > loading file 
> '/home/monty/context/tex/texmf-context/tex/context/base/mkxl/spac-par.lmt' 
> succeeded
> tex error   > tex error on line 41 in file spac-par.mkxl: Undefined 
> control sequence \undefined
>
> 
>   + \shapingpenaltiesfrozenparcode
>
> 
> The control sequence at the end of the top line of your error message was 
> never
> \def'ed. You can just continue as I'll forget about whatever was undefined.
>
> What has changed here?
>
> L. Montgomery
___
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] Update error on Raspberry Pi

2021-10-16 Thread J. Hagen via ntg-context
Looks like the pi bins and an osx one are behind (mojca then needs to kick those vm's) ... I 'll check it tomorrow.Op 16 okt. 2021 15:12 schreef Luis Montgomery via ntg-context :Hi,I try to update LMTX and the script sends me this error:resolvers       > lua > loading file '/home/monty/context/tex/texmf-context/tex/context/base/mkxl/spac-par.lmt' succeededtex error       > tex error on line 41 in file spac-par.mkxl: Undefined control sequence \undefined        + \shapingpenaltiesfrozenparcodeThe control sequence at the end of the top line of your error message was never\def'ed. You can just continue as I'll forget about whatever was undefined.What has changed here?L. Montgomery
___
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] Compilation error with the new version of lmtx

2021-10-16 Thread Fabrice Couvreur via ntg-context
Hi,
The latest version of lmtx does not allow me to compile the following file
although there was no problem before.
Thank you
Fabrice

\startproduct[expertes-manual]

  \startfrontmatter

\setuppagenumbering
   [location=]

\definefont
  [ChapterTextStyle]
  [SansBold*default sa 2.2]

\setuphead
  [title]
  [style=ChapterTextStyle,
   align=flushright]

\setuplist
   [chapter]
   [style=bold,
alternative=b,
width=1em]

\setuplist
   [section]
   [margin=1em,
width=1.75em]

\setuplist
   [subsection]
   [margin=2.75em,
width=2em,
distance=\spaceamount]


\starttitle[title=Table des matières]

 \placelist
   [chapter,section,subsection]
   [criterium=all,
   interaction=all,
alternative=c]

  \stoptitle

\stopfrontmatter

\startbodymatter
\component[chapter_1]
\component[chapter_2]
\stopbodymatter


\stopproduct

##
tex error   > tex error on line 1 in file ./expertes.tex: Undefined
control sequence \undefined




\relax
 \p_maxwidth
\dostarttagged \t!listcontent \empty \clf_listtitle {\currentlist
}\currentlistindex \relax
\dostoptagged
 \strc_lists_limitated_text
#1->\edef \p_maxwidth {\listparameter \c!maxwidth }\ifempty \p_maxwidth
\listparameter \c!textcommand {#1}
\else \listparameter \c!textcommand {\limitatetext {#1}\p_maxwidth
{\splitsymbol {\listparameter \c!limittext }}}\fi
 \22>:140>:abc
...rence_attribute \v!text \strc_lists_set_style_color \c!textstyle
\c!textcolor \v!text \the \t_lists_every_renderingtext \the
\t_lists_every_renderingsynchronize \setstrut \begstrut
\strc_lists_limitated_text \currentlistentrytitle
\endstrut \en ...
 \currentlistextra
...\begingroup \ifempty \m_strc_list_alternative \edef
\currentlistalternative {\listparameter \c!alternative }\else \let
\currentlistalternative \m_strc_list_alternative \fi \directsetup
{\listalternativeparameter \c!renderingsetup }
\relax \endgr ...
 ...


alternative=c]

 1 >>  \startproduct[expertes-manual]
 2
 3   \startfrontmatter
 4
 5 \setuppagenumbering
 6[location=]
 7
 8 \definefont
 9   [ChapterTextStyle]
10   [SansBold*default sa 2.2]
11
The control sequence at the end of the top line of your error message was
never
\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context | fatal error: return code: 256

TeX Output exited abnormally with code 1 at Sat Oct 16 19:28:21
___
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] Update error on Raspberry Pi

2021-10-16 Thread Luis Montgomery via ntg-context
Hi,
I try to update LMTX and the script sends me this error:


resolvers   > lua > loading file
'/home/monty/context/tex/texmf-context/tex/context/base/mkxl/spac-par.lmt'
succeeded
tex error   > tex error on line 41 in file spac-par.mkxl:
Undefined control sequence \undefined


  + \shapingpenaltiesfrozenparcode


The control sequence at the end of the top line of your error message was never
\def'ed. You can just continue as I'll forget about whatever was undefined.

What has changed here?

L. Montgomery
___
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] Reading ConTeXt metadata values into Lua

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

On 10/16/2021 10:33 AM, Wolfgang Schuster via ntg-context wrote:

Ramkumar KB via ntg-context schrieb am 16.10.2021 um 06:00:

Hello All,

I was trying to read the value of '\totalnumberofpages' into lua to do 
something with it. As an example, see below.


Now, as I understand it, my example would not work as TeX gets the 
first go at this and therefore the variable 'pages' is the string 
'\totalnumberofpages' and not the actual value itself. And Lua cannot 
process this "calculation".


I tried to go thru the manual - *cld-mkiv.pdf *- in the distro but 
could not catch on how to read a metadata value (not print). I am sure 
that I am missing a small trick somewhere (or is it something more 
involved?).


\startluacode
function myFancyCalculations(pages)
  -- some fancy stuff but as an example
local myCal = tonumber(pages) + 1
return myCal
\stopluacode
\starttext

\blah

\ctxlua{context(myFancyCalculations("\\totalnumberofpages"))}

\stoptext


Everything gets easier when you use the Lua functions to access the 
counter values but be aware the values can be wrong when you're at a 
page break.


\startbuffer[pagenumber]
\startluacode
context.starttabulate()
     context.NC()
     context("Current page")
     context.EQ()
     context(structures.counters.get("realpage",1,"number"))
     context.NC()
     context.NR()
     context.NC()
     context("Last page")
     context.EQ()
     context(structures.counters.get("realpage",1,"last"))
     context.NC()
     context.NR()
context.stoptabulate()
\stopluacode
\stopbuffer

\starttext

\dorecurse
     {\randomnumber{5}{10}}
     {\getbuffer[pagenumber]
  \page}

\stoptext


As addendum ... The problem in general with macros is that one doesn't 
really knows by looking at the name what actually happens when it 
expands, which can be a lot. Now, because \totalnumberofpages is 
supposed to 'return' a number and not typeset something styled (which 
itself involved macro expansion) you can actually do this:


\startluacode
local n = tokens.getters.macro("totalnumberofpages",true)
print(">>>",type(n),n)
\stopluacode

but beware of the fact that you actually get back a string:

\startluacode
local n = tokens.getters.macro("totalnumberofpages",true)
print(">>>",type(n),n)
local n = tonumber(n)
print(">>>",type(n),n)
\stopluacode

etc 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] Reading ConTeXt metadata values into Lua

2021-10-16 Thread Wolfgang Schuster via ntg-context

Ramkumar KB via ntg-context schrieb am 16.10.2021 um 06:00:

Hello All,

I was trying to read the value of '\totalnumberofpages' into lua to do 
something with it. As an example, see below.


Now, as I understand it, my example would not work as TeX gets the 
first go at this and therefore the variable 'pages' is the string 
'\totalnumberofpages' and not the actual value itself. And Lua cannot 
process this "calculation".


I tried to go thru the manual - *cld-mkiv.pdf *- in the distro but 
could not catch on how to read a metadata value (not print). I am sure 
that I am missing a small trick somewhere (or is it something more 
involved?).


\startluacode
function myFancyCalculations(pages)
  -- some fancy stuff but as an example
local myCal = tonumber(pages) + 1
return myCal
\stopluacode
\starttext

\blah

\ctxlua{context(myFancyCalculations("\\totalnumberofpages"))}

\stoptext


Everything gets easier when you use the Lua functions to access the 
counter values but be aware the values can be wrong when you're at a 
page break.


\startbuffer[pagenumber]
\startluacode
context.starttabulate()
    context.NC()
    context("Current page")
    context.EQ()
    context(structures.counters.get("realpage",1,"number"))
    context.NC()
    context.NR()
    context.NC()
    context("Last page")
    context.EQ()
    context(structures.counters.get("realpage",1,"last"))
    context.NC()
    context.NR()
context.stoptabulate()
\stopluacode
\stopbuffer

\starttext

\dorecurse
    {\randomnumber{5}{10}}
    {\getbuffer[pagenumber]
 \page}

\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] Memo module not working with lmtx

2021-10-16 Thread Floris van Manen via ntg-context



On 16/10/2021 09:57, Wolfgang Schuster via ntg-context wrote:




There is a new version of the module online which fixes the bug.


But is it not part of de LMTX distribution?
___
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] Memo module not working with lmtx

2021-10-16 Thread Wolfgang Schuster via ntg-context

Jason Ross via ntg-context schrieb am 16.10.2021 um 06:10:
I made a mistake with the MWE for the mailing list, however, corrected 
MWE gives same error:


\usemodule[memo]

\setupmemo[
name={Jason Ross},
opening={People of Earth},
closing={Thanks for all the Fish,},
signature={The Dolphins}]
\starttext
\startmemo
  We are writing to let you know that we are all leaving
\stopmemo
\stoptext


There is a new version of the module online which fixes the bug.

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
___