[NTG-context] Regarding XML export and EPUB

2020-12-21 Thread Andres Conrado Montoya
Hello, list. I've been experimenting with the export scripts and the instructions and manuals you can find in: https://wiki.contextgarden.net/XML https://wiki.contextgarden.net/Export https://wiki.contextgarden.net/Epub https://wiki.contextgarden.net/ePub This with the expectation of being able

Re: [NTG-context] Title in enumeration not working?

2020-12-21 Thread Mikael Sundqvist
Hi Otared, Thank you for your suggestion. I would say yes and no. I want the result one gets from what you write, but I prefer the syntax \startexample[title={Title}] ... \stopexample and that has been working before. Reading in setup-en.pdf, it also looks to me as if that should work. Best,

[NTG-context] Title in enumeration not working?

2020-12-21 Thread Mikael Sundqvist
Hi, Has anything changed with titles and enumerations? I expected a title "Title" with the following setup. \defineenumeration[example][ text=Example, title=yes, ] \starttext \startexample[title={Title}] This is a test. \stopexample \stoptext But it does not show up. /Mikael

Re: [NTG-context] Title in enumeration not working?

2020-12-21 Thread Otared Kavian
Hi Mickael, Maybe this is what you want: \defineenumeration[example] [text=Example, title=yes, titleleft=, titleright={.}, ] \starttext \startexample{Title} This is a test. \stopexample \stoptext Of course is you say text=, then you get only «

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

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

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

2020-12-21 Thread Mojca Miklavec
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

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

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

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

2020-12-21 Thread Arthur Reutenauer
On Mon, Dec 21, 2020 at 02:08:11PM +0100, Mojca Miklavec wrote: > 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? That’s definitely

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

2020-12-21 Thread Mojca Miklavec
Hi, Thanks to both Taco and Arthur for clarifying this and pointing out the difference between PEG and PCRE. I'll put some links like https://en.wikipedia.org/wiki/Parsing_expression_grammar https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions on my reading list and try to

Re: [NTG-context] Title in enumeration not working?

2020-12-21 Thread Otared Kavian
Hi Mikael, Indeed you are right about the fact that > \startexample[title={Title}] > ... > \stopexample is more logical and also more convenient. Sorry for not having checked your example in mkiv, where this structure works as intended. So it might be a small buglet in LMTX. Best regards:

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

2020-12-21 Thread luigi scarso
On Mon, Dec 21, 2020 at 2:36 PM Taco Hoekwater wrote: > > > > 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

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

2020-12-21 Thread Hans Hagen
On 12/21/2020 1:16 PM, Mojca Miklavec wrote: I'm sorry for being slightly off-topic here, but this list might still be the best place to resolve lpeg-related questions :) spoiler attached ... doesn't deserve a beauty contest price not one for performence (not much different from your btw) but

Re: [NTG-context] Problem with \Caps

2020-12-21 Thread Otared Kavian
Hi Joaquín, Actually it depends on the font you are using, but on th eother hand it seems that \Caps is broken in LMTX. The following gives a correct result in mkiv but results in an error in LMTX: \setupbodyfont[lucidaot] \starttext Test {\sc Test} {\Caps Test} {\smallcaps Test}

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

2020-12-21 Thread Hans Hagen
On 12/21/2020 3:10 PM, Mojca Miklavec wrote: lpeg.P('b') + lpeg.P('bb') + lpeg.P('bbb') always put the longest (for overlapping) first, in this case you could do: P('b')^-3 at most 3 -

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

2020-12-21 Thread Garulfo
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)

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

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

2020-12-21 Thread Mojca Miklavec
Hi, I'm sorry for being slightly off-topic here, but this list might still be the best place to resolve lpeg-related questions :) 0.) Disclaimer: the challenge that triggered this curiosity came from Advent of Code 2020. In case you are taking part and you wan't to avoid spoilers, please stop

Re: [NTG-context] Alternative for selector in LMTX for different heading and reference texts for descriptions

2020-12-21 Thread Christoph Reller
On Sat, Dec 19, 2020 at 10:43 PM Christoph Reller < christoph.rel...@gmail.com> wrote: > Hans Hagen schrieb am Sa., 19. Dez. 2020, 19:16: > >> Actually, what you want is: >> >> \definedescription[desc] >> \starttext >> \startdesc[title={Long title},reference=foo,referencetext={Short >>

Re: [NTG-context] Problem with shading in Metafun (LMTX)

2020-12-21 Thread Jairo A. del Rio
Nice. It works again. Thank you very much! Cordially, Jairo El lun., 21 de dic. de 2020 2:45 a. m., Hans Hagen escribió: > On 12/21/2020 4:46 AM, Jairo A. del Rio wrote: > > While shading works with MkIV, with LMTX the following breaks: > > > > > > \startMPpage > > > > comment("two shades

Re: [NTG-context] Polar pgfplots seems to be broken (Aditya Mahajan)

2020-12-21 Thread Gavin
xistype, which uses an > explicit \begin{axis} ... \end{axis} instead of the more portable \axis ... > \endaxis. Attached is a quick fix, but it has been quite a while since I > looked at pgfplots code, so it may be better to post a bug-report on pgfplots > mailing list for a prope