[NTG-context] Re: Combine \setupdelimitedtext with an author (define custom variable?)
Am Donnerstag, 6. Juni 2024, 13:51:53 MESZ schrieb Hans Hagen via ntg-context: > On 6/6/2024 12:30 PM, Gerion Entrup wrote: > > Hi, > > > > I like to achieve something that looks like this: > > ``` > > \definedelimitedtext[extract][blockquote] > > \setupdelimitedtext > >[extract] > >[leftmargin=1.5pc, > > style={\italic}, > > before={\setupindenting[next]}, > > after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] > > \tfx\italic{René Descartes} \stopalignment}] > > > > \starttext > > \startextract > > Cogito ergo sum. > > \stopextract > > \stoptext > > ``` > > > > So it should setup a quotation and mentions the author. > > However, here the author is hardcoded within the blockquote. I would like > > it to use like this: > > ``` > > \definedelimitedtext[extract][blockquote] > > \setupdelimitedtext > >[extract] > >[leftmargin=1.5pc, > > style={\italic}, > > before={\setupindenting[next]}, > > after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] > > \tfx\italic{\getcustomvariable{author}} \stopalignment}] > > > > \starttext > > \startextract[author=René Descartes] > > Cogito ergo sum. > > \stopextract > > \stoptext > > ``` > > > > Is there an easy way to achieve that? > > I tried with \structureuservariable (like possible in \startchapter) but it > > does not work. > > not all constructs hav ethese user variables (yet) > > i'll add an option for arguments tostart/stop so that you can do > > \starttext > > \definedelimitedtext >[dextract] >[blockquote] >[leftmargin=1.5pc, > style=italic, > before=\setupindenting[next], > after=\setups{extract:whatever}] > > \definestartstop >[extract] >[arguments=yes, > before=\setups{extract:start}, > after=\setups{extract:stop}] > > \startsetups extract:start > \startdextract > \stopsetups > > \startsetups extract:stop > \startstopparameter{author} > \stopdextract > \blank[1ex,samepage] > \hrule > \blank[1ex,samepage] > \dontleavehmode > \wordright{\itx\startstopparameter{author}} > \stopsetups > > \starttext > > \startextract[author=René Descartes] > Cogito ergo sum. > \stopextract > > \stoptext > > but first i want Wolfgang to check the patch, For me, Wolfgang's answer fulfills all my needs. So, from my point of view, this is not needed anymore. Thank you for your effort anyway! Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] ConTeXt source from XML
Dear Pablo, Dear Christoph, just in case it might help to your meditation. First of all, lpaths are XPath implemented with Lua in ConTeXt. XPath seems to have as it primary purpose to address the nodes of XML trees. About your sources, the real issue here is to define whether you want TEI or TeX to be the format containing them. I mean, if you add explaining footnotes to your TeX file(s), XML won’t be source anymore. If you don’t want this to happen, you have to encode them in the TEI XML sources. In my case, the connection to the original source will be lost. While we will still try to backport corrections, the connection will be lost at the very moment when we will annotate the source text. From this point of view, an independent source is created here anyway, so I have the freedom to choose between TEI or TeX. At the moment I'm leaning strongly towards TEI, also because I could try to remove the annotations via XSLT once the work is complete, diff the result with the original source and improve it). And besides, XML+ConTeXt looks quite elegant from the distance of my ignorance. (Although reading xml-mkiv.pdf creates a pleasant frictional heat in my cerebral convolutions, but leaves at least as many knots in them as XML data have nodes). One last suggestion about proofreading. This is something I learnt from personal experience. The first reading is much better to catch errors in the text than the subsequent ones. Having the text properly formatted and printed on paper helps a lot to spot errors. Same here: It's the paper! (I for myself prefer for the first proof reading a page lots of white space, in monospaced font like Courier, while my proofreader wants to see the font that will be used in the end.) Thank you very much for your suggestions, Christoph ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Combine \setupdelimitedtext with an author (define custom variable?)
Am Donnerstag, 6. Juni 2024, 16:34:03 MESZ schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 06.06.2024 um 12:30: > > Hi, > > > > I like to achieve something that looks like this: > > ``` > > \definedelimitedtext[extract][blockquote] > > \setupdelimitedtext > >[extract] > >[leftmargin=1.5pc, > > style={\italic}, > > before={\setupindenting[next]}, > > after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] > > \tfx\italic{René Descartes} \stopalignment}] > > > > \starttext > > \startextract > > Cogito ergo sum. > > \stopextract > > \stoptext > > ``` > > > > So it should setup a quotation and mentions the author. > > However, here the author is hardcoded within the blockquote. I would like > > it to use like this: > > ``` > > \definedelimitedtext[extract][blockquote] > > \setupdelimitedtext > >[extract] > >[leftmargin=1.5pc, > > style={\italic}, > > before={\setupindenting[next]}, > > after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] > > \tfx\italic{\getcustomvariable{author}} \stopalignment}] > > > > \starttext > > \startextract[author=René Descartes] > > Cogito ergo sum. > > \stopextract > > \stoptext > > ``` > > > > Is there an easy way to achieve that? > > I tried with \structureuservariable (like possible in \startchapter) but it > > does not work. > > \startsetups [userdata:extract] > \startnarrower > \setupindenting[next] > \getuserdata > \hairline > \dontleavehmode\wordright{\itx\userdataparameter{author}} > \stopnarrower > \stopsetups > > \defineuserdataalternative >[extract] >[renderingsetup=userdata:extract] > > \defineuserdata >[extract] >[style=italic, > alternative=extract] > > \starttext > > \startextract[author=René Descartes] > Cogito ergo sum. > \stopextract > > \stoptext Really cool! Thank you. If I see it right, this is completely generic, so with this it is possible to define any start stop with completely variable arguments. Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: background= key not working in \startbackground and \starttextbackground
On Thu, 6 Jun 2024, Wolfgang Schuster wrote: > Aditya Mahajan schrieb am 06.06.2024 um 14:48: > > Hi, > > > > I am testing some of my old styles on latest context and find that the > > background key of \startbackground and \starttextbackground doesn't work > > (\framed is working as expected). Here is a MWE: > > 1. \starttextbackground isn't based on \framed and has a mp-key to assign a > metapost graphic. Thanks. I had forgotten that. > 2. \startbackground needs to be fixed but it's simple, replace \defcsname > with \edefcsname in pack-bck.mklx: > > \appendtoks > \frozen\protected\instance\defcsname\e!start\currentbackground\endcsname{\pack_backgrounds_start > [\currentbackground]}% > \frozen\protected\instance\defcsname\e!stop > \currentbackground\endcsname{\pack_backgrounds_stop }% > \frozen\protected\instance\defcsname > \currentbackground\endcsname{\pack_backgrounds_direct[\currentbackground]}% > \to \everydefinebackground Thanks. I'll patch it locally. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Kerning in Noto Serif
Thanks Hans, works now as expected. Am 6. Juni 2024 16:30:56 MESZ schrieb Hans Hagen : >On 6/6/2024 12:21 PM, Lutz Haseloff wrote: >> Thanks Hraban, >> >> my Noto Serif (just downloaded) is 2.013 >> >> --script font shows kern too: >> kern cyrl dflt >> dflt dflt >> grek dflt >> latn dflt >(^^ but not all steps are shared!) > >I updates that font (updating noto is a pain .. there was a zip once, now one >has to download per font unless i miss something). > >Indeed you don't get kerns out of the box. Try this: > >\char42\char38 > >and you will see a kern. However, that's the 'shared portion' so in order to >get the rest you need to do: > >\definefontfeature[default][default][script=latn] > >as it looks like dflt/dflt is no longer does that ... keep in mind thta fonts >are not downward compatible so never update (or let your syetem do it) in the >middle of a project > >Hans > >- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >- > >___ >If your question is of interest to others as well, please add an entry to the >Wiki! > >maillist : ntg-context@ntg.nl / >https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) >archive : https://github.com/contextgarden/context >wiki : https://wiki.contextgarden.net >___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: ConTeXt source from XML
On 6/6/2024 5:33 PM, Pablo Rodriguez via ntg-context wrote: On 6/5/24 20:23, Christoph Edenhauser wrote: Dear Pablo, Thank you very much for your very clear, detailed and elaborate explanations. - Over the next few days I will meditate on the ConTeXt way to handle XML and on my workflow and take a look at lpath (never heard of it). And somehow I have the impression that the next few days will last a few weeks. Dear Christoph, just in case it might help to your meditation. First of all, lpaths are XPath implemented with Lua in ConTeXt. XPath seems to have as it primary purpose to address the nodes of XML trees. About your sources, the real issue here is to define whether you want TEI or TeX to be the format containing them. I mean, if you add explaining footnotes to your TeX file(s), XML won’t be source anymore. If you don’t want this to happen, you have to encode them in the TEI XML sources. One last suggestion about proofreading. This is something I learnt from personal experience. The first reading is much better to catch errors in the text than the subsequent ones. Having the text properly formatted and printed on paper helps a lot to spot errors. Reading source code is cheaper (no doubt), but the results will be poorer too. Just in case it might help, fwiw, context supports 'synctex' to xml files / nodes so that might help a bit Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: ConTeXt source from XML
On 6/5/24 20:23, Christoph Edenhauser wrote: > Dear Pablo, > > Thank you very much for your very clear, detailed and elaborate > explanations. - Over the next few days I will meditate on the ConTeXt > way to handle XML and on my workflow and take a look at lpath (never > heard of it). And somehow I have the impression that the next few days > will last a few weeks. Dear Christoph, just in case it might help to your meditation. First of all, lpaths are XPath implemented with Lua in ConTeXt. XPath seems to have as it primary purpose to address the nodes of XML trees. About your sources, the real issue here is to define whether you want TEI or TeX to be the format containing them. I mean, if you add explaining footnotes to your TeX file(s), XML won’t be source anymore. If you don’t want this to happen, you have to encode them in the TEI XML sources. One last suggestion about proofreading. This is something I learnt from personal experience. The first reading is much better to catch errors in the text than the subsequent ones. Having the text properly formatted and printed on paper helps a lot to spot errors. Reading source code is cheaper (no doubt), but the results will be poorer too. Just in case it might 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Combine \setupdelimitedtext with an author (define custom variable?)
On 6/6/2024 4:34 PM, Wolfgang Schuster wrote: Gerion Entrup schrieb am 06.06.2024 um 12:30: Hi, I like to achieve something that looks like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{René Descartes} \stopalignment}] \starttext \startextract Cogito ergo sum. \stopextract \stoptext ``` So it should setup a quotation and mentions the author. However, here the author is hardcoded within the blockquote. I would like it to use like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{\getcustomvariable{author}} \stopalignment}] \starttext \startextract[author=René Descartes] Cogito ergo sum. \stopextract \stoptext ``` Is there an easy way to achieve that? I tried with \structureuservariable (like possible in \startchapter) but it does not work. \startsetups [userdata:extract] \startnarrower \setupindenting[next] \getuserdata \hairline \dontleavehmode\wordright{\itx\userdataparameter{author}} \stopnarrower \stopsetups \defineuserdataalternative [extract] [renderingsetup=userdata:extract] \defineuserdata [extract] [style=italic, alternative=extract] \starttext \startextract[author=René Descartes] Cogito ergo sum. \stopextract \stoptext ah, i start forgetting about these mechanisms ... i added this example to th etest suite Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Combine \setupdelimitedtext with an author (define custom variable?)
Gerion Entrup schrieb am 06.06.2024 um 12:30: Hi, I like to achieve something that looks like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{René Descartes} \stopalignment}] \starttext \startextract Cogito ergo sum. \stopextract \stoptext ``` So it should setup a quotation and mentions the author. However, here the author is hardcoded within the blockquote. I would like it to use like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{\getcustomvariable{author}} \stopalignment}] \starttext \startextract[author=René Descartes] Cogito ergo sum. \stopextract \stoptext ``` Is there an easy way to achieve that? I tried with \structureuservariable (like possible in \startchapter) but it does not work. \startsetups [userdata:extract] \startnarrower \setupindenting[next] \getuserdata \hairline \dontleavehmode\wordright{\itx\userdataparameter{author}} \stopnarrower \stopsetups \defineuserdataalternative [extract] [renderingsetup=userdata:extract] \defineuserdata [extract] [style=italic, alternative=extract] \starttext \startextract[author=René Descartes] Cogito ergo sum. \stopextract \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Kerning in Noto Serif
On 6/6/2024 12:21 PM, Lutz Haseloff wrote: Thanks Hraban, my Noto Serif (just downloaded) is 2.013 --script font shows kern too: kern cyrl dflt dflt dflt grek dflt latn dflt (^^ but not all steps are shared!) I updates that font (updating noto is a pain .. there was a zip once, now one has to download per font unless i miss something). Indeed you don't get kerns out of the box. Try this: \char42\char38 and you will see a kern. However, that's the 'shared portion' so in order to get the rest you need to do: \definefontfeature[default][default][script=latn] as it looks like dflt/dflt is no longer does that ... keep in mind thta fonts are not downward compatible so never update (or let your syetem do it) in the middle of a project Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: background= key not working in \startbackground and \starttextbackground
Aditya Mahajan schrieb am 06.06.2024 um 14:48: Hi, I am testing some of my old styles on latest context and find that the background key of \startbackground and \starttextbackground doesn't work (\framed is working as expected). Here is a MWE: 1. \starttextbackground isn't based on \framed and has a mp-key to assign a metapost graphic. 2. \startbackground needs to be fixed but it's simple, replace \defcsname with \edefcsname in pack-bck.mklx: \appendtoks \frozen\protected\instance\defcsname\e!start\currentbackground\endcsname{\pack_backgrounds_start [\currentbackground]}% \frozen\protected\instance\defcsname\e!stop \currentbackground\endcsname{\pack_backgrounds_stop }% \frozen\protected\instance\defcsname \currentbackground\endcsname{\pack_backgrounds_direct[\currentbackground]}% \to \everydefinebackground Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] background= key not working in \startbackground and \starttextbackground
Hi, I am testing some of my old styles on latest context and find that the background key of \startbackground and \starttextbackground doesn't work (\framed is working as expected). Here is a MWE: \startuseMPgraphic{background:test} fill OverlayBox withcolor 0.75[red,white]; draw OverlayBox withcolor red withpen pencircle scaled 2bp; \stopuseMPgraphic \defineoverlay[background:test][\useMPgraphic{background:test}] \definetextbackground [testA] [ location=paragraph, background=background:test, frame=off, ] \definebackground [testB] [ location=paragraph, background=background:test, frame=off, ] \defineframedtext [testC] [ background=background:test, frame=off, width=broad, ] \starttext \starttestA \input tufte \stoptestA \starttestB \input tufte \stoptestB \starttestC \input tufte \stoptestC \stoptext testA gives nothing, testB gives a gray(!) background, and testC works as expected. The output is attached. I am using 2024.05.31. Aditya test.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?
On Thu, Jun 6, 2024 at 11:04 (+0200), Aditya Mahajan wrote: > On Wed, 5 Jun 2024, Jim wrote: >> Hi, >> I had the following structure which ended up at the bottom of a page: > This is perhaps not related to what you asked but ... >> \noindent >> {\bf Blah blah blah } >> \startitemize[intro,nowhite] > Starting a paragraph with a group {...} can lead to unexpected outcome. It is > better to use \bold{...} here, or \dontleavehmode {\bf ... }. Aditya, thanks for the information. So far (in my ConTeXt journey) I haven't seen anything with doing that, but I appreciate the advice. I don't understand the full Zen of \dontleavehmode (in my poor understanding I think it should be called \ensurehmode or something like that), but given that I explicitly used \noindent, is that not an analogous thing? Thanks. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Combine \setupdelimitedtext with an author (define custom variable?)
On 6/6/2024 12:30 PM, Gerion Entrup wrote: Hi, I like to achieve something that looks like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{René Descartes} \stopalignment}] \starttext \startextract Cogito ergo sum. \stopextract \stoptext ``` So it should setup a quotation and mentions the author. However, here the author is hardcoded within the blockquote. I would like it to use like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{\getcustomvariable{author}} \stopalignment}] \starttext \startextract[author=René Descartes] Cogito ergo sum. \stopextract \stoptext ``` Is there an easy way to achieve that? I tried with \structureuservariable (like possible in \startchapter) but it does not work. not all constructs hav ethese user variables (yet) i'll add an option for arguments tostart/stop so that you can do \starttext \definedelimitedtext [dextract] [blockquote] [leftmargin=1.5pc, style=italic, before=\setupindenting[next], after=\setups{extract:whatever}] \definestartstop [extract] [arguments=yes, before=\setups{extract:start}, after=\setups{extract:stop}] \startsetups extract:start \startdextract \stopsetups \startsetups extract:stop \startstopparameter{author} \stopdextract \blank[1ex,samepage] \hrule \blank[1ex,samepage] \dontleavehmode \wordright{\itx\startstopparameter{author}} \stopsetups \starttext \startextract[author=René Descartes] Cogito ergo sum. \stopextract \stoptext but first i want Wolfgang to check the patch, Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Combine \setupdelimitedtext with an author (define custom variable?)
Hi, I like to achieve something that looks like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{René Descartes} \stopalignment}] \starttext \startextract Cogito ergo sum. \stopextract \stoptext ``` So it should setup a quotation and mentions the author. However, here the author is hardcoded within the blockquote. I would like it to use like this: ``` \definedelimitedtext[extract][blockquote] \setupdelimitedtext [extract] [leftmargin=1.5pc, style={\italic}, before={\setupindenting[next]}, after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{\getcustomvariable{author}} \stopalignment}] \starttext \startextract[author=René Descartes] Cogito ergo sum. \stopextract \stoptext ``` Is there an easy way to achieve that? I tried with \structureuservariable (like possible in \startchapter) but it does not work. Best, Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Kerning in Noto Serif
Thanks Hraban, my Noto Serif (just downloaded) is 2.013 --script font shows kern too: kern cyrl dflt dflt dflt grek dflt latn dflt Greetings Lutz Am 6. Juni 2024 11:12:18 MESZ schrieb Henning Hraban Ramm : >Am 06.06.24 um 09:41 schrieb Lutz Haseloff: >> Hi all, >> I can't get Kerning working with Noto Serif. >> My minimal file is: >> >> \definefontfeature[oldstylenumber][onum=yes] >> \definefont[testnoto][file:NotoSerif-Regular*default at 12pt] >> \starttext >> Line 1: {VAVAVAVAVAVA 12345}\par >> Line 2: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par >> Line 3: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par >> \testnoto >> Line 4: {VAVAVAVAVAVA 12345}\par >> Line 5: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par >> Line 6: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par >> \stoptext >> >> Line 4 and 6 should be significantly shorter too. >> I tried the variable and the static versions. >> In fontforge I can see a kerning of -80 between A and V. >> My context is the newest lmtx. > >For me, it looks good with ConTeXt v2024.05.31 and Noto Serif v.1.03 > >Just to check the font (yes, it has kerning): > >$ mtxrun --script font --list --pattern=notoserifregular --info >mtx-fonts | >mtx-fonts | mapping : notoserifregular >mtx-fonts | fontname : notoserif >mtx-fonts | fullname : notoserif >mtx-fonts | filename : NotoSerif-Regular.ttf >mtx-fonts | family: notoserif >mtx-fonts | weight: normal >mtx-fonts | style : normal >mtx-fonts | width : normal >mtx-fonts | variant : normal >mtx-fonts | >mtx-fonts | gpos features: >mtx-fonts | >mtx-fonts | feature script languages >mtx-fonts | >mtx-fonts | kern cyrl dflt >mtx-fonts |grek dflt >mtx-fonts |latn dflt >mtx-fonts | mark cyrl dflt >mtx-fonts |grek dflt >mtx-fonts |latn dflt >mtx-fonts | mkmk cyrl dflt >mtx-fonts |grek dflt >mtx-fonts |latn dflt >mtx-fonts | >mtx-fonts | gsub features: >mtx-fonts | >mtx-fonts | feature script languages >mtx-fonts | >mtx-fonts | ccmp cyrl dflt >mtx-fonts |grek dflt >mtx-fonts |latn dflt > >Hraban > >___ >If your question is of interest to others as well, please add an entry to the >Wiki! > >maillist : ntg-context@ntg.nl / >https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) >archive : https://github.com/contextgarden/context >wiki : https://wiki.contextgarden.net >___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: setuphead in connection with the command argument
Am Montag, 3. Juni 2024, 15:13:20 MESZ schrieb Hans Hagen via ntg-context: > On 6/3/2024 1:36 PM, Gerion Entrup wrote: > > Thank you. I think that I understand command vs alternative now. > > With try and error, I experienced, that the font/style of the `style` > > parameter interleave in a strange way. Therefore I see it as related. > > What i mean is: > style: outer level, also sets interline spacing and adapts before after > blanks > > numberstyle and textstyle : specific to the element Thank you! I will try to wrap it up in the Wiki. Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Kerning in Noto Serif
Am 06.06.24 um 09:41 schrieb Lutz Haseloff: Hi all, I can't get Kerning working with Noto Serif. My minimal file is: \definefontfeature[oldstylenumber][onum=yes] \definefont[testnoto][file:NotoSerif-Regular*default at 12pt] \starttext Line 1: {VAVAVAVAVAVA 12345}\par Line 2: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par Line 3: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par \testnoto Line 4: {VAVAVAVAVAVA 12345}\par Line 5: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par Line 6: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par \stoptext Line 4 and 6 should be significantly shorter too. I tried the variable and the static versions. In fontforge I can see a kerning of -80 between A and V. My context is the newest lmtx. For me, it looks good with ConTeXt v2024.05.31 and Noto Serif v.1.03 Just to check the font (yes, it has kerning): $ mtxrun --script font --list --pattern=notoserifregular --info mtx-fonts | mtx-fonts | mapping : notoserifregular mtx-fonts | fontname : notoserif mtx-fonts | fullname : notoserif mtx-fonts | filename : NotoSerif-Regular.ttf mtx-fonts | family: notoserif mtx-fonts | weight: normal mtx-fonts | style : normal mtx-fonts | width : normal mtx-fonts | variant : normal mtx-fonts | mtx-fonts | gpos features: mtx-fonts | mtx-fonts | feature script languages mtx-fonts | mtx-fonts | kern cyrl dflt mtx-fonts |grek dflt mtx-fonts |latn dflt mtx-fonts | mark cyrl dflt mtx-fonts |grek dflt mtx-fonts |latn dflt mtx-fonts | mkmk cyrl dflt mtx-fonts |grek dflt mtx-fonts |latn dflt mtx-fonts | mtx-fonts | gsub features: mtx-fonts | mtx-fonts | feature script languages mtx-fonts | mtx-fonts | ccmp cyrl dflt mtx-fonts |grek dflt mtx-fonts |latn dflt Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?
On Wed, 5 Jun 2024, Jim wrote: > Hi, > > I had the following structure which ended up at the bottom of a page: > This is perhaps not related to what you asked but ... > \noindent > {\bf Blah blah blah } > \startitemize[intro,nowhite] Starting a paragraph with a group {...} can lead to unexpected outcome. It is better to use \bold{...} here, or \dontleavehmode {\bf ... }. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Kerning in Noto Serif
Hi all, I can't get Kerning working with Noto Serif. My minimal file is: \definefontfeature[oldstylenumber][onum=yes] \definefont[testnoto][file:NotoSerif-Regular*default at 12pt] \starttext Line 1: {VAVAVAVAVAVA 12345}\par Line 2: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par Line 3: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par \testnoto Line 4: {VAVAVAVAVAVA 12345}\par Line 5: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par Line 6: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par \stoptext Line 4 and 6 should be significantly shorter too. I tried the variable and the static versions. In fontforge I can see a kerning of -80 between A and V. My context is the newest lmtx. Greetings Lutz___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___