Re: [NTG-context] underbrace under matrix
On Fri, Aug 5, 2022 at 2:01 AM Jethro Djan via ntg-context wrote: > > Hello, > > I want to get underbraces under matrices in a math alignment environment. > I’ve reproduced my problem here: > > \definemathmatrix >[pmatrix] >[left={\left(\,},right={\,\right)}] > > \starttext > \placeformula[-]\startformula\startmathalignment >\NC\ >A \NC=\underbrace{ >\startpmatrix > \NC 5\NC 5\NR > \NC -1\NC 7\NR >\stoppmatrix}\NR >\NC\NC=\underbrace{ >\startpmatrix > \NC 2\NC 1\NR > \NC 4\NC 2\NR > \stoppmatrix}\NR > \stopmathalignment\stopformula > \stoptext > > How can I achieve this? > > Jethro Hi Jethro, Temporary workaround: use the simplecommand. \definemathmatrix[pmatrix][matrix:parentheses][ simplecommand=pmatrix, ] \starttext % \placeformula[-] \startformula \startalign \NC A \NC = \underbrace{\pmatrix{5,5;-1,7}}_{B} \NR \NC\NC = \underbrace{\pmatrix{2,1;4,2}}_{C} \NR \stopalign \stopformula % \placeformula[-] \startformula A \alignhere= \underbrace{\pmatrix{5,5;-1,7}}_{B} \breakhere = \underbrace{\pmatrix{2,1;4,2}}_{C} \stopformula \stoptext But the code you were using should in principle also work. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] underbrace under matrix
Hello, I want to get underbraces under matrices in a math alignment environment. I’ve reproduced my problem here: \definemathmatrix [pmatrix] [left={\left(\,},right={\,\right)}] \starttext \placeformula[-]\startformula\startmathalignment \NC\ A \NC=\underbrace{ \startpmatrix \NC 5\NC 5\NR \NC -1\NC 7\NR \stoppmatrix}\NR \NC\NC=\underbrace{ \startpmatrix \NC 2\NC 1\NR \NC 4\NC 2\NR \stoppmatrix}\NR \stopmathalignment\stopformula \stoptext How can I achieve this? Jethro ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] lmtx and \prime ?
On 8/4/2022 8:52 PM, Michael Urban via ntg-context wrote: I get a different result for mkiv and lmtx for the following input: \starttext Even now, a six footer is two standard deviations from the mean. Remember, 5\prime{}7\prime\prime{} is 50th percentile today for a 15 year old. \stoptext With mkiv, the prime marks for inches and feet are where I expect them; in lmtx, they are placed almost to the baseline. Wrong lmtx, or user error? % you can add this to cont-new.mkxl \immutable\Umathchardef\minute\zerocount\zerocount\privatecharactercode{prime 0x2032 1} \immutable\Umathchardef\second\zerocount\zerocount\privatecharactercode{prime 0x2033 1} \starttext Even now, a six footer is two standard deviations from the mean. Remember, 5\minute7\second\ is 50\high{th} percentile today for a 15 year old. \stoptext I need to discuss this with Mikael as it assumes that all math fonts are set up that way). In lmtx (luametatex) primes are native features and assume dimensions that we can work with (primes and minutes are a typical example of messed up math unicode). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] lmtx and \prime ?
I get a different result for mkiv and lmtx for the following input: \starttext Even now, a six footer is two standard deviations from the mean. Remember, 5\prime{}7\prime\prime{} is 50th percentile today for a 15 year old. \stoptext With mkiv, the prime marks for inches and feet are where I expect them; in lmtx, they are placed almost to the baseline. Wrong lmtx, or user error? Mike ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] issue with lpath
On 8/4/22 17:32, Taco Hoekwater via ntg-context wrote: > [...] > PS This sort of confusing filtering is why I do most of my xml > processing from the lua end, where it is much clearer to me what is > what. Many thanks for clarifying the issue, Taco. BTW, according to the last slide from https://meeting.contextgarden.net/2019/talks/02-xmlprocessing/02-xmlprocessing.pdf, you had plans to document how to deal with XML in proper Lua. I wonder whether you are still interested in adding this information to the manual. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] issue with lpath
> On 4 Aug 2022, at 16:07, Hans Hagen wrote: > > On 8/4/2022 12:22 PM, Taco Hoekwater via ntg-context wrote: >>> On 3 Aug 2022, at 15:54, Pablo Rodriguez via ntg-context >>> wrote: >>> >>> BTW, is there any way to rephrase "{h3 + blockquote}" in proper Lua? >> I was wondering about that as well, and I really had no clue how to do that. >> Some >> reading and studying later, I realised that there is a preceding-sibling:: >> axis. >> That is not documented in xml-mkiv.pdf I think, but it inherited from xpath, >> and that means this works: >> \xmlsetsetup{#1}{blockquote/preceding-sibling::h3[-1]/} {xml:section} >> “Take all blockquotes, then tests their immediate preceding siblings (index >> [-1]) that are h3." >> But the CSS version is nicer. Still, both solutions fail on generic input. >> Sorry, out of clues > \startbuffer[demo] > ... That puts the whole content inside the \section, and I don’t think that was the intent. I understood that Pablo only wants the “h3” node. In the original request, the CSS “{h3 + blockquote}” matches a “blockquote” anyplace where it is immediately preceded by a “h3” (and nowhere else). After that, some trickery was needed to try and get back to the actual “h3”. My trick above with preceding-sibling above also gets the “h3” that is immediately followed by a “blockquote”, but it got easily confused if there were multiple “h3” or “blockquote” objects in the input. Best wishes, Taco PS This sort of confusing filtering is why I do most of my xml processing from the lua end, where it is much clearer to me what is what. — 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] issue with lpath
On 8/4/22 12:22, Taco Hoekwater via ntg-context wrote: >> On 3 Aug 2022, at 15:54, Pablo Rodriguez via ntg-context >> wrote: >> BTW, is there any way to rephrase "{h3 + blockquote}" in proper Lua? > > I was wondering about that as well, and I really had no clue how to > do that. Some reading and studying later, I realised that there is a > preceding-sibling:: axis. > > That is not documented in xml-mkiv.pdf I think, but it inherited > from xpath, and that means this works:> > \xmlsetsetup{#1}{blockquote/preceding-sibling::h3[-1]/} {xml:section} > > “Take all blockquotes, then tests their immediate preceding siblings > (index [-1]) that are h3." Many thanks for your reply, Taco. It isn’t documented, but I have just discovered that it is used inside a function: https://www.pragma-ade.com/general/manuals/xml-mkiv.pdf#search=sibling > But the CSS version is nicer. I agree. But using CSS for LPaths feels like cheating to me. Many thanks for your help again, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] issue with lpath
On 8/4/2022 12:22 PM, Taco Hoekwater via ntg-context wrote: On 3 Aug 2022, at 15:54, Pablo Rodriguez via ntg-context wrote: BTW, is there any way to rephrase "{h3 + blockquote}" in proper Lua? I was wondering about that as well, and I really had no clue how to do that. Some reading and studying later, I realised that there is a preceding-sibling:: axis. That is not documented in xml-mkiv.pdf I think, but it inherited from xpath, and that means this works: \xmlsetsetup{#1}{blockquote/preceding-sibling::h3[-1]/} {xml:section} “Take all blockquotes, then tests their immediate preceding siblings (index [-1]) that are h3." But the CSS version is nicer. Still, both solutions fail on generic input. Sorry, out of clues \startbuffer[demo] One Standard paragraph Quoted text Two Direct quote \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1} {xml|p|blockquote|div} {xml:*} \xmlsetsetup{#1} {/xml/div[contains(@class,'level3')]} {xml:section:level3} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:xml \xmlall{#1}{/div} \stopxmlsetups \startxmlsetups xml:p \startpar\xmlflush{#1}\stoppar \stopxmlsetups \startxmlsetups xml:blockquote \startblockquote\xmlflush{#1}\stopblockquote \stopxmlsetups \startxmlsetups xml:section:level3 \xmldoif{#1}{/blockquote} { \xmldoifnot{#1}{/p} { \section{\xmlflush{#1}} } } \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] ConTeXt meeting 2022 – please register!
Am 04.08.22 um 14:32 schrieb Hans Hagen via ntg-context: On 8/4/2022 10:22 AM, Max Chernoff via ntg-context wrote: * The flight would take 14 hours each way (biggest reason) * The flight would cost more than 2 months of rent Understandable – I won’t ever fly overseas for a conference. * It would be a bad idea for me to miss a full week of classes last year we experimented with some remote attendents but also decided that we would only mix that wilt a real meeting with a threshold attendance ... personally i will not sit behind a screen and present something staring in a camera .. it simply works better with real people there ... i don't know what is planned for this year wrt remote We will do the same as last year, use BigBlueButton for sharing the presentation and camera & microphone for the presenter, sometimes an additional camera for the room or showing stuff. (No recording, no general room camera.) Someone will watch the chat and relay questions. We’ll project remote presenters to the screen and use speakers. Discussion between local and remote participants is always a bit difficult, we’ll try again with microphones. But, also like last year, we have only a household DSL connection. That doesn’t limit remote participants, but the locals should not use the system as well. I also can’t guarantee that everthings works – last year we had big problems with the local DHCP/router. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] ConTeXt meeting 2022 – please register!
On 8/4/2022 10:22 AM, Max Chernoff via ntg-context wrote: Hi Hraban, but I’d like to know why you (esp. if you attended previous meetings) decided not to come: A not-useful answer: * The flight would take 14 hours each way (biggest reason) * The flight would cost more than 2 months of rent * It would be a bad idea for me to miss a full week of classes last year we experimented with some remote attendents but also decided that we would only mix that wilt a real meeting with a threshold attendance ... personally i will not sit behind a screen and present something staring in a camera .. it simply works better with real people there ... i don't know what is planned for this year wrt remote Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] ConTeXt meeting 2022 – please register!
On 8/4/2022 8:48 AM, juh+ntg-context--- via ntg-context wrote: 1. I wasn't sure if I can follow the programe. Though I am not a bloody beginner, I am still at the basis of the learning curve. Many talks seems to be way above my understanding. (The same is true for the monthly video meetings.) But I am very interested in learning – I can even imagine that my cooperative would pay for it. There's often plenty in-between time for more personal discussion and help. The be together in the room evening sessions are also a good oportunity. And ... from my end I put things on the program that are new or under development but when someone asks for a topic ... also, just present something and those present will kick in. Currently the first real life meetings starts again and I have to confess that it is not so easy to switch mentally to the pre-corona area. My cooperative will be present at the Bitsäume conference in Berlin and we are struggling to organize this. This sounds silly but all the processes of planning such an event must be restarted. Yes, one needs to get in the mood again. But last years meetings nevertheless went on and were quite nice (they are also anchors in development for me). And it helps to mee users (those we've seen in person have some advantages later on I guess). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] issue with lpath
> On 3 Aug 2022, at 15:54, Pablo Rodriguez via ntg-context > wrote: > > BTW, is there any way to rephrase "{h3 + blockquote}" in proper Lua? I was wondering about that as well, and I really had no clue how to do that. Some reading and studying later, I realised that there is a preceding-sibling:: axis. That is not documented in xml-mkiv.pdf I think, but it inherited from xpath, and that means this works: \xmlsetsetup{#1}{blockquote/preceding-sibling::h3[-1]/} {xml:section} “Take all blockquotes, then tests their immediate preceding siblings (index [-1]) that are h3." But the CSS version is nicer. Still, both solutions fail on generic input. Sorry, out of clues 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] ConTeXt meeting 2022 – please register!
Hi Hraban, > but I’d like to know why you (esp. if you attended > previous meetings) decided not to come: A not-useful answer: * The flight would take 14 hours each way (biggest reason) * The flight would cost more than 2 months of rent * It would be a bad idea for me to miss a full week of classes -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] ConTeXt meeting 2022 – please register!
Hi JUH! Am 04.08.22 um 08:48 schrieb juh+ntg-context--- via ntg-context: Am 03.08.22 um 10:50 schrieb Henning Hraban Ramm via ntg-context: Taco convinced me not to cancel the meeting due to a lack of participants, but I’d like to know why you (esp. if you attended previous meetings) decided not to come: short answer. The meeting is in the holidays of my wife and she expects me to join her in a travel. ;-) Well, the date seems to be untimely for several potential participants. But we decided on it about two years ago (you must book houses at least one year in advance; maybe no more). But other dates deter other people... (In fact I don't found information about accommodations on the website) On https://meeting.contextgarden.net/2022/location.shtml there’s a link to the venue’s website and the hint that we only single-book the bunk beds – i.e. it’s youth hostel style. 1. I wasn't sure if I can follow the programe. Though I am not a bloody beginner, I am still at the basis of the learning curve. Many talks seems to be way above my understanding. (The same is true for the monthly video meetings.) But I am very interested in learning – I can even imagine that my cooperative would pay for it. Well, if no beginners attend, nobody will talk for beginners. Yes, it’s often way over my head, esp. what Hans and Taco explain, but after the third time I start to understand ;) It’s like when I started reading challenging computer magazines like c’t in the public library as a 12yo and didn’t understand a lot but found it cool enough to continue. YMMV OTOH we always had talks about not-so-advanced projects, and what you did with ConTeXt for Hostsharing would be worth a talk or three. (Just repeat your blog entries.) You’d be welcome also as a remote presenter. 2. I always like to combine meetings with my passion to dance Tango. If a meeting is in a bigger city, chances are high that I could spend a couple of evenings in a local milonga. From Dreifelden to any milonga in NRW or Hessen I would need at least an hour by car. Sorry... Corona isn't over ... Yes, of course. I worry about that, too; can’t afford to be sick for a week or more... On the other hand I would really like to get into ConTeXt as I am convinced that it is the thing I need for my personal work and my work in my cooperative. So I would still like to attend a meeting. Well, you can start with the next online meetup in a week (August 10th). While we often had in-depth discussions with Hans, or between Hans and Mikael, that was partly due to a lack of simpler questions. And since we usually were only a few guys, there’s enough space for your personal project. What are the things I am interested in most? I would like to take an intensive training. Aside from the core functions I would like to learn more about integrations as this is what we are trying to do at Hostsharing at the moment. This could cover small things like automated business graphics with different tools to printing from TEI-XML to setup a single source publishing chain with Pandoc. The problems are in the details. ;-) Yes, probably in the details manual ;-P No, not this time. But bring them up in the online meetup. Another topic: If we want to promote ConTeXt it would be nice to have small meetings on bigger meetings like FOSDEM in Belgium or FrOSCon in Germany. (I was so bold to propose a workshop at FrOSCon and alas it was accepted!) At FrOSCon and FOSDEM you can get a developer room to make your own programe. That would be a good place for introductory workshops. I agree, but it’s also a matter of people, timing and other resources. I would have joined you at FrOSCon, but was occupied. And many other interesting conferences I can’t afford – financially and nervally. AFAIK other active ConTeXt users were focused on TeX conferences (and I don’t know who contributed talks on ConTeXt subjects besides Hans and Taco), and in every discussion about “promoting ConTeXt” we come to the conclusion that it’s not really worth the effort – like “if it’s for you, then you will find it”. And we want to keep our playground cosy ;) Some of us made the experience that they couldn’t pierce through the prejudices of old LaTeX folks. And well, let’s face it, the state of our documentation is still not very inviting. There’s a lot of it, but it’s often hard to find what you need, even for me, who’s not afraid of sourcecode, and ConTeXt changed a lot over the years. (Yes, my book is coming along... But I’m not sure how good it solves beginners’ problems. And it’s only in German, of course.) I hope that this is of some value for you. Thank you! Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage :
Re: [NTG-context] ConTeXt meeting 2022 – please register!
Dear Hraban, Am 03.08.22 um 10:50 schrieb Henning Hraban Ramm via ntg-context: Taco convinced me not to cancel the meeting due to a lack of participants, but I’d like to know why you (esp. if you attended previous meetings) decided not to come: short answer. The meeting is in the holidays of my wife and she expects me to join her in a travel. ;-) The long answer. During the pandemic I stopped planning more than one month ahead. So the above mentioned travel isn't booked yet. For this reason I miss the early birds and maybe the booking of special things like a private room. (In fact I don't found information about accommodations on the website) Before Corona I wanted to attend a meeting but didn't do it for two reasons. 1. I wasn't sure if I can follow the programe. Though I am not a bloody beginner, I am still at the basis of the learning curve. Many talks seems to be way above my understanding. (The same is true for the monthly video meetings.) But I am very interested in learning – I can even imagine that my cooperative would pay for it. 2. I always like to combine meetings with my passion to dance Tango. If a meeting is in a bigger city, chances are high that I could spend a couple of evenings in a local milonga. From Dreifelden to any milonga in NRW or Hessen I would need at least an hour by car. In this year there are some things that might affect others as well. Currently the first real life meetings starts again and I have to confess that it is not so easy to switch mentally to the pre-corona area. My cooperative will be present at the Bitsäume conference in Berlin and we are struggling to organize this. This sounds silly but all the processes of planning such an event must be restarted. Corona isn't over and even boostered people have to lay down for at least one week and to stay away from work another one to recover from covid. So for that reason I am still very cautious – and I expect to take over more tasks at work when colleagues got ill from one day to another. So it is not a good time too stay away for one week to attend a meeting. On the other hand I would really like to get into ConTeXt as I am convinced that it is the thing I need for my personal work and my work in my cooperative. So I would still like to attend a meeting. What are the things I am interested in most? I would like to take an intensive training. Aside from the core functions I would like to learn more about integrations as this is what we are trying to do at Hostsharing at the moment. This could cover small things like automated business graphics with different tools to printing from TEI-XML to setup a single source publishing chain with Pandoc. The problems are in the details. ;-) Another topic: If we want to promote ConTeXt it would be nice to have small meetings on bigger meetings like FOSDEM in Belgium or FrOSCon in Germany. (I was so bold to propose a workshop at FrOSCon and alas it was accepted!) At FrOSCon and FOSDEM you can get a developer room to make your own programe. That would be a good place for introductory workshops. I hope that this is of some value for you. Thank you very much for organizing the meeting in these challenging times. juh ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___