[NTG-context] transparent color

2024-05-06 Thread Hans van der Meer via ntg-context
I would like to use a transparent version of an existing color. Thus
\definecolor[transparentcolor][color,t=0.2,a=1]
instead of
\definecolor[transparentcolor][r=..,g=..,b=..,t=0.2,a=1]
because I do not know the rgb values of the color that must be made 
transparent, only its name.

How to accomplish? 

yours sincerely
dr. Hans van der Meer



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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Comments placed in the margin

2024-03-19 Thread Hans van der Meer via ntg-context
I am using: \margindata[]{group to isolate change e.g. {\rm \it etc}}

yours sincerely
dr. Hans van der Meer



> On 19 Mar 2024, at 15:38, Jeroen  wrote:
> 
> For comments that are placed in the margin, the \inleft{}, \inouter{} etc 
> will place text in the margin in bold. Can this text be placed in the margin 
> in regular text or possibly in slightly smaller font size compared to the 
> regular text in the document?
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] behaviour sy in externalfigure

2024-02-16 Thread Hans van der Meer via ntg-context

The scaling in \externalfigure[][] with option sy=number seems to have a discrete change in behaviour between sy=1.0 and sy=(not 1.0).The MWE (see below, FIGURE REMOVED BECAUSE OTHERWISE  MESSAGE TOO LARGE) shows that factor sy≠1.0 is applied to the original height of the figure, but for sy=1.0 the height is changed proportional to the reduction in width.Thus the series sy=0.999 sy=1.0 sy=1.001 has a discontinuity in the scaling of height.I would expect sy=1.0 to return the figure in the original height.Is this behaviour on purpose? With the current behaviour I must provide for sy=1.0 => sy=1.001 in order to get the original height. Although not to difficult with a jump to Lua code, I would prefer not.yours sincerelydr. Hans van der Meer\starttext\ConTeXt\space version \contextversion\blank\type{\externalfigure[testfile.jpg]} source figure\crlf\externalfigure[testfile.jpg]\crlf\type{\externalfigure[testfile.jpg][width=5cm]}\crlf\externalfigure[testfile.jpg][width=5cm]\crlfExplanation: height scaled proportional to the width reduction.\blank\type{\externalfigure[testfile.jpg][width=5cm,sy=0.999]}\crlf\externalfigure[testfile.jpg][width=5cm,sy=1.001]\crlfExplanation: sy different from 1.0 applies sy to original height.\blank\type{\externalfigure[testfile.jpg][width=5cm,sy=1.0]}\crlf\externalfigure[testfile.jpg][width=5cm,sy=1.0]\crlfExplanation: sy=1.0 exactly is ignored?\blank\type{\externalfigure[testfile.jpg][width=5cm,sy=1.001]}\crlf\externalfigure[testfile.jpg][width=5cm,sy=1.001]\crlfExplanation: sy different from 1.0 applies sy to original height.\blank\stoptext

testsyscaling.pdf
Description: Adobe PDF document

met vriendelijke groet,dr. Hans van der MeerBurgemeester Rijnderslaan 244 ingang D1185 MC Amstelveentel. 020 6452701 / 06 53743629


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: hyphenation question

2024-02-02 Thread Hans van der Meer via ntg-context
Yes, that is a possibilty that did not escape me. But this is but an example. 
In those documents such abbreviations are quite common and frequent. 
I hoped therefore to find a generic solution!

yours sincerely
dr. Hans van der Meer



> On 2 Feb 2024, at 18:25, Hans Hagen via ntg-context  
> wrote:
> 
> On 2/2/2024 1:03 PM, Hans van der Meer via ntg-context wrote:
>> In the 18th century documents I am transcribing often words are abbreviated 
>> as for example /voorschreeve/ becoming /voors:/ In the transcription it is 
>> usual to write this as /voors[chreeve]/ indicating to the reader how the 
>> abbreviation was interpreted.
>> The problem then arises with hyphenation, because /voors[chreeve]/  in the 
>> example will not be hyphenated as if the []'s were absent. Which is what I 
>> would like to happen.
>> Question: is it possible to realize this and how?
> Like this?
> 
> \starttext
> 
> \startexceptions
>voor-s[chree-ve]
> \stopexceptions
> 
> \hsize1mm
> voors[chreeve]
> 
> \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 / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] hyphenation question

2024-02-02 Thread Hans van der Meer via ntg-context
In the 18th century documents I am transcribing often words are abbreviated as 
for example voorschreeve becoming voors: In the transcription it is usual to 
write this as voors[chreeve] indicating to the reader how the abbreviation was 
interpreted.

The problem then arises with hyphenation, because voors[chreeve]  in the 
example will not be hyphenated as if the []'s were absent. Which is what I 
would like to happen.

Question: is it possible to realize this and how?

yours sincerely
dr. Hans van der Meer



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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-01-23 Thread Hans van der Meer via ntg-context
Just did 'sh install.sh' a moment ago without problems.
In the past I had to do xattr -d com.apple.quarantaine path-to-executable once 
but not anymore.
I think the xattr resides in the Apple command tools. Are you sure you have 
them?

yours sincerely
dr. Hans van der Meer



> On 23 Jan 2024, at 17:29, Otared Kavian  wrote:
> 
> Hi Hans,
> 
> I tried to update to your latest version (for MacOS Arm1) with the command 
>   sh install.sh
> but obtained the following message and no update:
> 
> xattr: bin/mtxrun: No such xattr: com.apple.quarantine
> install.sh: line 110: 62611 Killed: 9   $PWD/bin/mtxrun --script 
> ./bin/mtx-install.lua --update --server="$LMTXSERVER" 
> --instance="$LMTXINSTANCE" --platform="$PLATFORM" --erase 
> --extras="$LMTXEXTRAS" $@
> 
> 
> Since I have a working (and backed up…) version 2024-01-18, there is no 
> absolute necessity for me to update right now, but I wanted just to inform 
> you about the issue I encountered. I wonder whether other MacOS users have 
> had such a problem.
> 
> Best regards: Otared
> 
>> On 23 Jan 2024, at 10:09, Hans Hagen via ntg-context  
>> wrote:
>> 
>> On 1/20/2024 10:32 AM, Ursula Hermann wrote:
>>> 32 bits Windows download does not work, because 404 report.
>> 
>> i uploaded a win32 installer (for now we only keep 32 bit win but once all 
>> users are on 64 bit ...)
>> 
>> the current upload is as usual work in progress
>> 
>> 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 / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki : https://wiki.contextgarden.net
>> ___
> 
> Otared Kavian
> e-mail: ota...@gmail.com
> Phone: +33 6 88 26 70 95
> 
> 
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: externalfigure crashed

2023-11-22 Thread Hans van der Meer via ntg-context
Here too, I find 'undefined' from \meaning\expandeddetokenize

yours sincerely
dr. Hans van der Meer



> On 22 Nov 2023, at 21:55, Aditya Mahajan  wrote:
> 
> On Wed, 22 Nov 2023, Wolfgang Schuster wrote:
> 
>> Hans van der Meer schrieb am 22.11.2023 um 21:22:
>>> The problem persists. Here the new logfile.
>> 
>> 1. What is the version of your Luametatex binary?
>> 
>> luametatex --version
>> This is LuaMetaTeX, Version 2.10.11
> 
> For me, it is the same:
> 
> This is LuaMetaTeX, Version 2.10.11
> 
>> 
>> 2. What do you get in your log-file with the following example!
>> 
>> \starttext
>> \show\expandeddetokenize
>> \stoptext
>> 
>> On my system I can find the following line:
>> 
>> > \expandeddetokenize=primitive \expandeddetokenize
> 
> \expandeddetokenize=undefined
> 
> Not sure why this is the case!
> 
> Aditya___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] externalfigure crashed

2023-11-22 Thread Hans van der Meer via ntg-context
When \externalfigure could not find the file it used to graciously place a rectangle kindly telling the user that the file has not been found.But now, however, it seems the default in this case is a crash. Very annoying in comparison with the earlier behaviour.I might make a mistake, but the MWE is as simple as can be.The filename is test.jpeg, then this runs ok:\starttext\externalfigure[test.jpeg][]\stoptextBut this crashes, see the log:\starttext\externalfigure[test.jpg][]\stoptext
yours sincerelydr. Hans van der Meer

showlayout.log
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: marginwidths

2023-11-22 Thread Hans van der Meer via ntg-context
But changing the width of the section in the middle is not changing. Adapt \textwidth narrows the textwidth but does not allow wider margins.see next example. So how to adapt the page to for example:[leftmargin 40mm][middle what is left][rightmargin 60mm] this should leave 210-40-60=110mm in the middle, but doesn't.The textwidth is narrowed but the margins refuse to obey their setting.
yours sincerelydr. Hans van der Meer\setuppapersize[A4][A4]\setuplayout[leftmargin=40mm,rightmargin=60mm,textwidth=110mm]\showframe\starttextsetuplayout: leftmargin=40mm, rightmargin=60mm, textwidth=110mm\crlfabc\dotfill xyz\crlf\stoptext

showlayout.pdf
Description: Adobe PDF document




On 22 Nov 2023, at 14:46, Marco Patzer  wrote:On Wed, 22 Nov 2023 14:17:29 +0100Hans van der Meer via ntg-context  wrote:I would like to change the width of the margins on the page.In the MWE here, the pagelayout does not seem to obey the\setuplayout command. Why are the margins shown uneffected by\setuplayout?Works as expected here. The margins have changed and \showlayoutgives you:  \leftmarginwidth  =  6cm  \rightmarginwidth = 10cmChange the example to:  \setuplayout    [leftmargin=6mm,  %% mm, not cm rightmargin=10mm]That way you better see the effect on the page.Marco___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] marginwidths

2023-11-22 Thread Hans van der Meer via ntg-context
I would like to change the width of the margins on the page.In the MWE here, the pagelayout does not seem to obey the \setuplayout command. Why are the margins shown uneffected by \setuplayout?
yours sincerelydr. Hans van der Meer







showlayout.pdf
Description: Adobe PDF document


showlayout.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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] unwanted blank page

2023-11-19 Thread Hans van der Meer via ntg-context
I should have a first page without pagenumber and pagenumbers on the subsequent ones.However the MWE here introduces an unwanted blank page from the call to \setuppagenumbering[state=start].And the \setuppagenumbering has to come after the \page, of course.Should I program otherwise?
yours sincerelydr. Hans van der Meer




% test pagenumbering start-stop\setuppapersize[A5][A5]\starttext\setuppagenumbering[state=stop]\ConTeXt\space\contextversion\blankThis is page 1 without pagenumber.\crlf\page\setuppagenumbering[state=start]This should be a page with pagenumber 2.\crlfBut the pagenumber is 3 instead after blank page 2.\stoptext

extrapage.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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] placing \externalfigure

2023-11-12 Thread Hans van der Meer via ntg-context
In placing \externalfigure[file] I observe the figure is placed with its bottom 
on the baseline, thus:

[externalfigure]
--- baseline

I looked into the option list of setupexternalfigure but could not find one 
whereby the location with respect to the baseline is either top, bottom or 
center.
Such an option might not exist and then I must program around it. But I prefer 
to use something that is already there and fits my needs.

yours sincerely
dr. Hans van der Meer



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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \xmlinclusion?

2023-11-09 Thread Hans van der Meer via ntg-context
I cannot get \xmlinclusion working. Below an MWE with its output. What I am missing here or is \xmlinclusion not ok?\startxmlsetups demo	\xmlsetsetup{#1}{		root|test	}{demo:*}\stopxmlsetups\xmlregisterdocumentsetup{demo}{demo}\startxmlsetups demo:root	\blank{\bf Start test}\crlf	\string\xmlinclusion\{\#1\} ===> "\xmlinclusion{#1}"\crlf	\xmlflush{#1}\crlf	{\bf End test}\blank\stopxmlsetups\startxmlsetups demo:test	\xmlflush{#1}\stopxmlsetups\starttext\currentdate-\currenttime\quad\ConTeXt-version=\contextversion\blankThe following text is on page 52 of xml-mkiv.pdf:\crlf\type{\xmlinclusion{...}}\crlfreturns the file where the node comes from\blankFollows the test of this claim:\xmlprocessfile{demo}{demo.xml}{}\blank\typefile{demo.xml}\stoptext	node TEST

xml-inclusion.pdf
Description: Adobe PDF document

met vriendelijke groet,dr. Hans van der MeerBurgemeester Rijnderslaan 244 ingang D1185 MC Amstelveentel. 020 6452701 / 06 53743629




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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Testing whether an XML attribute exists

2023-10-17 Thread Hans van der Meer via ntg-context
But there is also
\ifxmlattempty{#1}{prefix} .. \else .. \fi

yours sincerely
dr. Hans van der Meer



> On 17 Oct 2023, at 13:37, Taco Hoekwater  wrote:
> 
> 
> 
>> On 17 Oct 2023, at 12:43, Michael Guravage  
>> wrote:
>> 
>> Hi,
>> 
>> I am typesetting a very simple address list whose source is written in XML.  
>> Typesetting choices need to be made dependent on the presence of various 
>> attributes; consider the following  element. 
>> 
>> 
>> 
>> If the prefix attribute exists I'l like the name to appear as, e.g. 'Boer, 
>> den."  The several XML attribute testing functions in the XML manual appear 
>> to discriminate on an attribute's value. I tried  \xmldoifnotatt in an 
>> attempt to say, "TRUE if prefix does not match an empty string",  since I am 
>> not interested in the attribute's value but only whether or not it exists. 
>> The code below doesn't work. If someone who knows why it doesn't work would 
>> enlighten my ignorance I would be most grateful. A brief explanation and 
>> example of \xmldoifatt, \xmldoifnotatt, and \xmldoifelseatt would be 
>> exceedingly helpful.
>> 
>> \startxmlsetups xml:list:family
>>  {\bf \xmlatt{#1}{surname} \xmldoifnotatt{#1, prefix, ''} {, 
>> \xmlatt{#1}{prefix}}} \crlf
> 
> 
> Syntax error there, you need:
> 
>  \xmldoifnotatt{#1}{prefix}{}{, \xmlatt{#1}{prefix}}
> 
> Best wishes,
> Taco
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Offline documentations

2023-10-02 Thread Hans van der Meer via ntg-context
I find offline documentation in the installed ConteXt files in 
ConTeXt/tex/texmf-context/doc/context/documents/general/manuals 
with more in neighboring directories. Hope this helps.

met vriendelijke groet,
dr. Hans van der Meer
Burgemeester Rijnderslaan 244 ingang D
1185 MC Amstelveen
tel. 020 6452701 / 06 53743629

> On 2 Oct 2023, at 10:55, Henning Hraban Ramm  wrote:
> 
> 
> __

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

[NTG-context] rotation weirdness

2023-09-16 Thread Hans van der Meer via ntg-context
I encountered something weird, that I cannot explain. It could be an error, but I was not able to pinpoint this.It seems as if the \rotate macro plays havoc with the macro definitions used to set the color of the frame and an outside title.Placing the outside title before the rotate proves that the call to \rotate is the culprit.I enclose an MWE with a little jpeg figure as illustration.
yours sincerelydr. Hans van der Meer\def\formattitle#1{\color[\boxtitlecolor]{#1\strut}}\def\boxfigurerotate#1#2{%	\rotate[rotation=10]%	{%		\externalfigure[#1]%		[rulethickness=4pt,width=100pt,height=50pt,frame=on,framecolor=\boxframecolor,]%	}%	\formattitle{#2}%}\def\boxfigure#1#2{%		\externalfigure[#1]%		[rulethickness=4pt,width=100pt,height=50pt,frame=on,framecolor=\boxframecolor,]%	\formattitle{#2}%}\def\boxtitlecolor{blue}\def\boxframecolor{blue}\starttext\ConTeXt\ \contextversion\blankProblem:\crlfit looks like \type{\rotate[]{}} kills the definition of boxtitlecolor.Changing the names of the titlecolor/framecolor definitions makes no difference.\crlfWhy is this? ConTeXt error?\blank\boxfigure{test}{norotation: title color is blue}\blank\boxfigurerotate{test}{rotation: title color should be blue but is not}\blank\def\boxframecolor{red}\boxfigurerotate{test}{rotation: title color different from framecolor now blue}\stoptext

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

[NTG-context] Re: ifxmlselfempty

2023-09-04 Thread Hans van der Meer via ntg-context
I changed this in the source of lxml-ini.lua (line 225). It seems the 'not' has been accidentally crept in (from  copying that line in ifxmlempty, the item above?)Anyway, remade the format and now the result is as I expected it to be. See below in the output of the MWE from my first post on this subject. I added the relevant portion of the code for clarity.I am sure the next update will reflect it in the source ;-)dr. Hans van der Meer   implement {        name      = "ifxmlselfempty",        public    = true,        usage     = "condition",        arguments = "argument",        actions   = function(id)--            return boolean_code, not checkedempty(getid(id)) and true            return boolean_code, checkedempty(getid(id)) and true        end    }

xmlsetup-template.pdf
Description: Adobe PDF document
On 4 Sep 2023, at 10:05, denis.ma...@unibe.ch wrote:IDK. But why do have a setup for , which does not appear in your xml source (shouldn’t it be ?)?  Von: Hans van der Meer via ntg-context <ntg-context@ntg.nl> Gesendet: Sonntag, 3. September 2023 14:11An: NTG ConTeXt <ntg-context@ntg.nl>Cc: Hans van der Meer <havdm...@ziggo.nl>Betreff: [NTG-context] ifxmlselfempty Is it possible that  the new \ifxmlselfempty has reversed its outcome? Or did I something wrong in this MWE?Here an MWE. yours sincerelydr. Hans van der Meer   \startbuffer[test]!not empty node!\stopbuffer \startxmlsetups xml:mysetups   \xmlsetsetup{\xmldocument}{something|emptynode|notemptynode}{xml:*}\stopxmlsetups \xmlregistersetup{xml:mysetups} \startxmlsetups xml:emptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}attribute = \xmlatt{#1}{value}\elsecontent = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}content = \xmlflush{#1}\elseattribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups \startxmlsetups xml:notemptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}attribute = \xmlatt{#1}{value}\elsecontent = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}content = \xmlflush{#1}\elseattribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups \startxmlsetups xml:something\xmlall{#1}{./emptynode}\blank\xmlall{#1}{./notemptynode}\blank\stopxmlsetups \starttext\ConTeXt\ \contextversion\blank   \xmlprocessbuffer{main}{test}{}\stoptext___
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
___

[NTG-context] ifxmlselfempty

2023-09-03 Thread Hans van der Meer via ntg-context
Is it possible that  the new \ifxmlselfempty has reversed its outcome? Or did I something wrong in this MWE?Here an MWE.
yours sincerelydr. Hans van der Meer






xmlsetup-template.pdf
Description: Adobe PDF document
\startbuffer[test]!not empty node!\stopbuffer\startxmlsetups xml:mysetups   \xmlsetsetup{\xmldocument}{something|emptynode|notemptynode}{xml:*}\stopxmlsetups\xmlregistersetup{xml:mysetups}\startxmlsetups xml:emptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}	attribute = \xmlatt{#1}{value}\else	content = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}	content = \xmlflush{#1}\else	attribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups\startxmlsetups xml:notemptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}	attribute = \xmlatt{#1}{value}\else	content = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}	content = \xmlflush{#1}\else	attribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups\startxmlsetups xml:something\xmlall{#1}{./emptynode}\blank\xmlall{#1}{./notemptynode}\blank\stopxmlsetups\starttext\ConTeXt\ \contextversion\blank   \xmlprocessbuffer{main}{test}{}\stoptext___
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
___

[NTG-context] Re: attribute selection

2023-08-30 Thread Hans van der Meer via ntg-context
Finally I saw the problem. Calling 
\xmlfilter{#1}{./node/command(demo:attribute:node)} is the right way.
Sorry for the noise.

dr. Hans van der Meer
> On 30 Aug 2023, at 13:49, Hans van der Meer via ntg-context 
>  wrote:
> 
> This line of code comes from the xml documentation (page 31):
> \xmlfilter{#1}{./node[@type=="cleanup"]}
> It should select among the 's those with .
> However, this node is not selected in the call to \xmlfilter.
> Where am I wrong?
> 
> MWE follows
> 
> 
> % failure to typeset attribute selected.
> \setuppapersize[A5][A5]
> \startxmlsetups demo:attribute
>   \xmlsetsetup{#1}{root|node}{demo:attribute:*}
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{demo:attribute}
> \startxmlsetups demo:attribute:root
>   Execute \type{\xmlall{#1}{./node}}
>   \crlf
>   \xmlall{#1}{./node}
>   \crlf
>   Execute \type{\xmlfilter{#1}{./node[@type=="cleanup"]}}
>   \xmlfilter{#1}{./node[@type=="cleanup"]}
>   \crlf
> \stopxmlsetups
> \startxmlsetups demo:attribute:node
>   calling node <\xmltag{#1}>
>   \xmlflush{#1}
>   \crlf
> \stopxmlsetups
> \startbuffer[attribute]
> 
> no attribute
> attribute type = cleanup
> 
> \stopbuffer
> \startbuffer[attribute2]
> 
> no attribute
> attribute type=cleanup
> 
> \stopbuffer
> \starttext
> \ConTeXt\ version\contextversion\blank
> \xmlprocessbuffer{demo}{attribute}{}
> \stoptext
> 
> 
> 
> 
> Hans van der Meer
> ___
> 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
> ___

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

[NTG-context] attribute selection

2023-08-30 Thread Hans van der Meer via ntg-context
This line of code comes from the xml documentation (page 31):
\xmlfilter{#1}{./node[@type=="cleanup"]}
It should select among the 's those with .
However, this node is not selected in the call to \xmlfilter.
Where am I wrong?

MWE follows


% failure to typeset attribute selected.
\setuppapersize[A5][A5]
\startxmlsetups demo:attribute
\xmlsetsetup{#1}{root|node}{demo:attribute:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:attribute}
\startxmlsetups demo:attribute:root
Execute \type{\xmlall{#1}{./node}}
\crlf
\xmlall{#1}{./node}
\crlf
Execute \type{\xmlfilter{#1}{./node[@type=="cleanup"]}}
\xmlfilter{#1}{./node[@type=="cleanup"]}
\crlf
\stopxmlsetups
\startxmlsetups demo:attribute:node
calling node <\xmltag{#1}>
\xmlflush{#1}
\crlf
\stopxmlsetups
\startbuffer[attribute]

no attribute
attribute type = cleanup

\stopbuffer
\startbuffer[attribute2]

no attribute
attribute type=cleanup

\stopbuffer
\starttext
\ConTeXt\ version\contextversion\blank
\xmlprocessbuffer{demo}{attribute}{}
\stoptext



xml-tex-attribute-select.pdf
Description: Adobe PDF document



Hans van der Meer
___
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
___

[NTG-context] Re: ideas for ConTeXt stickers?

2023-08-07 Thread Hans van der Meer via ntg-context
Please phrase your reaction differently. This is absolutely not about my sense 
of humor. But if you have observed the news media these last few years, you may 
have noticed how sensitive the public opinion has become about "humor" of this 
kind.  I am afraid it could place the Tex community (for which I care) in a 
less favourable light.

yours sincerely
dr. Hans van der Meer



> On 7 Aug 2023, at 19:57, Henning Hraban Ramm  wrote:
> 
> Am 07.08.23 um 19:20 schrieb Hans van der Meer via ntg-context:
>> I would say: Don't use this one. This sticker could be interpreted as having 
>> a sexual connotation and that is not the way (excuse the Mandalorian).
> 
> The sexual connotation is intentional, of course. Apparently not everyone’s 
> kind of humor.
> 
> Hraban
> ___
> 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
> ___

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

[NTG-context] Re: ideas for ConTeXt stickers?

2023-08-07 Thread Hans van der Meer via ntg-context
I would say: Don't use this one. This sticker could be interpreted as having a sexual connotation and that is not the way (excuse the Mandalorian).
yours sincerelydr. Hans van der Meer



On 7 Aug 2023, at 19:13, Henning Hraban Ramm  wrote:Hi,while it’s too late for this year’s conferences, I’d like to have some nice ConTeXt, MetaPost or general TeX stickers for next year’s.Do you have ideas?Find attached an example by Moss.Hraban___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-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net___

TeXies do it in groups-pink-on-black.pdf-flat-no-ICC.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 / 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
___

[NTG-context] Re: Replacing %20 with spaces in xml attributes

2023-07-21 Thread Hans van der Meer via ntg-context
Here in Terminal on my Mac:

21 ~: lua
Lua 5.4.6  Copyright (C) 1994-2023 Lua.org, PUC-Rio
> string.gsub('a%20b', '%%20', ' ')
a b 1
> (string.gsub('a%20b', '%%20', ' '))
a b
> ^D
21 ~: 

The first call returns the 1 giving the match, the extra ()'s get rid of that 
second return value.

yours sincerely
dr. Hans van der Meer



> On 21 Jul 2023, at 12:37, denis.ma...@unibe.ch wrote:
> 
> Hi,
>  
> I’m typesetting an XML document where the links to the images contain spaces 
> which are encoded as %20
> 
>  
> Using this works in cases without spaces:
>  
> \startxmlsetups xml:fig:graphic
>   \externalfigure[\xmlatt{#1}{xlink:href}]
> \stopxmlsetups
>  
> This also works for normal spaces, but is there a way to decode/expand the 
> %20s to regular spaces?
>  
> I’ve tried with some Lua, but I don’t really know how to pass data around.
>  
> %
> \startluacode
> function replaceSpaces(s)
>   result = string.gsub(s, "%%20", " ")
>   context(result)
> end
> \stopluacode
>  
> \define[1]\replaceSpaces{\ctxlua{replaceSpaces("#1")}}
>  
> \startxmlsetups xml:fig:graphic
>   \externalfigure[\replaceSpaces{\xmlatt{#1}{xlink:href}}]
> \stopxmlsetups
> %
>  
> Any hints, why this does not work?`
>  
> Also, maybe there’s a simpler way for this kind of scenario?
> 
> Best,
> Denis
> ___
> 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 
> ___

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

[NTG-context] Re: \hidewidth disappeared

2023-07-16 Thread Hans van der Meer via ntg-context
> \hidewidth is a plain tex thing that is unlikely to work well with other code

With all respect, I do not understand why it can cause problems and "is 
unlikely to work well". 
It is no surprise that in TeX you can cause havoc by using things unwisely or 
in the wrong place (and I have enough experience with this;-). By using things 
the burden to use them well falls onto the programmer, of course.

Given \hidewidth's body is \hskip\hideskip:
\hskip I would sorely miss and \hideskip is nothing more than a register set by 
Knuth to -1000pt plus1fill.

I am open for further enlightment and not too old to learn.

yours sincerely
dr. Hans van der Meer



> On 16 Jul 2023, at 14:08, Hans Hagen via ntg-context  
> wrote:
> 
> On 7/16/2023 1:31 PM, Hans van der Meer via ntg-context wrote:
>> What happened to \hidewidth? It looks as if it disappeared. See the 
>> accompanying MWE.
>> However, searching the ConTeXt source I find it used in enco-ini.mkiv, 
>> defined in syst-ini.mkiv, but commented out in syst-ini.mkxl.
>> Why is that? It seems a harmless definition, and its body is even used twice 
>> in enco-ini.mkxl.
>> I dare say, with all due respect, it is not pleasant (and a waste of time) 
>> to find working code suddenly broken because of leftout macro's. And I feel 
>> lucky to not having used \ialign, because something similar happened to it.
> \hidewidth is a plain tex thing that is unlikely to work well with other code
> 
> \ialign is also something plain and as it sets everycr as well as tabskip and 
> also can interfere
> 
> you can define these macros yourself and hope for the best wrt interference 
> but i'm not going to look into such interferences
> 
> 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 / 
> 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
> ___

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

[NTG-context] \hidewidth disappeared

2023-07-16 Thread Hans van der Meer via ntg-context
What happened to \hidewidth? It looks as if it disappeared. See the accompanying MWE.However, searching the ConTeXt source I find it used in enco-ini.mkiv, defined in syst-ini.mkiv, but commented out in syst-ini.mkxl.Why is that? It seems a harmless definition, and its body is even used twice in enco-ini.mkxl.I dare say, with all due respect, it is not pleasant (and a waste of time) to find working code suddenly broken because of leftout macro's. And I feel lucky to not having used \ialign, because something similar happened to it.
yours sincerelydr. Hans van der Meer






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

[NTG-context] depth of framed

2023-07-16 Thread Hans van der Meer via ntg-context
I cannot get rid of some depth in framed. Used various combinations of the depth and backgrounddepth setting, nothing helps.What am I doing wrong? Or is something in \framed not working in the way I expected?See the accompanying MWE.
yours sincerelydr. Hans van der Meer






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

[NTG-context] how to install on M2 Mac?

2023-06-27 Thread Hans van der Meer via ntg-context
After transferring the context directory to my new M2 Mac Studio sh.install.sh 
complains "Your system "Darwin arm64" is not supported (yet)". What now? I 
cannot live without TeX-ing 沈

yours sincerely
dr. Hans van der Meer



___
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] right and left arrowfill

2023-06-22 Thread Hans van der Meer via ntg-context
\starttext   x \rightarrowfill x   x \leftarrowfill xhbox to 5cm:   y\hbox to5cm{\rightarrowfill}y   y\hbox to5cm{\leftarrowfill}y\stoptextBut obviously not in an dimensioned \hbox, whereas Knuth's version does that too.

On 22 Jun 2023, at 15:11, Hans Hagen via ntg-context  wrote:   x \rightarrowfill x   x \leftarrowfill xyours sincerelydr. Hans van der Meer

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


[NTG-context] right and left arrowfill

2023-06-21 Thread Hans van der Meer via ntg-context
A few days ago I drew attention to the fact that \rightarrowfill and \leftarrowfill are broken in the latest ConTeXt. Imho that should not happen with basic TeX macro's.Although one can recreate their definitions from the TeX-book (see the MWE attached), I still do not understand why it should be needed.
yours sincerelydr. Hans van der Meer 

hboxarrowfill.tex
Description: Binary data


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


[NTG-context] right/left-arrowfill not seen

2023-06-18 Thread Hans van der Meer via ntg-context
Why do the \rightarrowfill and \leftarrowfill not show up in the accompanying MWE?
yours sincerelydr. Hans van der Meer





hboxfill.pdf
Description: Adobe PDF document


hboxfill.tex
Description: Binary data


hboxfill.log
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 / 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] letfrozen?

2023-06-13 Thread Hans van der Meer via ntg-context
Of course. But without that \enabledirective I can redefine the frozen macro at 
will, as a simple test did show.
The crux, however, is that one wants to protect the frozen code always, 
irrespective of that directive setting.

dr. Hans van der Meer
> On 12 Jun 2023, at 19:47, Hans Hagen via ntg-context  
> wrote:
> 
> On 6/12/2023 12:32 PM, Hans van der Meer via ntg-context wrote:
>>> On 12 Jun 2023, at 11:12, Hans Hagen via ntg-context  
>>> wrote:
>>> 
>>> On 6/12/2023 10:57 AM, Hans van der Meer via ntg-context wrote:
>>>> The manual LMTX-primitives on page 21 tells me:
>>>>You can explicitly freeze an unfrozen macro.
>>>>...
>>>>A redefinition will now give: You can't redefine a frozen macro.
>>>> But is this true? The following code seems to contradict this:
>>>> \def\HOME{myhome}
>>>> \writestatus{1}{\meaning\HOME}
>>>> \letfrozen\HOME
>>>> \writestatus{2}{\meaning\HOME}
>>>> \def\HOME{other home}
>>>> \writestatus{3}{\meaning\HOME}
>>>> 
>>>> Is this mechanism broken? It looks so useful to prevent accidental 
>>>> redefinition!
>>> 
>>> here i run with
>>> 
>>> \enabledirectives[overloadmode=error]
>>> 
>>> (you can do that in cont-sys.mkxl)
>>> 
>>> \enabledirectives[overloadmode=warning]
>>> Hans
>>> 
>> Pity. Now I get on loading the tex file:
>> "csname overload > fatal error, protection level 4, control sequence 'nbsp', 
>> properties 'immutable', file 't-hvdm-text.tex', line 63
>> while I had hoped that frozen would give me something like:
>> illegal attempt to redefine \HOME
>> Byproduct (not unwanted) the above illegal redefinition to be solved :-)
>> May I ask why obviously the frozen-mechanism seems (yet?) unimplemented?
> It's okay and has been around for quite a while now.
> 
> \enabledirectives[overloadmode=error]
> 
> \starttext
> 
>\frozen\def\HOME{}
> 
>\def\HOME{!}
> 
> \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 / 
> 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
> ___

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


[NTG-context] xml nbsp?

2023-06-13 Thread Hans van der Meer via ntg-context
What happened to the non breaking space in XML? It has disappeared in a way. See the minimal example attached.dr. Hans van der Meer

test-nbsp.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 / 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] letfrozen?

2023-06-12 Thread Hans van der Meer via ntg-context
> On 12 Jun 2023, at 11:12, Hans Hagen via ntg-context  
> wrote:
> 
> On 6/12/2023 10:57 AM, Hans van der Meer via ntg-context wrote:
>> The manual LMTX-primitives on page 21 tells me:
>>  You can explicitly freeze an unfrozen macro.
>>  ...
>>  A redefinition will now give: You can't redefine a frozen macro.
>> But is this true? The following code seems to contradict this:
>> \def\HOME{myhome}
>> \writestatus{1}{\meaning\HOME}
>> \letfrozen\HOME
>> \writestatus{2}{\meaning\HOME}
>> \def\HOME{other home}
>> \writestatus{3}{\meaning\HOME}
>> 
>> Is this mechanism broken? It looks so useful to prevent accidental 
>> redefinition!
> 
> here i run with
> 
> \enabledirectives[overloadmode=error]
> 
> (you can do that in cont-sys.mkxl)
> 
> \enabledirectives[overloadmode=warning]
> Hans
> 

Pity. Now I get on loading the tex file:
"csname overload > fatal error, protection level 4, control sequence 'nbsp', 
properties 'immutable', file 't-hvdm-text.tex', line 63

while I had hoped that frozen would give me something like:
illegal attempt to redefine \HOME

Byproduct (not unwanted) the above illegal redefinition to be solved :-)

May I ask why obviously the frozen-mechanism seems (yet?) unimplemented?

dr. Hans van der Meer

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


[NTG-context] letfrozen?

2023-06-12 Thread Hans van der Meer via ntg-context
The manual LMTX-primitives on page 21 tells me:
You can explicitly freeze an unfrozen macro.
...
A redefinition will now give: You can't redefine a frozen macro.

But is this true? The following code seems to contradict this:

\def\HOME{myhome}
\writestatus{1}{\meaning\HOME}
\letfrozen\HOME
\writestatus{2}{\meaning\HOME}
\def\HOME{other home}
\writestatus{3}{\meaning\HOME}




Is this mechanism broken? It looks so useful to prevent accidental redefinition!

dr. Hans van der Meer


___
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] font style and size interaction

2023-05-30 Thread Hans van der Meer via ntg-context
Hans,

I see this as a no with respect to changing the behaviour of \small and 
friends. Which I can well understand: changes on this level may trigger a lot 
of unwanted problems.
But now I can program around it with a clear conscience;-)

dr. Hans van der Meer

> On 30 May 2023, at 11:33, Hans Hagen via ntg-context  
> wrote:
> 
> On 5/30/2023 10:18 AM, Hans van der Meer via ntg-context wrote:
>> There is -- in my perception -- a problem with the interaction between font 
>> style and font size changes.
>> The order of calling for example  \it\small matters because \small\it leads 
>> to a different result.
>> I would however reason that size and style changes should be in orthogonal 
>> spaces, that is: the one should have no effect on the other.
>> Cause of this behaviour seems the \tf call included in small. See the 
>> accompanying example.
>> I can try to program around this, but I would prefer not to. Is there a 
>> possibility that this behaviour will be changed to \it\small and \small\it 
>> giving the same result?
> \small does a (massive) bodyfont switch and therefore you end up with regular 
> tf
> 
> 
> -
>  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 / 
> 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
> ___

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


[NTG-context] font style and size interaction

2023-05-30 Thread Hans van der Meer via ntg-context
There is -- in my perception -- a problem with the interaction between font 
style and font size changes.
The order of calling for example  \it\small matters because \small\it leads to 
a different result.
I would however reason that size and style changes should be in orthogonal 
spaces, that is: the one should have no effect on the other.
Cause of this behaviour seems the \tf call included in small. See the 
accompanying example.

I can try to program around this, but I would prefer not to. Is there a 
possibility that this behaviour will be changed to \it\small and \small\it 
giving the same result?

dr. Hans van der Meer



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


[NTG-context] font size and style

2023-05-26 Thread Hans van der Meer via ntg-context
Calling "\bf\tfa  TEXT" for example leaves the TEXT not in bold because \tfa 
does not respect the current style. As does \small, etc.
Shown by looking at the meaning of for example \small:
\small=protected macro:\triggergroupedcommand {\setsmallbodyfont \tf }

and

\tx=protected macro:\currentxfontsize \plusone \ifmmode \scriptstyle \orelse 
\ifconditional \c_font_inherit_scale \font_scale_inherit_x \else 
\font_scale_defined_x \fi \al­ ways\let \tx \txx

Thus in contrast \tx and \txx do respect the current style setting.

My question: It seems most convenient if I could retrieve the current style and 
reset that after a size command. I rather would refrain from tinkering with 
those. Since there is a \currentxfontsize is there an analogue for the style?

dr. Hans van der Meer
___
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
___


[NTG-context] position in xmlfilter

2023-05-22 Thread Hans van der Meer via ntg-context
I do not understand the behaviour of certain function is xml processing.
My problem is finding the position of the current node, for example with 
 I would like to see the first  resulting in 1 and the second in 2.
The result of some experiments:

return=[\xmlfilter{#1}{../tag()}]   returns the parent tag, in this 
case [setup] as expected
return=[\xmlfilter{#1}{./tag()}]returns the tag, in this case 
[example] as expected
return=[\xmlfilter{#1}{../position()}]  returns [] i.e. returns nothing 
expecting a number
return=[\xmlfilter{#1}{./position()}]   returns [] i.e. returns nothing 
expecting a number
return=[\xmlfilter{#1}{../index()}] returns [0] expecting a number larger 
than 0
return=[\xmlfilter{#1}{./index()}]  returns [0] expecting a number larger 
than 0

dr. Hans van der Meer
___
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] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Hans van der Meer via ntg-context
\def\relationsFontSize{8pt}\starttextHello World!\crlf\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext

Untitled.pdf
Description: Adobe PDF document
dr. Hans van der MeerOn 19 May 2023, at 11:43, Gerben Wierda via ntg-context  wrote:I want to use a variable for a font size so I can set it based on language (as some translated texts have widely different sizes)This fails:%===\newdimen\relationsFontSize\relationsFontSize=8pt\starttext\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext%===How can I use a variable to steer \switchtobodyfont size?
Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate


___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-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net__
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] new module installer and .tar.gz compression

2023-05-09 Thread Hans van der Meer via ntg-context


> On 9 May 2023, at 01:19, Hans Hagen via ntg-context  
> wrote:
> 
> On 5/8/2023 8:55 PM, Henning Hraban Ramm via ntg-context wrote:
> 
>> But either the module scripts should re-pack tgz archives or the installer 
>> must learn to handle them.
> The script now
> 
> -- before installing uninstalls a previous installation
> -- can uninstall an installed module
> -- can list installed modules
> 

Please don't do this! I fear it will break my habit of keeping older versions 
that worked for me. As a safeguard against things that are broken and will have 
to wait when repaired!

dr. Hans van der Meer


> For the moment I disable a few badly packages zips:
> 
> metaducks, sudoku, aquamints, simpleslides
> 
> as they put files in the root and their own directories and I am not adding a 
> zip-root remover and additional checkers.
> 
> No upload 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 / 
> 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
> ___

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


[NTG-context] missing xml call

2023-04-21 Thread Hans van der Meer via ntg-context
\xmlatt{}{} has a counterpart \xmlattribute{}{LPATH}{} where one can start the 
search for the attribute at LPATH.
for \xmlchainatt{}{} I am missing such a counterpart 
\xmlchainattribute{}{LPATH}{} where one can do the same.

The problem now is that \xmlchainatt{#1}{att} always finds attribute att when 
it is defined on the node itself.
But consider the case where att="true" exists with the intention to trigger a 
search higher up in the call chain for that same attribute att.
Of course \xmlattribute{#1}{..}{att} is not exactly the same as 
\xmlchainattribute{#1}{..}{att} would be .

yours sincerely
dr. Hans van der Meer



___
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] xmlsetentity on the fly?

2023-04-19 Thread Hans van der Meer via ntg-context
After some experiments I am now fairly convinced that the entities are 
substituted BEFORE the typesettting actually starts. And thus changing the 
entity on the fly will have no effect. Is there a flag that can be set in order 
to delay the substitution until the actual moment of typesetting that part of 
the input? I examined files lxml-ent.lua and lxml-tex.lua but could not find 
how to this.

dr. Hans van der Meer

> On 17 Apr 2023, at 18:11, Hans van der Meer via ntg-context 
>  wrote:
> 
> I tried 
> \directlua{xml.registerentity("DATE","NEWDATE")}
> 
> but neither does effect a change in the entity.
> 
> Why is that entry not set in the Lua-table entities? (file xml-ent.lua) has 
> as that function:
> 
> function xml.registerentity(key,value)
> entities[key] = value
> if trace_entities then
> report_xml("registering entity %a as %a",key,value)
> end
> end
> 
> 
>> On 17 Apr 2023, at 12:32, Hans van der Meer  wrote:
>> 
>> I would like to change an entity 'on the fly'. Example
>> 
>> \def\DATE{THEDATE}\expanded{\xmlsetentity{DATE}{\DATE}}
>> 
>> \startxmlsetups typ:event
>> 
>>  \def\DATE{NEWDATE}\expanded{\xmlsetentity{DATE}{\DATE}}
>> 
>> Using  within the .
>> 
>> \stopxmlsetups
>> 
>> However, using  inside an  always results in THEDATE and never 
>> in NEWDATE.
>> 
>> How can I change the value of the entity inside the xmlsetups?
>> 
> 
> dr. Hans van der Meer
> ___
> 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
> ___

___
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] xmlsetentity on the fly?

2023-04-17 Thread Hans van der Meer via ntg-context
I tried 
\directlua{lxml.registerentity("DATE","NEWDATE")}
and
\directlua{lxml.registerentity("DATE","NEWDATE")}

but neither does effect a change in the entity.

Why is that entry not set in the Lua-table entities? (file xml-ent.lua) has as 
that function:

function xml.registerentity(key,value)
entities[key] = value
if trace_entities then
report_xml("registering entity %a as %a",key,value)
end
end


> On 17 Apr 2023, at 12:32, Hans van der Meer  wrote:
> 
> I would like to change an entity 'on the fly'. Example
> 
> \def\DATE{THEDATE}\expanded{\xmlsetentity{DATE}{\DATE}}
> 
> \startxmlsetups typ:event
> 
>   \def\DATE{NEWDATE}\expanded{\xmlsetentity{DATE}{\DATE}}
> 
> Using  within the .
> 
> \stopxmlsetups
> 
> However, using  inside an  always results in THEDATE and never 
> in NEWDATE.
> 
> How can I change the value of the entity inside the xmlsetups?
> 

dr. Hans van der Meer___
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] xmlsetentity on the fly?

2023-04-17 Thread Hans van der Meer via ntg-context
> Use \xmltexentity

Already tried this. But doesn't work. I guess it has more to do with the 
definition of the entity in the stsrem.

met vriendelijke groet,
dr. Hans van der Meer
Burgemeester Rijnderslaan 244
1185 MC Amstelveen
tel. 020 6452701 / 06 53743629

> On 17 Apr 2023, at 13:00, Thomas A. Schmitz via ntg-context 
>  wrote:
> 
> Use \xmltexentity
> 
> Thomas
> 
>> On 17. Apr 2023, at 12:32, Hans van der Meer via ntg-context 
>>  wrote:
>> 
>> I would like to change an entity 'on the fly'. Example
> 
> 
> ___
> 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
> ___

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


[NTG-context] xmlsetentity on the fly?

2023-04-17 Thread Hans van der Meer via ntg-context
I would like to change an entity 'on the fly'. Example

\def\DATE{THEDATE}\expanded{\xmlsetentity{DATE}{\DATE}}

\startxmlsetups typ:event

\def\DATE{NEWDATE}\expanded{\xmlsetentity{DATE}{\DATE}}

Using  within the .

\stopxmlsetups

However, using  inside an  always results in THEDATE and never in 
NEWDATE.

How can I change the value of the entity inside the xmlsetups?

dr. Hans van der Meer



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


[NTG-context] accessing tex.sprint from pure Lua code.

2022-08-30 Thread Hans van der Meer via ntg-context
How can ik access the tex library in pure Lua for tex.sprint and token.setmacro?
I guess something like
require XYZ
?

dr. Hans van der Meer


___
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] SHA calculation

2022-08-28 Thread Hans van der Meer via ntg-context


> On 28 Aug 2022, at 19:07, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> On 8/28/22 12:25, Hans van der Meer via ntg-context wrote:
>> 
>> With \directlua{context(md5.hex([===[#1]===]))} I can calculate the MD5
>> checksum. 
>> I thought there was another call for the calculation of the SHA
>> checksum, but I could not find it in the documentation or on the context
>> garden. 
>> Where to look?
> 
> Dear dr. van der Meer,
> 
> it is my fault since Hans explained this before (to me).
> 

You absolutely need not to apologize. The answer of Hans Hagen was quite 
sufficient for me and 
\def\SHA#1{\directlua{tex.sprint(sha2.hash256([===[#1]===]))}}
was all I needed. I know Hans from ages ago and he knows what I need in cases 
like this.

Alas, wikifying is not my thing.

Hans van der Meer\___
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
___


[NTG-context] SHA calculation

2022-08-28 Thread Hans van der Meer via ntg-context

With \directlua{context(md5.hex([===[#1]===]))} I can calculate the MD5 
checksum. 
I thought there was another call for the calculation of the SHA checksum, but I 
could not find it in the documentation or on the context garden. 
Where to look?

dr. Hans van der Meer


___
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] Metafun : save memory content ?

2022-07-18 Thread Hans van der Meer via ntg-context
Storing in a memory block in the computers' internal memory would be super, of 
course. But I am afraid that is asking a bit too much;-)

dr. Hans van der Meer


> On 18 Jul 2022, at 18:31, Hans Hagen via ntg-context  
> wrote:
> 
> On 7/18/2022 3:20 PM, Fabrice L via ntg-context wrote:
>> Dear list,
>> I’m doing animations in MetaFun, by simply using \startMPpage (…) 
>> \stopMPpage for each frame of the animation. Here is an example: 
>> https://youtu.be/yhxUbVQx9Uo (please note you can watch it in HD by 
>> adjusting the setting in YouTube).
>> This works usually great, but when the number of objects to draw by page is 
>> large, the resulting pdf file could be huge, several gigabytes sometimes. 
>> Such huge files are difficult (sometimes impossible) to convert in jpeg 
>> files (I’m using Image magick for the conversion), necessary to do a mp4 
>> movie.
>> One solution is to do several pdf files, for example one by second; with 
>> this option, I can do 60 files of 30 pages, for an animation of 60 seconds 
>> (1800 frames for 1 minute). Everything is smoother this way, quicker to 
>> convert files. But in order to do so, I have to be able to describe each 
>> frame of the animation with the same set of instructions; so the position of 
>> an object at time t is described by an equation for example.
>> But this is not always possible. If the animation is based on a random 
>> process, the position of an object at time t depends on his position at time 
>> t-1. I can still use this preceeding strategy by simulating the past at the 
>> begging of each second, starting with a unique random seed. So for example 
>> if I work on second 9, I begin by calculating the past from frame 1 to frame 
>> 240 (8*30) and then simulate time 241, draw frame 241, simulate time 242, 
>> draw time 242, etc.. This could be complicated to do, but is feasible. The 
>> drawback is that more I advance in time, the more computations I have to do 
>> at the beginning of each file.
>> So to simplify things, one option would be to be save the state of some 
>> variables at some point in time, say t, in order to be able to access these 
>> informations at time t+1. So the strategy would be :
>> % File second1.pdf
>> for frame =1 to 30 :
>>  simulate position of objects ;
>>  draw the frame ;
>> endfor;
>> save the position of all objects ;
>> % File second2.pdf
>> Read (access) the position of all objects from second 1(after frame 30);
>> for frame =31 to 60 :
>>  simulate position of objects ;
>>  draw the frame ;
>> endfor;
>> save the position of all objects ;
>> Etc...
>> Does someone has an idea of how to do such a thing ? I can read text file in 
>> Context with no problem and integrate them in the animation process with 
>> \startMPinclusions (…) \stopMPinclusions, but I did not find a way to write 
>> information from MetaFun to a text file. Is Lua the solution ?
> there's always an idea ...
> 
> \starttext
>\startMPpage
>runscript("metapost.setparameterset('test', table.load('mydata.lua') 
> or { })") ;
>path b ; b := getparameterpath "test" "test_c";
>draw fullcircle scaled 3cm ;
>draw b scaled .4;
>  % show(b);
>getparameters "test" [
>test_a = 123,
>test_b = (456,789),
>test_c = (boundingbox currentpicture)
>] ;
> runscript("table.save('mydata.lua',(metapost.getparameterset('test')))") ;
>\stopMPpage
> \stoptext
> 
> but maybe i need abetter one .. a proper save/restore in the tuc file or so, 
> but you can play with this first
> 
> 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 / 
> 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
> ___

___
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] ignore not closed tags in XML input

2022-05-16 Thread Hans van der Meer via ntg-context
Can't you use an editor with grep, searching for something like the pattern 
 (with appropriate escapes of course).

dr. Hans van der Meer


> On 16 May 2022, at 17:08, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> Dear list,
> 
> I would like to feed
> https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/001.html as
> XML input for ConTeXt.
> 
> The problem is that (as many other XML files that I haven’t generated
> myself) some  and  tags aren’t closed, such as in:
> 
>  
>  https://fonts/css?greek; rel="stylesheet">
>  
> 
> So, all that I get is the following message:
> 
>  invalid xml file - parsed text
> 
> Unsuccessfully I have tried the following:
> 
>  \xmlsetsetup{#1}{html/head/(meta|link)}{-}
> 
> Is there no way to make ConTeXt more tolerant, so that it is able to
> ignore those tags?
> 
> Many thanks for your help,
> 
> Pablo
> ___
> 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] Error: attempt to index a nil value

2021-10-13 Thread Hans van der Meer via ntg-context
>  tex.print("\string\\latinmodern")

should be at least double backslashes: tex.print("\\string\\latinmodern") I 
would think

met vriendelijke groet
dr. Hans van der Meer


> On 13 Oct 2021, at 18:01, Hans Åberg via ntg-context  
> wrote:
> 
> I was suggested a long ago to hack the file
> /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
> and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
> this error:
> (./luaotfload.sty
> (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
> (./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value 
> (global
> 'arguments')
> stack traceback:
>   [\directlua]:1: in main chunk.
> l.132 }
> 
> ? …
> 
> 
> It is from this segment in the modified luatex-math.tex:
> 
> \ifdefined\directlua
>   \directlua {
>   if arguments["mtx:lucidabright"] then
>   tex.print("\string\\lucidabright")
>   else
>   tex.print("\string\\latinmodern")
>   end
>   }
> \fi
> 
> Is there a workaround? —I may ditch this setup in favour of using 'context' 
> directly, so it is not so important if there is no fix.
> 
> 
> ___
> 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] modules not found

2021-09-08 Thread Hans van der Meer via ntg-context
Further investigation seems to indicate that the module files are not found 
when initiating the context run from another directory. Though previously this 
was no problem.
I have moved the whole ConTeXt machinery from $HOME to another volume. Could 
that cause the problem? Allthough I set their location in the .bashrc.
# The current version of the ConTeXt luametatex in use:
CONTEXTLMTX=/Volumes/REALM/TeX/context
export CONTEXTLMTX
PATH=$CONTEXTLMTX/tex/texmf-osx-64/bin:$PATH ; export PATH

dr. Hans van der Meer


> On 8 Sep 2021, at 12:46, Hans van der Meer via ntg-context 
>  wrote:
> 
> Here is something I do not understand about \usemodule.
> 
> My modules are in two places because I wanted development and production 
> separated:
> (1) Volume/TeX/texmf/modules/
> (2) Volume/TeX/texmf/modules-new/
> 
> Unexpected and suddenly loading files from the first directory does not occur 
> any longer: modules > 'hvdm-tak' is not found
> But modules from modules-new load without a hitch:  modules > 'hvdm-load' is 
> loaded
> 
> I have discard the caches and rebuilt them to no avail. Then trying mtxrun 
> --locate filename does not show any location not even from the files that are 
> loaded, just an empty line.
> What happens inside \usemodule to cause this? I confess being baffled. And 
> how to convince ConTeXt to find all my modules?
> 
> dr. Hans van der Meer
> 
> 
> ___
> 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] modules not found

2021-09-08 Thread Hans van der Meer via ntg-context
Here is something I do not understand about \usemodule.

My modules are in two places because I wanted development and production 
separated:
(1) Volume/TeX/texmf/modules/
(2) Volume/TeX/texmf/modules-new/

Unexpected and suddenly loading files from the first directory does not occur 
any longer: modules > 'hvdm-tak' is not found
But modules from modules-new load without a hitch:  modules > 'hvdm-load' is 
loaded

I have discard the caches and rebuilt them to no avail. Then trying mtxrun 
--locate filename does not show any location not even from the files that are 
loaded, just an empty line.
What happens inside \usemodule to cause this? I confess being baffled. And how 
to convince ConTeXt to find all my modules?

dr. Hans van der Meer


___
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] parameters TeX->LuaTeX

2021-09-05 Thread Hans van der Meer via ntg-context
And \ListSort[[abc]]{value} turns out to be worse: doesn't makes it into LuaTeX 
at all.
dr. Hans van der Meer


> On 5 Sep 2021, at 10:14, Hans van der Meer via ntg-context 
>  wrote:
> 
> There is something I do not understand in the passing of parameters from TeX 
> to LuaTex.
> This is my TeX definition:
> \def\ListSort[#1]#2{\directlua{hvdm.listsort([===[#2]===],[===[#1]===])}}
> 
> Calling \ListSort[sep={ + }]{} delivers the string  'sep={ + }' into LuaTeX 
> as the printout in the logfile shows and as intended.
> However in \ListSort[{ + }]{} the braces have disappeared and transferred is 
> nothing more than ' + '.
> 
> Why is the transfer messing up the character string I am passing by removing 
> the outer braces? Is this a bug or is it an unavoidable consequence of the 
> TeX-LuaTeX interface?
> 
> dr. Hans van der Meer
> 
> 
> ___
> 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] parameters TeX->LuaTeX

2021-09-05 Thread Hans van der Meer via ntg-context
There is something I do not understand in the passing of parameters from TeX to 
LuaTex.
This is my TeX definition:
\def\ListSort[#1]#2{\directlua{hvdm.listsort([===[#2]===],[===[#1]===])}}

Calling \ListSort[sep={ + }]{} delivers the string  'sep={ + }' into LuaTeX as 
the printout in the logfile shows and as intended.
However in \ListSort[{ + }]{} the braces have disappeared and transferred is 
nothing more than ' + '.

Why is the transfer messing up the character string I am passing by removing 
the outer braces? Is this a bug or is it an unavoidable consequence of the 
TeX-LuaTeX interface?

dr. Hans van der Meer


___
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] Curiosity about math.random in LuaTeX

2021-08-23 Thread Hans van der Meer via ntg-context
I guess the underlying library calls are from Lua5.4? Then it is perhaps useful 
to know that between 5.3 and 5.4 there is mentioned a new implementation for 
math.random. Perhaps it changes the sequence of random values generated? 
Someone who knows?

dr. Hans van der Meer


> On 23 Aug 2021, at 17:13, Hans Hagen via ntg-context  
> wrote:
> 
> On 8/23/2021 4:46 PM, Thierry Horsin via ntg-context wrote:
>> Hi everybody.
>> I wonder how does math.random() work in context. I found that this subject 
>> was discussed more than ten years ago by Otared and Taco and Thomas. It is 
>> clear to me how to obtain new results upon typesetting the same file by 
>> changing the value of math.randomseed (with os.time()).
>> If you don't change the seed, you get the same result upon each typesetting, 
>> and a seed is given in the .tuc file.
>> For example I have this:
>> ["randomseed"]=0x1.0741c18b8a4ep-6
>> How do I use (and is it possible to) this value to have the same result of 
>> math.random() upon typesetting another file (with a different name) ?
>> I could provide a same fixed seed in both files, but for some reasons I 
>> would like to re-use some previous results of math.random() for which no 
>> seed was initially given in another .tex file.
> You have to go low level ...
> 
> % \ctxlua{utilities.randomizer.setseed(0x1.0741c18b8a4ep-6)}
> % \ctxlua{utilities.randomizer.setseed(0x1.6822232009d5p-5)}
> 
> \setrandomseed{123}
> 
> \starttext
>test \randomnumber{1}{100}
>test \randomnumber{1}{100}
>test \randomnumber{1}{100}
> \stoptext
> 
> btw, the 0x representation is lua's low level binary representation of a 
> double.
> 
> 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] lua

2021-08-17 Thread Hans van der Meer via ntg-context
I am still interested in this luacondition 733 allthough the culprit has been 
spotted. Very nasty typo and hard to spot fo me. 
Shudder and enjoy:

\ifxmlatt{#1}{regime}{xml}\let\Flush\ModuleFlushXML\else\let\FlushModuleFlushTEX\fi
instead of
\ifxmlatt{#1}{regime}{xml}\let\Flush\ModuleFlushXML\else\let\FlushModule\FlushTEX\fi

dr. Hans van der Meer


> On 17 Aug 2021, at 15:49, Hans van der Meer via ntg-context 
>  wrote:
> 
> Where is this message on luacondition 733 coming from? I would be glad to get 
> rid of it. The message does not pinpoint the problem location enough for me 
> to find its cause.
> 
> close source> level 2, order 7, name './modules-docs.tex'
> close source> level 1, order 7, name 'cont-yes.mkiv'
> (\end occurred when luacondition 733 on line 8 was incomplete)
> 
> 
> dr. Hans van der Meer
> 
> 
> ___
> 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] lua

2021-08-17 Thread Hans van der Meer via ntg-context
Where is this message on luacondition 733 coming from? I would be glad to get 
rid of it. The message does not pinpoint the problem location enough for me to 
find its cause.

close source> level 2, order 7, name './modules-docs.tex'
close source> level 1, order 7, name 'cont-yes.mkiv'
(\end occurred when luacondition 733 on line 8 was incomplete)


dr. Hans van der Meer


___
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] file to buffer

2021-08-17 Thread Hans van der Meer via ntg-context
Is it possible to retrieve the contents of a file directly into a buffer? On 
the Wiki I could not find such a command. That is, equivalent to something like:
\startbuffer[from file]
contents of the file
\stopbuffer

dr. Hans van der Meer


___
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] nil from TeX to Lua

2021-08-09 Thread Hans van der Meer via ntg-context
In the TeX to Lua interface with

\def\Macro#1{\directlua{luafunction("#1")}}

the transfer from TeX to Lua is by string. However what to do at the Lua end 
when calling \Macro{}?
As I understand it, then on the Lua side an empty argument and an empty string 
are indistinguishable. This is not always wanted, for example when one needs to 
place either a nil or an empty string into a Lua table. I am running in trouble 
when to t.key set to \Macro{} should become nil or when it should become "".
Is there some common understanding about how to handle this situation?

dr. Hans van der Meer


___
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 check if buffer or block has content

2021-08-02 Thread Hans van der Meer via ntg-context
And in pathological cases where even this does not work (as I encountered a few 
days ago): 
\setbox\scratchbox=\vboxx{content}\ifdim\wd\scratchbox>\zeropoint .. \else .. 
\fi
dr. Hans van der Meer


> On 2 Aug 2021, at 17:17, Hans Hagen via ntg-context  
> wrote:
> 
> On 8/2/2021 4:43 PM, Aditya Mahajan via ntg-context wrote:
>> On Mon, 2 Aug 2021, Benjamin Buchmuller via ntg-context wrote:
>>> Hi,
>>> 
>>> How can I check if a buffer or block has content (or is empty) before a 
>>> \useblocks or \getbuffer statement?
>>> 
>>> I would like to typeset a headline only if the buffer/block has been used 
>>> in a particular section and want to avoid headlines with empty sections.
>> There may be more efficient ways to do it (since buffers are stored at the 
>> lua end), but you can always do \doiftextelse(\getbuffer[...]} to test it 
>> buffer creates any output.
> indeed you know there is a way ...
> 
> \starttext
> 
> \startbuffer[test]
> test
> \stopbuffer
> 
> \doifelsebuffer{test} {YES} {NOP}
> 
> \permanent\protected\def\doifelsebuffercontent#1%
>  {\doifelse{\luaexpr{(string.strip(buffers.getcontent("#1")) ~= "" and 
> "yes")}}{yes}}
> 
> \startbuffer[test]
> \stopbuffer
> 
> \doifelsebuffercontent{test} {YES} {NOP}
> 
> \startbuffer[test]
> 
> \stopbuffer
> 
> \doifelsebuffercontent{test} {YES} {NOP}
> 
> \stoptext
> 
> if we can agree on a proper name then i can add a (more efficient) 
> \doifelse...
> 
> 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
___