Re: [NTG-context] Software upgrade for ntg and contextgarden server 6 April

2023-04-12 Thread Werner Hennrich via ntg-context

KUDOS to you guys and thanks a *lot*!
W


Am 11.04.23 um 22:42 schrieb Taco Hoekwater via ntg-context:

Hi,

So … the server now runs Ubuntu 22.04. Jay!
This was a much harder upgrade though.
...
In any case, today was the last of the big software update procedures

Best wishes,
Taco and Jules and Robbert


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] what happend to \writeline?

2021-05-31 Thread Werner Hennrich

\writeline works well again after the next update to version: 2021.05.31
14:13 -
*and* my xtables patch in cont-loc persisted.

Thank you Hans,
Werner


Am 28.05.21 um 18:19 schrieb Hans Hagen:

On 5/28/2021 6:05 PM, Werner Hennrich wrote:

Hello everyone,

I'm looking into my environment's logging to trace a problem and
realize that \writeline is gone mute -
that is, the output of subsequent logging lines now gets joined up in
the same line, very hard to read...


i'll check it


___
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] new page before xtable with repeated headers

2021-05-31 Thread Werner Hennrich

sorry, not true:

Am 31.05.21 um 12:36 schrieb Werner Hennrich:

but the patch isn't loaded any more.


my

\writestatus\m!system{beware: LOCAL PATCH LOADED FOR xtable}

from inside the \else to \fi is indeed still in my console.

case re safe update closed -
thanks, Werner




___
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] new page before xtable with repeated headers

2021-05-31 Thread Werner Hennrich

Hello Hans,
loading from cont-loc now works, thank you!

Am 31.05.21 um 11:33 schrieb Hans Hagen:

you can wrap such a patch in:

\ifcsname\??xtableflushsplit\v!repeat\endcsname \else

\fi

to make sure that it's not overloading something built in


if I do this, I get:

   suggestion  > use \withcaron instead of \v

and if I use \withcaron, then the wrapper seems to be OK,
but the patch isn't loaded any more.
Wasn't the patch meant to override an already existing\xtableflushsplit
in this case?

Thank you,
Werner

___
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] Side-by-side environment

2021-05-31 Thread Werner Hennrich

Hello Tommy,
xtable is quite versatile and can do a lot of things -
place your cells next to each other by putting them into the same row.

If you haven't yet, this might be a good moment to skim through the
xtables manual
 and play
around,
for the full list of options refer to the commands reference
.

All the best!
Werner



Am 31.05.21 um 09:52 schrieb Tommaso Gordini:

Hello everybody.

Some time ago, Wolfgang helped me write an environment to have code
above and typeset output below.
I'll glue you a MWE below.

\mainlanguage [it]

\setupbodyfont [modern]


\defineuserdata

[example]

[alternative=example]


\defineuserdataalternative

[example]

[renderingsetup=userdata:example]


\startsetups [userdata:example]

\blank

\startembeddedxtable
[width=\textwidth,strut=no,offset=1ex,framecolor=black,rulethickness=0.5pt]

  \startxrow [corner=03,align=normal]

    \startxcell

      \typebuffer [userdata] [option=tex]

    \stopxcell

  \stopxrow

  \startxrow [corner=01,align=normal]

    \startxcell

      \getuserdata

    \stopxcell

  \stopxrow

\stopembeddedxtable

\blank

\stopsetups


\starttext


\startuserdata [example]

\starttext

C’era una volta un re\dots

\stoptext

\stopuserdata


\stoptext


Now, the question: Can the code to be improved? How can I modify the
code to have the example typeset to the right of the box? I would like
the box to be 0.5\textwidth wide.

Thanks in advance
Tommy

___
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] new page before xtable with repeated headers

2021-05-31 Thread Werner Hennrich

I still rely in all my installations on this bit at the bottom to be in
cont-new.mkxl.
Is there a way to make this patch update-safe?

There are comments
in ./tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl:

   %D This file is loaded at runtime, thereby providing an excellent
   place for hacks,
   %D patches, extensions and new features. There can be local
   overloads in cont-loc
   %D (which has always been the case) and experimental code in
   cont-exp (which is also
   %D so old that I need to remind myself to check it occasionally, so
   here is the
   %D reminder).

I tried the mentioned local overload methods but didn't get them to work.
Did I mess up somehow or is the comment above outdated?
Are there any better ways - update-safe though?

Thanks a lot, Werner


Am 23.04.21 um 21:28 schrieb Hans Hagen:

You can put this on cont-new.mkxl as test:

\unprotect

\defcsname\??xtableflushsplit\v!repeat\endcsname
  {\doloop
 {\clf_x_table_flush
    method {\v!split}%
    height
\ifdim\pagegoal=\maxdimen\textheight\else\dimexpr\pagegoal-\pagetotal\relax\fi
  \relax
  \ifcase\c_tabl_x_state
    \exitloop
  \else
    \page
  \fi}}

\protect



___
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 happend to \writeline?

2021-05-28 Thread Werner Hennrich

Hello everyone,

I'm looking into my environment's logging to trace a problem and realize
that \writeline is gone mute -
that is, the output of subsequent logging lines now gets joined up in
the same line, very hard to read...

I observe this in version: 2021.05.27 14:15, as well as in version:
2021.05.27 14:15
the last one I used where \writeline did write (and end) the logging
line was version: 2021.03.17 17:46.

   \def\log#1{
   \message{ logging: #1}
   \writeline
   logging #1\par
   }
   \starttext
   \log{the}
   \log{quick}
   \log{brown}
   \log{fox}
   \stoptext

used to log like this:

   logging: the
   logging: quick
   logging: brown
   logging: fox

but now:

logging: the logging: quick logging: brown logging: fox

Any idea how I can switch back the old behavior (on the new lmtx)?

Thanks you,
Werner

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

2021-05-23 Thread Werner Hennrich

Julian, is the luametatex file in that directory executable?
both context and mtxrun are links to it:

lrwxrwxrwx 1 xxx xxx  10  context -> luametatex
-rw-r--r-- 1 xxx xxx    1315  context.lua
-rwxr-xr-x 1 xxx xxx 2957368  luametatex
-rwxr-xr-x 1 xxx xxx 7150016  luatex
lrwxrwxrwx 1 xxx xxx  10  mtxrun -> luametatex
-rw-r--r-- 1 xxx xxx  689635  mtxrun.lua

all the best!
Werner

Am 23.05.21 um 12:14 schrieb jbf:

Then something is not making sense (to me).

.bashrc clearly shows: export
PATH=$PATH:/home/me/bin/context/tex/texmf-linux-64/bin, so does that
not mean that bin can be found via the path? So why does 'context
myfile.tex' not work?

If I run a full path (.
/home/me/bin/context/tex/texmf-linux-64/bin/mtxrun context myfile.tex)
I get the message 'cannot execute binary file' and yet mtxrun is
executable. I checked. Clearly I am making a basic error, but cannot
work out what.

Julian



___
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] xtable in def or setups

2021-05-18 Thread Werner Hennrich

Hi Adam,
no, I hadn't tried that -
even tough I had skimmed over that part way back, it now escaped me.

   \long\def\iconblock[#1]#2{%
   \ignorespaces
   *\startembeddedxtable[icbtable]*
   \startxrow
   \startxcell[width=17mm]
   \externalfigure[img/#1.svg][height=15mm,width=15mm]
   \stopxcell
   \startxcell #2 \stopxcell
   \stopxrow
   *\stopembeddedxtable*
   \removeunwantedspaces
   }

that did the job.

Thanks a lot Adam!
Cheers, W


Am 18.05.21 um 20:17 schrieb Adam Reviczky:

Hi Werner,

Did you try startembeddedxtable ?

See Section 5 in the manual
(https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf
<https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf>).

Adam

On Tue, May 18, 2021 at 6:38 PM Werner Hennrich mailto:w...@gmx.at>> wrote:

Hello everyone,

I'm trying to create an xtable from within a \def (or within a
\setups)
but always run into "runaway error: end of file encountered"
whenever the xtable-commands are in there.

\definextable[icbtable]
\setupxtable[icbtable]
[frame=off,
top=\vskip7mm]
\long\def\iconblock[#1]#2{%
\ignorespaces
\startxtable[icbtable]
\startxrow
\startxcell[width=17mm]
\externalfigure[img/#1.svg][height=15mm,width=15mm]
\stopxcell
\startxcell #2 \stopxcell
\stopxrow
\stopxtable
\removeunwantedspaces
}

Is this simply not possible or am I doing something wrong there?

system  > ConTeXt  ver: 2021.05.15 22:45 LMTX fmt:
2021.5.18  int: english/english

Thank you,
Werner

__



___
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] xtable in def or setups

2021-05-18 Thread Werner Hennrich

Hello everyone,

I'm trying to create an xtable from within a \def (or within a \setups)
but always run into "runaway error: end of file encountered"
whenever the xtable-commands are in there.

   \definextable[icbtable]
   \setupxtable[icbtable]
   [frame=off,
   top=\vskip7mm]
   \long\def\iconblock[#1]#2{%
   \ignorespaces
   \startxtable[icbtable]
   \startxrow
   \startxcell[width=17mm]
   \externalfigure[img/#1.svg][height=15mm,width=15mm]
   \stopxcell
   \startxcell #2 \stopxcell
   \stopxrow
   \stopxtable
   \removeunwantedspaces
   }

Is this simply not possible or am I doing something wrong there?

system  > ConTeXt  ver: 2021.05.15 22:45 LMTX  fmt: 2021.5.18 
int: english/english

Thank you,
Werner

___
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] new page before xtable with repeated headers

2021-04-26 Thread Werner Hennrich

Am 25.04.21 um 10:52 schrieb Wolfgang Schuster:

Yes, some slack is needed to avoid the table being pushed to the next
space because not enough space is available. I recommend also to
ensure a minimum amount of space (e.g. 5 lines) is available to avoid
tables with just a few rows.

Wolfgang


I caught a some fail-cases (attached) using a test-runner
(linux/bash/python3, attached as well) - hope this helps.

Thanks in advance und best regards,
Werner

<>
<>
___
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] new page before xtable with repeated headers

2021-04-24 Thread Werner Hennrich

Thank you Hans,

this works well in my unchanged MWE -
I'll do some more rigorous testing on monday and let you know.

Thanks a lot and hava a nice weekend!
Werner


Am 23.04.21 um 21:28 schrieb Hans Hagen:

Always tricky this (on my agenda is to look into the engines page
builder ...)

You can put this on cont-new.mkxl as test:

\unprotect

\defcsname\??xtableflushsplit\v!repeat\endcsname
 {\doloop
    {\clf_x_table_flush
   method {\v!split}%
   height
\ifdim\pagegoal=\maxdimen\textheight\else\dimexpr\pagegoal-\pagetotal\relax\fi
 \relax
 \ifcase\c_tabl_x_state
   \exitloop
 \else
   \page
 \fi}}

\protect

Please test a lot! I also needs Wolfgangs opinion on this. Maybe
preceding whitespace can interfere so maybe we need some 'slack'
parameter.

Hans



___
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] new page before xtable with repeated headers

2021-04-23 Thread Werner Hennrich

Hello everyone,

I'm having an xtable spanning several pages and need to have its headers
repeated.

For this I've set "split=repeat", but unfortunately this causes the
table to start with a new new page leaving the rest of the preceding
page empty. Having "split=yes" makes the tabe continue on the previous
page as a need it to, but then the header isn't repeated any longer.

I realize that there has been a very similar question already in
https://www.mail-archive.com/ntg-context@ntg.nl/msg93775.html, but my
problem happens isolated in a very clean situation w/o any header,
floats or the like - and I don't see yet how I can get this working in
my situation. Any help is highly appreciated, here is a MWE of my problem:

\definextable[mytable]
\setupxtable[mytable]
[
option=max,
split=repeat,
%split=yes,
header=repeat,
width=\textwidth
]
\definextable[mytable:header]
\setupxtable[mytable:header]
[
foregroundstyle=\bf,
foregroundcolor=darkred,
]
% ==
\startdocument
\dorecurse{2} {
\input tufte
\vskip7mm
}
\startxtable[mytable]
\startxtablehead
\startxrow[mytable:header]
\startxcell Some Header \stopxcell
\startxcell More Header \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\dorecurse{10} {
\startxrow
\startxcell
{\bf (\recurselevel) some tale:}
\startitemize
\item a quick
\item brown fox
\item jumps over
\item the lazy dog
\stopitemize
\stopxcell
\startxcell
{\bf and a fact:}
\startitemize
\item the vodka
\item is good
\item but the meat
\item is rotten
\stopitemize
\stopxcell
\stopxrow
}
\stopxtablebody
\stopxtable
\stopdocument
Thank you very much i.a., Werner
___
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] Problems with new ConTeXt in Linux

2021-03-20 Thread Werner Hennrich

not a Linux related Problem IMHO - I'm having none of that kind under
both Arch and Debian.
HTH! W

Am 20.03.21 um 08:13 schrieb Jairo A. del Rio:

When I update to ConTeXt LMTX version 2021.03.20 01:07, the following
happens during format generation:

tex error       > tex error on line 25 in file spac-hor.mkxl:
Undefined control sequence

 \bitwiseflip \normalizelinemode \flattendiscretionariescode



So, what is happening here?

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
___



___
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] working on page refs with MP

2021-03-19 Thread Werner Hennrich

yes I had realized this already but I still don't know how to get those
page numbers down into MP - they keep being strings with macro code instead

is there a way the I can get \setupMPvariables[hdrPgs] in
\setupheadertexts[\setups{page:header}]
to be fully evaluated and stored as the page number in the MPvariables
first= and next= ??

   \startsetups page:header
    \setupMPvariables[hdrPgs]
        [curr=\pagenumber,
        first={\ref[page][\headerfirst]},
        next={\ref[page][\headernext]}]

    I've tried \expanded and \numeric without success

or alternatively in MP how would I call TeX (from MP) with a string like
"\ref[page][a]" and have the page number stored in a numeric var?

Thanks in advance,
Werner


Am 18.03.21 um 19:55 schrieb Hans Hagen:

On 3/18/2021 6:14 PM, Werner Hennrich wrote:


metafun > log >
metafun > log > error: Improper subscript has been replaced
by zero
metapost    > log > <*> ... numeric numFirst; numFirst := \ref
[page]

watch closely to the previous log line ... you're missing quotes so mp
sees \ref [page] and as it ignores a \ it sees ref[page] which unless
you defined 'ref' and 'page' triggers an error

-
  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] working on page refs with MP

2021-03-18 Thread Werner Hennrich

Hello everyone,

I'm having page references and want to calc / draw 'Page x of y' for
some subsections in MP.
How can I pass 'em down so I end up with numbers to do calculations with?

   \setuplayout[header=15mm]
   \def\myHeader[#1]#2{
   \ignorespaces
   \getdummyparameters[ref=,next=,#1]
   \pagebreak[yes]
   \pagereference[\dummyparameter{ref}]
   \doassign[header][first=\dummyparameter{ref}]
   \doassign[header][next=\dummyparameter{next}]
   {\tfc\bf{#2}}\par
   \vskip3mm
   }
   \def\fillWithText[#1]{
   \dorecurse{#1}{
   \input tufte
   \input knuth
   }
   }
   \setupheadertexts[\setups{page:header}]%
   \startsetups page:header
   \setupMPvariables[hdrPgs]
   [curr=\pagenumber,
   first={\ref[page][\headerfirst]},
   next={\ref[page][\headernext]}]
   \framed[
   frame=off,
   background={hdrPgs}
   ]{}% all to be done in MP
   \stopsetups
   \defineoverlay[hdrPgs][\useMPgraphic{hdrPgs}]
   \startuseMPgraphic{hdrPgs}
   StartPage; % calc and draw 'Page x of y'
   numeric numCurr; numCurr := \MPvar{curr};
   string strFirst; strFirst := "\MPvar{first}";
   string strNext; strNext := "\MPvar{next}";
   message("===");
   message("MP_hdrPageNrs: curr="& tostring numCurr & ", sFirst="&
   strFirst & ", sNext="& strNext);
   % fails:
   numeric numFirst; numFirst := \MPvar{first};
   StopPage;
   \stopuseMPgraphic
   \starttext
   \myHeader[ref=a,next=b]{  AaAaAaAa}
   \fillWithText[10]
   \myHeader[ref=b,next=c]{  BbBbBbBbBb}
   \fillWithText[3]
   \myHeader[ref=c,next=d]{ c CcCcCcCc}
   \fillWithText[8]
   \myHeader[ref=c,next=last]{ d DdDdDdDdDd}
   \fillWithText[8]
   \pagebreak[yes]
   \pagereference[last]
   This is the last page, goodby
   \stoptext

metapost    > message : MP_hdrPageNrs: curr=1, sFirst=\ref
[page][a], sNext=\ref [page][b]
metafun > log >
metafun > log > error: Improper subscript has been replaced by zero
metapost    > log > <*> ... numeric numFirst; numFirst := \ref [page]
metafun > log >
metafun > log > A bracketed subscript must have a known numeric
value;

So MP gets the macro and tries array access... I tried \expanded,
\numeric, and resolving the page numbers via \ref[page][id] at the
various code levels - unsuccessfully so far - and out of wit now.

TIA, Werner


___
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] temporary changes to the layout - \startlocal undefined

2021-02-16 Thread Werner Hennrich

*great*, that looks clean and useful -
thank you very much Wolfgang!
cheers, Werner


Am 16.02.21 um 17:21 schrieb Wolfgang Schuster:

Werner Hennrich schrieb am 16.02.2021 um 16:29:

Hello Everybody,

I need to increase my header's space temporarily
and according to pg 99 of context_an_excursion "\startlocal ...
\stoplocal" is the way to go -
unfortunately my LMTX (2021.02.02 15:49) disagrees:

 \setuppapersize[A4][A4]
 \setuplayout[
 ...
 header=15mm,
 ...
 ]
 \starttext

 \input tufte
 \page

 \startlocal
 \setuplayout[header+=20mm]
 \input tufte
 \stoplocal
 \page

 \input tufte
 \stoptext

This fails:

 tex error   > tex error on line XX in file ./local-layout.tex:
Undefined control sequence
 XX >> \startlocal

Do I need to load something in order to use this?
Or has it been completely removed?
And if so, is there a new alternative method to do the same thing?

I was unable to find anything on this topic
except https://www.mail-archive.com/ntg-context@ntg.nl/msg63602.html
which raises the same question already in 2012 but never answers it
IMHO.


Create a named layout (\definelayout[...]) and use it:

\setuplayout
  [header=15mm]

\definelayout
  [extraheader]
  [header=35mm]

\showframe

\starttext

\input tufte

\startlayout[extraheader]
\input tufte
\stoplayout

\input tufte

\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] temporary changes to the layout - \startlocal undefined

2021-02-16 Thread Werner Hennrich

Hello Everybody,

I need to increase my header's space temporarily
and according to pg 99 of context_an_excursion "\startlocal ...
\stoplocal" is the way to go -
unfortunately my LMTX (2021.02.02 15:49) disagrees:

    \setuppapersize[A4][A4]
    \setuplayout[
    ...
    header=15mm,
    ...
    ]
    \starttext

    \input tufte
    \page

    \startlocal
    \setuplayout[header+=20mm]
    \input tufte
    \stoplocal
    \page

    \input tufte
    \stoptext

This fails:

    tex error   > tex error on line XX in file ./local-layout.tex:
Undefined control sequence
    XX >> \startlocal

Do I need to load something in order to use this?
Or has it been completely removed?
And if so, is there a new alternative method to do the same thing?

I was unable to find anything on this topic
except https://www.mail-archive.com/ntg-context@ntg.nl/msg63602.html
which raises the same question already in 2012 but never answers it IMHO.

Thank you very much,
Werner





___
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] parsing multi-valued parameters

2021-02-13 Thread Werner Hennrich

quite nifty, I'll add that to my bag... thank you Wolfgang!

cheers, Werner


Am 12.02.21 um 12:53 schrieb Wolfgang Schuster:

Werner Hennrich schrieb am 12.02.2021 um 08:26:

Hello everyone,

please can you give me pointers on how to easiest parse multi-valued
\dummyparameter{...} like in

\something[...,weather={sunshine, rain, hail},...]

so that I can test for e.g.  rain, sunshine, wind, hail, mist, fog,
storm etc, each if it is present or not?

...so I can keep my number of parameters down and my parameter list as
simple as possible.

I have no idea what to search for in the docs or (better) in the test
cases / samples.
Would be great if you could just let me know where to look or what to
sarch for



\starttext

\def\something[#1]%
  {\getdummyparameters[weather=,#1]%
   \processallactionsinset
 [\dummyparameter{weather}]
 [sunshine=>Sunshine\endgraf,
  rain=>Rain\endgraf,
  hail=>Hail\endgraf]}

\something[weather=sunshine]

\blank

\something[weather={sunshine,rain}]

\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] parsing multi-valued parameters

2021-02-12 Thread Werner Hennrich

a, so easy - thank you Hans!
cheers, Werner

Am 12.02.21 um 09:01 schrieb Hans Hagen:

On 2/12/2021 8:26 AM, Werner Hennrich wrote:

Hello everyone,

please can you give me pointers on how to easiest parse multi-valued
\dummyparameter{...} like in

\something[...,weather={sunshine, rain, hail},...]

so that I can test for e.g.  rain, sunshine, wind, hail, mist, fog,
storm etc, each if it is present or not?

...so I can keep my number of parameters down and my parameter list as
simple as possible.

I have no idea what to search for in the docs or (better) in the test
cases / samples.
Would be great if you could just let me know where to look or what to
sarch for

\setvariables[mynamespace][a=1,b=2,c={3,4,5}]

\doifelseinset{4}{\getvariable{mynamespace}{c}}{FOUR}{OEPS}

\setvariables[mynamespace][d={one,two,three,four}]

\doifelseinset{4}{\getvariable{mynamespace}{c}}{FOUR}{OEPS}

\doifelseinset{two}{\getvariable{mynamespace}{d}}{y}{n}

of course when you need millions of (similar) checks you might go for
another approach but this is still doable (0.02 sec per 10K on my
machien so less on yours)

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] parsing multi-valued parameters

2021-02-11 Thread Werner Hennrich

Hello everyone,

please can you give me pointers on how to easiest parse multi-valued
\dummyparameter{...} like in

\something[...,weather={sunshine, rain, hail},...]

so that I can test for e.g.  rain, sunshine, wind, hail, mist, fog,
storm etc, each if it is present or not?

...so I can keep my number of parameters down and my parameter list as
simple as possible.

I have no idea what to search for in the docs or (better) in the test
cases / samples.
Would be great if you could just let me know where to look or what to
sarch for

Thank you very much!
Werner


___
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-23 Thread Werner Hennrich

Am 22.01.21 um 23:46 schrieb Wolfgang Schuster:

I guess you set the value in a local group and at the end of the group
your setting is forgotten, ...


you're right Wolfgang!

I removed a \begingroup-\endgroup pair in the macro that sets the value
by calling my \setHeaderVar and now I get the updates being visible
inside the header code.


a simple change you can make is to replace
\doassign with \getgparameters which makes global settings.


I couldn't find any docu on \getgparameters except for its parameter
list (in setup-en.pdf) but what I have now will totally suffice.


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).


I didn't even try the \setvariables approach now,
even though I had checked that one out before I wrote to this list
(w/out checking the begin/endgroup thing though).

Thank you very much and best regards,
Werner


___
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] new lmtx / fonts

2021-01-22 Thread Werner Hennrich

Am 22.01.21 um 09:50 schrieb Hans Hagen:

I'm still playing a bit with metafonts so there are two new files

context --global meta-imp-clock.mkxl


> A crazy examples made in crazy times.

made me laugh =:-)

Thanks, weHe


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