Re: [NTG-context] Problem with \head inside \itemize

2021-11-22 Thread Taco Hoekwater via ntg-context


> On 22 Nov 2021, at 14:15, Jean-Philippe Rey via ntg-context 
>  wrote:
> 
> Dear list,
> 
> The following code worked perfectly well with ConTeXt  ver: 2021.01.05 10:45 
> LMTX
> but produces an error with the current LMTX version (at least since ConTeXt  
> ver: 2021.09.26 17:00 LMTX).
> Adding an explicit \par at the end of the \head line allows the example to 
> work.

It seems like the newest LMTX versions don’t handle implicit \par (empty lines) 
as argument 
delimiter any more, the argument has to be terminated by the explicit string 
“\par", just 
like any other argument delimiter. 

This is definitely a change, but I would vote for that change to stay. ;)

Best wishes,
Taco

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



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

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


Re: [NTG-context] Can modes be used for content control?

2021-11-17 Thread Taco Hoekwater via ntg-context
Hi Idris,

I think Hans was trying to point you to the blocks mechanism. Blocks *do* nest:

\defineblock[sectionblock]
\defineblock[myblock]

\startmode[variantone]
\keepblocks[sectionblock]
\keepblocks[myblock]
\stopmode

\startmode[varianttwo]
\keepblocks[sectionblock]
\stopmode

\starttext
\beginsectionblock
\section{A to B}
\beginmyblock
A is for Amy, who fell down the stairs.
\endmyblock
\beginmyblock
B is for Basil, assaulted by bears.
\endmyblock
\endsectionblock

\stoptext



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



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

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


Re: [NTG-context] Footnotes in margins

2021-11-16 Thread Taco Hoekwater via ntg-context
Hi,

Like Hraban said, inserts are generally tricky and they tend to disappear when 
used inside
other elements like floating objects / boxes / tables. However, ConTeXt has an 
easy way out
at least for your case:

\starttext
\startpostponingnotes
\inmargin{Foo\footnote{Foo 1.}}Foo\footnote{Foo 2.}
\stoppostponingnotes
\stoptext

Best wishes,
Taco

> On 16 Nov 2021, at 12:57, Marcus Vinicius Mesquita via ntg-context 
>  wrote:
> 
> Dear list,
> 
> When running the MWE below, the first footnote does not appear.
> What am I missing?
> 
> \starttext
> \inmargin{Foo\footnote{Foo 1.}}Foo\footnote{Foo 2.}
> \stoptext

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



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

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


Re: [NTG-context] \startbodymatter forcing new page in document

2021-11-15 Thread Taco Hoekwater via ntg-context


> On 15 Nov 2021, at 15:07, A A via ntg-context  wrote:
> 
> Dear All,
> 
> The following code generates a title and some fake text:
> 
> \setuppagenumbering[location=right]
> 
> \usemodule[visual]
> 
> \usebtxdataset[bibliography.bib]
> \starttext
> \title{test}
> \fakewords{1000}{1200}
> 
> \stoptext
> 
> The following code does the same, but wraps the fakewords in a bodymatter 
> environment:
> 
> \setuppagenumbering[location=right]
> 
> \usemodule[visual]
> 
> \usebtxdataset[bibliography.bib]
> \starttext
> \title{test}
> \startbodymatter
> \fakewords{1000}{1200}
> \stopbodymatter
> 
> \stoptext
> 
> 
> In the first case, the title remains on the same page as the fake text. In 
> the second case, a new page is forced after the title. Why does this occur? 

\startbodymatter starts a sectionblock (the “bodypart” block, to be exact) and
by default these blocks all switch to a ‘right’ page. Add this in your preamble 
to
get rid of the page switch:

\setupsectionblock[bodypart][page=no]



> 
> Regards,
> 
> Amine
> 
> ___
> 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
> ___

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



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

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


Re: [NTG-context] check installed program using Lua

2021-11-01 Thread Taco Hoekwater via ntg-context


> On 1 Nov 2021, at 14:26, Pablo Rodriguez via ntg-context  
> wrote:
> 
> Dear list,
> 
> is there a way if a program is installed on the computer using Lua.
> 
> I have the following sample:
> 
>  \starttext
>  \startluacode
>  filename = tex.jobname .. ".pdf"
>  os.exec("dir " .. filename)
>  \stopluacode
>  \stoptext
> 
> Is there a way to wrap os.exec() in the sample so that it only runs if
> "dir" is available?

if os.which(‘dir’) then
  ...
end

But note that os.which() may be unreliable in various cases (like it will fail 
for shell/command interpreter builtins, in cron jobs, in special scripted 
environments, and may incorrectly succeed for disabled/forbidden commands), as 
it just runs through the PATH environment variable to check for executable file 
existence. 

Often times, it is better to just try to run the command to see if that 
produces satisfactory results.

Best wishes,
taco

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



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

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


[NTG-context] Wiki's ConTeXt updated

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

Since yesterday  wiki.contextgarden.net, live.contextgarden.net, and 
source.contextgarden.net all use

  ConTeXt 2021.10.28 10:19 LMTX

as the installed ConTeXt.

I have also tried to reset all the “” output images so that they will 
be automatically
regenerated with this new ConTeXt, but sometimes that reset does not work 
properly, and the wiki 
has to be ‘helped' manually. 

If you see a ‘broken image’ icon (or no output at all) from a “” 
demonstration block, do this:

* right click on the ‘Edit’ link of the page so it opens in a new tab,
* go to the new tab and press ’Show preview’,
* close the tab.

The ’Show preview' will force the wiki to refresh the cached images. ’Save 
changes’ is not needed.

Best wishes,
Taco

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



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

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


Re: [NTG-context] The certificate of the mailman site has expired

2021-10-22 Thread Taco Hoekwater via ntg-context


> On 22 Oct 2021, at 02:21, Gerben Wierda via ntg-context  
> wrote:
> 
> Just to let you know: The certificate of the mailman site has expired

Which one exactly? 

Both https://lists.contextgarden.net/ and https://mailman.ntg.nl/ seem fine to 
me

Best wishes,
Taco

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



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

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


Re: [NTG-context] Clickable url problem with \useurl and \url

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

> On 12 Oct 2021, at 04:30, Rik Kabel via ntg-context  
> wrote:
> 
> Hello List,
> 
> I notice an inconsistency in the clickable area when using \useurl. With the 
> following example, both the \from and the \url are clickable in some lines 
> (as noted iin the value of \from) but in others, the \from is clickable but 
> not the \url.
> 
> It does seem sensitive to the urlL, but I cannot see a pattern.

It is the pdf viewer program that automatically interprets the \url-produced 
text and 'invents' a link, it is not
ConTeXt itself. The exact rules may therefore vary depending on the pdf viewer 
you use. 

In Apple's Preview, all items are in fact clickable. But only \from produces 
actual pdf hyperlink annotations.

> Should I use something other than \url[earlXX] here to get the clickable 
> literal url from useurl?

This, maybe

\goto{\url[earlLH]}[url(earlLH)]

(perhaps wrapped in a short macro)

Best wishes,
Taco

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



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

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


Re: [NTG-context] TLS Certificate Expired for the Wiki

2021-10-12 Thread Taco Hoekwater via ntg-context


> On 12 Oct 2021, at 08:41, Ramkumar KB via ntg-context  
> wrote:
> 
> Hello,
> 
> The TLS certificate for the Context wiki expired yesterday - valid only upto 
> 12-October-2021.

I’ll fix that in a bit.

> 
> Just an alert as Chrome now pops up the "Unsafe" alerts.
> 
> Thank you,
> 
> best regards,
> Ramkumar 
> ___
> 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
> ___

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



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

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


Re: [NTG-context] MkIV missing?

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

Here is what I assume has happened:

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


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

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

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

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

Best wishes,
Taco

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

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



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

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


Re: [NTG-context] MkIV missing?

2021-10-04 Thread Taco Hoekwater via ntg-context
We are busy with this off-list.

If it is urgent: 

 luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate

fixed it for me (you’ll need to adjust the path, of course)

Best wishes,
Taco

> On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context 
>  wrote:
> 
> Same problem here, on a linux64, context current version: 2021.09.26 17:00
> 
> Greetings
> 
> Marcus Vinicius
> 
> On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> > Am 04.10.2021 um 13:06 schrieb Hans Hagen :
> > 
> > On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote:
> >> Hi,
> >> since a while, I can’t run MkIV any more, even after several runs of 
> >> install.sh (and mtxrun --generate, of course).
> >> It’s the same on my Mac and my Linux laptop (of course the bin dir is 
> >> different on the latter):
> >> $ context --version
> >> mtx-context | ConTeXt Process Management 1.04
> >> mtx-context |
> >> mtx-context | main context file: 
> >> /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> >> mtx-context | current version: 2021.09.26 17:00
> >> mtx-context | main context file: 
> >> /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl
> >> mtx-context | current version: 2021.09.26 17:00
> >> $ context --version --luatex
> >> mtx-context | redirect luametatex -> luatex: luatex --luaonly 
> >> "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context 
> >> --version --luatex --redirected
> >> mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'
> >> $ which context
> >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/context
> >> $ which luatex
> >> /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex
> >> $ luatex --version
> >> This is LuaTeX, Version 1.13.0 (TeX Live 2021)
> >> ...
> >> $ mtxrun --version
> >> mtxrun  | ConTeXt TDS Runner Tool 1.32
> >> mtxrun  | source path
> >> I thought that was related to the server/provider move, but I guess it 
> >> isn’t.
> >> It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that 
> >> a call to mtxrun can’t find any configuration.
> > works here ... maybe a --generate issue?
> 
> I re-ran the install script with a shell ("sh install.sh" instead just ". 
> install.sh"), but that doesn’t change the "unknown script" issue.
> 
> "mtxrun --generate" seems to work without problems; or do you see something 
> suspicious in the attached log?
> 
> Hraban
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> 
> 
> -- 
> Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo 
> nem seus membros, por ser descanso da alma, primavera do coração, distração 
> do aflito, entretenimento do solitário, e viático do viajante.
> 
> Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
> _______
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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



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

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


Re: [NTG-context] MkIV missing?

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


> On 4 Oct 2021, at 12:39, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> I thought that was related to the server/provider move, but I guess it isn’t.
> 
> It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a 
> call to mtxrun can’t find any configuration.

That is why I always run “sh install.sh” instead of executing the script 
directly.

Best wishes,
Taco

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



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

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


Re: [NTG-context] website

2021-09-29 Thread Taco Hoekwater via ntg-context
Hi,

There is also a mirror of the website at http://context.aanhet.net

Best wishes,
Taco

> On 28 Sep 2021, at 23:34, Hans Hagen via ntg-context  
> wrote:
> 
> Hi,
> 
> Due to domain transfer issues (provider quits services) there is the 
> possibility that the coming days the pragma-ade.com address fails.
> The pragma-ade.nl and other addresses are okay, If all works well the 
> installer handles fallbacks. Eventually the context garden will also have the 
> files.
> 
> 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] Test for displaying a header

2021-08-26 Thread Taco Hoekwater via ntg-context

Hi,

> On 26 Aug 2021, at 16:07, Fabrice Couvreur via ntg-context 
>  wrote:
> 
> Hi, 
> I know I asked the question a few years ago, but I don't remember ! 
> The idea is to test whether the document contains only one page or not. 

Perhaps not the nicest solution, but this works:

\doifvalueelse
  {\lastpage}
  {1}
  {\message{true}}
  {\message{false}}

> If it contains only one page, the header is enabled. 
> If it contains several pages, the header is enabled only on the first page 
> but not on the others. 
> Thanks
> Fabrice
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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



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

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


Re: [NTG-context] Indexing redux

2021-08-26 Thread Taco Hoekwater via ntg-context
Hi Rik,

> On 26 Aug 2021, at 03:14, Rik Kabel via ntg-context  
> wrote:
> 
> List,
> 
> I am trying to create an index with both "see" and "see also" cross-reference 
> entries.[1] At this point, ConTeXt provides basic support for "see" entries 
> via the \seeREGISTER command (it does not properly support references to 
> sub-entries) and it provides no support at all for "see also" entries.
> 
> Can somebody suggest a way to generate these entries? Perhaps a way of 
> inserting entries into the index before it is formatted, in the manner of 
> \writetolist or \writebetweenlist? (MkII has \writetoregister, but that did 
> not carry forward and I do not know if it would have helped here.)


Since strc-reg.mkiv starts with a number of ’todo’ comments, I think your best 
bet is to create an
actual functional example along with an explanation of what you want the 
typeset result to look 
like in the cases where it is not doing what you want.

Generally, explicit examples / test files are the best way to get replies to 
questions 
(either by Hans or anyone else).

Best wishes,
Taco

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



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

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


Re: [NTG-context] Control of Titles appearing in \completelistoftables and \completelistoffigures

2021-08-25 Thread Taco Hoekwater via ntg-context
Hi,

There is \startplacefigure / \startplacetable , which has a ‘list’ key

 https://wiki.contextgarden.net/Command/_startplacefloat

Best wishes,
Taco

> On 25 Aug 2021, at 05:20, Richard Mahoney via ntg-context 
>  wrote:
> 
> List,
> 
> I've been wondering if there is some syntax that one can use in:
> 
> \placetable or \placefigure
> 
> to control the Table of Figure Title appearing in:
> 
> \completelistoftables and \completelistoffigures
> 
> 
> At the moment one can do this for the output of:
> 
> \completecontent
> 
> with something such as the following:
> 
> \startsection[title={Title in body},list={Title in contents}]
> 
> 
> Such a thing would be *extremely* useful for a current 
> publication. :)
> 
> 
> Best, Richard
> 
> 
> 
> -- 
> T +6433121699  M +64210640216  E rmaho...@indica-et-buddhica.org
> IM https://t.me/rmahoney  W https://indica-et-buddhica.org/
> 
> Indica et Buddhica  Littledene  Bay Road  Oxford  NZ
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV






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



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

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


Re: [NTG-context] lua

2021-08-17 Thread Taco Hoekwater via ntg-context
Hi Hans,

> On 17 Aug 2021, at 16:39, Hans van der Meer via ntg-context 
>  wrote:
> 
> I am still interested in this luacondition 733 allthough the culprit has been 
> spotted. Very nasty typo and hard to spot fo me. 

The “luacondition 733” is the \ifxmlatt . You get these numbers because the 
command is
defined using lua ‘interfaces.implement’ (lxml-ini.lua) instead of directly as 
a TeX conditional.

And yes indeed, the new lua-defined commands are hard to derive from the log 
information
(for the other Hans: is this reporting not controlled via ‘public=true’ ? ).

Best wishes,
Taco

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

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



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

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


[NTG-context] 15th International ConTeXt Meeting (registration closes Aug 22)

2021-08-13 Thread Taco Hoekwater via ntg-context
Hi all,

There is still room for some extra participants for the ConTeXt meeting in 
Bassenge, 
Belgium from Sept 20 to Sept 25. Despite the still somewhat lingering situation 
wrt
COVID-19, we are now certain that the meeting can and will in fact take place in
person. Hurrah!

Even if we still have room by then, registration will close on Aug 22, because 
by 
that time we need to make final arrangements for T-shirt printing and catering. 
So if you are still on the fence about attending, do not wait too long!


Also remember that it is possible for ConTeXt Group members to attend 
online-only
for free. That is less than ideal because you cannot join us for a drink and a 
chat,
but it gives you bragging rights for attending, and you will get a T-shirt as 
well !
(if you register before Aug 22)

You can easily become a member of CG by filling in the form at

  https://group.contextgarden.net/register.shtml

Besides being able to register for the online portion of the upcoming meeting,
you will also receive the nicely printed ConTeXt journal, and additionally you
will help the ConTeXt Group to do more for the community in the future. 

Even if you are not going to attend the online meeting, we think becoming a 
CG member is a great idea! More that fifty people have joined already!

To see more details about the upcoming meeting, see the website at

  https://meeting.contextgarden.net/


In other news, there is now a provisional programme page:

  https://meeting.contextgarden.net/2021/programme.shtml


I can't wait to see (some of) you in person in Bassenge!

Best wishes,
Taco

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



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

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


Re: [NTG-context] nil from TeX to Lua

2021-08-10 Thread Taco Hoekwater via ntg-context


> On 9 Aug 2021, at 22:05, Aditya Mahajan via ntg-context  
> wrote:
> 
> On Mon, 9 Aug 2021, Hans van der Meer via ntg-context wrote:
> 
>> 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. 
> 

On the TeX side, these are always indistinguishable (as TeX doesn’t have 
’strings’) so depending
on the called macro, you could just assume str == "” actually means nil?

But a clearer example of where you run into trouble would be helpful.

Best wishes,
Taco


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



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

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


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

2021-08-02 Thread Taco Hoekwater via ntg-context
Hi,

> On 31 Jul 2021, at 15:56, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> 
> Ah, I didn’t recognize you mean this.
> 
> Since the mail goes through the mailing list software, the sender must not be 
> the original sender any more – ntg.nl is not allowed to send emails for a 
> different domain. Many securely configured mail servers reject “faked” sender 
> addresses, as they should. Look up DANE etc.


Which is exactly why that setting was changed. So yes, the change is on purpose.

Best wishes,
Taco

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



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

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


Re: [NTG-context] Rolling out a pandoc-context publication workflow in an organization

2021-07-01 Thread Taco Hoekwater


> On 1 Jul 2021, at 13:31, Jan U. Hasecke  wrote:
> 
> Hi Taco,
> 
> thanks for this hint.
> 
> Am 01.07.21 um 08:44 schrieb Taco Hoekwater:
>> I would put the whole context distribution in the git. That way, you can
>> potentially hotfix something centrally.
> 
> Would you put texmf-cache into .gitignore?

probably, but it depends on how homogenous your setups are. 

In principle texmf-cache can be shared, but only if nobody has personal files.

> 
> Or is the cache portable to other machines?
> 
> juh
> ___
> 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
> _______

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



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

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


Re: [NTG-context] Rolling out a pandoc-context publication workflow in an organization

2021-07-01 Thread Taco Hoekwater
Hi,

> On 1 Jul 2021, at 08:02, Jan U. Hasecke  wrote:
> 
> I come up with the idea of an "organizational context distribution" that has 
> all requirements preinstalled. That could look like this:

I would put the whole context distribution in the git. That way, you can
potentially hotfix something centrally.

Best wishes,
Taco

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



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

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


Re: [NTG-context] 15th International ConTeXt Meeting (early bird closes)

2021-06-30 Thread Taco Hoekwater


> On 30 Jun 2021, at 19:34, Bruce Horrocks  wrote:
> 
> 
>> On 30 Jun 2021, at 15:23, Taco Hoekwater  wrote:
>> 
>> Just a quick reminder that early bird registration for the ConTeXt meeting 
>> 2021
>> in Bassenge officially ends today. I’ll be a bit lenient about the actual 
>> money 
>> transfer, but you should fill in the registration form today or at the very 
>> last
>> tomorrow, if you want to be eligible for the early bird discount.
>> 
>>  https://meeting.contextgarden.net/
>> 
>> In other news, there is now an abstracts page with lots of talk topics added 
>> by Hans himself. Check that out as well!
> 
> In other news the early bird deadline in the table header row on the linked 
> page is 11th July.

You are not even the first person to point that out. 

Ok, so July 11 it is. It is still better to register right away :)

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 / 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] 15th International ConTeXt Meeting (early bird closes)

2021-06-30 Thread Taco Hoekwater

Hi all,

Just a quick reminder that early bird registration for the ConTeXt meeting 2021
in Bassenge officially ends today. I’ll be a bit lenient about the actual money 
transfer, but you should fill in the registration form today or at the very last
tomorrow, if you want to be eligible for the early bird discount.

   https://meeting.contextgarden.net/

In other news, there is now an abstracts page with lots of talk topics added 
by Hans himself. Check that out as well!

   https://meeting.contextgarden.net/2021/abstracts.shtml

Finally: this year for the first time we do have a (small) bursary fund.
Applications can be added in the remark fields of the registration page, or
by sending a message directly to me.

I can't wait to see (some of) you in person in Bassenge!

Best wishes,
Taco

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



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

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


Re: [NTG-context] PDF forms not creating proper children

2021-06-09 Thread Taco Hoekwater
Hi,

> On 9 Jun 2021, at 16:41, Pablo Rodriguez  wrote:
> 
> 
> Only mupdf-gl sees the signature annotation after signing it. Acrobat,
> Evince, Okular and xpdf cannot deal with the signature.

Just FYI:

On the Mac, I can sign the processed example using Adobe Acrobat Reader DC,
and it can save a signed pdf as well as re-open it, including showing that
verification bar that says it is a signed pdf.

mupdf-gl ‘sees’ the original field also, but mine is compiled without openssl 
so it cannot actually sign. It happily correctly opens the signed version 
from AR DC, of course.

Apple Preview does not recognize the signature field (well, it has zero
support for signing to begin with, so that is not a surprise).



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



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

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


Re: [NTG-context] keep text strictly inside box

2021-06-08 Thread Taco Hoekwater


> On 7 Jun 2021, at 23:07, Wolfgang Schuster 
>  wrote:
> 
> Use the align key.
> 
> \starttext
> 
> \startframedtext[width=10cm,align={flushleft,nothyphenated}]

Also, ‘verytolerant’ helps:

> align={flushleft,nothyphenated,verytolerant}]

Best wishes,
Taco
> 
> Martinus, zoon van Johannes van Zonnevelt en Johanna
> Teikenbort: getuigen Adrianus van Zonnevelt en Anna
> van Oostbroek.
> \stopframedtext
> 
> \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
> ___

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

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


Re: [NTG-context] [metafun example does not compile]

2021-05-21 Thread Taco Hoekwater
Hi,

It looks like textext.dflt is undefined in the latest lmtx because it is now
renamed to textext.dlft :)


> On 21 May 2021, at 14:03, Floris van Manen  wrote:
> 
> Using the example from the wiki
> https://wiki.contextgarden.net/textext_positioning
> 
> then using the latest version of lmtx
> 
> $ context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: 
> /home/vm/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.05.20 16:06
> mtx-context | main context file: 
> /home/vm/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.05.20 16:06
> 
> 
> it will produce an error (and an empty page)
> 
> 
> metapost> initializing instance 'metafun:1' using format 'metafun' 
> and method 'default'
> metapost> loading 'metafun' as 'metafun.mpxl' using method 'default'
> metapost> initializing number mode 'scaled'
> metafun > log >
> metafun > log > error: Unknown relation will be considered false
> metafun > log >
> metapost> log >
> metapost> log > 
> metapost> log >)
> metapost> log > 
> thetextext->...FIX2)(rawtextext(ddecimal(EXPR3)),(EXPR4))else:if.anchortextexts>0:image(draw(EXPR3)withprescript"tx_anchor="(EXPR4))else:(EXPR3)fi.if(mfun_labtype(SUFFIX2)>=10)
> metapost> log > :shifted(0,y...
> metapost> log > 
> thetextext->begingroup.if.string(EXPR3):thetextext(SUFFIX2)(rawtextext((EXPR3)),(EXPR4))
> metapost> log > 
> elseif.numeric(EXPR3):thetextext(SUFFIX2)(rawtextext(decimal(EXPR3)),(EXPR4))elseif.pair(EXPR3):thetextext(SU...
> metapost> log > 
> textext->begingroup.thetextext(SUFFIX2)((EXPR3),origin)
> metapost> log >   endgroup
> metapost> log > <*> ...A; draw PA withpen pencircle scaled 1.5mm 
> withcolor red; pair PB ; PB := PA shifted decal ; draw textext.drt ("DRT-" & 
> MonTexte) shifted PB; draw textext.dflt("DFLT-" & MonTexte)
> metafun > log >
> metafun > log > Oh dear. I can't decide if the expression above is 
> positive, negative, or zero.
> So this comparison test won't be 'true'.
> 
> 
> 
> 
> As in most of the cases with software, there is (probably) a reason to it ;-)
> 
> 
> .F
> ___
> 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
> ___

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



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

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


Re: [NTG-context] \char not working with private unicodes

2021-05-12 Thread Taco Hoekwater


> On 12 May 2021, at 14:03, Taco Hoekwater  wrote:
> 
> But \char”F1538 still shows the wrong icon (though probably a different wrong 
> one). 
> 
> I did a bit of digging, and here is where it starts to goes wrong right now 
> (tma excerpt):
> 
> 
>  [….]


Never mind that, that was wrong of me and not the problem at all! Sorry!

Retry:

  [983943]={
   ["boundingbox"]=58,
   ["index"]=903,
   ["name"]="music-note",
   ["unicode"]=983943,
   ["width"]=512,
  },
  [983944]={
   ["boundingbox"]=187,
   ["index"]=904,
   ["name"]="music-note-half",
   ["unicode"]=983945,
   ["width"]=512,
  },

“music-note” appears twice in the font encoding, at F0387 and F0388. 
The cheat sheet says that the second of those should be “music-note-eight”,
but it has the wrong name, which is probably why ConTeXt removes it.

The next one is “checkbox-blank-circle-outline”, which is at F0766 and F043D.
The latter should have been named “radiobox-blank” according to the cheat sheet.

Etc.

On my earlier note: I still think it is bad to assign unicode code points
in ’this’ case. A logo that is encoded in the PUA and happens to be named 
“minus” is very unlikely to actually be a mathematical minus.


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



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

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


Re: [NTG-context] \char not working with private unicodes

2021-05-12 Thread Taco Hoekwater


> On 11 May 2021, at 17:31, Hans Hagen  wrote:
> 
> On 5/11/2021 3:40 PM, Taco Hoekwater wrote:
>>> On 11 May 2021, at 15:16, Hans Hagen  wrote:
>>> 
>>> On 5/11/2021 2:08 PM, Jairo A. del Rio wrote:
>>>> Hi, list! Following this thread: 
>>>> https://tex.stackexchange.com/questions/596610/how-to-use-luatex-with-large-unicode-codepoint
>>>>  
>>>> <https://tex.stackexchange.com/questions/596610/how-to-use-luatex-with-large-unicode-codepoint>,
>>>>  I tried to replicate it in ConTeXt. Both LMTX and LMTX fail to display 
>>>> the right symbol and, as it's discussed in the linked page, there's an 
>>>> offset by 14. Is this intentional (in ConTeXt)? A bug? Minimal 
>>>> (non-)working example:
>>>> %Font available here: https://materialdesignicons.com/ 
>>>> <https://materialdesignicons.com/>
>>>> \starttext
>>>> \definedfont[file:materialdesignicons-webfont.ttf]\char"F1372\relax
>>>> \stoptext
>>> You need to employ a sense of humour for that font:
>>> 
>>> \starttext
>>>\definefontfeature[materialicons][default][rlig=yes]
>>>\definedfont[file:materialiconsregular.ttf*materialicons]
>>>baby_changing_station
>>> \stoptext
>> That only works with the regular font, not with the webfont version from the 
>> ‘easy download’
>> link (it is cool, though :)).
>> But that is not the issue. The issue is that you have this super-useful page 
>> online:
>>   https://pictogrammers.github.io/@mdi/font/5.4.55/
>> where you can just copy the code point and/or the encoding hex value. But 
>> those values
>> do not match the ones in ConTeXt because the duplicates are removed while 
>> creating the tma,
>> which condenses the encoding, resulting in an encoding offset, and that in 
>> turns make cut
>> useless. :(
>> Also, it is a bit of a shame that the XXX-webfont.ttf has postscript glyph 
>> names that map to the
>> online cheat sheet, but these names are not preserved in the tma file (at 
>> least not in my lmtx
>> version). Keeping those would make the whole typset-a-specific-glyph 
>> procedure be a lot less
>> error-prone, at least.
> i suppose you noted the message -)
> 
> can you confirm / check that we can safely assume zero length names to be 
> okay?
> 
>local length = readbyte(f)
>if length > 0 then
>glyphs[mapping].name = readstring(f,length)
>else
> -- report("quit post name fetching at %a of %a: 
> %s",i,maxnames,"overflow")
> -- break
>end
> 
> i bet this check is there because of some other font needed it in order to 
> get loaded


With that “break" removed glyph naming works and I can safely do:

 \getnamedglyphdirect{file:materialdesignicons-webfont.ttf}{access-point-check}

which is the font glyph encoded at “F1538. The above line produces the correct 
output now.

But \char”F1538 still shows the wrong icon (though probably a different wrong 
one). 

I did a bit of digging, and here is where it starts to goes wrong right now 
(tma excerpt):


  [983923]={
   ["boundingbox"]=1,
   ["index"]=883,
   ["name"]="minecraft",
   ["unicode"]=983923,
   ["width"]=512,
  },
  [983924]={
   ["boundingbox"]={ 0, 0, 406, 214 },
   ["index"]=884,
   ["name"]="minus",
   ["unicode"]=8722,
   ["width"]=512,
  },
  [983925]={
   ["boundingbox"]=6,
   ["index"]=885,
   ["name"]="minus-box",
   ["unicode"]=983925,
   ["width"]=512,
  },

That “minus" is moved back to the spot for Unicode MINUS SIGN, and then the 
rest 
of the encoding shifts down by one. That happens a few dozen times in total, for
various glyphs with “standard” names. So probably the name-based remapping of
glyphs is a bad idea for glyphs that are explicitly PUA-encoded in the font ...

Best wishes,
Taco


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



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

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


Re: [NTG-context] \char not working with private unicodes

2021-05-11 Thread Taco Hoekwater


> On 11 May 2021, at 15:16, Hans Hagen  wrote:
> 
> On 5/11/2021 2:08 PM, Jairo A. del Rio wrote:
>> Hi, list! Following this thread: 
>> https://tex.stackexchange.com/questions/596610/how-to-use-luatex-with-large-unicode-codepoint
>>  
>> <https://tex.stackexchange.com/questions/596610/how-to-use-luatex-with-large-unicode-codepoint>,
>>  I tried to replicate it in ConTeXt. Both LMTX and LMTX fail to display the 
>> right symbol and, as it's discussed in the linked page, there's an offset by 
>> 14. Is this intentional (in ConTeXt)? A bug? Minimal (non-)working example:
>> %Font available here: https://materialdesignicons.com/ 
>> <https://materialdesignicons.com/>
>> \starttext
>> \definedfont[file:materialdesignicons-webfont.ttf]\char"F1372\relax
>> \stoptext
> You need to employ a sense of humour for that font:
> 
> \starttext
>\definefontfeature[materialicons][default][rlig=yes]
>\definedfont[file:materialiconsregular.ttf*materialicons]
>baby_changing_station
> \stoptext

That only works with the regular font, not with the webfont version from the 
‘easy download’ 
link (it is cool, though :)).

But that is not the issue. The issue is that you have this super-useful page 
online:

  https://pictogrammers.github.io/@mdi/font/5.4.55/

where you can just copy the code point and/or the encoding hex value. But those 
values
do not match the ones in ConTeXt because the duplicates are removed while 
creating the tma, 
which condenses the encoding, resulting in an encoding offset, and that in 
turns make cut
useless. :(


Also, it is a bit of a shame that the XXX-webfont.ttf has postscript glyph 
names that map to the 
online cheat sheet, but these names are not preserved in the tma file (at least 
not in my lmtx 
version). Keeping those would make the whole typset-a-specific-glyph procedure 
be a lot less 
error-prone, at least.

Best wishes,
Taco

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



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

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


[NTG-context] 15th International ConTeXt Meeting

2021-05-03 Thread Taco Hoekwater
TL;DR:  See https://meeting.contextgarden.net/ for registration!


Hi all,


Registration for the next ConTeXt meeting is now open!

15th International ConTeXt Meeting
==

The thirteenth ConTeXt meeting will take place in Bassenge, Belgium on

  September 20-25, 2021

You are cordially invited to join the 15th ConTeXt meeting. The meeting will 
host ConTeXt and Lua(Meta)TeX developers and users and gives you the 
opportunity 
to present your results, experiences and ideas on future development. The talks 
will be followed-up by tutorials on different ConTeXt and Lua(Meta)TeX 
techniques.

Our meeting will take place in person since we assume vaccination levels will 
be high enough by then that travel restrictions will be lifted (yeah!). 

Alternatively, it is also possible to register for on-line attendance so you
can listen to the talks from your home office. On-line attendance is free, but 
only open to ConTeXt Group members. 


Thematic context


The theme for this meeting is:

 expanding orbits

You can interpret that any way you want.

But, as in previous years, anything at all related to ConTeXt that you would 
like 
to share is an acceptable subject for a presentation, tutorial, discussion, 
Q session, demonstration, workshop, recital, sketch, or sermon.


The programme committee is Hans Hagen and Taco Hoekwater.


Social context
==

Registration opened today. 

We will be back in ’t Sjetootje in Bassenge-Boirs, the same location as the
meetings in 2011, 2014 and 2019. There has been some remodelling (there is now
an actual conference room with built-in wifi!) but the basic layout of 
the chateau has not changed so, as before, (single) rooms are very scarce.

Note that the meeting starts on Monday evening and ends on Saturday morning.
It is possible to stay on for another day (or even two, if you are OK with
getting up early on Monday the 27th). Arriving early is not possible, though.


Calendric context
=

• May 3, 2021, beginning of registration
• July 1, 2021, deadline for early bird payment
• September 20-25, 2021, 13th ConTeXt Meeting


See https://meeting.contextgarden.net/ for more details.

Hope to see you in September,

Taco
(your local organizer this year)

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



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

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


Re: [NTG-context] nbsp in XML (S01E01)

2021-04-22 Thread Taco Hoekwater
Hi,


> On 21 Apr 2021, at 23:09, Jano Kula  wrote:
> 
> On Wed, Apr 21, 2021 at 8:37 PM Hans van der Meer  wrote:
>> Why tilde is displayed?
> 
> Wouldn't the simple answer not be: because XML is not TeX?

You are never going back to “TeX mode”: the preprocessor converts XML into 
*other* XML. 
And tilde in XML is just that: the ascii tilde glyph.

> 
> I still would expect unicode nbsp to be expandable, 

I agree with that, but for fine-tuning XML output I would use a trick like this:

\startluacode
function lxml.preprocessor(data)
return string.gsub(data, "nbsp;", "")
end
\stopluacode

\startxmlsetups xml:name
...
\xmlsetsetup{\xmldocument}{document|nbsp}{xml:name:*}
\stopxmlsetups

\startxmlsetups xml:name:nbsp
\penalty1\hskip .3em plus 2em % or something, just a wild example.
\stopxmlsetups

Using an xml element would also allow your code to ‘look around’ to make sure 
all is 
well with its (typesetting) environment.

Best wishes,
Taco

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



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

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


[NTG-context] README for pending new subscribers March 2021

2021-04-01 Thread Taco Hoekwater
Hi all,

Regretfully, we have had problems with a hacker messing with the html 
subscription page of this mailing list. In mitigation, we have disabled web - 
based subscription requests completely. 

From now on, subscription to this mailing list can only be requested by sending 
an email message to ntg-context-requ...@ntg.nl with “subscribe" as the Subject.

Unfortunately, it was impossible for us to differentiate between "hacked" and 
“legit” subscription requests made during the month of March 2021 so to prevent 
our mail server from being blacklisted as email sender we have had to discard 
all pending subscription requests. 

This means that anyone that has tried to subscribe to ntg-context during the 
past month (that has not received a confirmation message from mailman welcoming 
them to the mailing list) will have to re-start the subscription process. 

Apologetically,
Taco

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



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

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


[NTG-context] ConTeXt Meeting 2021 announcement; Call for submissions

2021-03-31 Thread Taco Hoekwater

Hi all!


15th International ConTeXt Meeting
==

The fifteenth ConTeXt meeting will take place in Bassenge, Belgium on

September 20–25, 2021

This will be our fourth meeting at ’t Sjetootje / Château Boirs (!) 

Registration


Registration will start on May 1.


Call for submissions


The theme for this meeting is:

expanding orbits

But, as in previous years, anything at all related to ConTeXt that you 
would like to share is an acceptable subject for a presentation, 
tutorial, discussion, Q session, demonstration, workshop, recital, 
sketch, or sermon.

The programme committee is Hans Hagen and Taco Hoekwater, feel free to 
email them with hints and ideas.

Hoping to see many of you in person in September, your organiser,

Taco

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



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

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Taco Hoekwater


> On 24 Feb 2021, at 10:42, Christoph Hintermüller  
> wrote:
> 
> Hi
> What command line parameters, trackers etc I should activate when i

There is 

  \enabletrackers[export.*]

Best wishes,
Taco

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



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

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


Re: [NTG-context] Question about parsing XML and attributes (normally var.at.attrib) with a name with ':' in it

2021-02-14 Thread Taco Hoekwater
Hi Gerben,

Not behind a computer right now, but you should look at the output of 

   table.print(foo)

Best wishes,
Taco

> On 14 Feb 2021, at 23:12, Gerben Wierda  wrote:
> 
> 
> foo.at[“attribute:B”]
> 
> I looked at the code and guessed this. Still haven’t found really good 
> documentation for lua, lua in ConTeXt, and especially theXML stuff (it’s all 
> written as \xmlsomething TeX commands. No idea if this is ConTeXt, lua or 
> whatever but it works.
> 
> Gerben Wierda (LinkedIn)
> R Enterprise Architecture (main site)
> Book: Chess and the Art of Enterprise Architecture
> Book: Mastering ArchiMate
> 
>> On 14 Feb 2021, at 22:40, Gerben Wierda  wrote:
>> 
>> If I have an XML element like this:
>> 
>> 
>> 
>> and it has been read in a lua variable foo, I can get at attribute x with 
>> foo.at.x 
>> 
>> But how do I get at attribute:B?
>> 
>> Gerben Wierda (LinkedIn)
>> R Enterprise Architecture (main site)
>> Book: Chess and the Art of Enterprise Architecture
>> Book: Mastering ArchiMate
>> 
>> ___
>> 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
> ___
___
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] Metapost: directionpoint gives unexpected point(?)

2021-02-12 Thread Taco Hoekwater


> On 12 Feb 2021, at 10:31, Mikael Sundqvist  wrote:
> 
> Hi Taco,
> 
> thanks, from your observation and the way I build the paths, I found
> out that I can avoid the problem by shortening the paths I join just
> slightly:
> 
> cl := (fullcircle scaled 4u) shifted z0;
> cl := cl cutbefore point (1/6+epsilon) along cl cutafter point
> (2/6-epsilon) along cl;
> cs := (fullcircle scaled 16u) shifted z1;
> cs := cs cutafter point (1/6-epsilon) along cs;
> 
> and indeed, it works here now, with different values of the scale u,
> and it seems more stable.


Here is a quick hack I wrote that does the cleanup in a postprocessing stage. 
It is not very generic or clever, but it works for your case:

def clean_path(suffix p) =
  begingroup;
  save q,precontrols,postcontrols,points, skip, i,j;
  boolean skip;
  pair precontrols[],postcontrols[],points[] ;
  j := 0;
  for i = 0 upto length p:
skip := false;
if abs(xpart point i of p - xpart point i+1 of p)<0.01:
   if abs(ypart point i of p - ypart point i+1 of p)<0.01:
 skip := true;
   fi
fi
if not skip:
   points[j] := point i of p;
   postcontrols[j] := postcontrol i of p;
   precontrols[j+1] := precontrol i+1 of p;
   j := j + 1;
fi
  endfor;
  if abs(xpart point 0 of p - xpart point length p of p)<0.01:
 if abs(ypart point 0 of p - ypart point length p of p)<0.01:
   j := j - 1;
 fi
  fi
  p := for i=0 upto j-1: points[i] .. controls postcontrols[i] and 
precontrols[i+1] .. endfor cycle;
  endgroup;
enddef;

show p0;
clean_path(p0);
show p0;

> 
> PS I found out that eps and epsilon both worked, and I do not see in
> the metafun manual if there is a difference.

The original intent was for eps to be just a ’small enough value that a human 
will not notice it’ where epsilon is intended as ’the smallest representable 
value’. Neither really work that way because depending on how you use metapost 
eps can be quite visible (especially in non-scaled number systems) and (more 
importantly) in the new non-scaled number systems epsilon cannot really be the 
smallest representable value for numerical and practical reasons.

So in reality, we always use these definitions:

  eps  := .00049 ;  % this is a pretty small positive number
  epsilon  := 1/256/256 


Best wishes,
Taco

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



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

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


Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-12 Thread Taco Hoekwater
Hi,

> On 11 Feb 2021, at 17:41, Mikael Sundqvist  wrote:
> 
> Thanks for your investigation and extended example!
> 
> So, if I understand it correctly, the problem occurs where the
> different circles are glued together with the .. construction.

Took me a while to get it, but the problem is the definition of p0:

p[0] := cs .. cl .. (cs rotated 120) .. (cl rotated 120) .. (cs rotated 240) .. 
(cl rotated 240) .. cycle;

Here are cs and cl after your earlier definition:

cs := (141.732246,-49.097491614210789)
  ..(75.312386775380347,111.25424516116959)
  ..(28.347427842053655,147.2925755432174);
   
cl := (28.346108531095332,147.29283827977969)
  ..(0,154.88788322842163)
  ..(-28.346108531095332,147.29283827977969);

Note how the last point of cs and the first point of cl are nearly the same. 
When you combine these bits into p0, p0 becomes a cyclic path with 18 points 
(where you really want/need only 12 points).

The micro-segments between these nearly-identical paths are the problem. At 
smaller u values the differences between the points become zero, and the 
directionpoint of a path of length zero is mathematically undefined. 

I do not know a quick generic solution off hand, but that is what the issue is.

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 / 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] About baseline alignment in metapost - issue on the wiki ?

2021-01-29 Thread Taco Hoekwater


> On 29 Jan 2021, at 09:33, Garulfo  wrote:
> 
> The dlft version doesn't seem to work on the wiki.
> 
> A MVE here https://wiki.contextgarden.net/textext_positioning#Test_dlft

Version issue? The wiki is still running a context from june last year.
> 
> 
> 
> 
> Le 29/01/2021 à 09:01, Garulfo a écrit :
>> To align with the baseline :
>> thetextext.drt("Hello, World!", (1cm, 5cm)) ;
>> Also existing :
>> thetextext.d  (center)
>> thetextext.dlft   (left)
> ___
> 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
> ___

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



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

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


Re: [NTG-context] Missing images in Wiki?

2021-01-25 Thread Taco Hoekwater


> On 22 Jan 2021, at 20:41, Andres Conrado Montoya Acosta 
>  wrote:
> 
> This is one example: 
> 
> https://wiki.contextgarden.net/Command/externalfigure
> 
> However, now I checked the source, and the image files are there... and they 
> are being correctly linked, but the image attributes width and height are set 
> to zero. Maybe something wrong with lazy loading?

The remote cat was missing from ConTeXt’s image cache. I fixed that now by 
editing the source (added a space),
which made the wiki rerun ConTeXt, and that in turn made ConTeXt re-fetch the 
url contents.

The other images all load fine for me.



Images for ‘’ blocks can be a little tricky, because the wiki software 
caches them based on a hash of the block’s contents. So if something transient 
goes wrong in the ConTeXt processing but ConTeXt still outputs some sort of 
PDF, then that output will never get fixed unless you edit the wiki source 
again. 

That does not happen a lot, but it is likelier to happen with remote content.

There are two ways around this:

1. edit the block source slightly, by adding a space or a % or something else 
that is harmless. That changes the hash key of the content, and the wiki will 
(probably) regenerate the graphic.

2. There is a ‘secret’ force attribute for , but that should only be 
used to apply fixes like the one I did above, and it should be removed 
afterwards. That attribute bypasses the wiki caching altogether. But as that is 
really bad for the webserver’s performance, it should only be used if there is 
no other way. 

See also:  https://wiki.contextgarden.net/Help:Context


Best wishes,
Taak


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



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

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


Re: [NTG-context] Missing images in Wiki?

2021-01-22 Thread Taco Hoekwater


> On 21 Jan 2021, at 20:30, Andres Conrado Montoya  
> wrote:
> 
> It seems a lot of image examples from the wiki are gone now. Most articles 
> lost many images. Is this on purpose? 

Seems unlikely, but provide a few examples, please. I will check.

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



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

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


Re: [NTG-context] Getting dimensions in Lua

2021-01-18 Thread Taco Hoekwater


> On 18 Jan 2021, at 10:45, Hans Hagen  wrote:
> 
> On 1/18/2021 1:58 AM, Jairo A. del Rio wrote:
>> Hi, list.
>> I want to get some dimensions in Lua. See, for instance
>> \starttext
>> \the\dimexpr\availablehsize\relax %say, 426pt
>> \stoptext
>> Is there an equivalent in ConTeXt for Lua, i.e. without passing values from 
>> TeX or, at least, using only Lua commands? Thank you in advance.
> tex being tex, there is always a way ...

There is also this option:

   % function returns scaled points
   \startluacode
   function availablehsize() 
  local l = tex.dimen.hsize - tex.skip.leftskip.width - 
tex.skip.rightskip.width
  if tex.count.hangafter<0 then
 local h = tex.dimen.hangindent
 if h>0 then  l = l - h else l = l + h end
  end
  return l 
   end
   \stopluacode

But I suspect that there are multiple cases where this does not work
(like when used in horizontal mode, for example if the par setting changes 
before the \par is seen, or when there is data in the local par node)

Best wishes,
Taco

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







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

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


Re: [NTG-context] question about vardef variables

2021-01-18 Thread Taco Hoekwater


> On 17 Jan 2021, at 11:17, Damien Thiriet  wrote:
> 
> Hi,
> 
> 
> I have some troubles with understanding metafun's macro mechanism.
> 
> Given this MWE:
> 
> \starttext
> \startMPpage
> 
> vardef Test (expr ab,cd)=
>   %numeric ab;
>   %numeric cd;
>   draw unitsquare scaled 10 xshifted ab;
>   draw unitsquare scaled 10 yshifted cd;
> enddef;
> 
> Test (50,100);
> \stopMPpage
> \stoptext
> 
> Uncommenting the two declarations makes me run intro a silent error. I was 
> lucky enough yesterday to get an explicit error message with a more 
> complex macro.  It made me figure out where my problems came from.
> 
> So here are my two questions:
> - Why shouldn't we tell metafun if expr is a path, a pair or so on?

You were (attempting to) redefine the macro’s arguments, but they are read-only.

A somewhat longer answer: the type of macro arguments in this case is “expr”. 
Metapost argument types are based solely on what the internal language parser 
needs to interpret the code; the language is not strongly typed.

Also, during macro expansion, your code is replaced by:

  %numeric (READONLY TEMP VALUE 1);
  %numeric (READONLY TEMP VALUE 2);
  draw unitsquare scaled 10 xshifted (READONLY TEMP VALUE 1);
  draw unitsquare scaled 10 yshifted (READONLY TEMP VALUE 2);

Best wishes,
Taco

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







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

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


Re: [NTG-context] dutch calendars 3 months

2021-01-05 Thread Taco Hoekwater

Knew that one. AKA: what is the weekday for “XX in month XX”?

> On 5 Jan 2021, at 14:06, Otared Kavian  wrote:
> 
> Best wishes for the new year !
> 
> Talking of calendars, this one is even more compact: each year is shown on 
> one page, and when changing the year only the three lines where the months 
> are shown will change:
> 
> http://www.professores.im-uff.mat.br/hjbortol/c1p/?fbclid=IwAR3EkoYjcxA2MCkfWU8J-KqaEReMluNaQ1DPkDNM8dxtWEwnGZ0mXsvQ640
> 
> Best regards: Otared
> 
>> On 5 Jan 2021, at 11:46, luigi scarso  wrote:
>> 
>> I guess this is a challenge for Willi :
>> a module to typeset "dutch calendars"
>> as in 
>> https://www.calendari.it/
>> (I am not involved at all with the site, it's the first I have found )
>> 
>> I like the slim version, with 3 months, the saint(s) of the day, the moon 
>> phases, the week number,
>> the day from the beginning and to the end of the year 
>> 
>> 
>> -- 
>> luigi
>> ___
>> 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
> ___

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







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

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


Re: [NTG-context] dutch calendars 3 months

2021-01-05 Thread Taco Hoekwater


> On 5 Jan 2021, at 11:46, luigi scarso  wrote:
> 
> I guess this is a challenge for Willi :
> a module to typeset "dutch calendars"
> as in 
> https://www.calendari.it/
> (I am not involved at all with the site, it's the first I have found )

Being Dutch, I never realised there was such a thing as a “Dutch calendar”. 

These are just calendars? What makes them “Dutch” from an Italian viewpoint?

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 / 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] Migrating from LaTeX (was: A not so short introduction to ConTeXt Mark IV)

2021-01-04 Thread Taco Hoekwater


> On 4 Jan 2021, at 14:02, BPJ  wrote:
> 
> for searching for "index" on the ConTeXt wiki finds an error page!

Redirect page added. If you see more such issues, please do the same.

Best wishes,
Taco

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







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

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


Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-24 Thread Taco Hoekwater


> On 24 Dec 2020, at 00:14, Garulfo  wrote:
> 
> Thanks Taco,
> 
> I made some progress :
> https://wiki.contextgarden.net/Talk:Cover_Pages
> 
> I now have two additional questions ... ;-)
> 
> - How can I deal with "space" characters (because current solution
>  requires to explicitly add the ~ character)

Here’s what I would do (which is probably not the nicest way of doing it). Just
enable \obeyspaces while reading the argument to \EmptyLetters, then disable
it again immediately (that is needed if you have to go back to TeX from Lua):

\def\EmptyLetters
 {\obeyspaces\doEmptyLetters}

\def\doEmptyLetters#1%
  {\normalspaces
   ...
  }

and in \whatever you then need \doifinstringelse{ }{#1}

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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-21 Thread Taco Hoekwater


> On 21 Dec 2020, at 16:09, Garulfo  wrote:
> 
> Hi,
> 
> 
> * I try to "remove the paths of text" from a metapost pictures to let
>  the background visible.
> 
> * Using
>  https://mailman.ntg.nl/pipermail/ntg-context/2018/thread.html#92725
> 
> * I was able to get the following with one glyph (MVE code below)
> 
>  https://wiki.contextgarden.net/images/d/d2/test_extract_glyphs.pdf
> 
> 
> 2 questions:
> 
> 1/ for some fonts (e.g. dejavu vs latin modern) the "encompassing" path
>   of the B glyph can switch from B[1] to B[Bn]. Is there a trick to
>   identify which id match with "the encompassing" path ?

What you get is the order of the paths as defined in the font, which is 
arbitrary, as you discovered.

A quick trick (that will not always work, but should work quite well for font 
variations of alphabetics) is to check the actual arclength of the paths. The 
longest one will typically be the outer one. 

But much depends on the font, so a generic solution is likely quite 
complicated. Consider an outline font’s colon glyph ;)


> 
> 2/ now, I would like to do the same, but for text... a kind of
>   derivative of "textext" or "outlinetext".
>   Would you please give me some guidelines ?
>   does it already exist ?
>   should I use something like \handletokens, \scantokens ?
>   do you have examples where I can get inspiration ?
> 
> 
> Thanks again for your help,
> Garulfo
> 
> 
> %==
> 
> 
> 
> 
> \starttext
> 
> %--
> 
> \startluacode
> 
> function document.outlinepaths(character)
>local chardata  = fonts.hashes.characters[true] -- by unicode
>local shapedata = fonts.hashes.shapes[true] -- by index
>local c = chardata[character]
>if c and c.index and shapedata then
>local shapeglyphs = shapedata.glyphs or { }
>local glyph   = shapeglyphs[c.index]
>if glyph and (glyph.segments or glyph.sequence) then
>local units  = shapedata.units or 1000
>local factor = 100/units
>return fonts.metapost.paths(glyph,factor)
>end
>end
>return { }
> end
> 
> function document.defineoutline(char,target)
>local outlines = document.outlinepaths(char)
>local nofpaths = #outlines
>context("path %s[] ;",target)
>context("numeric %sn ; %sn := %s ;",target,target,nofpaths)
>for i=1,nofpaths do
>context("%s[%i] := %s ; ",target,i,outlines[i])
>end
> end
> 
> \stopluacode
> 
> %--
> 
> \def\mpdefineoutlines#1#2{\ctxlua{document.defineoutline(\number`#1,"#2")}}
> 
> %--
> 
> \startMPpage
> 
> numeric dimA ; dimA := 20cm;
> 
> path pathbackground ;
> pathbackground :=  unitsquare scaled dimA ;
> fill pathbackground withshademethod "linear" withshadedirection(0,1) 
> withshadecolors (red,blue);
> 
> %--
> 
> \mpdefineoutlines{B}{B}
> 
> %--
> 
> numeric dimB  ; dimB := 2cm;
> numeric vratio ; vratio := 2;
> 
> path frame ;
> frame :=  unitsquare
>  xscaled (dimA - 2 * dimB)
>  yscaled (dimA / vratio)
>  shifted (dimB , (dimA - (dimA / vratio))/2 );
> 
> %--
> 
> pair shift ; shift := center frame;
> numeric scal ; scal := (0.9) * (10cm / (bbheight B[1])) ;
> 
> picture monImageB; monImageB := nullpicture;
> addto monImageB contour
>  (B[1] shifted (- center B[1]) scaled scal)
>  shifted shift
>  withpostscript "collect";
> 
> addto monImageB contour
>  frame
>  withpostscript "evenodd";
> 
> for i=2 upto Bn :
>  addto monImageB contour
>(B[i] shifted (- center B[1]) scaled scal)
>shifted shift;
> endfor ;
> 
> %--
> 
> draw monImageB withcolor white;
> 
> \stopMPpage
> 
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/comm

Re: [NTG-context] Off-topic: Struggles with LPEG grammar

2020-12-21 Thread Taco Hoekwater
Hi,

Also good reading are the first sections in Roberto’s paper:

  http://www.inf.puc-rio.br/~roberto/docs/peg.pdf

> 
> In reality it just means that I was trying to add a new rule to solve
> the second part of the puzzle (hidden on the website until you solve
> the first part), which read something like
>6: 3 | 3 6
> which would in theory be translated into something like
>r6 = lpeg.V"r3" + lpeg.V"r3" * lpeg.V"r6",
> if PEGs worked the way I imagined they worked, that is. Apparently they don't 
> :)

Try this, blind guess: 

r6 = lpeg.V"r3" * lpeg.V”r6” + lpeg.V"r3",

Best wishes,
Taco


Taco Hoekwater
Elvenkind BV




___
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] Off-topic: Struggles with LPEG grammar

2020-12-21 Thread Taco Hoekwater


> On 21 Dec 2020, at 14:08, Mojca Miklavec  
> wrote:
> 
> Dear Taco,
> 
> On Mon, 21 Dec 2020 at 13:46, Taco Hoekwater wrote:
>>> On 21 Dec 2020, at 13:16, Mojca Miklavec wrote:
>>> 
>>> My only explanation would be that perhaps "^1" is so greedy that the
>>> rest of the pattern doesn't get found. But I don't want to believe
>>> that explanation.
>> 
>> Which (of course) means that that is exactly what happens ;)
>> 
>> The ones that match are
>> 
>> ababbb (a (ba+bb) b) => r4 r1(r3(r5 r4) r2(r5 r5)) r5
>> abbbab (a (bb+ba) b) => r4 r1(r2(r5 r5) r3(r5 r4)) r5
>> 
>> With the ^1, in the “bb” cases the first “b” eats all three “b”s:
>> 
>> ababbb fails the r5 at the end
>> 
>> abbbab fails the first r2 already (since the second r5 therein never happens)
> 
> Is this a deliberate choice, a limitation of the grammar
> expressiveness, some misuse on my side that could/should/needs to be
> implemented in a different way, or does it count as a "bug" on the
> lpeg side?
> 
> For example, I wouldn't expect a regexp "b+b" to fail on "bbb" just
> because "b+" would eat all three "b"s at once (the regexp "b+b" in
> fact finds "bbb", and I would expect a less-than-totally-greedy hit
> with lpeg as well). Or is my reasoning wrong here?

PEGs are greedy by design, which is a consequence of the fact that PEGS do not 
backtrack, which goes back to the underlying assumptive rule of PEGs that there 
is one (and only one!) ‘correct’ way to parse the input. Allowing backtracking 
destroys that assumption and by doing so would complicate the system to a level 
that would make it comparable to PCRE (with all the associated penalties on 
processing speed and a much greater codebase).

Another way of thinking of it (perhaps that helps): PEGs are _declarative_ on 
the input, whereas REs are _interpretive_.

Yet another way of thinking about it: PEGs rigorously define the (programming) 
language of the input.

It takes a bit of rewiring your brain to get comfortable with PEGs when you are 
used to REs, and unpredictable input is much harder to tackle in PEGs. OTOH, 
using PEGs are much better if there is an explicit grammar.

In your example, the fact that you even considered ^1 means that you were still 
thinking too much in terms of regular expressions, but I know it is very hard 
to learn how to do something that is _only a little_ different from something 
you know well already.

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 / 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] Off-topic: Struggles with LPEG grammar

2020-12-21 Thread Taco Hoekwater


> On 21 Dec 2020, at 13:46, Taco Hoekwater  wrote:
> 
> 
> 
>> On 21 Dec 2020, at 13:16, Mojca Miklavec  
>> wrote:
>> 
>> My only explanation would be that perhaps "^1" is so greedy that the
>> rest of the pattern doesn't get found. But I don't want to believe
>> that explanation.
> 
> Which (of course) means that that is exactly what happens ;)
> 
> The ones that match are
> 
> ababbb (a (ba+bb) b) => r4 r1(r3(r5 r4) r2(r5 r5)) r5
> abbbab (a (bb+ba) b) => r4 r1(r2(r5 r5) r3(r5 r4)) r5
> 
> With the ^1, in the “bb” cases the first “b” eats all three “b”s: 
> 
> ababbb fails the r5 at the end

Sorry, that was wrong, it fails at the second r5 in the r2 as well, for the same
reason as below.

> 
> abbbab fails the first r2 already (since the second r5 therein never happens)
> 
> 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 / 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] Off-topic: Struggles with LPEG grammar

2020-12-21 Thread Taco Hoekwater


> On 21 Dec 2020, at 13:16, Mojca Miklavec  
> wrote:
> 
> My only explanation would be that perhaps "^1" is so greedy that the
> rest of the pattern doesn't get found. But I don't want to believe
> that explanation.

Which (of course) means that that is exactly what happens ;)

The ones that match are

ababbb (a (ba+bb) b) => r4 r1(r3(r5 r4) r2(r5 r5)) r5
abbbab (a (bb+ba) b) => r4 r1(r2(r5 r5) r3(r5 r4)) r5

With the ^1, in the “bb” cases the first “b” eats all three “b”s: 

ababbb fails the r5 at the end

abbbab fails the first r2 already (since the second r5 therein never happens)

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 / 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] Parallelizing typesetting of large documents with lots of cross-references

2020-12-03 Thread Taco Hoekwater


> On 3 Dec 2020, at 12:04, Stephen Gaito  wrote:
> 
> 1. Are there any other known attempts to parallelize context?

Not that I know of, except for the tricks I mentioned in my earlier mail today.

> 2. Are there any other obvious problems with my approach?

The big problem with references is that changed / resolved references can 
change other (future) references because the typeset length can be different,
shifting a following reference to another page, which in turn can push
another reference to yet another page, perhaps changing a page break, et 
cetera. 

That is why the meta manual needs five runs, otherwise a max of two runs would 
always be enough (assuming no outside processing like generating a bibliography 
or index is needed). So your —once approach may fail in some cases, sorry.

Actually, the meta manual really *needs* only four runs. The last run is the 
one 
that verifies that the .tuc file has not changed (that is why a ConTeXt document
with no cross-references at all uses two runs, and is one of the reasons for 
the existence of the —once switch).

Depending on your docs, you may be able to skip a run by using —runs yourself.

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 / 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] Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 1/2

2020-12-03 Thread Taco Hoekwater


> On 3 Dec 2020, at 11:35, Stephen Gaito  wrote:
> 
> Hans,
> 
> As I said my desktop is elderly... it has a 2.8GHz processor, 16Gb of
> DDR3 memory, and a couple of old SATA1 hard disks, and only 3Mb of CPU
> cache...
> 
> ... all well past its use by date for single threaded ConTeXt. ;-(
> 
> So one way to get better performance for ConTeXt is to invest in a new
> ultra fast processor. Which will cost a lot, and use a lot of power
> which has to be cooled, which uses even more power

Startup time can be improved quite a bit with an SSD. Even a cheap SATA
SSD is already much faster than a traditional harddisk. Doesn’t help
with longer documents, but it could be a fairly cheap upgrade.

I can’t comment on how to speed up the rest of what you are doing,
but generally multi-threading TeX typesetting jobs is so hard as to
be impossible in practise. About the only step that can be split off
is the generation of the PDF, and even there the possible gain is 
quite small (as you noticed already).

Typesetting is a compilation job, so the two main ways to speed things
along are

1) split the source into independent tasks, like in a code compiler
   that splits code over separate .c / .cpp / .m / .p etc. files,
   and then combine the results (using e.g. mutool)

2) precompile recurring stuff (in TeX, that would mean embedding
   separately generated pdfs or images)

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 / 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] mathmatrix and internal lines

2020-11-30 Thread Taco Hoekwater


> On 29 Nov 2020, at 08:48, Otared Kavian  wrote:
> 
>> On 26 Nov 2020, at 23:23, Hans Hagen  wrote:
>> […]
>> A bit more code needed but the next upload will have it. Of course you have 
>> to wikify it.
>> 
>> Hans
> 
> Hi,
> I created a page on the wiki:
>   https://wiki.contextgarden.net/Matrix_in_maths
> However the LMTX code is not typeset on the wiki. I'll see with taco whether 
> it is possible to have lmtx mode on the wiki.

I plan to update the lmtx on the wiki sometime between now and new years’ eve. 
Sorry, I can not be more precise right now.

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 / 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] Units of xpart and ypart of a pair in MetaFun

2020-11-27 Thread Taco Hoekwater


> On 26 Nov 2020, at 16:09, Keith McKay  wrote:
> 
> Hi,
> 
> I have been using xpart and ypart to extract these values from pairs of 
> points in a path but I wasn't getting the correct result. I was expecting:
> 
> pair (2cm, 11cm) to give xpart 2 and ypart 11

As explained by various people, Metapost does not have dimensions. All lengths 
are implicit Postscript big points
(72/inch). Variables like “cm” just add a multiplication factor to your 
expressions, at no point is a dimension stored inside Metapost. 

Your equation:

  a0 = (2cm,11cm)

first expands into 
  
  a0 = (2*28.34645,11*28.34645)

because “cm” is a variable with a value (Its definition in plain.mp is "cm = 
28.34645”)

Then, the two expressions in the a0 equation are resolved before the 
assignment, so what you actually wrote at the statement level is

  a0 = (56.6929, 311.8096);

At no point is there a “cm”-sized dimension.

===

Perhaps another option would be for you to do all your work without units, e.g. 

  a0 = (2,11) % assume scaling will happen later

and then in the end do the drawing on a scaled path:

  draw (pp scaled cm) …

as that may be less confusing? If the precision is an issue, you could counter 
the loss of precision you could use implied millimeters instead of centimeters.

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 / 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] color epub reader

2020-11-09 Thread Taco Hoekwater


> On 6 Nov 2020, at 20:22, Hans Hagen  wrote:
> 
> Hi,
> 
> Playing with a pocketbook color epub reader (I just put some manuals on it):
> 
> - the colors are not bright enough, also not with lights on, why rgb and not 
> cmyk (i only tested pdf)

If I understand the tech right, it uses traditional e-ink pigments and a 
filter. The filter is subtractive, which means rgb, and that is also why it is 
not all that bright.

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 / 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] Bug: context/mtxrun makes Firefox eat up cpu

2020-11-05 Thread Taco Hoekwater


> On 5 Nov 2020, at 11:48, Sylvain Hubert  wrote:
> 
> After dozens of compilations of various minimal examples using the newly 
> installed context, the problem reappeared.
> 
> Removing tex/texmf-cache does not help.
> 
> Does anyone know what files context modifies apart from tex/texmf-cache?

None. 

Are you sure your disk(-driver) is OK?

Taco

___
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] Bug: context/mtxrun makes Firefox eat up cpu

2020-10-30 Thread Taco Hoekwater


> On 30 Oct 2020, at 09:34, n...@scorecrow.com wrote:
> 
> Hi Sylvain,
> 
> This bug tracker report 
>  describes lagging / 
> freezing (which are symptoms of excessive CPU usage, of course) for versions 
> of Firefox from 70 to 74 inclusive on Manjaro. They also report Chromium 
> seeing the same problem.

This basically says it is a bug in the video driver. 

You could test that theory by switching to a text terminal for running the 
‘context’ command (assuming the text-only terminal is still accessible in 
Manjaro) and see whether the output of ‘context —help’ causes lag there as 
well. Even a really, really crappy video driver should be able to handle the 
output stream in full-screen text mode, so if it still lags in that 
environment, that moves the needle toward a problem in ConTeXt (however 
unlikely Hans and I think that is).

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 / 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] Bug: context/mtxrun makes Firefox eat up cpu

2020-10-29 Thread Taco Hoekwater


> On 29 Oct 2020, at 15:14, Sylvain Hubert  wrote:
> 
> > But it seems to be a big problem only on your machine
> I fail to see what this implies.

The point is that if this was a common problem, many users would complain or at 
least respond to your message with a “me too”. So it seems likely that there is 
something special going on with exactly your computer or your context 
installation.

What binary are you using for luametatex ? The normal linux 64-bit one from the 
lmtx distribution?

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 / 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] Bug: context/mtxrun makes Firefox eat up cpu

2020-10-29 Thread Taco Hoekwater


> On 29 Oct 2020, at 12:44, Sylvain Hubert  wrote:
> 
> I've just tried chromium which behaves a bit better but still experiences a 
> sudden raise of cpu usage from <10% to >70% during ~1s.
> I've also noticed that, even without any browser running, each time after I 
> compile a file with `context`, my terminal get stuck for ~1s.
> So I'm pretty sure this is a context bug, probably caused by unnecessary 
> excessive disk operations or something.

But it seems to be a big problem only on your machine. What hardware are you 
running on? Is it a Raspberry PI?

Like any TeX-related program, ConTeXt does a fair bit of disk access while 
starting up, but I haven’t heard of that being an actual problem since the age 
of single-core CPUs. And it certainly should not have an effect on the CPU 
usage of any other program (it could affect system responsiveness, though).

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 / 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] Bug: context/mtxrun makes Firefox eat up cpu

2020-10-29 Thread Taco Hoekwater


> On 29 Oct 2020, at 12:19, Sylvain Hubert  wrote:
> 
> And using safe mode here is just to make sure that the problem is not caused 
> by extensions.
> The annoyance started long before I bothered opening firefox with an extra 
> argument.

I am baffled then. I do not see the connection, at all. 

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 / 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] Bug: context/mtxrun makes Firefox eat up cpu

2020-10-29 Thread Taco Hoekwater


> On 29 Oct 2020, at 11:29, Sylvain Hubert  wrote:
> 
> Hi,
> 
> sorry if this is not the best place to file a bug but I found no working bug 
> tracker for context.

Should you not be looking for a bug tracker for firefox instead?

It looks like firefox in safe mode is perhaps trying to do something with (or 
waiting for ?) a shell command called ‘context’, which is presumably not 
related to ‘our’ ConTeXt.

You can test that by (temporarily) redirecting the ‘context’ command from 
‘luametatex’ to ‘ls’ (but keep it at the same path), and see if the problem 
persists. If so, then it is the actual name giving problems, and then can you 
should file a firefox bug report because then it has nothing to do with ConText 
itself.

But even if the above is not the actual issue, it still sounds like a firefox 
problem to me.

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 / 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] troubles with cutafter

2020-10-27 Thread Taco Hoekwater


> On 27 Oct 2020, at 14:06, Damien Thiriet  wrote:
> 
> Hello,
> 
> 
> I went into some troubles with cutafter.
> Must have missed something obvious.

Not so obvious: due to rounding/precision errors, the result of 
“intersectionpoint”
is rarely the actual point. It finds a point “close to” the actual intersection
of the two paths.

The intersectionpoint calculation works by limited recursive bisection of the 
two paths, 
and thus it  finds imprecise results in all but the most trivial cases. The 
result may
be an actual point on p1 or p2, or on both, or even on neither.

The better solution is to use intersectiontimes and subpath:

  draw subpath (0, xpart (p1 intersectiontimes p2)) of p1 withcolor red;

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 / 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] Hyphenation patterns

2020-10-09 Thread Taco Hoekwater


> On 9 Oct 2020, at 08:52, Denis Maier  wrote:
> 
> Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:
>> \starttext
>> 
>> {EN: \en\hyphenatedcoloredword{applicable}}
>> 
>> {DE: \de\hyphenatedcoloredword{applicable}}
>> 
>> \stoptext
>> 
> Wow, that's super helpful. The English pattern seems to be "ap-plic-a-ble"
> According to Meriam-Webster it should just be "ap·​pli·​ca·​ble".
> 
> {EN: \en\hyphenatedcoloredword{obligate}} gives me "ob-lig-ate"
> According to Meriam-Webster it should be "ob·​li·​gate".
> 
> I've had a look at the files mentioned by Tomáš, but as these are not just 
> wordlists I can not really tell what is happening.
> 
> So, is that a bug? 

Not really. hyphenation patterns are a bit like applying JPEG compression to 
a dictionary. It makes the data size smaller by recognising patterns while
ignoring outliers. 

Occasional errors are to be expected, which is why \hyphenation exists.

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 / 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] Citeproc

2020-10-06 Thread Taco Hoekwater


> On 5 Oct 2020, at 22:26, Denis Maier  wrote:
> 
> Am 05.10.2020 um 22:04 schrieb Hans Hagen:
>> if it's an xml spec then using lua makes not that much sense (no gain) .. 
>> just process the xml 
> Hmm, but the XML is just a descriptive grammar of how bibliographies and 
> citations should be rendered. As Aditya has pointed out it's quite similar to 
> the role of bst style files for bibtex. So, a citeproc will take a style file 
> (in xml) and apply it to the metadata (based on the items actually cited in a 
> document).

I recall discussing this idea with Bruce D’Arcus a long time ago (somewhere in 
the early 00-es, maybe).

The CSL files look like XML, but really they are more like a macro processing 
language. Parsing and interpreting that should not be all that hard, I expect. 
If I had to do this, I would convert the XML  tags into actual lua 
functions while parsing the XML. The implied processing language is quite 
straightforward (unlike the stack-based postfix language in bibtex bst files). 
I don’t have time right now, but if someone reminds me in two months or so, I 
might have a go at it.

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 / 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] color problem

2020-10-02 Thread Taco Hoekwater
Hi,

> On 1 Oct 2020, at 20:55, Susanne G. Loeber  wrote:
> 
> Dear Reader, 
> 
> I have a colored section, text in another color and a TikZ picture with a 
> differently colored node, following each other. However, either the node gets 
> the wrong color or the following paragraph, see example below. 
> 
> Is there something wrong with the section settings? How do I get all the 
> colors right without using a paragraph in between? 

Some of the blackbox magic in the tikz module is confusing ConTeXt, it seems. 
This works:

  \draw (0,0) rectangle (2,1) node[right] {\color[A6plus]{node text should be 
orange}}; 

But that’s all I know. I do not understand the tikz module at all.

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 / 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] no frontmatter head on recto page

2020-09-30 Thread Taco Hoekwater


> On 30 Sep 2020, at 11:46, jbf  wrote:
> 
> For some reason that I cannot work out, the recto page header is not 
> appearing in frontmatter sections like Foreword. It is important to note that 
> for this item I am using:
> 
> \definehead
>   [foreword] [chapter]…

‘chapter' suppresses the header by default on the first page.

at a guess:

  \setuphead[foreword][header=start]

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 / 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] page counter problem

2020-09-30 Thread Taco Hoekwater
Hi Alan,

> On 30 Sep 2020, at 12:50, Alan Bowen  wrote:
> 
> he page counter does not increase in the first iteration an PDf inclusion but 
> seems to work properly after that. Have attached a sample file (69K) that 
> will serve to show the problem—at least, on my machine.

It is not the iteration itself. Try with another pdf with more than 2 pages and 
you
will see that it happens in the first page(s).

The problem is that you are not giving ConTeXt a fair chance to update the page 
number,
because a series of \vbox to \paperheight {}’s cannot cleanly be broken into 
separate
pages. The solution is to use 

\dorecurse{\noffigurepages}
   {\vbox to \paperheight 
{\vskip-\dimexpr\headerheight+\headerdistance+\topspace\relax
 \hbox to \hsize
 {\hskip-\backspace
\layeredtext[]
[boffset=3pc]   
{\red\userpagenumber}
{\externalfigure[HannahBW.pdf][page=#1]}%
  \hss}%
\vss}\page
  }

where the extra \page command allows ConTeXt to properly process the page 
breaks.

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 / 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] scaling images

2020-09-27 Thread Taco Hoekwater


> On 27 Sep 2020, at 11:42, Henning Hraban Ramm  wrote:
> 
> Hi,
> I’m struggling with scaling images:
> 
> \externalfigure[hacker][width=0.5\textwidth]
> 
> looks right.
> 
> 
> If I use the scale / xscale / yscale options, the image gets smaller, 
> regardless of height/width settings

Have you tried with factor/vfactor/hfactor?

Taco
___
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] Full page image and caption in another page?

2020-09-23 Thread Taco Hoekwater
Hi,

This sounds quite complicated, really. 

I am not at all sure how this page rotation should work but I assume you plan a 
pdf-only document then?  Otherwise, I would expect rotating the figure instead 
of the whole page. Also, rotating the paper does not rotate the layout, at 
least not if you use a fixed height and width. You would need something like 
this for auto-resizing \textheight and \textwidth:

\definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm, 
headerdistance=0cm,
   height=fit, footer=0cm,
   backspace=4.2cm, width=fit]

Another problem is that setting the width and height of a float does not affect 
any externafigure side. You need to do a \setupexternalfigure for that.

And there is (afaik) no support for having a “two-page” float. The “opposite” 
key is used to put the float (including caption) on the opposite side of the 
current page.

But at least there is a command to typeset a caption standalone, so perhaps 
that will help? You would then *not* use the \startplacebigfigure, but place 
the caption and the image manually:

\page
\placefloatcaption[bigfigure][title={A cow}]
\page
\externalfigure[cow]
\page

Best wishes,
Taco


> On 22 Sep 2020, at 19:42, José de Mattos Neto  wrote:
> 
> Hi, it's my first message on this list.
> I've searched in ConTeXt manuals, TeX.SX and here, but couldn't find a way to 
> achieve these 4 requirements altogether:
> 
>   • Place a figure as full-page figure
>   • Change orientation accordingly (if it's a landscape PDF, for instance)
>   • Make that using \setupfloat (or other setup), not directly in 
> \placefloat
>   • Place captions in another page (ideally on opposite page)
> Problems:
>   • I can't get # 1 and # 3 at same time
>   • \setupfloat doesn't have before option, which I could use to change 
> orientation
>   • I have no idea how to accomplish # 4
> A minimal working example (PDF in attachment):
> 
> %%%
> \definepapersize[default][A4, portrait]
> \definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm, 
> headerdistance=0cm,
>height=27.3cm, footer=0cm,
>backspace=4.2cm, width=13.6cm]
> \setuppapersize[default]
> \setuplayout[default]
> \setuppagenumbering[alternative=doublesided, location={header}]
> \setupexternalfigures[location={default}]
> 
> \definepapersize[rotate][A4, landscape]
> \definefloat[bigfigure][bigfigures][figure]
> \setupfloat[bigfigure][default={page},
>width=1\textwidth, height=1\textheight,
>before={\setuppapersize[rotate]}] % there's no before 
> in setupfloat
> \setupcaption[bigfigure][location={opposite}] % there's no opposite location 
> in setupcaption
> 
> \starttext
> \showframe
> \dorecurse{2}{\input{knuth}}
> 
> \setuppapersize[rotate] % this doesn't work because is in same page
> \startplacebigfigure[title={A cow}]{\externalfigure[cow]}\stopplacebigfigure
> \setuppapersize[default]
> 
> \dorecurse{2}{\input{knuth}}
> \stoptext
> %%%
> 
> Thanks in advance!
> José Neto
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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] issue with interaction=all and \insertpages

2020-09-23 Thread Taco Hoekwater
Hi Pablo,

> On 20 Sep 2020, at 18:29, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have the following sample:
> 
>  \setuplayout[page]
>  \setupinteraction
> [state=start, color=, contrastcolor=, focus=standard]
>  \enabledirectives[references.border=red]
>  \setupexternalfigures[interaction=all, method=pdf]
>  \setupinteractionscreen[option={portrait, paper}]
>  \starttext
>  %~ \insertpages[http://gaceta.rsme.es/abrir.php?id=1495][width=0pt]
>  \insertpages[GacRSocMatEsp.pdf][width=0pt]
>  \stoptext
> 
> I have some issues with it.

Yes, various issues indeed.

> 1. For some strange reason, the first \insertpages command with a remote
> file cannot deal with the interaction from the file (no internal or
> external links).

The problem with that one is that the url does not end in .pdf, which 
means context is too late in discovering that it really is a pdf. The

  \setupexternalfigures[interaction=all, method=pdf]

doesn’t help enough, it seems. I could get it to ‘work’ with

  \insertpages[http://gaceta.rsme.es/abrir.php?id=1495&=f.pdf][width=0pt]

but I assume that is a bug, and that ConTeXt should have listened to the
method=pdf.

> 2. The local file includes internal destinations to page parts. After
> imposition, destinations to page for internal links cannot reach the
> page parts as links in original document do.

Interaction=all actually converts the internal links in the pdf into a
normal ConTeXt layer. In that process, the target is lost, and all the
links are converted to page number references. That is a limitation
of the current (MkIV) implementation. In lmtx it should be possible
to be smarter about this, but it needs an extension to ConTeXt.

> 
> 3. Even external links are converted. On last page,
> https://www.cs.umb.edu/~offner/files/pi.pdf is rewritten as
> https://www.cs.umb.edu/õffner/files/pi.pdf.

This is a bug for sure. In the process of converting the link to the
ConTeXt layer (it actually becomes a \button) it is necessary to
convert some of the characters in the PDF link into ’TeX’ by escaping
some special characters like \ and #, or the \button would fail.

ConTeXt does the TeX escaping by prepending a backslash. While that
works fine for most of the special characters, it fails for a few others.

It fails for ~ and ^ because \~ and \^ are accent commands, not character 
escapes. 
The replacer should be using \texttilde and \textcircumflex for those.

It also fails for \, but that character is rejected in URIs anyway.

===

However, in fact, most of the special characters don't need escaping for 
inclusion 
at all any more (at least not with the standard catcodes). The only ones that 
do need escaping to please ConTeXt are:

  # % \ { }

(of those, only # and % can actually happen in a wellformed URI)

The other ‘old’ special characters: 

  ~ $ ^ & _ |

do not need to be escaped by ConTeXt at all any more, \button handles them just 
fine.

(also, bare ^ and | are disallowed in a wellformed URI)


Summarized: 

In link_uri() in lpdf-epa.lua, the line

  url = escapetex(url)

can be replaced with 

  url = string.gsub(url,"#", "\\#")
  url = string.gsub(url,"%%", "\\%%")

if only correct URIs need to be considered. 


Otherwise (if bad URIs should be processed correctly), then a special 
escapeurl()
is needed in char-tex.lua to make sure that besides the prefixed backslashes
for the list of escaped characters, there is this override:

  ^ => “\textcircumflex "
  ~ => “\texttitlde "
  \ => “\textbackslash “

In that case, the \ handling needs fixing as well, because ConTeXt currently 
rejects
URIs with backslashes in them. This latter option may be wise, because I know 
from
experience that there are many bad URIs in external PDFs.

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 / 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] ZapfDingbats Unicode differences MKIV vs LMTX

2020-09-22 Thread Taco Hoekwater


> On 22 Sep 2020, at 13:51, Hans Hagen  wrote:
> 
> On 9/22/2020 7:19 AM, Christoph Reller wrote:
>> On Mon, Sep 21, 2020 at 3:27 PM Hans Hagen > > wrote:
>>On 9/21/2020 2:55 PM, Christoph Reller wrote:
>> >
>>\definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
>>I don't know what the previous line does ... but it works ok here when
>>you remove it.
>> This line loads the font from a file ZapfDingbats.ttf. Without this line I 
>> get no check marks in the output and the following log messages:
> 
> i don't know that one

MacOS has 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] How to get the last item from an XML node

2020-09-22 Thread Taco Hoekwater


> On 21 Sep 2020, at 18:31, Denis Maier  wrote:
> 
> Hi
> 
> struggling again: Shouldn't the code below give me the last element under 
> ? Right now \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} 
> gives me nothing...
> 
> (Use case is that I want to have a frame above the table and one bar below. 
> So I think I should wrap the last line in the \startxtablefoot 
> ...\stopxtablefoot, i.e., I need one command for the last element, and one 
> for the rest (Or is there a better way?). What would be the everything but 
> the last?
> 
> What am I missing?

You need to read some more on the "Expressions and filters” chapter of the xml 
manual, as it does not work quite the way you think. Here is a quick fix:

> 
> 
> \startxmlsetups xml:table:tbody
> \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)}

\xmlfilter{#1}{/tr[position()==last()]/command(xml:table:tbody:tr)}

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 / 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] 2020 Meeting recordings?

2020-09-21 Thread Taco Hoekwater
No. I post what I have ;)

Taco

> On 21 Sep 2020, at 16:40, Denis Maier  wrote:
> 
> Thanks! But not recordings, right?
> 
> Am 21.09.2020 um 15:50 schrieb Taco Hoekwater:
>> Hi,
>> Most of the available slides are now integrated with the abstracts page:
>> https://meeting.contextgarden.net/2020/abstracts.shtml
>> Best wishes,
>> Taco
>>> On 17 Sep 2020, at 19:03, Marcus Vinicius Mesquita 
>>>  wrote:
>>> 
>>> So do I.
>>> 
>>> Marcus Vinicius
>>> 
>>> On Thu, Sep 17, 2020, 13:07 Denis Maier  
>>> wrote:
>>> Hi,
>>> 
>>> unfortunately, I wasn't able to come to this years meeting. Have the
>>> presentations and demos been recorded? I would very much like to watch
>>> some of those.
>>> 
>>> Best,
>>> Denis
>>> ___
>>> If your question is of interest to others as well, please add an entry to 
>>> the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl / 
>>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> wiki : http://contextgarden.net
>>> ___
>>> ___
>>> 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
>>> ___
>> Taco Hoekwater
>> Elvenkind BV
>> ___
>> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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] Extreme tables and XML conflict?

2020-09-21 Thread Taco Hoekwater


> On 21 Sep 2020, at 16:38, Denis Maier  wrote:
> 
> Hi,
> 
> I'm a bit confused, but this here won't compile:
> 
> =
> 
> \startxmlsetups xml:table
>   \startxtable
> \startxrow
>   \startxcell one \stopxcell
>   \startxcell two \stopxcell
> \stopxrow
>   \stopxtable
> \stopxmlsetups

The normal xtables don’t like to be called from inside other constructs. Use 
this instead:

\startxmlsetups xml:table
  \message{xml:table}
  \startembeddedxtable
\startxrow
  \startxcell one \stopxcell
  \startxcell two \stopxcell
\stopxrow
  \stopembeddedxtable
\stopxmlsetups


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 / 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] 2020 Meeting recordings?

2020-09-21 Thread Taco Hoekwater
Hi,

Most of the available slides are now integrated with the abstracts page:

https://meeting.contextgarden.net/2020/abstracts.shtml

Best wishes,
Taco

> On 17 Sep 2020, at 19:03, Marcus Vinicius Mesquita 
>  wrote:
> 
> So do I.
> 
> Marcus Vinicius 
> 
> On Thu, Sep 17, 2020, 13:07 Denis Maier  wrote:
> Hi,
> 
> unfortunately, I wasn't able to come to this years meeting. Have the 
> presentations and demos been recorded? I would very much like to watch 
> some of those.
> 
> Best,
> Denis
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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] Parallel text support

2020-09-21 Thread Taco Hoekwater


> On 21 Sep 2020, at 12:21, Denis Maier  wrote:
> 
> 
> However, as it turns out, split only seems to mean that the table is split 
> between rows, individual rows stay on the same page.
> 
> Is there a better approach? I've found the page-streams, but that seems to be 
> too much…

\starttabulate

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

2020-09-10 Thread Taco Hoekwater
Hi,

The certificate for *.contextgarden.net expired this morning. I installed a new 
certificate just now, but it is possible that I missed one of the uses of the 
old certificate.

If you find that you get an error about ‘Connection is not private’ still, even 
after a hard reload, please send me message as I likely forgot to update some 
file.

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 / 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] Can't output direct glyphs either in MKIV or LMTX

2020-09-07 Thread Taco Hoekwater
Hi,

> On 7 Sep 2020, at 22:05, Andres Conrado Montoya  
> wrote:
> 
> 
> Hello list. I'm trying to call a direct glyph from the Phaistos font, but it 
> seems it doesn't work. The font is loaded, the log file says it so:
> 
> system  >   12: filename=/home/vantta/.fonts/Phaistos.otf format=otf 
> foundname=/home/vantta/.fonts/Phaistos.otf 
> fullname=/home/vantta/.fonts/Phaistos.otf usedmethod=direct
> 
> However, the glyph is not displayed in the pdf. I've tried both in MKIV and 
> LMTX with no luck. Maybe someone here will have a clue.

I don’t have the font, but is u101F2 the glyphs’ name, or its code point?

Try this:

   \starttext
   \usemodule [fnt-10]
   \ShowCompleteFont{name:phaistos}{14pt}{1}
   \stoptext___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Quotation with footnote

2020-09-04 Thread Taco Hoekwater

Something like this?


\definenarrower[myquote]
\setupnarrower[myquote]
  [left=2em,
   right=1.5em,
   before=\dontleavehmode\hskip-0.33em\startquote,
   after=\stopquote]

\startmyquote
Im übrigen ist der Mensch ein Lebewesen, das klopft, schlechte Musik macht und 
seinen Hund bellen läßt. Manchmal gibt er auch Ruhe, aber dann ist er tot.
\stopmyquote \footnote[f:9]{Kaspar Hauser (Kurt Tucholsky), Weltbühne 24, 
16.\,6.\,1931}


But there may be smarter solutions.

Best wishes,
Taco

> On 4 Sep 2020, at 13:25, Henning Hraban Ramm  wrote:
> 
> My current book contains a lot of quotations with their sources marked as 
> footnotes, e.g.
> 
> 
> \definedelimitedtext[Zitat][
>  %setups=Zitat, % doesn’t work!?
>  left=»,
>  right=«,
>  leftmargin=2em,
>  rightmargin=1.5em,
> ]
> 
> \startZitat
> A rose is a rose is a rose.\footnote{Marx brothers}
> \stopZitat
> 
> 
> Now, since the quotations are whole sentences or paragraphs, the footnote 
> marker needs to be placed _after_ the closing quotation mark. (German 
> typography, I learned it’s different at least in US English.)
> 
> I tried several approaches e.g. with my own single start/stop macros that 
> call \start/stopnarrower or \start/stopZitat – that always lead to unclosed 
> environments.
> 
> * Only the delimitedtext approach gives a hanging opening quotation mark 
> (which looks nice and I’d like to have).
> 
> * \stopnarrower within a macro doesn’t seem to work (all following text stays 
> narrower).
> 
> * I can’t get rid of that space introduced by the CR before \stop – didn’t 
> find a place where \gobblespacetokens works, maybe that’s the wrong command.
> 
> 
> Most preferred would be a solution that checked if there’s a footnote in 
> front of \stopZitat and would put the closing quotation mark in front instead 
> of after. Without a footnote it would just place the mark.
> 
> Something like \stopZitat\footnote{...} would also be nice, but I guess 
> that’s too far outside of TeX’s logic.
> 
> In the worst case I’d need to typeset the closing mark manually.
> 
> Some hints please?
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Taco Hoekwater
Elvenkind BV




___
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] Typing efficiency

2020-09-04 Thread Taco Hoekwater

Hi,

Sounds like a job for the blocks mechanism more so than buffers:


\defineblock[entext]
\defineblock[nltext]
  
\defineselector [language] [max=2,n=1]
\startmode[en]
\setupselector[language][n=1]
\keepblocks[entext]
\stopmode
\startmode[nl]
\setupselector[language][n=2]
\keepblocks[nltext]
\stopmode
 
\starttext
 
\startsection[title=\select{language}{English title}{Dutch title}]
 
\beginentext
This is English text.
\endentext
\beginnltext
This is Dutch text.
\endnltext
 
\stopsection
 
\stoptext


Best wishes,
Taco

> On 4 Sep 2020, at 14:02, Jan Willem Flamma  wrote:
> 
> Dear list member,
>  
> Following up from:
> https://www.mail-archive.com/ntg-context@ntg.nl/msg94719.html
>  
> The below MWE works but how can I avoid having to type
> \startmode[en]
> \getbuffer[en]
> \stopmode
> \startmode[nl]
> \getbuffer[nl]
> \stopmode
>  
> after every block of text? 
>  
> I tried to define a new start/stop pair as follows:
> \definestartstop[Bufen][
> before={\startmode[en]
> \startbuffer[en]},
> after={\stopbuffer
> \getbuffer[en]
> \stopmode}]
>  
> but that fails.
>  
> No doubt a clever solution exists that minimizes the typing. 
>  
> Kind regards,
> Jan Willem
>  
>  
> ===
> \setupinteraction[state=start]
>  
> %\enablemode[nl]
> \enablemode[en]
>  
> \defineselector [language] [max=2,n=1]
> \startmode[en]
> \setupselector[language][n=1]
> \stopmode
> \startmode[nl]
> \setupselector[language][n=2]
> \stopmode
>  
> \starttext
>  
> \startsection[title=\select{language}{English title}{Dutch title}]
>  
> \startbuffer[en]
> This is English text.
> \stopmode
> \stopbuffer
> \startbuffer[nl]
> This is Dutch text.
> \stopbuffer
>  
> \startmode[en]
> \getbuffer[en]
> \stopmode
> \startmode[nl]
> \getbuffer[nl]
> \stopmode
>  
> \stopsection
>  
> \stoptext
>  
>  
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Taco Hoekwater
Elvenkind BV




___
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] Import a metapost extension

2020-09-01 Thread Taco Hoekwater
Hi,

> On 1 Sep 2020, at 16:46, Hans Hagen  wrote:
> 
> On 9/1/2020 3:04 PM, Fabrice Couvreur wrote:
>> Hi Taco,
>> Thank you for your help. I specify that this extension works perfectly by 
>> compiling the following file.

A logfile of a failed run would have been more helpful in trying to track down 
the problem. But I did notice that there is a LaTeX file loaded in your 
succesful run. So perhaps the extension depends on LaTeX?
> 
>  input "mp-scratch.mp" ;
> 
> maybe the path you look for is not part of the search path either
> 
>   mtxrun --expand-path MPINPUTS
> 
> 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] Import a metapost extension

2020-09-01 Thread Taco Hoekwater
Hi,

I think you need this:

\startMPinclusions
  input mp-scratch;
\stopMPinclusions

\startMPcode
  Scratchversion:=3;
  ….

If that also doesn’t work, perhaps attach the log file / terminal output to a 
new message.

Best wishes,
Taco

> On 1 Sep 2020, at 13:07, Fabrice Couvreur  wrote:
> 
> Hello
> Is it possible to import a metapost extension into a file compiled with the 
> lmtx engine ?
> I tried unsuccessfully with this example :
> 
>  begin test.tex
> 
> \starttext
> \startMPcode
>   input mp-scratch;
> 
> Scratchversion:=3;
> 
> draw Drapeau;
> draw Repeter("4");
> draw Avancer("50");
> draw Tournerd("90");
> draw FinBlocRepeter;
>  
> \stopMPcode
> \stoptext
> 
>  end test.tex
> 
> Thanks
> Fabrice
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Taco Hoekwater
Elvenkind BV




___
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] Wiki New Extension: ConTeXtXML

2020-08-27 Thread Taco Hoekwater
Hi again,

Just now, I installed and update of the extension that replaces the default 
edit form  for Command pages by a dedicated form. This should make editing a 
lot easier, since there is no longer any visible XML code to confuse you.

Best wishes,
Taco

> On 20 Aug 2020, at 14:04, Taco Hoekwater  wrote:
> 
> Hi,
> 
> As announced last week, I have been working on a wiki extension to control 
> the editing of /Command pages. That extension is now installed on the main 
> wiki.
> 
> In short, we will switch to XML as the page model for newly created /Command 
> pages. This makes editing a bit harder, but it allows much better quality 
> control and (fairly) easy export and import.
> 
> The goal is to eventually be able to easily export all of the reference 
> documentation in the wiki to a separate system (for instance, Paul Mazaitis 
> plans to create a full-blown reference manual). In the current situation, 
> this is nearly impossible because there is so much variation in the content 
> and quality of the wiki /Command pages (not to mention that many are 
> missing). We also want it to be possible to merge improvements to the 
> interface xml definitions by Wolfgang without loosing any existing 
> documentation work.
> 
> The documentation pages are here:
> 
>   https://wiki.contextgarden.net/Command
>   https://wiki.contextgarden.net/Help:Command
>   https://wiki.contextgarden.net/Extension:ConTeXtXML
> 
> After reading those, have a look at the three ‘work pages’:
> 
>   https://wiki.contextgarden.net/Document_level_commands_work_page
>   https://wiki.contextgarden.net/Style_level_commands_work_page
>   https://wiki.contextgarden.net/System_level_commands_work_page 
> 
> All the bright red links are currently undocumented commands. Clicking on one 
> should bring you to the edit screen automatically, with a blob of XML 
> preloaded, ready for you to start writing.
> 
> All the dark red links are existing /Command pages. All of those are 
> traditional wiki text pages. Following those links will bring you to a normal 
> /Command page just like on the main wiki. If you want to see how one of those 
> pages would look like in the new system, you’ll have to rename the existing 
> page first (as explained in 
> https://wiki.contextgarden.net/Command#Pre-existing_pages ) 
> 
> If you do some work, please update those work pages!
> 
> 
> Comments, suggestions and bug reports are more than welcome. 
> 
> Please direct those to me personally or (better) to the wiki mailing list:
> 
>   https://lists.contextgarden.net/mailman/listinfo/wiki
> 
> Have fun!
> 
> Taco
> 
> 
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Taco Hoekwater
Hi,

> On 27 Aug 2020, at 17:11, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have and \xmlraw command that gives some text with percent signs.
> ConTeXt parses them as comments (so no output).
> 
> Using Lua gsub(), I need to replace something like:
> 
>  string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent")

Double it: %%

See also https://www.lua.org/manual/5.3/manual.html#6.4.1 , but the mention of 
%% is a bit hidden.

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 / 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] Overriding the number on a float

2020-08-24 Thread Taco Hoekwater


> On 24 Aug 2020, at 19:59, Wolfgang Schuster 
>  wrote:
> 
>> 
>> 
>> \setcounter[figure][5] % next figure is no.6

For this subfigure stuff, perhaps this is useful?

% setup definitions
\definecounter[subfigure][way=bytext,prefix=no]
\setupcounter[subfigure][state=start,numberconversion=a]
\setcounter[subfigure][1]

\def\setsubfigures
  {\setcounter[subfigure][1]
   \incrementcounter[figure]
   
\setupcaption[figure][state=stop,numberstopper={\convertedcounter[subfigure]}]}

\def\unsetsubfigures
  {\setupcaption[figure][state=start,numberstopper=]}

%usage
\setsubfigures

\startplacefigure[title=Test figure]
\externalfigure[dummy]
\stopplacefigure

\incrementnumber[subfigure]

\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure

\unsetsubfigures


I could not find a safe way to increment the subfigure number automatically, 
unfortunately.

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 / 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] Wiki New Extension: ConTeXtXML

2020-08-20 Thread Taco Hoekwater
Hi,

As announced last week, I have been working on a wiki extension to control the 
editing of /Command pages. That extension is now installed on the main wiki.

In short, we will switch to XML as the page model for newly created /Command 
pages. This makes editing a bit harder, but it allows much better quality 
control and (fairly) easy export and import.

The goal is to eventually be able to easily export all of the reference 
documentation in the wiki to a separate system (for instance, Paul Mazaitis 
plans to create a full-blown reference manual). In the current situation, this 
is nearly impossible because there is so much variation in the content and 
quality of the wiki /Command pages (not to mention that many are missing). We 
also want it to be possible to merge improvements to the interface xml 
definitions by Wolfgang without loosing any existing documentation work.

The documentation pages are here:

   https://wiki.contextgarden.net/Command
   https://wiki.contextgarden.net/Help:Command
   https://wiki.contextgarden.net/Extension:ConTeXtXML

After reading those, have a look at the three ‘work pages’:

   https://wiki.contextgarden.net/Document_level_commands_work_page
   https://wiki.contextgarden.net/Style_level_commands_work_page
   https://wiki.contextgarden.net/System_level_commands_work_page 

All the bright red links are currently undocumented commands. Clicking on one 
should bring you to the edit screen automatically, with a blob of XML 
preloaded, ready for you to start writing.

All the dark red links are existing /Command pages. All of those are 
traditional wiki text pages. Following those links will bring you to a normal 
/Command page just like on the main wiki. If you want to see how one of those 
pages would look like in the new system, you’ll have to rename the existing 
page first (as explained in 
https://wiki.contextgarden.net/Command#Pre-existing_pages ) 

If you do some work, please update those work pages!


Comments, suggestions and bug reports are more than welcome. 

Please direct those to me personally or (better) to the wiki mailing list:

https://lists.contextgarden.net/mailman/listinfo/wiki

Have fun!

Taco


___
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] removing word in filtered XML

2020-08-20 Thread Taco Hoekwater


> On 19 Aug 2020, at 18:10, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have the following sample:
> 
>  \startbuffer[demo]
>  
>
>  
>This is
>  One of the best a paragraph.
>This is another paragraph.
>This is another
>  Two of the best paragraph.
>This is another
>  Three paragraph.
>This is another
>  Four of five paragraph.
>  
>
>  
>  \stopbuffer
> 
>  \startxmlsetups xml:initialize
>\xmlsetsetup{#1}{html}{xml:gen}
>  \stopxmlsetups
> 
>  \xmlregistersetup{xml:initialize}
> 
>  \startxmlsetups xml:gen
> \xmlfilter{#1}{/**/div/command(xml:special)}
>  \stopxmlsetups
> 
>  \startxmlsetups xml:special
>%~ \startitem
>\cldcontext{string.gsub(lxml.flush([[#1]]),
>   " of the ", "")}\stopitem
>  \stopxmlsetups
> 
>  \starttext
>\xmlprocessbuffer{main}{demo}{}
>  \stoptext
> 
> Is there any way to remove " of " and " of the " in the filtered content
> (xml:special)?

There is pretty much always ‘a way’, but I do not know of a ’nice’ way. 
Your problem is that lxml.flush() and friends do not return a value,
they just do a direct context(‘’) call behind the scenes with no
return string for you to modify.

Also, the special (catcode, space handling) rules for setups and \cldcontext
do not help you.

That does not mean it can’t be done. As I don’t know a of a nice way,
here is a low-level ‘ugly' way:

\startluacode
function filter(a)
local div = lxml.getid(a)
process(div)
lxml.flush(div)
end
function process(div)
for c=1,#div.dt do
if type(div.dt[c]) == 'string' then
div.dt[c] = string.gsub(div.dt[c], " of the ", "")
else 
process(div.dt[c]) 
end
end
end
\stopluacode

 \startxmlsetups xml:special
   \ctxlua{filter([[#1]])}
 \stopxmlsetups


process() is recursive because your xml:special gets the whole . Not sure 
if you intended it that way.
And if it can be done nicer, I am sure someone will correct me :)

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 / 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] TOC chapter and section numbering

2020-08-18 Thread Taco Hoekwater


> On 18 Aug 2020, at 06:40, Adrian  wrote:
> 
> 
> I would like all the chapters to be prefixed with "Chapter RN." and the 
> sections to keep a single count,
> for example:
> 

\setuplabeltext[chapter=Chapter~]

\definestructureresetset[default][1,1,0][1] % reset part, chapter, but not 
section
\setupheads[sectionresetset=default]

\setuphead[section][sectionsegments=section:*]

Mostly copied from the wiki page about titles:

  https://wiki.contextgarden.net/Titles

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 / 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] A dumb question about MetaFun

2020-08-16 Thread Taco Hoekwater


> On 16 Aug 2020, at 21:09, Keith McKay  wrote:
> 
> Jairo
> 
> Try
> 
> draw unitsquare scaled 1cm shifted (xcm, ycm);
> 
> Page 11 of the manual metafun-p.pdf is your friend here. My recent 
> conversation with Taco on this list will be usefull as well.

Also:

\starttext
\startMPpage
% puts the center of the bbox of path p at the point t
primarydef p centered t =
 hide(xshift := xpart t - (xpart urcorner p + xpart llcorner p)/2 ;
  yshift := ypart t - (ypart urcorner p + ypart llcorner p)/2 ; )
 p shifted (xshift,yshift)
enddef;

draw fullsquare scaled 2cm shifted (50,3) centered (100,100);

% just for reference:
drawdot origin withpen pencircle scaled 10 withcolor red;
drawdot (100,100) withpen pencircle scaled 10 withcolor green;
\stopMPpage
\stoptext

(I thought there was a metafun definition for that but I cannot find it).

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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] reading a single element from XML

2020-08-16 Thread Taco Hoekwater
\xmlfilter is your friend:

 \startxmlsetups xml:initialize
   \xmlsetsetup{#1}{html}{xml:gen}
 \stopxmlsetups

 \xmlregistersetup{xml:initialize}

\startxmlsetups xml:gen
\xmlfilter{#1}{/**/span[@class='special']/command(xml:special)}
\stopxmlsetups

 \startxmlsetups xml:special
   \bgroup\bfd\ssd\xmlflush{#1}\egroup
 \stopxmlsetups


Best wishes,
Taco

> On 16 Aug 2020, at 11:02, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have the following sample:
> 
>  \startbuffer[demo]
>  
>
>  
>This is Only a paragraph.
>This is another paragraph.
>This is another paragraph.
>This is another paragraph.
>This is another paragraph.
>  
>
>  
>  \stopbuffer
> 
>  \startxmlsetups xml:initialize
>\xmlsetsetup{#1}{*}{-}
> 
>\xmlsetsetup{#1}
>  {html|body|div|p}
>  {xml:flush}
> 
>\xmlsetsetup{#1}
>  {html/**/span[@class='special']}
>  {xml:special}
>  \stopxmlsetups
> 
>  \xmlregistersetup{xml:initialize}
> 
>  \startxmlsetups xml:flush
>\xmlflush{#1}
>  \stopxmlsetups
> 
>  \startxmlsetups xml:special
>\bgroup\bfd\ssd\xmlflush{#1}\egroup
>  \stopxmlsetups
> 
>  \starttext
>\xmlprocessbuffer{main}{demo}{}
>  \stoptext
> 
> How can I select only ? I mean, how can I have
> "Only" and nothing more in the output PDF document?
> 
> I thought that lpath "html/**/span[@class='special']" would work, but I
> don’t know what I’m missing.
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Taco Hoekwater
Elvenkind BV




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

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


Re: [NTG-context] Missing graphic in MPpage when viewing in Apple MAC Preview or GIMP 2.10 but not Adobe

2020-08-15 Thread Taco Hoekwater
Hi Keith,

It took me a while before I saw it, but I think you wanted to type in

  z0 = (60,60);
  z1 = z0 rotated 120;
  z2 = z0 rotated 240;

instead of 

  z0 = (60,60);
  z1 = z0 rotated 120;
  z2 = z1 rotated 240;

because the latter puts z2 at z0, resulting in a path that is a straight line. 
The fact that AR displays anything at all is probably some form of correction 
like "fill of empty path == single pixel line”.

Best wishes,
Taco

> On 15 Aug 2020, at 17:39, Keith McKay  wrote:
> 
> Dear List
> 
> I have come across a problem which I don't think is due to ConTeXt but I'm 
> hopping the great and the good of this list may be able to explain what is 
> going on.
> 
> The code below produces an MPpage with a shaded background and two graphics 
> along with a line of outlined text. When I view in Adobe (or the output from 
> TeXworks) I see everything as it should be. However, I wanted to convert the 
> MPpage to a jpeg file and when I opened the pdf in either Apple MAC Preview 
> or Gimp 2.10 the two graphics are missing, and I have no idea why.
> 
> Could someone explain a way round this?  Here is the code.
> 
> Thanks
> 
> Keith
> 
> %%
> system  > 
> 
> system  > ConTeXt  ver: 2020.07.29 18:36 LMTX  fmt: 2020.7.29  int: 
> english/english
> system  > 
> 
> %%%
> 
> 
> \setuppapersize [A5, portrait]
> \usecolors[crayola]
> \starttext
> \startMPpage
> StartPage;
> width := PaperWidth ; height := PaperHeight ; unit := cm ;
> definecolor [ name = "MyColor1", r = 0.781, g = 0.5, b = 0.5 ] ;
> definecolor [ name = "MyColor3", r = 1, g = 1, b = 0.7983 ] ;
> draw lmt_shade [
> path = unitsquare xscaled 14.8cm yscaled 21cm,
> direction = "up",
> alternative = "linear",
> colors = { "MyColor1", "MyColor3" },
> ] ;
> z0 = (60,60);
>   z1 = z0 rotated 120;
>   z2 = z1 rotated 240;
>   path carre;
>   carre = z0--z1--z2--cycle;
>   picture pic;
>   pic := image(
>  numeric d; d := 0.0005;
>  for i=1 step -d until d:
>   fill carre scaled i shifted (3.9cm,17cm) withcolor((1 + 
> i)*(\MPcolor{VividTangerine})) ;
>   fill carre rotated (45) scaled i shifted (3.9cm,17cm)  withcolor((1 + 
> i)*(\MPcolor{VividTangerine})) ;
>   fill carre rotated (90) scaled i shifted (3.9cm,17cm)  withcolor((1 + 
> i)*(\MPcolor{VividTangerine})) ;
>   fill carre rotated (135) scaled i shifted (3.9cm,17cm)  withcolor((1 + 
> i)*(\MPcolor{VividTangerine})) ;
>   fill carre rotated (180) scaled i shifted (3.9cm,17cm)  withcolor((1 + 
> i)*(\MPcolor{VividTangerine})) ;
>   fill carre rotated (225) scaled i shifted (3.9cm,17cm)  withcolor((1 + 
> i)*(\MPcolor{VividTangerine})) ;
> endfor;);
> draw pic rotatedaround(center pic, 270);
> draw pic rotatedaround(center pic, 90) shifted (7cm,-13cm) ;
> draw lmt_outline [
> text = "Page 18"
> kind = "draw",
> drawcolor = "VividTangerine",
> ] xsized TextWidth shifted (1cm,7.67cm);
> StopPage;
> \stopMPpage
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> 

Taco Hoekwater
Elvenkind BV




___
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] Same counter for figures as theorems

2020-08-14 Thread Taco Hoekwater
Hi Tim,

I misunderstood your goal, sorry. Proposed setup below.


But first, what I think is a bug in ConTeXt:

Neither
  \setupcaptions
[counter=object]
nor
  \setupcaption
[figure]
[counter=object]

work. the caption always falls back to the ‘current float counter’; figure or 
table or …

For the singular explicit \setupcaption[figure], I think this is a bug.


The solution I found is to blatantly redefine the ‘figure’ counter, that works!


Second, it seems that \setupenumerations does not modify the counter of an 
explicit defined enumeration, so you need to use the explicit 
\setupenumeration[enumeration] form. This may be intentional, I do not know for 
sure.



Here is what I believe is the required code for your desired effect 
(re-indented for Hans' style):

\setupcaptions
  [way=bysection,
   prefixsegments=chapter:section]

\setupenumerations
  [prefix=yes,
   prefixsegments=chapter:section]

\defineenumeration
  [enumeration]
  [text=Enumeration]

\definecounter
  [object]
  [way=bysection]

\setupenumeration
  [enumeration]
  [counter=object]

\definecounter
  [figure]
  [object]

Best wishes,
Taco


> On 14 Aug 2020, at 09:49, Tim Steenvoorden  wrote:
> 
> Hi Taco,
> 
> Thanks for your example and the pointer to make a MWE.
> 
> Sadly, it doesn’t work for me. It numbers the first enumeration 1.1.1 and the 
> first figure _also_ 1.1.1, which I’d like to be 1.1.2.
> 
> This time, you’ll find the code and the output pdf in the attachment!
> 
> Cheers,
> Tim
> 
> 
> P.S. I’m on Context MacTeX/TeXLive 2020:
> 
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: 
> /usr/local/texlive/2020basic/texmf-dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.03.10 14:44
> mtx-context | main context file: 
> /usr/local/texlive/2020basic/texmf-dist/tex/context/base/mkiv/context.mkxl
> mtx-context     | current version: 2020.03.10 14:44
> On 13 Aug 2020, 13:12 +0200, Taco Hoekwater , wrote:
>> 
>> 
>>> On 13 Aug 2020, at 10:06, Tim Steenvoorden  
>>> wrote:
>>> 
>>> Hi all,
>>> 
>>> Anybody some pointers?
>> 
>> Next time, prepare a minimal (non)working example. Because the attachment 
>> works for me.
>> 
>> 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 / 
>> 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
> ___

Taco Hoekwater
Elvenkind BV




___
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] weird issue with xtable

2020-08-13 Thread Taco Hoekwater

> On 13 Aug 2020, at 14:15, Pablo Rodriguez  wrote:
> 
>>> My questions are: what is the restricted horizontal mode (as different
>>> from the horizontal mode)?

I forgot to answer this. Simple explanation:

* 'restricted horizontal mode' is inside an \hbox{} or something similar like a 
header/footer, 
  where line breaks are forbidden
* ‘horizontal mode’ is inside a paragraph, where line breaks are possible

But the ‘restricted’ part is not relevant to your problem, \prevdepth is 
forbidden in horizontal mode  regardless of restrictions; it is only allowed in 
vertical mode.


Somehow your table ends up being typeset in a horizontal context, based on the 
error message (at least, if we assume that the error message was triggered by a 
table). 

But why that is? I do not have any other good ideas. And unfortunately lots of 
different things in ConTeXt can trigger an implicit horizontal context. 

For debugging, you could try adding this to the preamble (or grouped around 
each xtable, for slightly less damage to the vertical spacing):

  \let\prevdepth\relax
  \newdimen\prevdepth 

that should at least remove the error report.  The vertical spacing in the pdf 
output will be wrong (!!!), but perhaps the output can provide a clue about 
what triggered the problem.

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 / 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] weird issue with xtable

2020-08-13 Thread Taco Hoekwater


> On 13 Aug 2020, at 13:07, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> in order to avoid a problem already reported
> (https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html), I added
> to an indiviual table \startxtable[split=yes] (being the default in the
> document \setupxtable[split=repeat, header=repeat]).
> 
> But I’m experiencing a weird issue with that approach.
> 
> I get the following error message (that breaks compilation) when I add
> \setupxtable[split=yes]:
> 
>   You can't use '\prevdepth' in restricted horizontal mode
> 
> The single document (actually, an XML file) compiles just fine, but when
> combined together to generate a PDF document over 1000 pages, I get the
> error above.
> 
> My questions are: what is the restricted horizontal mode (as different
> from the horizontal mode)? Why might it be triggered with
> \startxtable[split=yes] in the huge source, but not in the single file?

At a wild guess, as I had a similar problem in my XML: try using 
\startembeddedxtable
instead of \startxtable. In my case, what happened was that a row of the xtable
ended up in the header/footer, generating the same error message you got. 

Not sure if it is actually the same problem, but switching is worth a shot.
The \startxtable does not like to be wrapped into other environments, 
so \startembeddedxtable is much better for that.


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 / 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] Same counter for figures as theorems

2020-08-13 Thread Taco Hoekwater


> On 13 Aug 2020, at 10:06, Tim Steenvoorden  wrote:
> 
> Hi all,
> 
> Anybody some pointers?

Next time, prepare a minimal (non)working example. Because the attachment works 
for me.

Best wishes,
Taco


tryme.tex
Description: Binary data



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

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


[NTG-context] Wiki New Extension Preview

2020-08-12 Thread Taco Hoekwater
Hi,

Some of you already know that I have been working on a wiki extension to 
control the editing of /Command pages.

The goal is to eventually be able to easily export all of the reference 
documentation in the wiki to a separate system (for instance, Paul Mazaitis 
plans to create a full-blown reference manual). In the current situation, this 
is nearly impossible because there is so much variation in the content and 
quality of the wiki /Command pages (not to mention that many are missing). We 
also want it to be possible to merge improvements to the interface xml 
definitions by Wolfgang without loosing any existing documentation work.

After some evenings and weekends of steady discussion with Paul, Wolfgang and 
some others on the wiki mailing list and a fair bit of hacking, this plan is 
now starting to come together. In short, we will switch to XML as the page 
model for newly created /Command pages. This makes editing a bit harder, but it 
allows much better quality control and (fairly) easy export and import.

The new extension is not installed on the normal wiki yet, because it makes 
sense to see if we can get some of the bugs ironed out before we start working 
on actual /Command pages. It is my first ever Wiki extension and even my first 
non-trivial php code, thus I am certain there will be bugs. So, while the 
documentation pages are already on the normal wiki, any testing and/or 
experimenting has to be done on the test wiki.

The documentation pages are here:

  https://wiki.contextgarden.net/Command
  https://wiki.contextgarden.net/Help:Command
  https://wiki.contextgarden.net/Extension:ConTeXtXML

and there is a small todo list here:

  https://wiki.contextgarden.net/User_talk:Taco

For playing around / experimenting / testing, have fun at

  https://wikitest.contextgarden.net/

(but read at least Help:Command first!)

A useful landing page on the test wiki to start playing around is:

  https://wikitest.contextgarden.net/Allcommands

which is a list of all the commands that are included in Wolfgang’s interface 
xml (and thus available to be documented using the new wiki extension). 

All the bright red links are currently undocumented commands. Clicking on one 
should bring you to the edit screen automatically, with a blob of XML 
preloaded, ready for you to start writing.

All the dark red links are existing /Command pages. Almost all of those are 
traditional wiki text pagse. Following those links will bring you to a normal 
/Command page just like on the main wiki. If you want to see how one of those 
pages would look like in the new system, you’ll have to rename the existing 
page first. 

Be assured that nothing on the wikitest is permanent! As long as the browser 
url says “ https://wikitest.contextgarden.net/ ” you cannot destroy anything 
important. But don’t spend hours improving existing pages yet, this preview is 
intended for catching bugs in the extension only.

Comments, Suggestions and Bug reports are more than welcome. 

Please direct those to me personally or (better) to the wiki mailing list:

https://lists.contextgarden.net/mailman/listinfo/wiki

Have fun!

Taco


___
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 can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Taco Hoekwater


> On 10 Aug 2020, at 14:59, Otared Kavian  wrote:
> 
> Hi Alex,
> 
> Thank you and Taco for helping. 
> In order to help solve the problem of running ConTeXt from MacTeX, I 
> installed MacTeX2020 (which is the same as TeXLive2020). Now if in a Terminal 
> window I do
>   which context
> the answer is:
>   /Library/TeX/texbin/context
> And the answer to
>   which pdflatex
> is
>   /Library/TeX/texbin/pdflatex
> Also the answer to:
>   which luatools 
> is
>   /Library/TeX/texbin/luatools
> 
> So the binaries are in /Library/TeX/texbin, which is in fact an alias for
>   /usr/local/texlive/2020/bin/x86_64-darwin
> 
> Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do
>   luatools --generate 

Does

  mtxrun —generate

work?



___
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 can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Taco Hoekwater


> On 10 Aug 2020, at 12:03, Otared Kavian  wrote:
> 
> Hi all,
> 
> I suggested to a friend, who is using plain TeX and LaTeX, to switch to 
> ConTeXt, and since he is using TeXShop on MacOSX with a version of 
> TeXLive2020 (named MacTeX2020), I thought he would just typeset a simple test 
> document with the option « ConTeXt (LuaTeX) » from the menu in TeXShop, where 
> it does appear.
> 
> Unfortunately when doing this all he gets in the log file is:
> 
> /sw/bin/init.csh: No such file or directory.

My guess is that this missing init.csh is supposed to set up the correct PATH 
environment.

But that is as far as my knowledge goes…

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

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


  1   2   3   4   5   6   7   8   9   10   >