[NTG-context] Re: \par and \startlines
Am 01.05.24 um 09:44 schrieb Wolfgang Schuster: but that should be sufficient, but to repeat Hraban's question: What would be the advantage of using the format module? The module provides features like - alignment of the verse lines - numbering of the lines (which isn't supported by \startlines unless you add the normal linenumbering mechanism) - support for lines which don't fit on a single page where the consecutive lines are indented but the module is outdated and relies on an old mkii style code base. A big difference between the \startlines environment and the format module is that the first treats each line in the input file as a separate line in the output while the format module requires begin/end tags for each line which works better for xml input. Thank you! Doesn’t sound like I should use it… 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: \par and \startlines
denisma...@mailbox.org schrieb am 30.04.2024 um 14:28: -Ursprüngliche Nachricht- Von: Wolfgang Schuster Gesendet: Samstag, 27. April 2024 07:40 An: Denis Maier Cc: mailing list for ConTeXt users Betreff: Re: [NTG-context] Re: \par and \startlines Denis Maier schrieb am 26.04.2024 um 19:52: I see. But there's no command that could be used to simulate an empty line? If not, me should I perhaps try to replicate the wrapper structure from the XML source in context? (I'll also look into the format module of course.) What do you think? Below is a different solution to your problem with works without \startlines because you already mark up each individual line in the poem which make it possible to add a linebreak in the output. With \blank options (samepage) you can avoid pagebreaks between stanzas. \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*} \stopxmlsetups \xmlregistersetup{xml:test} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:poem \blank[line] \xmlflush{#1} \blank[back,line] \stopxmlsetups \startxmlsetups xml:stanza \xmlflush{#1}\blank[preference,line] \stopxmlsetups \startxmlsetups xml:line \xmlflush{#1}\blank[samepage,none] \stopxmlsetups \startbuffer[test] The lines are there! The lines are there! The lines are there! \stopbuffer \starttext \samplefile{lorem} \xmlprocessbuffer{test}{test}{} \samplefile{lorem} \stoptext Thanks for this solution. I've had a quick look, and it seems to do exactly what I need. My requirements are rather simple at the moment, but that should be sufficient, but to repeat Hraban's question: What would be the advantage of using the format module? The module provides features like - alignment of the verse lines - numbering of the lines (which isn't supported by \startlines unless you add the normal linenumbering mechanism) - support for lines which don't fit on a single page where the consecutive lines are indented but the module is outdated and relies on an old mkii style code base. A big difference between the \startlines environment and the format module is that the first treats each line in the input file as a separate line in the output while the format module requires begin/end tags for each line which works better for xml input. 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] Hbox error with itemized list on second page
Hello, I'm attempting to format a resume in Context building off of a template I found online. I'm having an odd error with some bullets on the second page, however. I'm guessing it has something to do with my \definelayout for the second (and subsequent) pages, but I can't figure it out for sure. What is happening is that whichever bullets are at the top of the second page are being wrapped as if they were appearing on the first page, which has a different layout structure. I've pasted a sanitized version of the tex file below. Any assistance would be greatly appreciated! Thanks, Ross Schulman \usemodule[ipsum] \setuppapersize[letter] \setuppagenumbering[location=] \definelayout[first] [% horizontal backspace=2.5in, leftmargin=1.75in, leftmargindistance=0.25in, width=5.5in, rightmargin=0in, % vertical topspace=0pt, header=1.2in, headerdistance=.1in, height=middle, footerdistance=0pt, footer=\lineheight, bottomspace=.5in] \definelayout[rest] [% horizontal leftmargin=0in, width=6.5in, rightmargin=0in, % % vertical topspace=0pt, header=1in, headerdistance=.1in, height=middle, footerdistance=0pt, footer=\lineheight, bottomspace=.3in] \definelayout[1][first] \definelayout[2][rest] \setupmarginblock [location=left, width=\leftmarginwidth, align=flushright] \usecolors[svg] \definehead[contacts][title] \setuphead [contacts] [ align=center, page=no, after={\thinrule\blank[big]}] \definehead[topic][subject] \setuphead [topic] [ after={\hairline}] \defineitemgroup [timeline] [before=, inbetween=, width=6em] \setuplines[before=,after=,command=\strut] \definelayer[mybkgr][x=0mm,y=0mm, width=\paperwidth,height=\paperheight] \setupbackgrounds[page][background={mybkgr}] \starttext \setlayerframed [mybkgr] [] [background=color, framecolor=forestgreen, backgroundcolor=forestgreen, foregroundcolor=white, width=\paperwidth, height=\dimexpr\topspace+\headerheight\relax] {\dontleavehmode{\tfd ROSS SCHULMAN}\blank[medium] policy technologist } \startmarginblock \topic{CONTACT} \startlines 1234 Main St NW Washington, DC 20011 \stoplines \topic{LANGUAGES} \startlines English (Native Speaker) Spanish (Conversational) \stoplines \topic{TECH} \startlines Rust Javascript \letterampersand\space Typescript Linux Administration Google and Microsoft Office Suites \stoplines \stopmarginblock \setupalign[flushleft] \topic{EXPERIENCE} \starttimeline \sym{2021--Now}\color[forestgreen]{Lorem Ipsum Foundation}\hfill \color[darkgrey]{\tfx San Francisco, CA (remote)} Senior Fellow \startitemize[packed] \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \stopitemize \sym{2015--2021}\color[forestgreen]{Other Place About Lorem}\hfill \color[darkgrey]{\tfx Washington, DC} Senior Lorem Counsel \startitemize[packed] \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \stopitemize \sym{2014--2015}\color[forestgreen]{Lorems R Us}\hfill \color[darkgrey]{\tfx Washington, DC} Lorem Manager \startitemize[packed] \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \stopitemize \sym{2010--2014}\color[forestgreen]{Computer and Communications Industry Association}\hfill \color[darkgrey]{\tfx Washington, DC} Lorem Project Manager \startitemize[packed] \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \stopitemize \sym{2005--2007}\color[forestgreen]{Center for Lorem Ipsum}\hfill \color[darkgrey]{\tfx Washington, DC} Program Associate \startitemize[packed] \item \ipsum[alternative=words, n=10, inbetween=\space] \par \item \ipsum[alternative=words, n=10, inbetween=\space] \par \stopitemize \stoptimeline \stoptext ___ 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
[NTG-context] Re: \par and \startlines
> -Ursprüngliche Nachricht- > Von: Wolfgang Schuster > Gesendet: Samstag, 27. April 2024 07:40 > An: Denis Maier > Cc: mailing list for ConTeXt users > Betreff: Re: [NTG-context] Re: \par and \startlines > > Denis Maier schrieb am 26.04.2024 um 19:52: > > > I see. But there's no command that could be used to simulate an empty line? > > If not, me should I perhaps try to replicate the wrapper structure > > from the XML source in context? (I'll also look into the format module > > of > > course.) What do you think? > > Below is a different solution to your problem with works without \startlines > because you already mark up each individual line in the poem which make it > possible to add a linebreak in the output. > > With \blank options (samepage) you can avoid pagebreaks between stanzas. > > \startxmlsetups xml:test > \xmlsetsetup{#1}{*}{-} > \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*} > \stopxmlsetups > > \xmlregistersetup{xml:test} > > \startxmlsetups xml:doc > \xmlflush{#1} > \stopxmlsetups > > \startxmlsetups xml:poem > \blank[line] > \xmlflush{#1} > \blank[back,line] > \stopxmlsetups > > \startxmlsetups xml:stanza > \xmlflush{#1}\blank[preference,line] > \stopxmlsetups > > \startxmlsetups xml:line > \xmlflush{#1}\blank[samepage,none] > \stopxmlsetups > > \startbuffer[test] > > > > > The > lines > are > there! > > > The > lines > are > there! > > > The > lines > are > there! > > > > \stopbuffer > > \starttext > > \samplefile{lorem} > > \xmlprocessbuffer{test}{test}{} > > \samplefile{lorem} > > \stoptext Thanks for this solution. I've had a quick look, and it seems to do exactly what I need. My requirements are rather simple at the moment, but that should be sufficient, but to repeat Hraban's question: What would be the advantage of using the format module? Thanks again for your help, Denis ___ 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: How to make superscript text match footnote mark formatting?
Thank you! --Joel On Saturday, April 27, 2024 at 12:08:13 PM MDT, Wolfgang Schuster wrote: Joel via ntg-context schrieb am 27.04.2024 um 19:16: > \starttext > test\high{1}test\footnote{some text} > \stoptext > > How can I create a superscript number that has exactly the same > formatting as a footnote, but which won't create a footnote. I tried > \high{}, which I believe should be the way to superscript text, but if > you compile this, you can see the first "1" and second "1" have entirely > different formatting. How do I make the first one have the same exact > formtating as the real footnote? Footnotes apply the \tx style to the number in the running text and to get the same text size with \high you need \tx before the argument. Another solution is to create your own \high command where you set the text size as default value but now you have to pass \txx as value because by default \high already uses style=\tx. When you now combine the default \tx from \high and the \tx from the footnote you get the \txx size (which is used in the custom \high command). begin example \definehigh[fakenotesymbol][style=\txx] \starttext \startlines test\footnote{\unknown} test\high{\tx 1} test\fakenotesymbol{1} \stoplines \stoptext end example 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: How to make superscript text match footnote mark formatting?
Joel via ntg-context schrieb am 27.04.2024 um 19:16: \starttext test\high{1}test\footnote{some text} \stoptext How can I create a superscript number that has exactly the same formatting as a footnote, but which won't create a footnote. I tried \high{}, which I believe should be the way to superscript text, but if you compile this, you can see the first "1" and second "1" have entirely different formatting. How do I make the first one have the same exact formtating as the real footnote? Footnotes apply the \tx style to the number in the running text and to get the same text size with \high you need \tx before the argument. Another solution is to create your own \high command where you set the text size as default value but now you have to pass \txx as value because by default \high already uses style=\tx. When you now combine the default \tx from \high and the \tx from the footnote you get the \txx size (which is used in the custom \high command). begin example \definehigh[fakenotesymbol][style=\txx] \starttext \startlines test\footnote{\unknown} test\high{\tx 1} test\fakenotesymbol{1} \stoplines \stoptext end example 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: \par and \startlines
Am 26.04.24 um 18:24 schrieb Wolfgang Schuster: BTW: ConTeXt has a module for poems which can be loaded with \usemodule[format]. Never heard of it. Version says “ancient” ;) https://source.contextgarden.net/tex/context/modules/mkiv/m-format.mkiv What’s the advantage of all this markup over simple "lines" (or even \par after each line)? I’ll need to typeset a book of poetry soon, that will probably need a lot of different indentation/aligments… 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: \par and \startlines
Denis Maier schrieb am 26.04.2024 um 19:52: I see. But there's no command that could be used to simulate an empty line? If not, me should I perhaps try to replicate the wrapper structure from the XML source in context? (I'll also look into the format module of course.) What do you think? Below is a different solution to your problem with works without \startlines because you already mark up each individual line in the poem which make it possible to add a linebreak in the output. With \blank options (samepage) you can avoid pagebreaks between stanzas. \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*} \stopxmlsetups \xmlregistersetup{xml:test} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:poem \blank[line] \xmlflush{#1} \blank[back,line] \stopxmlsetups \startxmlsetups xml:stanza \xmlflush{#1}\blank[preference,line] \stopxmlsetups \startxmlsetups xml:line \xmlflush{#1}\blank[samepage,none] \stopxmlsetups \startbuffer[test] The lines are there! The lines are there! The lines are there! \stopbuffer \starttext \samplefile{lorem} \xmlprocessbuffer{test}{test}{} \samplefile{lorem} \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: \par and \startlines
Am 26.04.24 um 19:52 schrieb Denis Maier via ntg-context: I see. But there's no command that could be used to simulate an empty line? Did you try \vskip{…}? 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: \par and \startlines
On 4/26/24 19:52, Denis Maier via ntg-context wrote: >> Wolfgang Schuster hat am 26.04.2024 19:29 CEST geschrieben: >> The inbetween setting works because ConTeXt checks at the start of >> each line whether it's empty (in this case the value is used) or not. >> >> When you add a \par you just end the current line/paragraph and it >> doesn't matter how many \par's you use because TeX just ignores them. > > I see. But there's no command that could be used to simulate an empty line? Crappy code: \starttext a\dorecurse{25}{\par}b a\dorecurse{25}{\null\par}b \stoptext Just to show it could be achieved, 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: \par and \startlines
Wolfgang Schuster hat am 26.04.2024 19:29 CEST geschrieben: Denis Maier schrieb am 26.04.2024 um 19:18: Wolfgang Schuster hat am 26.04.2024 18:24 CEST geschrieben: Denis Maier via ntg-context schrieb am 26.04.2024 um 18:10: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 26.04.2024 17:25 CEST geschrieben: On 4/26/24 15:33, denis.ma...@unibe.ch wrote: Hi, I’m trying to typeset a poem from XML, but I can’t figure out how to make the inbetween key working here. As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines…\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here. How can this be done? Hi Denis, I must confess I don’t get which is your actual question. \blank works here and you know that (since you included it in your code). MkIV with \par works in your sample and LMTX with \par doesn’t. I wonder whether this might be a bug in LMTX. Just in case it might help, Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then. The lines environment treats each line of the input as paragraph by adding \par at the end of it and adding another \par makes no difference here. BTW: ConTeXt has a module for poems which can be loaded with \usemodule[format]. Wolfgang Ok. I'll have a look at this module. Just two questions: 1. so did this behavior change? 2. What is inbetween referring to then? If each line is a paragraph, what's this group of paragraphs then? Can you manually switch to the next one? The inbetween setting works because ConTeXt checks at the start of each line whether it's empty (in this case the value is used) or not. When you add a \par you just end the current line/paragraph and it doesn't matter how many \par's you use because TeX just ignores them. Wolfgang I see. But there's no command that could be used to simulate an empty line? If not, me should I perhaps try to replicate the wrapper structure from the XML source in context? (I'll also look into the format module of course.) What do you think? Thank you so much for your help. Best, Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: \par and \startlines
Denis Maier schrieb am 26.04.2024 um 19:18: Wolfgang Schuster hat am 26.04.2024 18:24 CEST geschrieben: Denis Maier via ntg-context schrieb am 26.04.2024 um 18:10: Pablo Rodriguez via ntg-context <mailto:ntg-context@ntg.nl>> hat am 26.04.2024 17:25 CEST geschrieben: On 4/26/24 15:33, denis.ma...@unibe.ch <mailto:denis.ma...@unibe.ch> wrote: Hi, I’m trying to typeset a poem from XML, but I can’t figure out how to make the inbetween key working here. As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines…\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here. How can this be done? Hi Denis, I must confess I don’t get which is your actual question. \blank works here and you know that (since you included it in your code). MkIV with \par works in your sample and LMTX with \par doesn’t. I wonder whether this might be a bug in LMTX. Just in case it might help, Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then. The lines environment treats each line of the input as paragraph by adding \par at the end of it and adding another \par makes no difference here. BTW: ConTeXt has a module for poems which can be loaded with \usemodule[format]. Wolfgang Ok. I'll have a look at this module. Just two questions: 1. so did this behavior change? 2. What is inbetween referring to then? If each line is a paragraph, what's this group of paragraphs then? Can you manually switch to the next one? The inbetween setting works because ConTeXt checks at the start of each line whether it's empty (in this case the value is used) or not. When you add a \par you just end the current line/paragraph and it doesn't matter how many \par's you use because TeX just ignores them. 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: \par and \startlines
Wolfgang Schuster hat am 26.04.2024 18:24 CEST geschrieben: Denis Maier via ntg-context schrieb am 26.04.2024 um 18:10: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 26.04.2024 17:25 CEST geschrieben: On 4/26/24 15:33, denis.ma...@unibe.ch wrote: Hi, I’m trying to typeset a poem from XML, but I can’t figure out how to make the inbetween key working here. As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines…\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here. How can this be done? Hi Denis, I must confess I don’t get which is your actual question. \blank works here and you know that (since you included it in your code). MkIV with \par works in your sample and LMTX with \par doesn’t. I wonder whether this might be a bug in LMTX. Just in case it might help, Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then. The lines environment treats each line of the input as paragraph by adding \par at the end of it and adding another \par makes no difference here. BTW: ConTeXt has a module for poems which can be loaded with \usemodule[format]. Wolfgang Ok. I'll have a look at this module. Just two questions: 1. so did this behavior change? 2. What is inbetween referring to then? If each line is a paragraph, what's this group of paragraphs then? Can you manually switch to the next one? Best, Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: \par and \startlines
Denis Maier via ntg-context schrieb am 26.04.2024 um 18:10: Pablo Rodriguez via ntg-context <mailto:ntg-context@ntg.nl>> hat am 26.04.2024 17:25 CEST geschrieben: On 4/26/24 15:33, denis.ma...@unibe.ch <mailto:denis.ma...@unibe.ch> wrote: Hi, I’m trying to typeset a poem from XML, but I can’t figure out how to make the inbetween key working here. As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines…\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here. How can this be done? Hi Denis, I must confess I don’t get which is your actual question. \blank works here and you know that (since you included it in your code). MkIV with \par works in your sample and LMTX with \par doesn’t. I wonder whether this might be a bug in LMTX. Just in case it might help, Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then. The lines environment treats each line of the input as paragraph by adding \par at the end of it and adding another \par makes no difference here. BTW: ConTeXt has a module for poems which can be loaded with \usemodule[format]. 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: \par and \startlines
Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 26.04.2024 17:25 CEST geschrieben: On 4/26/24 15:33, denis.ma...@unibe.ch wrote: Hi, I’m trying to typeset a poem from XML, but I can’t figure out how to make the inbetween key working here. As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines…\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here. How can this be done? Hi Denis, I must confess I don’t get which is your actual question. \blank works here and you know that (since you included it in your code). MkIV with \par works in your sample and LMTX with \par doesn’t. I wonder whether this might be a bug in LMTX. Just in case it might help, Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then. Thanks, Denis 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 ___ ___ 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: \par and \startlines
On 4/26/24 15:33, denis.ma...@unibe.ch wrote: > Hi, > > I’m trying to typeset a poem from XML, but I can’t figure out how to > make the inbetween key working here. > > As the source is XML, I cannot just add an empty line to start a new > group of lines inside \startlines…\stoplines. I guess, there must be a > command to do that, but \par seems to have no effect here. > > How can this be done? Hi Denis, I must confess I don’t get which is your actual question. \blank works here and you know that (since you included it in your code). MkIV with \par works in your sample and LMTX with \par doesn’t. I wonder whether this might be a bug in LMTX. 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] \par and \startlines
Hi, I'm trying to typeset a poem from XML, but I can't figure out how to make the inbetween key working here. As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines...\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here. How can this be done? Best, Denis %%% \setuplines[before={\blank},after={\blank},inbetween={ARE WE INBETWEEN?\blank}] % XML Nodes auswählen \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*} \stopxmlsetups \xmlregistersetup{xml:test} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:poem \startlines \xmlflush{#1} \stoplines \stopxmlsetups \startxmlsetups xml:stanza \xmlflushlinewise{#1}\par %this has no effect \stopxmlsetups \startxmlsetups xml:line \xmlflush{#1} \stopxmlsetups \startbuffer[test] The lines are there! The lines are there! \stopbuffer \starttext This works: \startlines The lines are there! The lines are there! \stoplines Apparently, \type{\par} has no effect here: \startlines The lines are there!\par% \par has no effect here The lines are there! \stoplines For background, this is what I'm actually trying to do: \xmlprocessbuffer{test}{test}{} \stoptext %% ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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] Wiki - question about Command/ pages which start with a space character
Hi all, Is it on purpose that 128 pages "https://wiki.contextgarden.net/Command/ " start with a space character ? I didn't find an explanation in https://wiki.contextgarden.net/Command For example, these two pages exist : - https://wiki.contextgarden.net/Command/startbuffer - https://wiki.contextgarden.net/Command/_startbuffer If it is on purpose: - What is the purpose, and which page should contain which documentation? If it is not: - Is there a way to automatically merge the content of the couple of pages, and to remove the "wrong" pages, or should it be done manually ? Thanks for your help. List : Command/ attachment Command/ background Command/ bar Command/ beginblock Command/ button Command/ characterkerning Command/ comment Command/ completecombinedlist Command/ completelistoffloats Command/ completelistofsorts Command/ completelistofsynonyms Command/ completeregister Command/ copylabeltext Command/ ctxfunction Command/ ctxfunctiondefinition Command/ currentlabel Command/ delimitedtext Command/ description Command/ enumeration Command/ fence Command/ fraction Command/ framed Command/ framedtext Command/ getbuffer Command/ hbox Command/ help Command/ high Command/ highlight Command/ label Command/ labellanguage Command/ labeltext Command/ labeltexts Command/ language Command/ leftlabeltext Command/ linenote Command/ low Command/ lowhigh Command/ lowmidhigh Command/ margindata Command/ mathcommand Command/ mathdoubleextensible Command/ mathextensible Command/ mathframed Command/ mathmatrix Command/ mathornament Command/ mathoverextensible Command/ mathovertextextensible Command/ mathradical Command/ mathtriplet Command/ mathunderextensible Command/ mathundertextextensible Command/ mathunstacked Command/ nextparagraphs Command/ note Command/ ornament Command/ paragraphs Command/ placecombinedlist Command/ placefloat Command/ placelistoffloats Command/ placelistofsorts Command/ placelistofsynonyms Command/ placement Command/ placepairedbox Command/ placeregister Command/ presetlabeltext Command/ referenceformat Command/ register Command/ rightlabeltext Command/ script Command/ section Command/ seeregister Command/ setupcombinedlist Command/ setupitemgroup Command/ setuplabeltext Command/ setuppairedbox Command/ setupregister Command/ shift Command/ sorting Command/ startattachment Command/ startbackground Command/ startbuffer Command/ startcolumnset Command/ startcomment Command/ startdelimitedtext Command/ startdescription Command/ starteffect Command/ startenumeration Command/ startfittingpage Command/ startfloattext Command/ startformula Command/ startframedtext Command/ starthelp Command/ startindentedtext Command/ startitemgroup Command/ startlabeltext Command/ startlinenote Command/ startlines Command/ startmakeup Command/ startmathalignment Command/ startmathcases Command/ startmathmatrix Command/ startmixedcolumns Command/ startnarrower Command/ startnote Command/ startpagecolumns Command/ startparagraphs Command/ startparallel Command/ startplacefloat Command/ startplacepairedbox Command/ startsection Command/ startsectionblock Command/ startstartstop Command/ startstop Command/ startstyle Command/ starttabulate Command/ starttextbackground Command/ starttyping Command/ startviewerlayer Command/ startxtable Command/ stoplinenote Command/ style Command/ synonym Command/ textbackground Command/ textnote Command/ tooltip Command/ type Command/ typebuffer Command/ unit ___ 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: imposition: getting to the last page of a booklet
Hans Hagen schrieb am 06.03.2024 um 21:38: On 3/6/2024 7:50 PM, Wolfgang Schuster wrote: The semicolon is a undocumented extension (I noticed it in the definition of \page[quadruple]) of \numexpr in Luametatex for the modulus operator. One of these days I have to write the pending section in th elow level manual and also explain this: \starttext \ifnum 10 = 11 wrong \else okay \fi \ifnum 10 != 11 okay \else wrong \fi \ifnum 10 !> 11 okay \else wrong \fi \ifnum 10 !< 11 wrong \else okay \fi \ifnum 10 ≤ 11 okay \else wrong \fi \ifnum 10 ≥ 11 wrong \else okay \fi \ifnum 10 ≰ 11 okay \else wrong \fi \ifnum 10 ≱ 11 wrong \else okay \fi \ifnum "F0 ∈ "F0 okay \else wrong \fi \ifnum "F0 ∉ "F0 wrong \else okay \fi \stoptext These new features are mentioned in the Luametatex manual but not the additions to \numexpr (I checked and : is mentioned but ; is missing). \starttext \startlines \number\numexpr 5 + 2 \relax \number\numexpr 5 - 2 \relax \number\numexpr 5 * 2 \relax \number\numexpr 5 / 2 \relax \number\numexpr 5 : 2 \relax % new! \number\numexpr 5 ; 2 \relax % new! \stoplines \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] Wiki page : Mixed languages sample (French, Ancient Greek, Arabic, Chinese)
莊周/庄周). Si l'on ajoute à cela une référence au philosophe arabo-persan Farabi\footnote{Al-Fārābī est nommé dans la philosophie arabe médiévale {\em le second maître}, le premier étant Aristote.} (Al-Fārābī, محمد فارابی), par le biais d'une précision sur Platon, avec des indications sur son nom en arabe, on aura fait le tour de quelques difficultés qui se présentent à ceux qui voudraient établir avec soin des documents un peu exigeants. % \showframe \startMyFrame[Title=Conclusion] \setcharacterspacing[frenchpunctuation] \startlines Pour éditer un texte un peu complexe, avec plusieurs langues non-romanes utilisées occasionnellement, on peut faire appel à \ConTeXt. Ce choix paraît être judicieux : en effet, pour le mathématicien, rendre possible la présentation et l'édition parfaites d'équations complexes, mais aussi de schémas et de tableaux nécessite un apprentissage assez poussé, mais qui peut être résolu par un certain nombre de macros qui automatisent les tâches. Le code est réutilisable et c'est vrai aussi pour les utilisateurs qui viennent des multiples horizons des {\em Humanités}, qui connaissent leur domaine de compétence et qui veulent rédiger un document simple, un article de revue, voir des chapitres entiers d'un ouvrage. \stoplines \stopMyFrame \stoptext ___ 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: Score sums and references
Cool. It works once \startlines ... \stoplines is removed. Thank you very much! Jairo El mié, 13 dic 2023 a la(s) 3:40 a.m., Hans Hagen (j.ha...@xs4all.nl) escribió: > On 12/13/2023 4:05 AM, Jairo A. del Rio wrote: > > Hi, dear list. Is there a proper "ConTeXt way" to do the following? > > > > \integerdef\lmao=0 > > \starttext > > Sum: \in[trick] % 10 from the result below > > > > +1\advance\lmao\plusone > > > > +2\advance\lmao\plustwo > > > > +3\advance\lmao\plusthree > > > > +4\advance\lmao\plusfour > > > > \normalexpanded{\reference[trick]{\the\lmao}} % 10 printed above > > \stoptext > > > > I want the result of a sum (either via Lua or TeX) to be printed before > > summands in text, but without the mess of reference options such as > > interaction, etc. Thank you in advance and sorry for any inconvenience. > > \integerdef\DSlmao=0 > > \starttext > > Sum: \datasetvariable{test-1}{1}{whatever} > > \startlines > +1\advance\DSlmao\plusone > +2\advance\DSlmao\plustwo > +3\advance\DSlmao\plusthree > +4\advance\DSlmao\plusfour > \stoplines > > \normalexpanded{\setdataset[test-1][whatever=\the\DSlmao]} > > \stoptext > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Score sums and references
On 12/13/2023 4:05 AM, Jairo A. del Rio wrote: Hi, dear list. Is there a proper "ConTeXt way" to do the following? \integerdef\lmao=0 \starttext Sum: \in[trick] % 10 from the result below +1\advance\lmao\plusone +2\advance\lmao\plustwo +3\advance\lmao\plusthree +4\advance\lmao\plusfour \normalexpanded{\reference[trick]{\the\lmao}} % 10 printed above \stoptext I want the result of a sum (either via Lua or TeX) to be printed before summands in text, but without the mess of reference options such as interaction, etc. Thank you in advance and sorry for any inconvenience. \integerdef\DSlmao=0 \starttext Sum: \datasetvariable{test-1}{1}{whatever} \startlines +1\advance\DSlmao\plusone +2\advance\DSlmao\plustwo +3\advance\DSlmao\plusthree +4\advance\DSlmao\plusfour \stoplines \normalexpanded{\setdataset[test-1][whatever=\the\DSlmao]} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)
On 12/9/2023 4:33 PM, Aditya Mahajan wrote: On Sat, 9 Dec 2023, Wolfgang Schuster wrote: \starttext \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines \stoptext Or, for inline math, $\sqrt{1/3}$. radicals are somewhat special to deal with: - multidimensional delimiter - vertical spacing inside - horizontal spacing oustside - anchoring degrees - left and right radicals - more consistent rules (char based) - size dependent additional spacing (avoid clash) - normalize size across formula - lack of granularity in variants sizes by now we have dealt with all of that (some not in the current release), think of additional control in the engine, compensation for insufficient opentype math features, companion fonts with more sizes there will always be suboptimal cases but the average is ok (we put radical - character kerning on hold because it is a lot of definitions) and we don't want to add hard to fight heuristics so to inline: in most cases the solution that Adirya suggests will work out okay with respect toline spacing 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: Fractions (was \placefigure[location=here...] problem)
On Sat, 9 Dec 2023, Wolfgang Schuster wrote: > \starttext > > \startlines > \type{\frac{1}{3}}: \m{\frac{1}{3}} > \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} > \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} > \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} > \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} > \type{\frac{1}{3}}: \m{\frac{1}{3}} > \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} > \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} > \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} > \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} > \stoplines > > \stoptext Or, for inline math, $\sqrt{1/3}$. 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: Fractions (was \placefigure[location=here...] problem)
Hi Wolfgang, I'm reading this thread and I'm interested because I type a lot of text with mathematical formulas. In fact, I find that \dfrac{} creates unsightly leading space and that \frac{} is too small. What is the difference between \frac{} and \tfrac{} ? Fabrice Le sam. 9 déc. 2023 à 14:00, Henning Hraban Ramm a écrit : > Am 09.12.23 um 14:43 schrieb Wolfgang Schuster: > > anton.chig...@mail.com schrieb am 09.12.2023 um 14:15: > > \startlines > > \type{\frac{1}{3}}: \m{\frac{1}{3}} > > \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} > > \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} > > \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} > > \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} > > \type{\frac{1}{3}}: \m{\frac{1}{3}} > > \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} > > \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} > > \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} > > \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} > > \stoplines > > There’s also \vulgarfraction{1}{3} (but probably not suitable for your > application). > > 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: Fractions (was \placefigure[location=here...] problem)
Am 09.12.23 um 14:43 schrieb Wolfgang Schuster: anton.chig...@mail.com schrieb am 09.12.2023 um 14:15: \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines There’s also \vulgarfraction{1}{3} (but probably not suitable for your application). 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] Fractions (was \placefigure[location=here...] problem)
anton.chig...@mail.com schrieb am 09.12.2023 um 14:15: I worked, ;-), thanks. Let me ask you another thing, how can I avoid messing up the line spacing by using \sqrt and \frac, the line that follows these has increased line spacing in the pdf output code: Find the normal and shearing stresses on an oblique plane defined by $l=\sqrt{\frac{3}{13}}$, $m=\sqrt{\frac{1}{13}}$, and $n=\sqrt{\frac{9}{13}}$. Complete working minimal examples are preferred over code snippets. To avoid single lines with different spacing you can either increase the line spacing for all lines with \setupinterlinespace or you use a different fraction command which uses smaller numbers or creates inline fractions. \starttext \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines \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: breakpoints in verbatim text
Hi, I think I need to use verbatim because I'm typesetting source code and I need it to be as verbatim as possible. For the moment, I'm manually inserting zero-width spaces... seems to do the trick, although it's becoming unreadable :P Thanks, Alex Le 17/08/23 à 17:22, Wolfgang Schuster a écrit : Alex Leray schrieb am 17.08.2023 um 14:41: Hi, I'd like to break lines in verbatim on certain characters like "/". I can do it for normal texte, but not inside typing environment. Do you need the verbatim environment or is the lines-environment sufficient. \setuppapersize[A7] \setbreakpoints[compound] \starttext \startlines[style=mono] 1. Thisisthetruth:waste-not-want-not 2. Thisisthetruth:waste/not/want/not 3. Thisisthetruth:waste+not+want+not 4. Thisisthetruth:waste(not(want(not)) 5. Thisisthetruth(waste)not)want)not \stoplines \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://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 ___ -- Alexandre Leray +32 487 947 030 Avez-vous pensé à (vous) offrir Médor ? https://medor.coop/ideescadeau ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: breakpoints in verbatim text
Alex Leray schrieb am 17.08.2023 um 14:41: Hi, I'd like to break lines in verbatim on certain characters like "/". I can do it for normal texte, but not inside typing environment. Do you need the verbatim environment or is the lines-environment sufficient. \setuppapersize[A7] \setbreakpoints[compound] \starttext \startlines[style=mono] 1. Thisisthetruth:waste-not-want-not 2. Thisisthetruth:waste/not/want/not 3. Thisisthetruth:waste+not+want+not 4. Thisisthetruth:waste(not(want(not)) 5. Thisisthetruth(waste)not)want)not \stoplines \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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Font switching, default features, and a request
Dear gang, Consider the following example: == \setupdirections[bidi=global,method=one] \startTEXpage[offset=1em,width=14in] \definedfont[almfixed*arabic] \switchtobodyfont[almfixed*arabic] \switchtobodyfont[almfixed] % \addff{arabic} \startbuffer[] \startlines الثَّعْلَبُ الْأَسْمَرُ السَّرِيعُ يَقْفِزُ فَوْقَ الْكَلْبِ الْكَسُولِ! The quick brown fox jumps over the lazy dog! \stoplines \stopbuffer {\tfxx \type{\tfxx} \getbuffer} {\tfx \type{\tfx} \getbuffer} \type{\tf} \getbuffer {\tfa \type{\tfa} \getbuffer} {\tfb \type{\tfb} \getbuffer} {\tfc \type{\tfc} \getbuffer} {\tfd \type{\tfd} \getbuffer} \stopTEXpage == There are three font switches to choose from: == \definedfont[almfixed*arabic] \switchtobodyfont[almfixed*arabic] \switchtobodyfont[almfixed] == Let's toggle one at a time: 1) \definedfont[almfixed*arabic] a) gives us the correct bidi output, but only for the \tf size b) is ignored for every other size switch. a) and b) are expected behavior. 2) \switchtobodyfont[almfixed] a) gives us Arabic-script bidi output, b) exhibits no Arabic-script features c) gives the same result for each size switch This means that the fontfeature "arabic" -- already predefined in ConTeXt (font-pre.mkiv) -- is not explicitly applied. Curiously, invoking \addff{arabic} does not affect the output. Why is it that \addff{arabic} does not work here? 3) \switchtobodyfont[almfixed*arabic] suppresses the font entirely and we're back to Latin Modern for all sizes. Assuming that this is expected behavior, it appears to follow that fontfeatures cannot be invoked for \switchtobodyfont and the like, only from within the typescript read by \switchtobodyfont etc. === REQUEST: Since ALMFixed is already distributed with ConTeXt, could Hans make the fontfeature "arabic" default for this font? That is \switchtobodyfont[almfixed] should automatically a) give us Arabic-script bidi output (already there), b) exhibit Arabic-script features (missing) c) gives the same result for each size switch (already there) (Indeed, it would be useful to have *arabic-predefined typescripts/bodyfonts for a few other commonly available/used Arabic fonts as well. Would be willing to make a list at some point, test, etc.) Thank you in advance for considering this request. Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Using
Thanks Hans! Le 4/08/23 à 23:21, Hans Hagen a écrit : On 8/4/2023 7:42 PM, Alex Leray wrote: Hello, I'm trying to figure out why this is not working (whereas \startlines\stoplines works): ``` \definehead[poem][section] \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] \starttext \startpoem[title={Glijden}][] Lorem ipsum dolor sit amet consectetur. \stoppoem \stoptext ``` I get the following traceback: ``` tex error > tex error on line 6 in file /home/ali/work/being_human/test.tex: ! Undefined control sequence \strc_sectioning_initialize_increment ->\edef \currentheadincrement verbatim is tricky because it changes the catcodes here is a trick: \definehead [poem] [section] \setuphead [poem] [after=\startlines\tt, % after the head is placed aftersection=\stoplines] % when we end this section \startpoem[title={Glijden}] Lorem ipsum dolor sit amet consectetur. Lorem ipsum dolor sit amet consectetur. \stoppoem it is not pretty coding but it seems to work ok 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 ___ -- Alexandre Leray +32 487 947 030 Avez-vous pensé à (vous) offrir Médor ? https://medor.coop/ideescadeau ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Using
On 8/4/2023 7:42 PM, Alex Leray wrote: Hello, I'm trying to figure out why this is not working (whereas \startlines\stoplines works): ``` \definehead[poem][section] \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] \starttext \startpoem[title={Glijden}][] Lorem ipsum dolor sit amet consectetur. \stoppoem \stoptext ``` I get the following traceback: ``` tex error > tex error on line 6 in file /home/ali/work/being_human/test.tex: ! Undefined control sequence \strc_sectioning_initialize_increment ->\edef \currentheadincrement verbatim is tricky because it changes the catcodes here is a trick: \definehead [poem] [section] \setuphead [poem] [after=\startlines\tt,% after the head is placed aftersection=\stoplines] % when we end this section \startpoem[title={Glijden}] Lorem ipsum dolor sit amet consectetur. Lorem ipsum dolor sit amet consectetur. \stoppoem it is not pretty coding but it seems to work ok 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] Using
Hello, I'm trying to figure out why this is not working (whereas \startlines\stoplines works): ``` \definehead[poem][section] \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] \starttext \startpoem[title={Glijden}][] Lorem ipsum dolor sit amet consectetur. \stoppoem \stoptext ``` I get the following traceback: ``` tex error > tex error on line 6 in file /home/ali/work/being_human/test.tex: ! Undefined control sequence \strc_sectioning_initialize_increment ->\edef \currentheadincrement {\headparameter \c!incrementnumber }\ifcsname \??headincrement \currentheadincrement \endcsname \lastnamedcs \else \settrue \c_strc_sectioning_increment \settrue \c_strc_sectionin... \strc_sectioning_handle ... \currentheadsection }\strc_sectioning_initialize_autolevel \strc_sectioning_initialize_increment \strc_sectioning_initialize_placement \strc_sectioning_initialize_number \the \everybeforesectionheadhandle \let \getheadn... \strc_sectioning_start_named_section ...parameter \c!beforesection \the \everybeforehead \strc_sectioning_handle {#1}{#2}{#3} \headparameter \c!insidesection l.6 \startpoem[title={Glijden}][] 1 \definehead[poem][section] 2 \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] 3 4 \starttext 5 6 >> \startpoem[title={Glijden}][] 7 Lorem ipsum dolor sit amet consectetur. 8 \stoppoem 9 10 \stoptext 11 mtx-context | fatal error: return code: 256 ``` Any idea? thanks a lot! Alex ___ 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] How to extend an existing macro to take optional parameters?
> On 13 Mar 2023, at 21:39, Hans Hagen via ntg-context > wrote: > > On 3/12/2023 2:24 PM, Bruce Horrocks via ntg-context wrote: >> I have an existing macro that I'd like to extend. >> The current definition is \define[3]\mycommand{...} which I'd like to extend >> to take an optional 4th parameter plus an optional setup parameter. >> Thus I currently invoke it as: >> \mycommand{aa}{bb}{cc} >> and I'd like to be able to extend it so that any of the following can be >> used: >> \mycommand{aa}{bb}{cc} >> \mycommand{aa}{bb}{cc}{dd} >> \mycommand{aa}{bb}{cc}{dd}[ee] >> or >> \mycommand[ee]{aa}{bb}{cc}{dd} % if this is more the ConTeXt way >> where {dd} is the optional extra parameter and, if it is present, then [ee] >> can also be optionally added (because it controls how {dd} is printed). >> If it helps, the actual body of the macro can easily be a call to Lua so >> it's fine if the function takes 5 params where 4 and 5 can be nil or empty >> strings. >> I've trawled through syst-aux.mkiv but it only covers optional numbers of [ >> ] or { } but not combinations of both (which given the vast numbers of >> combinations is perhaps not surprising!). Have I missed something obvious >> that would help me? > So, four optional with mandate {} plus a fallback to an optional [] > > \starttext > > \tolerant\def\mycommand#=#=#=#=#:[#5]% > {\ifparameter#1\or(1:#1)\fi > \ifparameter#2\or(2:#2)\fi > \ifparameter#3\or(3:#3)\fi > \ifparameter#4\or(4:#4)\fi > \ifparameter#5\or[5:#5]\fi} > > \startbuffer > \mycommand{aa}{bb}{cc} > \mycommand{aa}{bb}{cc}{dd} > \mycommand{aa}{bb}{cc}{dd}[ee] > \mycommand{aa}{bb}{cc} > \mycommand{aa}{bb}{cc}{dd} > \mycommand{aa}{bb}{cc}{dd}[ee] > \stopbuffer > > \typebuffer > > \startlines \getbuffer \stoplines > > \stoptext > > I'm not saying that it's the best solution, you can add \protected in front > of the \def if needed. > > Hans Thanks Hans, This works well. I'll try and add something to the Wiki but I don't understand how #: does what it does. Regards, — Bruce Horrocks Hampshire, UK ___ 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] \unit parser ignoring case, in some cases.
On 3/13/2023 10:55 PM, Gavin wrote: On Mar 13, 2023, at 3:44 PM, Hans Hagen via ntg-context wrote: On 3/9/2023 2:04 PM, Gavin via ntg-context wrote: \startformula \unit{3 meter} \qquad \unit{6 Meter} \qquad \unit{3 mEtEr} \qquad \stopformula Units with lowercase prefixes (c, k, n). \startformula \unit{3cm} \qquad \unit{6kg} \qquad \unit{3ns} \qquad \stopformula Units with capital letters, called with names (coulomb, kelvin, newton). \startformula \unit{3 coulomb} \qquad \unit{6 kelvin} \qquad \unit{3 newton} \qquad \stopformula you can look at phys-dim and see plenty of short and long keys and making all case insensitive is asking for troubles Indeed, I would like to make NONE of them case insensitive. But currently, when I register an upper case key (C=coulomb) it messes up the lower case prefix (“cm" gets typeset as C•m). I was expecting the parser to distinguish between the “C” and “c”, but it doesn’t. Is that intended? I added an option and an extra registers but it's up to you to decide hwo to use it (and how to deal with conflicts in definitions). \registerunit [unit] [Point=PT, point=pt, Basepoint=BP, % basepoint=bp, ] \registerunitshortcut [unit] [C=coulomb] \startlines 10 \unit {square meter per second} 10 \unit {square Meter per Second} 10 \unit {point} 10 \unit {Point} 10 \unit {basepoint} 10 \unit {Basepoint} 10 \unit {C} \stoplines \setupunit[unit][option=keep] \startlines 10 \unit {square meter per second} 10 \unit {square Meter per Second} 10 \unit {point} 10 \unit {Point} 10 \unit {basepoint} 10 \unit {Basepoint} 10 \unit {C} \stoplines - 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] How to extend an existing macro to take optional parameters?
On 3/12/2023 2:24 PM, Bruce Horrocks via ntg-context wrote: I have an existing macro that I'd like to extend. The current definition is \define[3]\mycommand{...} which I'd like to extend to take an optional 4th parameter plus an optional setup parameter. Thus I currently invoke it as: \mycommand{aa}{bb}{cc} and I'd like to be able to extend it so that any of the following can be used: \mycommand{aa}{bb}{cc} \mycommand{aa}{bb}{cc}{dd} \mycommand{aa}{bb}{cc}{dd}[ee] or \mycommand[ee]{aa}{bb}{cc}{dd} % if this is more the ConTeXt way where {dd} is the optional extra parameter and, if it is present, then [ee] can also be optionally added (because it controls how {dd} is printed). If it helps, the actual body of the macro can easily be a call to Lua so it's fine if the function takes 5 params where 4 and 5 can be nil or empty strings. I've trawled through syst-aux.mkiv but it only covers optional numbers of [ ] or { } but not combinations of both (which given the vast numbers of combinations is perhaps not surprising!). Have I missed something obvious that would help me? So, four optional with mandate {} plus a fallback to an optional [] \starttext \tolerant\def\mycommand#=#=#=#=#:[#5]% {\ifparameter#1\or(1:#1)\fi \ifparameter#2\or(2:#2)\fi \ifparameter#3\or(3:#3)\fi \ifparameter#4\or(4:#4)\fi \ifparameter#5\or[5:#5]\fi} \startbuffer \mycommand{aa}{bb}{cc} \mycommand{aa}{bb}{cc}{dd} \mycommand{aa}{bb}{cc}{dd}[ee] \mycommand{aa}{bb}{cc} \mycommand{aa}{bb}{cc}{dd} \mycommand{aa}{bb}{cc}{dd}[ee] \stopbuffer \typebuffer \startlines \getbuffer \stoplines \stoptext I'm not saying that it's the best solution, you can add \protected in front of the \def if needed. 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] [ TEXpage empty lines ]
On 3/8/23 16:24, Floris van Manen via ntg-context wrote: >> \startlines > > thanks! > and it saves a lot of extra typing as well Hi Floris, this might also do the trick: \starttext \startTEXpage[offset=10mm] een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \null\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \null\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \stopTEXpage \stoptext Although Hans knows best. 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] [ TEXpage empty lines ]
\startlines thanks! and it saves a lot of extra typing as well .F ___ 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] [ TEXpage empty lines ]
On 3/8/2023 9:29 AM, Floris van Manen via ntg-context wrote: Does any one know an answer? When wrapping a page in \startTEXpage the empty lines disappear. There is probably a reason to it. Any hints as to remove that difference? .Floris e.g. \starttext een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \stoptext vs \starttext \startTEXpage[offset=10mm] een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ een twee drie vier vijf zes zeven\\ \stopTEXpage \stoptext \starttext \startlines een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven \stoplines \startTEXpage[offset=10mm] \startlines een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven een twee drie vier vijf zes zeven \stoplines \stopTEXpage \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] Problem using \scale
On 2/9/2023 10:42 PM, Bruce Horrocks via ntg-context wrote: I'm printing address labels. Sometimes an address has a long line that is too long to fit on the label with the result that it wraps. Instead of wrapping, I thought it would be nice to try and auto-scale the label and shrink it so that the long line just fits. I'm using \crlf to break the address into lines and this doesn't play well with the \scale command, see MWE below, where the second frame is just one long line as the \crlf's seem to be ignored. Is there a simple solution that allows \crlf and also scale? \starttext \startbuffer[address] Name \crlf Address 1 \crlf A long line that wraps \crlf Town \crlf Postcode \stopbuffer \framed[width=3cm,align=flushleft]{\getbuffer[address]} \framed[width=3cm,align=flushleft]{\scale[factor=fit]{\getbuffer[address]}} \stoptext \starttext \startbuffer[address] Name Address 1 A long line that wraps Town Postcode \stopbuffer \framed [align=flushleft,strut=no] {\startlines[before=,after=] \getbuffer[address] \stoplines} \scale [width=3cm] {\framed [align=flushleft,strut=no] {\startlines[before=,after=] \getbuffer[address] \stoplines}} \stoptext You can of course adapt the font size instead but as it's just stickers the above is probably good enough, but you can do this: \begingroup \doloop { \setbox\scratchbox\hbox\bgroup\framed [align={flushleft},strut=no] {\startlines[before=,after=] \getbuffer[address] \stoplines} \egroup \ifdim\wd\scratchbox>3cm \advance\glyphscale by -50 \else \box\scratchbox \exitloop \fi } \endgroup to get more consistent stepwise scaling or even this: \begingroup \doloop { \setbox\scratchbox\hbox\bgroup\framed [align={flushleft},strut=no] {\startlines[before=,after=] \getbuffer[address] \stoplines} \egroup \ifdim\wd\scratchbox>3cm \advance\glyphxscale by -50 \else \framed [align={flushleft},strut=no,width=3cm] {\startlines[before=,after=] \getbuffer[address] \stoplines} \exitloop \fi } \endgroup which is what i might choose eventually (i'll add it to the test 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://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] Spacing issue with \digits in math mode
Hi list, I have been trying to understand the workings of the \unit command, which is producing strange spacing in math mode. In an effort to be more systematic, I began by investigating the related \digit command. \digit works well in text, but in math mode the comma separators produce unwanted space. \digits {12,345.67} vs.\ $\digits {12,345.67}$ Below is a one page test document, derived from the code in phys-dim.mkxl. I think a simple fix would be to treat the comma as “ord” inside a number, but I don’t know if that is easy or not. I’d also like the space removed from around the “x" in scientific notation, which might be accomplished the same way. Thanks for all the work on spacing in math! Gavin \setuppapersize[A4] \showmakeup[mathglue] %\mathspacingmode=1 \starttext Digits in math mode have problems with comma separators. \startbuffer 10 \setdigitmode {1} \setdigitorder{0} $\digits {12,345.67e89}$ 20 \setdigitmode {2} \setdigitorder{0} $\digits {12,345.67e89}$ 30 \setdigitmode {3} \setdigitorder{0} $\digits {12,345.67e89}$ 40 \setdigitmode {4} \setdigitorder{0} $\digits {12,345.67e89}$ 50 \setdigitmode {5} \setdigitorder{0} $\digits {12,345.67e89}$ 60 \setdigitmode {6} \setdigitorder{0} $\digits {12,345.67e89}$ 11 \setdigitmode {1} \setdigitorder{1} $\digits {12,345.67e89}$ 21 \setdigitmode {2} \setdigitorder{1} $\digits {12,345.67e89}$ 31 \setdigitmode {3} \setdigitorder{1} $\digits {12,345.67e89}$ 41 \setdigitmode {4} \setdigitorder{1} $\digits {12,345.67e89}$ 51 \setdigitmode {5} \setdigitorder{1} $\digits {12,345.67e89}$ 61 \setdigitmode {6} \setdigitorder{1} $\digits {12,345.67e89}$ \stopbuffer \typebuffer This is typeset as: \startlines \getbuffer \stoplines In text, the \type{\digits} command works fine: \setdigitmode {2}\setdigitorder{0}\digits{12,345.67e89}. \blank Suggestion: Within \type{\digits} (and probably \type{\units}) the comma could be an \quotation{ord} rather than a \quotation{pun}. This appears to be how the period is handled. \blank I personally think the space around the \quotation{$\times$} is excessive, especially when the number is in a formula. \startformula \digits {12,345.67e89} + \digits {12,345.67e89} \stopformula I would like the \quotation{$\times$} to also be an \quotation{ord} when used for scientific notation. \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
> -Ursprüngliche Nachricht- > Von: Hans Hagen > Gesendet: Dienstag, 30. August 2022 14:31 > An: Maier, Denis Christian (UB) ; mailing list for > ConTeXt users > Betreff: Re: AW: [NTG-context] Parallel texts: verse with blanks between > stanzas via tabulate > > On 8/30/2022 1:40 PM, denis.ma...@unibe.ch wrote: > > > Thanks for the updated version. So, that means the basic restriction > > is that blanks will need to be inserted between rows, right? We cannot > > have to two completely independent formatted poems, right? (For > > reference, see the attached PNG. This was done with paragraphs, and > > works as longs as this stays on a single page. One is one long stanza, > > the other one consists of multiple smaller stanzas.) > You need to be more prececise in defining what you want .. this example is not > a parallel obe right? Just two columns. > Sorry for not being precise enough. I'm not sure I understand. This example shows two poems side by side. Both are totally different in structure. One has a heading, and consists of multiple paragraphs. The other is just one long stanza. Until now, I've used tabulate for these kind of sidebyside texts. Usually there are not poems, just regular paragraphs, but with poems I've realized that blanks seem not be supported in individual table cells. Denis \startbuffer[lines1] \startlines[inbetween={\blank}] this is a poem with one longer stanza \stoplines \stopbuffer \startbuffer[lines2] \startlines[inbetween={\blank}] this is a poem with some stanzas here is another one and another one \stoplines \stopbuffer \starttext Just the buffers. One: \getbuffer[lines1] Two: \getbuffer[lines2] Via paragraphs \defineparagraphs[paraverse][n=2 ] \setupparagraphs[paraverse][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] \startparaverse \getbuffer[lines1] \nextparaverse \getbuffer[lines2] \stopparaverse Via tabulate \starttabulate[|p|p|] \NC \getbuffer[lines1] \NC \getbuffer[lines2] \NC\NR \stoptabulate \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
Thanks, Wolfgang. That gives me a blank between the verses. However the blank is rather huge and I don't see how I could make it smaller? Is it possible to do this? Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Wolfgang > Schuster via ntg-context > Gesendet: Samstag, 27. August 2022 09:27 > An: mailing list for ConTeXt users > Cc: Wolfgang Schuster > Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas > via tabulate > > Denis Maier via ntg-context schrieb am 27.08.2022 um 09:17: > > Thanks. I'll try that. But, iirc, these had some other drawbacks I'll > > check > if it works for my use case. > > > > Is there a way to have blanks in the tabulate? > > \startlines[inbetween={\dontleavehmode\crlf}] > ... > > Wolfgang > > __ > _ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg- > context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive > : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > __ > _ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Henning > Hraban Ramm via ntg-context > Gesendet: Freitag, 26. August 2022 23:27 > An: Denis Maier via ntg-context > Cc: Henning Hraban Ramm > Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas > via tabulate > > Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context: > > Hi, > > > > I need to typeset two poems side by side. Usually, I use the tabulate > > environment for typesetting parallel texts. However, for poems this > > does not quite work as tabulate does not seem to allow blanks between > > the stanzas. See MWE below. Am I missing someting? Is there a better > > way to achieve this? > > How about columnsets or paragraphs? > > \definecolumnset[Zwei][n=2] > \startcolumnset[Zwei] > \startlines > Starlight, star bright, > first star I see tonight; > \stoplines > \column > \startlines > I wish I may, I wish I might > have the wish I wish tonight. > \stoplines > \stopcolumnset > > > \defineparagraphs[Zwei][n=2] > \setupparagraphs[Zwei][1][ >width=.45\textwidth, distance=2em, >align={verytolerant,stretch}] > % width of 2nd column is calculated automatically > > \startZwei > ... > \nextZwei > ... > \stopZwei > > Ok, I've had a chance to look into this. Maybe I'm missing something, but paragraphs cannot be split across pages. Is that correct? That's a bit of a problem. As for columnsets, they seem to change the output routine for the entire page. Also not ideal in this case. Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
Denis Maier via ntg-context schrieb am 27.08.2022 um 09:17: Thanks. I'll try that. But, iirc, these had some other drawbacks I'll check if it works for my use case. Is there a way to have blanks in the tabulate? \startlines[inbetween={\dontleavehmode\crlf}] ... Wolfgang ___ 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] Parallel texts: verse with blanks between stanzas via tabulate
Thanks. I'll try that. But, iirc, these had some other drawbacks I'll check if it works for my use case. Is there a way to have blanks in the tabulate? Denis Von: ntg-context im Auftrag von Henning Hraban Ramm via ntg-context Gesendet: Freitag, 26. August 2022 23:26:56 An: Denis Maier via ntg-context Cc: Henning Hraban Ramm Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context: > Hi, > > I need to typeset two poems side by side. Usually, I use the tabulate > environment for typesetting parallel texts. However, for poems this does > not quite work as tabulate does not seem to allow blanks between the > stanzas. See MWE below. Am I missing someting? Is there a better way to > achieve this? How about columnsets or paragraphs? \definecolumnset[Zwei][n=2] \startcolumnset[Zwei] \startlines Starlight, star bright, first star I see tonight; \stoplines \column \startlines I wish I may, I wish I might have the wish I wish tonight. \stoplines \stopcolumnset \defineparagraphs[Zwei][n=2] \setupparagraphs[Zwei][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] % width of 2nd column is calculated automatically \startZwei ... \nextZwei ... \stopZwei Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context: Hi, I need to typeset two poems side by side. Usually, I use the tabulate environment for typesetting parallel texts. However, for poems this does not quite work as tabulate does not seem to allow blanks between the stanzas. See MWE below. Am I missing someting? Is there a better way to achieve this? How about columnsets or paragraphs? \definecolumnset[Zwei][n=2] \startcolumnset[Zwei] \startlines Starlight, star bright, first star I see tonight; \stoplines \column \startlines I wish I may, I wish I might have the wish I wish tonight. \stoplines \stopcolumnset \defineparagraphs[Zwei][n=2] \setupparagraphs[Zwei][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] % width of 2nd column is calculated automatically \startZwei ... \nextZwei ... \stopZwei 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 ___
[NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
Hi, I need to typeset two poems side by side. Usually, I use the tabulate environment for typesetting parallel texts. However, for poems this does not quite work as tabulate does not seem to allow blanks between the stanzas. See MWE below. Am I missing someting? Is there a better way to achieve this? Best, Denis %%% \startbuffer[lines] \startlines[after={\blank}] this is a poem with two stanzas \stoplines \stopbuffer \starttext With a blank between the stanzas: \getbuffer[lines] Without a blank between the stanzas: \starttabulate[|p|p|] \NC \getbuffer[lines] \NC \getbuffer[lines] \NC\NR \stoptabulate \stoptext %%% ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font fallbacks
Hi, I have used more than one fallback, but each fallback is for a different character range Denis Von: ntg-context im Auftrag von Henning Hraban Ramm via ntg-context Gesendet: Montag, 1. August 2022 19:42:51 An: Henning Hraban Ramm via ntg-context Cc: Henning Hraban Ramm Betreff: Re: [NTG-context] font fallbacks Nobody? I couldn’t find an example of more than one fallback, so I guess that’s not supported? Hraban Am 30.07.22 um 15:51 schrieb Henning Hraban Ramm via ntg-context: > Hi, > I thought I could use more than one fallback font, but as soon as I list > fallbacks, they stop working. > > In my example, I’d like to take all missing glyphs from Segoe UI > Symbols, and what’s still missing (emojis) from EmojiOneColor, > preferably without specifying the exact range. > > Additionally, I want to replace the tilde ~ of LM Modern: > > """ > \definefontfallback[seguiFB] >[file:seguisym.ttf] >[0x0-0xF] >[check=yes,force=no] > > \definefontfallback[emoneFB] >[name:EmojiOneColor] >[0x0-0xF] >[check=yes,force=no] > > % replace tilde in LM > \definefontfallback[tildeFB] >[file:seguisym.ttf] >[0x0007E-0x0007E] >[force=yes] > > > \starttypescript [start] >\definetypeface [start] [rm] [serif] [cambria] > [default][fallbacks={seguiFB,emoneFB}] >\definetypeface [start] [ss] [sans] [modern] > [default][fallbacks={seguiFB,emoneFB}] >\definetypeface [start] [tt] [mono] [modern] > [default][fallbacks={seguiFB,tildeFB,emoneFB}] >\definetypeface [start] [mm] [math] [modern] > [default][fallbacks={seguiFB,emoneFB}] > \stoptypescript > > > \setupbodyfont[start,rm,12pt] > > \starttext > > \Omega\ (Omega) and \aleph\ (Aleph) > > \startbuffer[example] > start missing characters: lmmono10-regular.otf > 7 U+00327 ̧ COMBINING CEDILLA > 7 U+00335 ̵ COMBINING SHORT STROKE OVERLAY >14 U+003B7 η GREEK SMALL LETTER ETA > 7 U+021A9 ↩ LEFTWARDS ARROW WITH HOOK > 350 U+02500 ─ BOX DRAWINGS LIGHT HORIZONTAL >98 U+02502 │ BOX DRAWINGS LIGHT VERTICAL >42 U+02514 └ BOX DRAWINGS LIGHT UP AND RIGHT > 133 U+0251C ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT > 154 U+02772 ❲ LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT > 154 U+02773 ❳ LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT >14 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE > stop missing characters > start missing characters: cambria.ttc > 9 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE > 9 U+0FFFD � REPLACEMENT CHARACTER > stop missing characters > start missing characters: cambriai.ttf > 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT > 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT > stop missing characters > \stopbuffer > > \typebuffer[example] > > \startlines > \getbuffer[example] > > {\ss\getbuffer[example]} > \stoplines > > \tex{abra}\arg{...} > \type{kadabra} \type{~~~} > > \stoptext > """ > > What’s wrong? > > Hraban > ___ > If your question is of interest to others as well, please add an entry > to the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font fallbacks
Nobody? I couldn’t find an example of more than one fallback, so I guess that’s not supported? Hraban Am 30.07.22 um 15:51 schrieb Henning Hraban Ramm via ntg-context: Hi, I thought I could use more than one fallback font, but as soon as I list fallbacks, they stop working. In my example, I’d like to take all missing glyphs from Segoe UI Symbols, and what’s still missing (emojis) from EmojiOneColor, preferably without specifying the exact range. Additionally, I want to replace the tilde ~ of LM Modern: """ \definefontfallback[seguiFB] [file:seguisym.ttf] [0x0-0xF] [check=yes,force=no] \definefontfallback[emoneFB] [name:EmojiOneColor] [0x0-0xF] [check=yes,force=no] % replace tilde in LM \definefontfallback[tildeFB] [file:seguisym.ttf] [0x0007E-0x0007E] [force=yes] \starttypescript [start] \definetypeface [start] [rm] [serif] [cambria] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [ss] [sans] [modern] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [tt] [mono] [modern] [default][fallbacks={seguiFB,tildeFB,emoneFB}] \definetypeface [start] [mm] [math] [modern] [default][fallbacks={seguiFB,emoneFB}] \stoptypescript \setupbodyfont[start,rm,12pt] \starttext \Omega\ (Omega) and \aleph\ (Aleph) \startbuffer[example] start missing characters: lmmono10-regular.otf 7 U+00327 ̧ COMBINING CEDILLA 7 U+00335 ̵ COMBINING SHORT STROKE OVERLAY 14 U+003B7 η GREEK SMALL LETTER ETA 7 U+021A9 ↩ LEFTWARDS ARROW WITH HOOK 350 U+02500 ─ BOX DRAWINGS LIGHT HORIZONTAL 98 U+02502 │ BOX DRAWINGS LIGHT VERTICAL 42 U+02514 └ BOX DRAWINGS LIGHT UP AND RIGHT 133 U+0251C ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT 154 U+02772 ❲ LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT 154 U+02773 ❳ LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT 14 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE stop missing characters start missing characters: cambria.ttc 9 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE 9 U+0FFFD � REPLACEMENT CHARACTER stop missing characters start missing characters: cambriai.ttf 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT stop missing characters \stopbuffer \typebuffer[example] \startlines \getbuffer[example] {\ss\getbuffer[example]} \stoplines \tex{abra}\arg{...} \type{kadabra} \type{~~~} \stoptext """ What’s wrong? Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] font fallbacks
Hi, I thought I could use more than one fallback font, but as soon as I list fallbacks, they stop working. In my example, I’d like to take all missing glyphs from Segoe UI Symbols, and what’s still missing (emojis) from EmojiOneColor, preferably without specifying the exact range. Additionally, I want to replace the tilde ~ of LM Modern: """ \definefontfallback[seguiFB] [file:seguisym.ttf] [0x0-0xF] [check=yes,force=no] \definefontfallback[emoneFB] [name:EmojiOneColor] [0x0-0xF] [check=yes,force=no] % replace tilde in LM \definefontfallback[tildeFB] [file:seguisym.ttf] [0x0007E-0x0007E] [force=yes] \starttypescript [start] \definetypeface [start] [rm] [serif] [cambria] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [ss] [sans] [modern] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [tt] [mono] [modern] [default][fallbacks={seguiFB,tildeFB,emoneFB}] \definetypeface [start] [mm] [math] [modern] [default][fallbacks={seguiFB,emoneFB}] \stoptypescript \setupbodyfont[start,rm,12pt] \starttext \Omega\ (Omega) and \aleph\ (Aleph) \startbuffer[example] start missing characters: lmmono10-regular.otf 7 U+00327 ̧ COMBINING CEDILLA 7 U+00335 ̵ COMBINING SHORT STROKE OVERLAY 14 U+003B7 η GREEK SMALL LETTER ETA 7 U+021A9 ↩ LEFTWARDS ARROW WITH HOOK 350 U+02500 ─ BOX DRAWINGS LIGHT HORIZONTAL 98 U+02502 │ BOX DRAWINGS LIGHT VERTICAL 42 U+02514 └ BOX DRAWINGS LIGHT UP AND RIGHT 133 U+0251C ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT 154 U+02772 ❲ LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT 154 U+02773 ❳ LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT 14 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE stop missing characters start missing characters: cambria.ttc 9 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE 9 U+0FFFD � REPLACEMENT CHARACTER stop missing characters start missing characters: cambriai.ttf 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT stop missing characters \stopbuffer \typebuffer[example] \startlines \getbuffer[example] {\ss\getbuffer[example]} \stoplines \tex{abra}\arg{...} \type{kadabra} \type{~~~} \stoptext """ What’s wrong? 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 ___
[NTG-context] can't accent/fake characters in euler font
Hello all, typesetting accented characters in eulernova font does not seem possible to me. Is it really impossible? The other math fonts (stix/xits) do it. I'm using Context LMTX 2022.01.21 20:13 \starttext \switchtobodyfont[eulernova] \startlines euler: 1 - č 2 - \ccaron 3 - \v{c} \stoplines \switchtobodyfont[stixtwo] \startlines stix: 1 - č 2 - \ccaron 3 - \v{c} \stoplines \stoptext In the end I'd like to be able to make more custom characters, e.g. Ĺ, ô, ä, ... therefore I wanted to read about how those could be made, but the wiki points to missing files: http://source.contextgarden.net/enco-acc.tex http://source.contextgarden.net/tex/context/base/enco-def.tex Any help appreciated, Andrej Badin ___ 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] process list items differently depending on position in list
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Hans Hagen > via ntg-context > Gesendet: Montag, 2. Mai 2022 12:34 > An: Denis Maier via ntg-context > Cc: Hans Hagen > Betreff: Re: [NTG-context] process list items differently depending on > position in list > > On 5/2/2022 12:09 PM, Denis Maier via ntg-context wrote: > > > But, it’d still love to hear whether there is a solution on the tex side. > \processtokens {[before]} {[between]} {[after]} {[space]} {{one}{two}{three}} > > \def\whatever{a,b,c,d} > > \getcommacommandsize[\whatever] > \scratchcounterone \zerocount > \scratchcountertwo \commalistsize > > \processcommacommand[\whatever] >{\advance\scratchcounterone\plusone > \ifnum\scratchcounterone=\scratchcountertwo > \space and\space > \orelse\ifnum\scratchcounterone>\plusone > ,\space > \fi > \commalistelement} Thanks. > > but ... there's also: > > \startlines > \commalistsentence[aap,noot,mies] > \commalistsentence[aap,noot] > \commalistsentence[aap] > \commalistsentence[a,b,c] > \commalistsentence[a,b,c][{ \& },{ and }] \commalistsentence[a,b,c][+,-] > \stoplines > > which uses presets like > > \setuplabeltext [nl] [and-1={{, }}, and-2={{ en }}] % 1, 2 en 3 > \setuplabeltext [en] [and-1={{, }}, and-2={{, }}] % 1, 2, 3 > \setuplabeltext [de] [and-1={{, }}, and-2={{ und }}] % 1, 2 und 3 > \setuplabeltext [hr] [and-1={{, }}, and-2={{ i }}]% 1, 2 i 3 > > maybe wikify I've just checked, \commalistsentence is already on the wiki, but you have to know it exists. (I'll check whether I can link to that page from somewhere.) But there's no (high-level) way to apply certain commands to this list elements, right? Background: My real use case is a bit more complex. I use comma separated lists to store author lists, but the authors themselves are saved in structured variables. So, I'll need to reassemble the different name parts first. So, nothing like \commalistprocessandmakesentence[a,b,c]\commandforfirst\commandforinbetween\commandforlast Probably to specific, right? \startbuffer[test] This is the title Doe John Smith Jane This is a first sentence \stopbuffer \startxmlsetups xml:setup \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{document|p}{xml:*} \stopxmlsetups \xmlregistersetup{xml:setup} \startxmlsetups xml:document \xmlfilter{#1}{/title/command(xml:title)} \xmlfilter{#1}{/author/command(xml:author)} \startdocument \xmlflush{#1} \stopdocument \stopxmlsetups \startxmlsetups xml:title \setupdocument[title={\xmlflush{#1}},author={\AuthorList}] \stopxmlsetups \startxmlsetups xml:author:family-name \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:author:given-name \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:author \defineauthor[\xmlfilter{#1}{/family-name/command(xml:author:family-name)}\xmlfilter{#1}{/given-name/command(xml:author:given-name)}][family-name={\xmlfilter{#1}{/family-name/command(xml:author:family-name)}},given-name={\xmlfilter{#1}{/given-name/command(xml:author:given-name)}}] \addtocommalist {\xmlfilter{#1}{/family-name/command(xml:author:family-name)}\xmlfilter{#1}{/given-name/command(xml:author:given-name)}} \AuthorList \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1}\par \stopxmlsetups \definenamespace [documentauthor] % name of internal varialbles [type=module, name=author, command=yes, % Create \defineauthor style=yes, % Create \useauthorstyleandcolor setup=list, % Create \setupauthor parent=documentauthor, ] \def\AuthorList{} \define[1]\useauthor {\edef\currentauthor{#1}% {\authorparameter{given-name} \space \authorparameter{family-name}}} \startsetups document:start \documentvariable{title}\endgraf \blank[medium] \processcommacommand[\documentvariable{author}]\useauthor \endgraf \stopsetups \xmlprocessbuffer{main}{test}{} ___ 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] process list items differently depending on position in list
On 5/2/2022 12:09 PM, Denis Maier via ntg-context wrote: But, it’d still love to hear whether there is a solution on the tex side. \processtokens {[before]} {[between]} {[after]} {[space]} {{one}{two}{three}} \def\whatever{a,b,c,d} \getcommacommandsize[\whatever] \scratchcounterone \zerocount \scratchcountertwo \commalistsize \processcommacommand[\whatever] {\advance\scratchcounterone\plusone \ifnum\scratchcounterone=\scratchcountertwo \space and\space \orelse\ifnum\scratchcounterone>\plusone ,\space \fi \commalistelement} but ... there's also: \startlines \commalistsentence[aap,noot,mies] \commalistsentence[aap,noot] \commalistsentence[aap] \commalistsentence[a,b,c] \commalistsentence[a,b,c][{ \& },{ and }] \commalistsentence[a,b,c][+,-] \stoplines which uses presets like \setuplabeltext [nl] [and-1={{, }}, and-2={{ en }}] % 1, 2 en 3 \setuplabeltext [en] [and-1={{, }}, and-2={{, }}] % 1, 2, 3 \setuplabeltext [de] [and-1={{, }}, and-2={{ und }}] % 1, 2 und 3 \setuplabeltext [hr] [and-1={{, }}, and-2={{ i }}]% 1, 2 i 3 maybe wikify - 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 ___
Re: [NTG-context] poetry \startlines and tab
On 1/12/2022 1:09 AM, jbf via ntg-context wrote: For poetry that has non-regular indentations, I simply \definelines[poem] and set that up the way I want, obviously, with \setuplines[poem] e.g. [before={\blank \setupinterlinespace[line=2.5ex]},after={\blank},indenting=first]. And then, but I guess it is still a hack, I use \hskip at a suitable dimension whenever I need indented lines: \startpoem This is line one, \hskip1em{This is line two} This is line three, \hskip1em{This is line four,} \hskip1em{This is line five.} \rightaligned{Poet's name} \stoppoem \quad - 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 ___
Re: [NTG-context] poetry \startlines and tab
For poetry that has non-regular indentations, I simply \definelines[poem] and set that up the way I want, obviously, with \setuplines[poem] e.g. [before={\blank \setupinterlinespace[line=2.5ex]},after={\blank},indenting=first]. And then, but I guess it is still a hack, I use \hskip at a suitable dimension whenever I need indented lines: \startpoem This is line one, \hskip1em{This is line two} This is line three, \hskip1em{This is line four,} \hskip1em{This is line five.} \rightaligned{Poet's name} \stoppoem Julian On 11/1/22 1:01 pm, Youssef Cherem via ntg-context wrote: Hello, I needed to typeset some poetry and noticed that \startlines[space=on] Some line with tab % doesn't work, no spaces added Some line with spaces %work \stoplines Is there a way to make the "tab" render the space "as is"? ___ 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] poetry \startlines and tab
On 1/11/2022 3:01 AM, Youssef Cherem via ntg-context wrote: Hello, I needed to typeset some poetry and noticed that \startlines[space=on] Some line with tab % doesn't work, no spaces added Some line with spaces %work \stoplines Is there a way to make the "tab" render the space "as is"? one can make the tab 'active' and have a meaning of say 2em but that's normally not what one does in tex ... btw, there are options for doing lines with odd/even indentation schemes a tab at the start of a line (when it can be recognized as such) could work but in the middle ... doable but still somewhat hackery because it involves position tracking 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 ___
Re: [NTG-context] How to let a macro check the previous value of #1 the last time the same macro was called?
On 1/11/2022 5:22 AM, Aditya Mahajan via ntg-context wrote: On Tue, 11 Jan 2022, Henning Hraban Ramm via ntg-context wrote: Am 10.01.22 um 20:21 schrieb Wolfgang Schuster: Henning Hraban Ramm via ntg-context schrieb am 10.01.2022 um 09:52: Would it make more sense, or would it be “cleaner” to use a variable? You can get rid of the temp variable before the command definition but now you have to access it with a different method in \mymacro, below is one way (LMTX only) but \setvariable and \getvariable work as well. \define[1]\mymacro {\iftok{#1}{\getvalue{previousmymacro}}% same as last time \else it is different from last time \fi \setvalue{previousmymacro}{#1}} That was the approach that I meant. Thank you. But would you consider one way to be better? Just for fun: lua code \startluacode local previous = nil interfaces.implement { name = "mymacro", public = true, arguments = "string", actions = function (current) if current == previous then context("same as last time") else context("Different!") end previous = current end, } \stopluacode \starttext \startlines cat: \mymacro{cat} cat: \mymacro{cat} mouse: \mymacro{mouse} mouse: \mymacro{mouse} cat: \mymacro{cat} \stoplines \stoptext keep in mind that what you do is global (probably what one wants here): \startlines cat: \mymacro{cat} cat: \mymacro{cat} {mouse: \mymacro{mouse}} {mouse: \mymacro{mouse}} cat: \mymacro{cat} \stoplines - 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 ___
Re: [NTG-context] How to let a macro check the previous value of #1 the last time the same macro was called?
On Tue, 11 Jan 2022, Henning Hraban Ramm via ntg-context wrote: > Am 10.01.22 um 20:21 schrieb Wolfgang Schuster: > > Henning Hraban Ramm via ntg-context schrieb am 10.01.2022 um 09:52: > >> Would it make more sense, or would it be “cleaner” to use a variable? > > > > You can get rid of the temp variable before the command definition but > > now you have to access it with a different method in \mymacro, below is > > one way (LMTX only) but \setvariable and \getvariable work as well. > > > > \define[1]\mymacro > > {\iftok{#1}{\getvalue{previousmymacro}}% > > same as last time > > \else > > it is different from last time > > \fi > > \setvalue{previousmymacro}{#1}} > > That was the approach that I meant. Thank you. > > But would you consider one way to be better? Just for fun: lua code \startluacode local previous = nil interfaces.implement { name = "mymacro", public = true, arguments = "string", actions = function (current) if current == previous then context("same as last time") else context("Different!") end previous = current end, } \stopluacode \starttext \startlines cat: \mymacro{cat} cat: \mymacro{cat} mouse: \mymacro{mouse} mouse: \mymacro{mouse} cat: \mymacro{cat} \stoplines \stoptext Aditya___ 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] poetry \startlines and tab
Hello, I needed to typeset some poetry and noticed that \startlines[space=on] Some line with tab % doesn't work, no spaces added Some line with spaces %work \stoplines Is there a way to make the "tab" render the space "as is"? ___ 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 let a macro check the previous value of #1 the last time the same macro was called?
Joel via ntg-context schrieb am 09.01.2022 um 15:16: Is there a way for a macro to check the previous value of #1, the last time that same macro was called? Here is a minimum working example, pretending that `\previousvalue` is equal to #1 from the last time the same macro was called: [...] To check is the current value differs from the last one you need a temp macro where you store the current value at the end of your command to check it in the next call. \let\previousmymacro\empty \define[1]\mymacro {\edef\currentmymacro{#1}% \ifx\previousmymacro\currentmymacro same as last time \else it is different from last time \fi \let\previousmymacro\currentmymacro} \starttext \startlines cat: \mymacro{cat} cat: \mymacro{cat} mouse: \mymacro{mouse} mouse: \mymacro{mouse} cat: \mymacro{cat} \stoplines \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 ___
[NTG-context] zint doesn’t work in "lines"
Hi, while the zint module generally works well, I run into "TeX capacity exceeded" as soon as I try a barcode within \startlines ... \stoplines: \usemodule[zint] \starttext \startlines My homepage: \barcode[alternative=qr code,text={www.fiee.net},width=2.5cm] \stoplines \stoptext What’s wrong? 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 ___
Re: [NTG-context] startlines with long lines that break and indent
Rik, Wolfgang – thanks a lot. So simple. I wikified it. 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 ___
Re: [NTG-context] startlines with long lines that break and indent
juh via ntg-context schrieb am 26.12.2021 um 17:36: Hi all, I am looking for a way to make startstoplines likes this: This is a long line that breaks, the second line, the third line. So if a line in the poem is too long it shall break and indent. Short version: \setuplines [ before={\blank\startnarrow[default=left,left=1cm]}, after={\stopnarrow\blank}, indenting={yes,-1cm}] \showframe[text][text] \starttext before \startlines text \dorecurse{10}{ text} text \dorecurse{40}{ text} text \dorecurse{10}{ text} \stoplines after \stoptext Long version: \definemeasure[Indentation][1cm] \definenarrower [LinesIndentation] [ before=\blank, after=\blank, default=left, left=\measure{Indentation}] \definelines [Poem] [ before=\startLinesIndentation, after=\stopLinesIndentation, indenting={yes,-\measure{Indentation}}] \showframe[text][text] \starttext before \startPoem text \dorecurse{10}{ text} text \dorecurse{40}{ text} text \dorecurse{10}{ text} \stopPoem after \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 ___
Re: [NTG-context] startlines with long lines that break and indent
On 2021-12-26 11:36, juh via ntg-context wrote: Hi all, I am looking for a way to make startstoplines likes this: This is a long line that breaks, the second line, the third line. So if a line in the poem is too long it shall break and indent. TIA juh You can play with something based on the following, which I made it following suggestions from others. There may well be other ways, but this works for me. \define\Poemindent{3em} \define\Poeminset{14em} \definedelimitedtext[Poe] \setupwhitespace[medium] \showframe \startbuffer[Poem] This is a long line that breaks, the second line, the third line. The second stanza starts. \stopbuffer \setupdelimitedtext[Poe][ rightmargin=\Poeminset, leftmargin={\dimexpr\Poemindent+\Poeminset\relax}, before={\setuplines[ before=, inbetween={\blank[small]}, after=, ] \startlines \setupindenting[-\Poemindent,yes] \startparagraph}, after=\stopparagraph \stoplines, ] \starttext \startparagraph Here comes a poem – watch the lines break! \stopparagraph \startPoe \inlinebuffer[Poem] \stopPoe \startparagraph Now, it is gone. Good-bye. \stopparagraph \stoptext -- Rik ___ 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] startlines with long lines that break and indent
Hi all, I am looking for a way to make startstoplines likes this: This is a long line that breaks, the second line, the third line. So if a line in the poem is too long it shall break and indent. TIA 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 ___
Re: [NTG-context] Question on style-italic vs style=italicface
Rik Kabel via ntg-context schrieb am 27.09.2021 um 00:20: On 9/26/2021 16:29, Wolfgang Schuster via ntg-context wrote: Rik Kabel via ntg-context schrieb am 26.09.2021 um 22:13: Hello list mavens, What are the circumstances under which style=italicface should be used instead of style=italic. I note a difference when I define highlighting. I expected to see no difference in the line before and line after the hairline the example below, but see that italicface adapts to nesting, while italic does not: Are there other places where this makes a difference? \setupbodyfontenvironment [default] [em=italicface] %same with italic for this example \definehighlight [emIt] [style=italic] \definehighlight [emIf] [style=italicface] \definehighlight [emEm] [style=\em] \starttext {\em abc {\em def} ghi}: \type{\em} \emph{abc {\emph def} ghi}: \type{\emph} \emEm{abc {\emEm def} ghi}: \type{\emEm \definehighlight[style=\em]} \emIf{abc {\emIf def} ghi}: \type{\emIf \definehighlight[style=italicface]} \hairline \emIt{abc {\emIt def} ghi}: \type{\emIt \definehighlight[style=italic]} \stoptext The \em command has two special values which are allowed when you change the style with \setupbodyfontenvironment[default][em=...] with the value "slanted" and "italic". When you choose one of them the result depends on the current weight (\tf or \bf) but with every other value you're just using whatever the style command/name provides. When you pass "italicface" you're using a style which uses either \it or \bi dependant on the current weight. The result from the "italic" value doesn't depend on the behavior or the normal italic style (\it) which is the reason why you get different result when you use \em compared with \it. Example: \starttext \tex{it}: normal {\it italic} {\bf bold {\it italic}} \tex{italicface}: normal {\italicface italic} {\bf bold {\italicface italic}} \tex{em}: normal {\em italic} {\bf bold {\em italic}} \stoptext Wolfgang Wolfgang, I understand that mechanism, but I am asking a different question, I think. When we specify style=\em or style=italic (and most examples I see use the later) in a setup of some sort, I think most folks expect similar behavior, but clearly it is not because italic does not track changes in emphasis. However, style=italicface does seem to match the behavior of style=\em (mostly, see the bug report below). The basic font commands are \tf, \it, \sl, \bf, \bs and \bi and when you want for example bold italic text you always have to use \bi even the current text is already bold because \it produces normal italic text. \em is a special case because it affects also italic text: \starttext \startlines \tf normal {\em emphasized} \sl slanted {\em emphasized} \it italic {\em emphasized} \bf bold {\em emphasized} \bs bold slanted {\em emphasized} \bi bold italic {\em emphasized} \stoplines \stoptext So, I am asking whether, in places where folks often use style=italic, it might be better to consider style=italicface. Bug report: \meaning\italicface gives: protected macro:\relax \ifx \fontalternative \s!tf \it \orelse \ifx \fontalternative \s!bf \bi \else \tf \fi This leaves out the transition from bi to bf. That transition is done by \emph, but \emph may give slanted while \italicface is always italic. The \italicface command uses either \it or \bi as result but it never result in upright text and the "italic" in the name tells you this, there are commands (e.g. \boldface) with similar results. To get a slanted style you have to use the \slantedface command. 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 ___
Re: [NTG-context] nil from TeX to Lua
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. That is not the case: $ echo 'print("" == nil)' | lua false > This is not always wanted, for example when one needs to place either a nil > or an empty string into a Lua table. I am running in trouble when to t.key > set to \Macro{} should become nil or when it should become "". If you call luafunction(""), the string is empty and not nil. \startluacode userdata = userdata or {} function userdata.macro(str) if str == nil then context("Argument is nil") elseif str == "" then context("Argument is empty") else context("Argument is %s", str) end end \stopluacode \define[1]\Macro{\ctxlua{userdata.macro([==[#1]==])}} \starttext \startlines \Macro{} \Macro{ABC} \ctxlua{userdata.macro()} \stoplines \stoptext Aditya ___ 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] small lmtx update
Hi, In the perspective of fancyfying context I made an alternative rendering for missing glyphs (and in the process also made the visualization italic and bold aware which is of course feature creepifying). \replacemissingcharacters \startbuffer \startlines[before=,after=] \strut {\tf test \char 12345\ test \char 12346\ test} \strut {\bf test \char 12345\ test \char 12346\ test} \strut {\it test \char 12345\ test \char 12346\ test} \strut {\bi test \char 12345\ test \char 12346\ test} \strut {test ὀ ρ φ α ν ῖ ο ς test} \stoplines \stopbuffer \starttext \startTEXpage[offset=2pt,strut=no] \getbuffer \switchtobodyfont[pagella] \getbuffer \switchtobodyfont[dejavu] \getbuffer \stopTEXpage \stoptext This is dedicated to Jano who wants to be able to search and these are proper glyphs (so one can search, assuming a sane viewer). It also fits the "new mechanisms should reduce code" bill, 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 ___
Re: [NTG-context] basic issues with formulas
Andres Conrado Montoya schrieb am 03.12.2020 um 21:58: Hi pablo, regaring 1) TeX assumes that each character is a variable on math mode. You need to tell it that each "word" is, well, a "word": \starttext \startitemize[packed] \item Valor actual neto: $\text{\em beneficios} - \text{\em costes}$. % you can use typographical variations inside \text: \em, \bf, etc \item Beneficio por euro: $\frac{\text{\em beneficios}}{\text{\em costes}}$. \item Beneficio obtenido el primer año. \stopitemize \stoptext There are additional commands for italic, bold etc. text \starttext \startlines $\mathtexttf{upright text}$ $\mathtextit{italic text}$ $\mathtextsl{slanted text}$ $\mathtextbf{bold text}$ $\mathtextbi{bolditalic text}$ $\mathtextbs{boldslanted text}$ \stoplines \startlines $\mathwordtf{upright word}$ $\mathwordit{italic word}$ $\mathwordsl{slanted word}$ $\mathwordbf{bold word}$ $\mathwordbi{bolditalic word}$ $\mathwordbs{boldslanted word}$ \stoplines \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 ___
Re: [NTG-context] LMTX MkIV difference in expansion
On 11/21/2020 10:05, Wolfgang Schuster wrote: Rik Kabel schrieb am 20.11.2020 um 00:18: You are right about not quite understand. There are cases where you want to pass a command to another command as it is without replacing it with its content, e.g. when you store the \TeX logo in the table of content the \TeX command should be written in the register and not the content of the command. In the following example the first line prints the definition of the \TeX logo but in many cases you ant to preserve the command as in the second line. \starttext \tex{TeX} = \detokenize\expandafter{\TeX} \blank \tex{TeX} = \detokenize{\TeX} \stoptext To make it easier to keep the command eTeX added a new command \protected which can be used before \def to achieve this (ConTeXt provides the same thing under the name \unexpanded). The following example shows how you can use \protected\def to keep always the current meaning of \foo when you print the content of \bar. \starttext \def\foo{foo} \edef\bar{\foo} \def\foo{bar} \startlines bar=\bar foo=\foo \stoplines \blank \protected\def\foo{foo} \edef\bar{\foo} \protected\def\foo{bar} \startlines bar=\bar foo=\foo \stoplines \stoptext A problem in older TeX engines is that \csname ...\endcsname didn't respect this protection and replaced the protected command with its content, recently Hans changed this behavior in LMTX which lead to the error message in your document. Does this mean that I can have the same definitions in MkIV and LMTX (after some future update), or should I hunt down the \defines in both, or that I should fork (or mode test) my source environment files, one set for LMTX and one for MkIV? When you use \define to store arguments which are passed as arguments to other command you have to change this to \defineexpandable but its best to do this in MkIV and LMTX because protected commands are the wrong thing in this case. Even though it would work in MkIV in some cases you run into problems when you pass argument to Lua. Wolfgang Thank you, Wolfgang, for the explanation and examples. I have in fact already gone through and replaced the impacted occurrences of \define with \defineexpandable. LMTX made it easy to identify them. -- Rik ___ 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] LMTX MkIV difference in expansion
Rik Kabel schrieb am 20.11.2020 um 00:18: You are right about not quite understand. There are cases where you want to pass a command to another command as it is without replacing it with its content, e.g. when you store the \TeX logo in the table of content the \TeX command should be written in the register and not the content of the command. In the following example the first line prints the definition of the \TeX logo but in many cases you ant to preserve the command as in the second line. \starttext \tex{TeX} = \detokenize\expandafter{\TeX} \blank \tex{TeX} = \detokenize{\TeX} \stoptext To make it easier to keep the command eTeX added a new command \protected which can be used before \def to achieve this (ConTeXt provides the same thing under the name \unexpanded). The following example shows how you can use \protected\def to keep always the current meaning of \foo when you print the content of \bar. \starttext \def\foo{foo} \edef\bar{\foo} \def\foo{bar} \startlines bar=\bar foo=\foo \stoplines \blank \protected\def\foo{foo} \edef\bar{\foo} \protected\def\foo{bar} \startlines bar=\bar foo=\foo \stoplines \stoptext A problem in older TeX engines is that \csname ...\endcsname didn't respect this protection and replaced the protected command with its content, recently Hans changed this behavior in LMTX which lead to the error message in your document. Does this mean that I can have the same definitions in MkIV and LMTX (after some future update), or should I hunt down the \defines in both, or that I should fork (or mode test) my source environment files, one set for LMTX and one for MkIV? When you use \define to store arguments which are passed as arguments to other command you have to change this to \defineexpandable but its best to do this in MkIV and LMTX because protected commands are the wrong thing in this case. Even though it would work in MkIV in some cases you run into problems when you pass argument to Lua. 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 ___
Re: [NTG-context] removing word in filtered XML
On 8/20/20 1:10 PM, Hans Hagen wrote: > On 8/20/2020 12:38 PM, Pablo Rodriguez wrote: >> [...] >> This time, I have to remove two words, such as in: >> >>string.gsub([[\xmlraw{#1}{.}]]," del ", " "):gsub(" de la ", " ")} >> >> But they could be more (and replacements might be added to that list). >> >> Is there a more elegant way than appending :gsub()? >> >> Is there also a proper way for word scanning? >> >> A "word" can be "Word ", " word " " word." " word?" (and so on). I would >> like to avoid having to code all combinations (of course, if this were >> already available). > > old stuff present for a long time ... probaly documented somewhere ... > if not than you have to wikify it ... Many thanks for your reply, Hans. It is already wikified (https://wiki.contextgarden.net/Ligatures#Replacements). I wonder whether \replaceword could be extended to replace multiple words and also to remove them. \starttext \replaceword[whatever][this or][no] \replaceword[whatever][that][] \startlines it is this or that {\setreplacements[whatever]it is this or that} {\setreplacements[whatever]it is this or that} it is this or that \stoplines \stoptext 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 ___
Re: [NTG-context] removing word in filtered XML
On 8/20/2020 12:38 PM, Pablo Rodriguez wrote: On 8/20/20 11:27 AM, Hans Hagen wrote: On 8/19/2020 6:10 PM, Pablo Rodriguez wrote: [...] Is there any way to remove " of " and " of the " in the filtered content (xml:special)? Sorry, Lua code is crap for sure. [...] \startxmlsetups xml:initialize \xmlsetsetup{#1}{html}{xml:gen} \xmlsetsetup{#1}{span[@class='special']}{xml:span:special} \stopxmlsetups [...] \startxmlsetups xml:span:special (\cldcontext{(string.gsub([[\xmlraw{#1}{.}]]," of the ", ""))}) \stopxmlsetups Many thanks for your reply, Hans. I now see that \xmlraw is the way to go. I have two questions in word replacement and Lua (maybe there is some lpeg magic that could be used). This time, I have to remove two words, such as in: string.gsub([[\xmlraw{#1}{.}]]," del ", " "):gsub(" de la ", " ")} But they could be more (and replacements might be added to that list). Is there a more elegant way than appending :gsub()? Is there also a proper way for word scanning? A "word" can be "Word ", " word " " word." " word?" (and so on). I would like to avoid having to code all combinations (of course, if this were already available). old stuff present for a long time ... probaly documented somewhere ... if not than you have to wikify it ... \starttext \replaceword[whatever][this][that] \replaceword[whatever][that][this] \startlines it is this or that {\setreplacements[whatever]it is this or that} it is this or that \stoplines \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 / 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] new upload
Hi, I uploaded a new lmtx ... not much done due to the heat (entered reading mode instead) but ... apart from some work in progress ... we now have some basic bitwise operations (maybe we need some more). So far we have: \startlines \meaning\bitwiseset \meaning\bitwisenot \meaning\bitwisenil \meaning\bitwiseand \meaning\bitwiseor \meaning\bitwisexor \meaning\ifbitwiseand \stoplines used as: \scratchcounter = \bitwiseand "01 "02 \uchexnumbers{\scratchcounter} \quad \scratchcounter = \bitwiseand "01 with "02 \uchexnumbers{\scratchcounter} \quad \scratchcounter = \bitwiseand "03 "02 \uchexnumbers{\scratchcounter} \par \scratchcounter = \bitwiseor "01 "02 \uchexnumbers{\scratchcounter} \quad \scratchcounter = \bitwiseor "01 with "02 \uchexnumbers{\scratchcounter} \quad \scratchcounter = \bitwiseor "03 "02 \uchexnumbers{\scratchcounter} \par \scratchcounter = \bitwisexor "01 "02 \uchexnumbers{\scratchcounter} \quad \scratchcounter = \bitwisexor "01 with "02 \uchexnumbers{\scratchcounter} \quad \scratchcounter = \bitwisexor "03 "02 \uchexnumbers{\scratchcounter} \par \scratchcounter = \bitwisenil \bitwisenil "0F "02 "01 \uchexnumbers{\scratchcounter} \par \scratchcounter = \bitwisenil \bitwisenil "0F with "02 with "01 \uchexnumbers{\scratchcounter} \par \scratchcounterone\zerocount \scratchcounterone \bitwiseset "FFF \ifbitwiseand \scratchcounterone "800 YES \else NOP \fi \ifbitwiseand \scratchcounterone "F00 YES \else NOP \fi \ifbitwiseand \scratchcounterone "100 YES \else NOP \fi \scratchcounterone \bitwisenot \scratchcounterone \ifbitwiseand \scratchcounterone "800 YES \else NOP \fi \ifbitwiseand \scratchcounterone "F00 YES \else NOP \fi \ifbitwiseand \scratchcounterone "100 YES \else NOP \fi \scratchcounter \bitwiseand "01 "02 \scratchcounter \numexpr"01+"02\relax \ifcase \bitwiseand \scratchcounterone \plusone \else \fi \ifbitwiseand\scratchcounterone \plusone \else \fi \ifnum \scratchcounterone=\plusone \else \fi A while ago I played with bitwise operator sin \numexpr but in the end removed that because it's messy with the symbols to be used, but I will look at that agaon if needed. 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 ___
Re: [NTG-context] Alphabet & color
Ok, after changing the glyph names in colorfont.lfg things run smoothly but for six glyphs: uacute, ucircumflex, udieresis, Uacute, Ucircumflex, Udieresis Have I hit a bug? Regards, Marcus Vinicius On Fri, Jul 31, 2020 at 3:00 PM Marcus Vinicius Mesquita < marcusvinicius.mesqu...@gmail.com> wrote: > Thank you, that was very helpful. > > Marcus Vinicius > > -- 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) colorfont.lfg Description: Binary data \setupbodyfont[plex,22pt] \definecolor[colorscheme:1:1][h=002776] % a \definecolor[colorscheme:1:2][h=009c3b] % b \definecolor[colorscheme:1:3][h=17737e] % c \definecolor[colorscheme:1:4][h=ff5733] % d \definecolor[colorscheme:1:5][h=493367] % e \definecolor[colorscheme:1:6][h=7c6d11] % f \definecolor[colorscheme:1:7][h=117c2a] % g \definecolor[colorscheme:1:8][h=6d109d] % h \definecolor[colorscheme:1:9][h=08d11a] % i \definecolor[colorscheme:1:10][h=a81163] % j \definecolor[colorscheme:1:11][h=7d2830] % k \definecolor[colorscheme:1:12][h=2868d1] % l \definecolor[colorscheme:1:13][h=2c11da] % m \definecolor[colorscheme:1:14][h=cf47bb] % n \definecolor[colorscheme:1:15][h=27bde2] % o \definecolor[colorscheme:1:16][h=dc5777] % p \definecolor[colorscheme:1:17][h=c28201] % q \definecolor[colorscheme:1:18][h=ffdf00] % r \definecolor[colorscheme:1:19][h=30a777] % s \definecolor[colorscheme:1:20][h=722548] % t \definecolor[colorscheme:1:21][h=ff00ff] % u \definecolor[colorscheme:1:22][h=e0115f] % v \definecolor[colorscheme:1:23][h=004c4c] % w \definecolor[colorscheme:1:24][h=ae0001] % x \definecolor[colorscheme:1:25][h=696966] % y \definecolor[colorscheme:1:26][h=7bb3ff] % z \definefontfeature [MyFeaturesA] [default] [goodies={colorfont},colorscheme=default] \definefont[MyFontA][SerifBold*MyFeaturesA] \starttext \setfontcolorscheme[1] \MyFontA \startlines aàáâãäå AÀÁÂÃÄÅ eèéêë EÈÉÊË iìíîï IÌÍÎÏ oòóôõö OÒÓÔÕÖ uùúûü UÙÚÛÜ \stoptext mwe.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 / 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] Typesetting poetry with particular indenting
Tommaso Gordini schrieb am 02.07.2020 um 16:48: Taco, this works! Thank you! Now (last question), it's possibile to centering in the middle of the page the whole verse block ? You can use the framedtext environment but the content can no longer split across pages. \starttext \startframedtext[middle][frame=off,width=fit] \startlines Per correr miglior acque alza le vele omai la navicella del mio ingegno, che lascia dietro a sé mar sì crudele; e canterò di quel secondo regno dove l'umano spirito si purga e di salire al ciel diventa degno. \stoplines \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 ___
Re: [NTG-context] Typesetting poetry with particular indenting
On 7/2/2020 4:15 PM, Wolfgang Schuster wrote: Hans Hagen schrieb am 02.07.2020 um 15:40: On 7/2/2020 3:01 PM, Tommaso Gordini wrote: Hi everyone. I am typesetting a poetry text in triplets and I would like the second and third lines of each triplet to be indented (i.e., in the next example, verse no. 2, 3, 5, and 6). Is it possible to get what I ask for with ConTeXt? The most I managed to do is this: \starttext \setupindenting[yes,1em] \setuplines[indenting=even] \startlines Per correr miglior acque alza le vele omai la navicella del mio ingegno, che lascia dietro a sé mar sì crudele; e canterò di quel secondo regno dove l'umano spirito si purga e di salire al ciel diventa degno. \stoplines \stoptext but that's not what I want. I'll add this \setuplines[indentnext={0pt,10pt,15pt,20pt}] % \setuplines[indentnext={0pt,*,*}] which then is a challenge for WS to get in the setups and for you to wikify Are you sure you use the correct key? Well, we have that key (and maybe some day we can do that for all), i was wondering about 'left' but then we'd need some \cycle command or so 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 ___
Re: [NTG-context] Typesetting poetry with particular indenting
Taco, this works! Thank you! Now (last question), it's possibile to centering in the middle of the page the whole verse block ? Tommy Il giorno gio 2 lug 2020 alle ore 15:56 Taco Hoekwater ha scritto: > > I was having fun with this as well while Hans was writing his generic > solution. > > Here is an explicit ‘indent each 2nd and 3rd line’: > > > \unprotect > > \installindentingmethod {three} > {\c_spac_indentation_toggle_state\plusthree} > > \unexpanded\def\spac_indentation_tri_toggle_indeed > {\glet\checkindentation\spac_indentation_tri_toggle} > > \unexpanded\def\spac_indentation_tri_toggle > {\gdef\checkindentation > {\spac_indentation_remove >\gdef\checkindentation{\spac_indentation_tri_toggle_indeed}}} > > % this next macro is redefinition of a core macro ! > \def\spac_indentation_check_toggle > {\ifcase\c_spac_indentation_toggle_state > % nothing > \or > \spac_indentation_no_toggle > \or > \spac_indentation_do_toggle > \or > \spac_indentation_tri_toggle > \fi} > \protect > %% > > to be used with: > > \setuplines[indenting=three] > > > Best wishes, > Taco > > > On 2 Jul 2020, at 15:01, Tommaso Gordini > wrote: > > > > \starttext > > > > \setupindenting[yes,1em] > > \setuplines[indenting=even] > > > > \startlines > > Per correr miglior acque alza le vele > > omai la navicella del mio ingegno, > > che lascia dietro a sé mar sì crudele; > > e canterò di quel secondo regno > > dove l'umano spirito si purga > > e di salire al ciel diventa degno. > > \stoplines > > > > \stoptext > > 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 ___
Re: [NTG-context] Typesetting poetry with particular indenting
Hans Hagen schrieb am 02.07.2020 um 15:40: On 7/2/2020 3:01 PM, Tommaso Gordini wrote: Hi everyone. I am typesetting a poetry text in triplets and I would like the second and third lines of each triplet to be indented (i.e., in the next example, verse no. 2, 3, 5, and 6). Is it possible to get what I ask for with ConTeXt? The most I managed to do is this: \starttext \setupindenting[yes,1em] \setuplines[indenting=even] \startlines Per correr miglior acque alza le vele omai la navicella del mio ingegno, che lascia dietro a sé mar sì crudele; e canterò di quel secondo regno dove l'umano spirito si purga e di salire al ciel diventa degno. \stoplines \stoptext but that's not what I want. I'll add this \setuplines[indentnext={0pt,10pt,15pt,20pt}] % \setuplines[indentnext={0pt,*,*}] which then is a challenge for WS to get in the setups and for you to wikify Are you sure you use the correct key? 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 ___
Re: [NTG-context] Typesetting poetry with particular indenting
I was having fun with this as well while Hans was writing his generic solution. Here is an explicit ‘indent each 2nd and 3rd line’: \unprotect \installindentingmethod {three} {\c_spac_indentation_toggle_state\plusthree} \unexpanded\def\spac_indentation_tri_toggle_indeed {\glet\checkindentation\spac_indentation_tri_toggle} \unexpanded\def\spac_indentation_tri_toggle {\gdef\checkindentation {\spac_indentation_remove \gdef\checkindentation{\spac_indentation_tri_toggle_indeed}}} % this next macro is redefinition of a core macro ! \def\spac_indentation_check_toggle {\ifcase\c_spac_indentation_toggle_state % nothing \or \spac_indentation_no_toggle \or \spac_indentation_do_toggle \or \spac_indentation_tri_toggle \fi} \protect %% to be used with: \setuplines[indenting=three] Best wishes, Taco > On 2 Jul 2020, at 15:01, Tommaso Gordini wrote: > > \starttext > > \setupindenting[yes,1em] > \setuplines[indenting=even] > > \startlines > Per correr miglior acque alza le vele > omai la navicella del mio ingegno, > che lascia dietro a sé mar sì crudele; > e canterò di quel secondo regno > dove l'umano spirito si purga > e di salire al ciel diventa degno. > \stoplines > > \stoptext 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] Typesetting poetry with particular indenting
On 7/2/2020 3:01 PM, Tommaso Gordini wrote: Hi everyone. I am typesetting a poetry text in triplets and I would like the second and third lines of each triplet to be indented (i.e., in the next example, verse no. 2, 3, 5, and 6). Is it possible to get what I ask for with ConTeXt? The most I managed to do is this: \starttext \setupindenting[yes,1em] \setuplines[indenting=even] \startlines Per correr miglior acque alza le vele omai la navicella del mio ingegno, che lascia dietro a sé mar sì crudele; e canterò di quel secondo regno dove l'umano spirito si purga e di salire al ciel diventa degno. \stoplines \stoptext but that's not what I want. I'll add this \setuplines[indentnext={0pt,10pt,15pt,20pt}] % \setuplines[indentnext={0pt,*,*}] which then is a challenge for WS to get in the setups and for you to wikify 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 ___
[NTG-context] Typesetting poetry with particular indenting
Hi everyone. I am typesetting a poetry text in triplets and I would like the second and third lines of each triplet to be indented (i.e., in the next example, verse no. 2, 3, 5, and 6). Is it possible to get what I ask for with ConTeXt? The most I managed to do is this: \starttext \setupindenting[yes,1em] \setuplines[indenting=even] \startlines Per correr miglior acque alza le vele omai la navicella del mio ingegno, che lascia dietro a sé mar sì crudele; e canterò di quel secondo regno dove l'umano spirito si purga e di salire al ciel diventa degno. \stoplines \stoptext but that's not what I want. Thank you very much in advance? Tommy ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] error running wiki example with labels
The issue is the same after update of lmtx but the complaint differs. I’m not sure the full command sequence that runs by vim, anyone else who knows the internal default by vim in context mode? However the result from commandline in vim :!context % works fine but not when I run :ConTeXt The thing is also when I do the example code on wiki with page command commented out Errorlog with mtxrun inside vim open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2020.06.25 11:23 MKIV beta fmt: 2020.6.25 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'labels3', input './labels3', result 'labels3' fonts > latin modern fonts are not preloaded languages > language 'en' is active system > synctex functionality is enabled, expect 5-10 pct runtime overhead! open source > level 2, order 3, name './labels3.tex' open source > level 3, order 4, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 4, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' open source > level 3, order 5, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' close source> level 3, order 5, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' metapost> library 'dum' is loaded metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/Users/janneman/context-osx-64/tex/texmf-context/metapost/context/base/mpiv/metafun.mpxl' using method 'default' metapost> initializing number mode 'scaled' metapost log> metapost log> loading metafun, including plain.mp version 1.004 for metafun iv and xl metapost log> fonts > bodyfont '14pt' is defined (can better be done global) fonts > bodyfont '16.8pt' is defined (can better be done global) fonts > bodyfont '11.2pt' is defined (can better be done global) lua error > lua error on line 1 in file ./labels3.tex: function call [844]: ...-64/tex/texmf-context/tex/context/base/mkiv/node-syn.lua:435: attempt to index a nil value (upvalue 'filehandle') 1 >> \newdimen\LWidth 2 \newdimen\LHeight 3 \newdimen\LDistanceX 4 \newdimen\LDistanceY 5 6 \LWidth=75mm 7 \LHeight=30mm 8 \LDistanceX=0mm 9 \LDistanceY=0mm 10 11 \define[1]\Name{{\switchtobodyfont[14pt]#1}} And the code was as following \newdimen\LWidth \newdimen\LHeight \newdimen\LDistanceX \newdimen\LDistanceY \LWidth=75mm \LHeight=30mm \LDistanceX=0mm \LDistanceY=0mm \define[1]\Name{{\switchtobodyfont[14pt]#1}} \define[1]\Title{#1} \mainlanguage[sv] %\usetypescriptfile [plex] \setupbodyfont [palatino,ss,11pt] \setupinterlinespace[16pt] \useMPlibrary[dum] \useexternalfigure[logo][cow][size=art] \definepapersize[Label][width=\LWidth,height=\LHeight] \setuppapersize[Label][A4] \setuppaper[ nx=2, ny=9, topspace=1cm, backspace=1cm, %dx=\LDistanceX, %dy=\LDistanceY, ] % must come before \setuparranging! \setuparranging [XY] \setuplayout[ location=middle, marking=on, topspace=5mm, backspace=5mm, width=68mm, header=0mm, footer=0mm, ] \setuppagenumbering[state=stop] \definelayer[BG][ x=0mm,y=0mm, width=\LWidth,height=\LHeight, state=repeat] \setupbackgrounds[page][background=BG,] \setlayerframed[BG][ frame=on, framecolor=yellow, width=\LWidth,height=\LHeight, align=flushleft, ]{\strut} \setlayer[BG][ preset=rightbottom, hoffset=3mm, voffset=3mm]{% \externalfigure[logo][height=0.75\LHeight]} \setlayer[BG][ preset=leftbottom, hoffset=5mm, voffset=3mm]{% the context group} \starttext \startlines \Name{Hans Hägar} \Title{CEO · R \& D} %\page \stoplines %\Name{Wolf Schmidt} %\Title{0th Level Support} %\page[yes] %\Name{Mocca Bob} %\Title{the Builder} %\page[yes] %\Name{A. Rockefeller} %\Title{Mad Hatter} %\page[yes] %\Name{Ali Breslau} %\Title{MetaPost Manager} %\page[yes] %\Name{Taco Bellman} %\Title{CFO} %\page[yes] %\stoplines \stoptext Then I issued the regular context command via terminal inside vim And the result went just fine open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2020.06.25 11:23 MKIV beta fmt: 2020.6.25 int: engl
Re: [NTG-context] Macros which scan subscripts/superscripts in ConTeXt
On 6/26/2020 3:47 AM, Aditya Mahajan wrote: On Thu, 25 Jun 2020, Jairo A. del Rio wrote: Hi, list! I've seen the following in Stack Exchange: https://tex.stackexchange.com/questions/503208/define-macro-that-scans-ahead-for-super-and-or-subscript-absorbs-them-and-mo The answer is: \documentclass{article}\usepackage{amsmath}\usepackage{xparse} \NewDocumentCommand{\mymathsym}{e{^_}}{% x^{\mathrm{foo}\IfValueT{#1}{,#1}}_{\mathrm{bar}\IfValueT{#2}{,#2}}%} \begin{document} \begin{gather}\mymathsym \\\mymathsym^{\mathrm{extrasup}} \\\mymathsym_{\mathrm{extrasub}} \\\mymathsym^{\mathrm{extrasup}}_{\mathrm{extrasub}} \\\mymathsym_{\mathrm{extrasub}}^{\mathrm{extrasup}} \end{gather} \end{document} Such a macro contextually defines a behavior for a subscript and a superscript even if they aren't displayed in a specific order, so \mymacro_{a}^{b} \mymacro^{b}_{a} have the same output, even if the intended behavior is not the typical one (I could redefine it so subscripts change colors, for instance). Although I could just port the macro using xparse-generic because it works in ConTeXt too, how to define a macro like that the ConTeXt way, i.e., using only ConTeXt macros? Return of the dodo :-) % Must be outside \unprotect .. \protect so that _ has usual catcodes \def\capturemathoplimits#1% {\doifnextcharelse _% {\docapturemathoplimitsA{#1}} {\doifnextcharelse ^% {\docapturemathoplimitsB{#1}} {\redocapturemathoplimits{#1 \def\docapturemathoplimitsA#1#2#3% {\doifnextcharelse ^% {\dodocapturemathoplimitsA{#1}{#2}{#3}} {\dodocapturemathoplimitsA{#1}{#2}{#3}\empty\empty}} \def\dodocapturemathoplimitsA#1#2#3#4#5{#1{#5}{#3}} \def\docapturemathoplimitsB#1#2#3% {\doifnextcharelse _% {\dodocapturemathoplimitsB{#1}{#2}{#3}} {\dodocapturemathoplimitsB{#1}{#2}{#3}\empty\empty}} \def\dodocapturemathoplimitsB#1#2#3#4#5{#1{#3}{#5}} \def\redocapturemathoplimits#1{#1\empty\empty\empty\empty\empty} % Usage: \define\mymacro{\capturemathoplimits\domymacro} \def\domymacro#1#2% % #1 is supscript, #2 is subscript {x^{\mathrm{foo}\doifsomething{#1}{,#1}}_{\mathrm{bar}\doifsomething{#2}{,#2}}} \starttext \startlines $\mymacro$ $\mymacro^{\mathrm{extrasup}}$ $\mymacro_{\mathrm{extrasub}}$ $\mymacro^{\mathrm{extrasup}}_{\mathrm{extrasub}}$ $\mymacro_{\mathrm{extrasub}}^{\mathrm{extrasup}}$ \stoplines \stoptext We could have this: \unexpanded\def\scripts {\scratchtoksone\emptytoks \scratchtokstwo\emptytoks \doscriptscheck} \def\doscriptscheck {\doifnextcharelse _% \doscriptssub {\doifnextcharelse ^% \doscriptssup \doscriptsflush}} \def\doscriptsflush {\doifsometoks\scratchtoksone{^{\the\scratchtoksone}}% \doifsometoks\scratchtokstwo{_{\the\scratchtokstwo}}} \def\doscriptssup ^#1% {\doifelsesometoks\scratchtoksone {\appendtoks,{#1}\to\scratchtoksone} {\scratchtoksone{{#1}}}% \doscriptscheck} \def\doscriptssub _#1% {\doifelsesometoks\scratchtokstwo {\appendtoks,{#1}\to\scratchtokstwo} {\scratchtokstwo{{#1}}}% \doscriptscheck} % % a bit more low level: % \unexpanded\def\scripts % {\scratchtoksone\emptytoks %\scratchtokstwo\emptytoks %\doscriptscheck} % % \def\doscriptscheck % {\doifnextcharelse ^% % {\doscriptsstep\scratchtoksone} % {\doifnextcharelse _% % {\doscriptsstep\scratchtokstwo} % {\doscriptsflush}}} % % \def\doscriptsflush % {\iftok\scratchtoksone\emptytoks\else\Usuperscript{\the\scratchtoksone}\fi% %\iftok\scratchtokstwo\emptytoks\else\Usubscript {\the\scratchtokstwo}\fi} % % \def\doscriptsstep#1#1#3% % {\etoksapp#1{\iftok#1\emptytoks\else,\fi\normalunexpanded{#3}}% %\doscriptscheck} \starttext \startlines $z\scripts _{\rm one} _{\bf two} ^{one} _{ three} ^{\bi two}$ \stoplines \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 / 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] Macros which scan subscripts/superscripts in ConTeXt
On Thu, 25 Jun 2020, Jairo A. del Rio wrote: Hi, list! I've seen the following in Stack Exchange: https://tex.stackexchange.com/questions/503208/define-macro-that-scans-ahead-for-super-and-or-subscript-absorbs-them-and-mo The answer is: \documentclass{article}\usepackage{amsmath}\usepackage{xparse} \NewDocumentCommand{\mymathsym}{e{^_}}{% x^{\mathrm{foo}\IfValueT{#1}{,#1}}_{\mathrm{bar}\IfValueT{#2}{,#2}}%} \begin{document} \begin{gather}\mymathsym \\\mymathsym^{\mathrm{extrasup}} \\\mymathsym_{\mathrm{extrasub}} \\\mymathsym^{\mathrm{extrasup}}_{\mathrm{extrasub}} \\\mymathsym_{\mathrm{extrasub}}^{\mathrm{extrasup}} \end{gather} \end{document} Such a macro contextually defines a behavior for a subscript and a superscript even if they aren't displayed in a specific order, so \mymacro_{a}^{b} \mymacro^{b}_{a} have the same output, even if the intended behavior is not the typical one (I could redefine it so subscripts change colors, for instance). Although I could just port the macro using xparse-generic because it works in ConTeXt too, how to define a macro like that the ConTeXt way, i.e., using only ConTeXt macros? Return of the dodo :-) % Must be outside \unprotect .. \protect so that _ has usual catcodes \def\capturemathoplimits#1% {\doifnextcharelse _% {\docapturemathoplimitsA{#1}} {\doifnextcharelse ^% {\docapturemathoplimitsB{#1}} {\redocapturemathoplimits{#1 \def\docapturemathoplimitsA#1#2#3% {\doifnextcharelse ^% {\dodocapturemathoplimitsA{#1}{#2}{#3}} {\dodocapturemathoplimitsA{#1}{#2}{#3}\empty\empty}} \def\dodocapturemathoplimitsA#1#2#3#4#5{#1{#5}{#3}} \def\docapturemathoplimitsB#1#2#3% {\doifnextcharelse _% {\dodocapturemathoplimitsB{#1}{#2}{#3}} {\dodocapturemathoplimitsB{#1}{#2}{#3}\empty\empty}} \def\dodocapturemathoplimitsB#1#2#3#4#5{#1{#3}{#5}} \def\redocapturemathoplimits#1{#1\empty\empty\empty\empty\empty} % Usage: \define\mymacro{\capturemathoplimits\domymacro} \def\domymacro#1#2% % #1 is supscript, #2 is subscript {x^{\mathrm{foo}\doifsomething{#1}{,#1}}_{\mathrm{bar}\doifsomething{#2}{,#2}}} \starttext \startlines $\mymacro$ $\mymacro^{\mathrm{extrasup}}$ $\mymacro_{\mathrm{extrasub}}$ $\mymacro^{\mathrm{extrasup}}_{\mathrm{extrasub}}$ $\mymacro_{\mathrm{extrasub}}^{\mathrm{extrasup}}$ \stoplines \stoptext Aditya ___ 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] error running wiki example with labels
Hello All! In the page https://wiki.contextgarden.net/Labels <https://wiki.contextgarden.net/Labels> I’ve tried with no success to run those examples given at the page. The error complaint as the log shows below return { ["filename"]="./labels3.tex", ["lastluaerror"]="function call [801]: ...-64/tex/texmf-context/tex/context/base/mkiv/node-syn.lua:435: attempt to index a nil value (upvalue 'filehandle')", ["lasttexerror"]="?", ["linenumber"]=70, ["luaerrorline"]="435", ["offset"]=10, } open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2020.03.10 14:52 MKIV beta fmt: 2020.4.13 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'labels3', input './labels3', result 'labels3' fonts > latin modern fonts are not preloaded languages > language 'en' is active system > synctex functionality is enabled, expect 5-10 pct runtime overhead! open source > level 2, order 3, name './labels3.tex' open source > level 3, order 4, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-plex.mkiv' open source > level 4, order 5, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-plex.mkiv' fonts > defining > font with asked name 'IBMPlexSans-regular' is not found using lookup 'file' fonts > defining > unknown font 'IBMPlexSans-regular', loading aborted fonts > defining > unable to define 'IBMPlexSans-regular' as 'ibmplex-11pt-ss-tf-0--0' open source > level 3, order 6, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' close source> level 3, order 6, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' metapost> library 'dum' is loaded metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/Users/janneman/context-osx-64/tex/texmf-context/metapost/context/base/mpiv/metafun.mpxl' using method 'default' metapost> initializing number mode 'scaled' metapost log> metapost log> loading metafun, including plain.mp version 1.004 for metafun iv and xl metapost log> fonts > bodyfont '14pt' is defined (can better be done global) fonts > bodyfont '16.8pt' is defined (can better be done global) fonts > bodyfont '11.2pt' is defined (can better be done global) fonts > defining > font with asked name 'IBMPlexSans-regular' is not found using lookup 'file' fonts > defining > unknown font 'IBMPlexSans-regular', loading aborted fonts > defining > unable to define 'IBMPlexSans-regular' as 'ibmplex-14pt-ss-tf-0--0' lua error > lua error on line 70 in file ./labels3.tex: function call [801]: ...-64/tex/texmf-context/tex/context/base/mkiv/node-syn.lua:435: attempt to index a nil value (upvalue 'filehandle') 60 \setlayer[BG][ 61 preset=leftbottom, 62 hoffset=5mm, 63 voffset=3mm]{% 64 the context group} 65 66 \starttext 67 \startlines 68 \Name{Hans Hägar} 69 \Title{CEO · R} 70 >> \page 71 72 \Name{Wolf Schmidt} 73 \Title{0th Level Support} 74 \page 75 76 \Name{Mocca Bob} 77 \Title{the Builder} 78 \page 79 80 \Name{A. Rockefeller} It seems to complain with the \page command Jan-Eriks-Air: ~/Google Drive/PRIVAT janneman > context --version mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: /Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2019.07.24 11:31 mtx-context | main context file: /Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkxl mtx-context | current version: 2020.03.10 14:52 ___ If your question is of interest to o
Re: [NTG-context] Let chapter start on odd page and make the even page before show an image
On Fri, 29 May 2020, Jan U. Hasecke wrote: One and a half question. Why did you set \ChapterCounter explizitly and why is \ChapterCounter part of the datasetvariable? \dataset... is a high level interface for collecting two-pass data in ConTeXt. Here is a simple example: \definedataset[name] \starttext The values of the three dataset variables are: \startlines \datasetvariable{name}{hash1}{key} \datasetvariable{name}{hash2}{key} \datasetvariable{name}{hash3}{key} \stoplines Now we set the values. \setdataset[name][hash1][key=value1] \setdataset[name][hash2][key=value2] \setdataset[name][hash3][key=value3] \stoptext Note that we are using the values stored in different hash-ids before they are defined. ConTeXt stores the values in the `.tuc` file and uses them. This is what is stored in the `.tuc` file: utilitydata.job.datasets.collected={ ["name"]={ ["hash1"]={ ["key"]="value1", }, ["hash2"]={ ["key"]="value2", }, ["hash3"]={ ["key"]="value3", }, }, } The magic of loading and reusing them happens behind the scenes, so the user doesn't have to worry about it. See https://wiki.contextgarden.net/System_Macros/Key_Value_Assignments#Multi-pass_data for more details. Now, suppose you wanted to use the image defined as part of `\startchapter` as the background image of the _current_ page, then you could access the value of the \structureuservariable. For example, \startchapter[title=whatever][image=filename] \structureuservariable{image} \stopchapter But you want to use the value of the image _before_ the start of the chapter. So, Wolfgang is using the two-pass mechanism to store the value of the image in the database named 'chapter` in the hash-location `\ChapterCounter` and then retrieving it before it is defined! Aditya ___ 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] sunny friday afternoon update
Hi, I uploaded a new version of lmtx and there are some experimental features that users cna play with so that we can think about related interfacing. (I won't mention soem in the lua department that I'm still exploring myself.) When you use a math symbol its class property determines the spacing. One can use \mathopen etc to wrap such a character an dmake it behave different. There is a new mechanism to overload that property in a different way: \startlines $x\mathopen {!}+123+\mathclose {!}x$ $x\tomathopen ! +123+\tomathclose ! x$ $x\mathclose {!}+123+\mathopen {!}x$ $x\tomathclose ! +123+\tomathopen ! x$ $x ! +123+ ! x$ \stoplines It uses a low level primitive, for the open case: \Umathclass 4 with the number being the desired class. A more experimental features concerns native prescripts. Consider the following input \blank \hbox{$ {\tf X}^1_2^^3__4 \quad {\tf X}^1 ^^3\quad {\tf X} _1 __4 \quad {\tf X}^^3\quad {\tf X} __4 \quad {\tf X}^^3__4 $} \blank or with the control sequence variants: \blank \hbox{ \ruledhbox{${\tf X}\Usuperscript{a} $} \ruledhbox{${\tf X}\Usubscript{b} $} \ruledhbox{${\tf X}\Usuperscript{a}\Usubscript{b} $} \ruledhbox{${\tf X}\Usuperscript{a} \Usuperprescript{c} $} \ruledhbox{${\tf X}\Usubscript{b} \Usubprescript{d}$} \ruledhbox{${\tf X}\Usuperscript{a}\Usubscript{b}\Usuperprescript{c}\Usubprescript{d}$} \ruledhbox{${\tf X} \Usuperprescript{c} $} \ruledhbox{${\tf X} \Usubprescript{d}$} \ruledhbox{${\tf X} \Usuperprescript{c}\Usubprescript{d}$} } \blank A few days ago there was a discussion about tweaking some math parameters, like the radical spacing. I made a macro that deals with it: $\mathopenupparameter\Umathradicalvgap{10.5}\sqrt[3]{x}$ (this one is also in mkiv, be it slightly less efficient because in lmtx we can use \Umathparameter to query the state of a variable) Already present was a variant on \over which normally is used like {{1}\over{2}} i.e. the only time when tex looks back and needs to tweak styles. The alternative is: $\Uover{1}{2}$ etc which looks forward but is otherwise compatible, apart from supporting an optional keyword $\Uover style \scriptscriptstyle{1}{2}$ etc $\Uover style \textstyle{1}{2}$ etc At some point I will adapt some context code to this. Anyway, these are things that low level math users might like to play with. There are few more things but those will probably go unnoticed. 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 ___
Re: [NTG-context] Short weekday option for date command
Thank you Wolfgang! Adam On Wed, Apr 8, 2020 at 9:11 PM Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Adam Reviczky schrieb am 08.04.2020 um 21:53: > > Thank you Hans and Wolfgang, > > > > I have updated the wiki (https://wiki.contextgarden.net/Command/date) > > with the new dayshort/daylong options, but I seem to get an empty value > > for every day after day 7, see example: > > > > \starttext > > \date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par > > \date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] > > \stoptext > > > > This gives me (note "sun" is missing in the second line): > > > > sat, 7 April 2008 > > , 8 April 2008 > > > > Am I using the options correctly? > > No, the \daylong and \dayshort expect a number between 1 and 7 and > result in a label for the requested day of the week but it's not meant > to be used in \currentdate. > > > Still using luatex and not luametatex. > > To get the short names with \currentdate you have to append ":mnem" to > the weekday, w, WEEKDAY or W keywords. > > \starttext > > \startlines > \date[d=7,m=4,y=2008][weekday,{,~},day,~,month,~,year] > \date[d=7,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year] > \date[d=8,m=4,y=2008][weekday,{,~},day,~,month,~,year] > \date[d=8,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year] > \stoplines > > \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 ___
Re: [NTG-context] Short weekday option for date command
Adam Reviczky schrieb am 08.04.2020 um 21:53: Thank you Hans and Wolfgang, I have updated the wiki (https://wiki.contextgarden.net/Command/date) with the new dayshort/daylong options, but I seem to get an empty value for every day after day 7, see example: \starttext \date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par \date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \stoptext This gives me (note "sun" is missing in the second line): sat, 7 April 2008 , 8 April 2008 Am I using the options correctly? No, the \daylong and \dayshort expect a number between 1 and 7 and result in a label for the requested day of the week but it's not meant to be used in \currentdate. Still using luatex and not luametatex. To get the short names with \currentdate you have to append ":mnem" to the weekday, w, WEEKDAY or W keywords. \starttext \startlines \date[d=7,m=4,y=2008][weekday,{,~},day,~,month,~,year] \date[d=7,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year] \date[d=8,m=4,y=2008][weekday,{,~},day,~,month,~,year] \date[d=8,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year] \stoplines \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 ___
Re: [NTG-context] Capitalize first word of first line within \startlines
On 3/5/2020 2:46 AM, Thangalin wrote: If it helps, here's why I thought it would work: https://wiki.contextgarden.net/Command/definefirstline The wiki page shows that the macro takes a style option. The style option links to: https://wiki.contextgarden.net/Style_Alternatives This page has a list of predefined styles and describes how to set up an alternative style: https://wiki.contextgarden.net/Style_Alternatives#Defining_a_Style_Alternative From the wiki page: \definealternativestyle [head:neat] [\WORD] [] While \definealternativestyle[PoemFirstWord][{\bf\uppercasing}][] will work for my needs, I am concerned that it is inconsistent wrt wiki documentation, and also appears to expose an inconsistent API, as it were. Is there any way to make the two conform to the same usage? That is, it was not obvious (from the wiki) that I could not use "WORD" as an alternative style even though it is literally listed and used as an alternative style. WORD is not a style but some operation on characters so it won't work here (ok, i could probably make it work but it would be ugly code) .. it happens that some operations can be uses as styles 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 ___
Re: [NTG-context] Capitalize first word of first line within \startlines
If it helps, here's why I thought it would work: https://wiki.contextgarden.net/Command/definefirstline The wiki page shows that the macro takes a style option. The style option links to: https://wiki.contextgarden.net/Style_Alternatives This page has a list of predefined styles and describes how to set up an alternative style: https://wiki.contextgarden.net/Style_Alternatives#Defining_a_Style_Alternative From the wiki page: \definealternativestyle [head:neat] [\WORD] [] While \definealternativestyle[PoemFirstWord][{\bf\uppercasing}][] will work for my needs, I am concerned that it is inconsistent wrt wiki documentation, and also appears to expose an inconsistent API, as it were. Is there any way to make the two conform to the same usage? That is, it was not obvious (from the wiki) that I could not use "WORD" as an alternative style even though it is literally listed and used as an alternative style. Thanks again! ___ 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] Capitalize first word of first line within \startlines
On 3/4/2020 5:09 PM, Thangalin wrote: Looking to uppercase the first word of a poem: \setupindenting[yes, 0.75em] \setupinitial[ state=start, n=2, distance=\zeropoint, ] % This does not appear to work? \definealternativestyle[PoemFirstWord][\WORD][] \definefirstline[PoemFirstLine][ alternative=word, style=PoemFirstWord, n=1, ] \definestartstop[poem][ before={\startlines \setfirstline[PoemFirstLine] \placeinitial}, after={\stoplines}, ] \setuplines[indenting=odd] \starttext \startpoem Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favor fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great, And would suffice. \stoppoem \stoptext Any ideas why the first word is not capitalized? because it is not applied to that stretch ... but i will send you something to play with ... kind of braindead trivial piece of code but it needs testing 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 / 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] Capitalize first word of first line within \startlines
Looking to uppercase the first word of a poem: \setupindenting[yes, 0.75em] \setupinitial[ state=start, n=2, distance=\zeropoint, ] % This does not appear to work? \definealternativestyle[PoemFirstWord][\WORD][] \definefirstline[PoemFirstLine][ alternative=word, style=PoemFirstWord, n=1, ] \definestartstop[poem][ before={\startlines \setfirstline[PoemFirstLine] \placeinitial}, after={\stoplines}, ] \setuplines[indenting=odd] \starttext \startpoem Some say the world will end in fire, Some say in ice. From what I've tasted of desire I hold with those who favor fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great, And would suffice. \stoppoem \stoptext Any ideas why the first word is not capitalized? Thank you! ___ 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 dash issues with semantic markup
On 12/30/2019 5:03 AM, Sam May wrote: \setuplanguage[en] [leftquotation=\quotedash~, rightquotation=~\quotedash, leftsentence=\removeunwantedspaces~\endash\space, midsentence=\removeunwantedspaces~\endash\space, % leftsentence=\endash~, % midsentence=~\endash, rightsentence=~\endash] \define\quotedash{\emdash\endash} %\setupbackend[export=yes] \starttext \startsection[title=Introduction] Any of you able to help me get my quotation dashes into line when automatically inserted by the semantic commands? I'm sure a number of you look at this style and cringe, but \cap{A.} I'm not looking for grammatical input, and \cap{B.} I'm intending this for a non-English language where the quotation dash (though still not most common) isn't as out of place. \stopsection \startsection[title=Desired rendering] \quotedash~Speech should always have a dash at the start, but none at the end of a paragraph. \quotedash~Dialog asides should not duplicate dashes,~\endash\ he said.~\quotedash\ Also, this doesn't reflect the spacing mentioned in section \in[extra]. \quotedash~nor, as above, add ones at the end of paragraphs. \endash~he continued. \stopsection \startsection[title=Actual output] \speech{Speech should always have a dash at the start, but none at the end of a paragraph.} \speech{Dialog asides should not duplicate dashes, \aside{he said.}} Also, note the spacing isn't removed despite \type{\removeunwantedspaces}, but instead duplicated. \speech{nor, as above, add ones at the end of paragraphs. \aside{he continued.}} \stopsection \startsection[title=Additional considerations and observations,reference=extra] It would also be nice if a quote ending in a period carried the \quote{broad} spacing to the other side of the (ending) quote dash |=| the dash before \quote{Also} above would be packed on the left and broad on the right. I know this might be a lot trickier to code, and only consider it a bonus. The issue with \type{\removeunwantedspaces} only seems to affect the command forms. When inserted directly |<| as here |>| the spacing acts as desired in the \cap{PDF} (as expected, the \cap{XML} doesn't understand the order). Also, the right \type{|>|} doesn't require either of the explicit spacing instructions (beyond being non-breaking) while the others do; try switching the commented lines and re-rendering. The quotation dash itself only \emph{looks} as I want it; when I highlight and copy the text or export it to the \cap{XML} backend, it's still two dashes next to each other. Instead, I'd like it to be the Unicode bar U+2015. I'm not sure if \TEX/\LUATEX\ allows that difference between appearance and interaction (I do know \cap{PDF} does), so if there's some way of adding a new glyph to the font |<| one that mimics the other dashes even if the font changes |>| I'd love to actually use the proper codepoint. As is, that doesn't work in the standard font(s): [\char"2015]. \stopsection \stoptext I bet that Wolfgang has the answers to the speech setup so I'll do the font part. Assuming that you use context lmtx (the luametatex branch), you can use some of the new metafun magic. \startMPcalculation{simplefun} vardef QuotationDash = draw image ( interim linecap := squared ; save l ; l := 0.2 ; draw (l/2,2) -- (15-l/2,2) withpen pencircle scaled l ; ) enddef ; lmt_registerglyphs [ name = "symbols", units= 10, usecolor = true, width= 15, height = 2.1, depth= 0, ] ; lmt_registerglyph [ category = "symbols", unicode = "0x2015", code = "QuotationDash ;" ] ; \stopMPcalculation \definefontfeature[default][default][metapost=symbols] % \showglyphs \starttext \startlines xx\endashxx xx\emdashxx xx\endash\emdash xx xx\char"2015 xx \stoplines \stoptext Keep in mind that when you use for instance pagella, that there already that glyph. 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 ___
Re: [NTG-context] Disappearing font feature
italic,features}, bf={style:thinitalic,features}, bi={style:lightitalic,features}, it={style:bookitalic,features}] \definefontfamily[it-two] [sansserif] [Jost] [tf={style:mediumitalic,features}, bf={style:semiitalic,features}, bi={style:bolditalic,features}, it={style:heavyitalic,features}] \definefontfamily[it-three] [sansserif] [Jost] [tf={style:blackitalic,features}, bf={style:blackitalic,features}, bi={style:blackitalic,features}, it={style:blackitalic,features}] \startbuffer [Sampler] A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç 1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = ! @ \# \$ \letterpercent\ ^ \& * ( ) _ + [ ] \textbackslash\ ; ' , . / \{ \} \| : " < > ? \fontname\font \blank [line] \stopbuffer \setupalign [middle] \setupbodyfont [up-one,13pt] \starttext \obeylines \ss\tf\getbuffer [Sampler] \ss\bf\getbuffer [Sampler] \ss\bi\getbuffer [Sampler] \ss\it\getbuffer [Sampler] \switchtobodyfont[up-two] \ss\tf\getbuffer [Sampler] \ss\bf\getbuffer [Sampler] \ss\bi\getbuffer [Sampler] \ss\it\getbuffer [Sampler] \switchtobodyfont[up-three] \ss\tf\getbuffer [Sampler] \page \switchtobodyfont[it-one] \ss\tf\getbuffer [Sampler] \ss\bf\getbuffer [Sampler] \ss\bi\getbuffer [Sampler] \switchtobodyfont[it-two] \ss\tf\getbuffer [Sampler] \ss\bf\getbuffer [Sampler] \ss\bi\getbuffer [Sampler] \ss\it\getbuffer [Sampler] \switchtobodyfont[it-three] \ss\tf\getbuffer [Sampler] \stoptext Assistance or explanation is welcome. This is just for a sampler -- the font with just three weights when used in a real project is fine. I do not know if the problem is with the font or with ConTeXt or with my expectations. i donloaded the fonts from https://github.com/indestructible-type/Jost/tree/master/Finished/otf and this shows what you run into: \definefont [JHair] [jost-100-hairline*default] \definefont [JHairI] [jost-100-hairlineitalic*default] \definefontfeature[ss01][ss01=yes] \startbuffer[ss01] \hbox\bgroup \char 97\relax \char 224\relax \char 225\relax \char 226\relax \char 227\relax \char 228\relax \char 229\relax \char 257\relax \char 259\relax \char 261\relax \char 1072\relax \egroup \stopbuffer \starttext \startlines {\type{default } \JHair \getbuffer[ss01]} {\type{enabled } \JHair \addff{ss01}\getbuffer[ss01]} {\type{disabled} \JHair \subff{ss01}\getbuffer[ss01]} {\type{default } \JHairI\getbuffer[ss01]} {\type{enabled } \JHairI\addff{ss01}\getbuffer[ss01]} {\type{disabled} \JHairI\subff{ss01}\getbuffer[ss01]} \stoplines \stoptext btw, this happens often, like with oldstyle, the wished default is the hard coded default so one has to enable/disable now, what you miss is that you define a font without applying any features ... 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 ___
Re: [NTG-context] poem as a sidefloat
Henning Hraban Ramm schrieb am 25.09.2019 um 21:37: The following works, except: - There’s too much space (2 lines?) within the frame before the poem. Use the framedtext environment. - I’d like to insert some space below the float, spaceafter doesn’t work. You nee sidespacebefore/after but you can only set it for *all* floats. \definefloat [poem] % \setupfloat % [sidespacebefore=medium] \setupfloat [poem] [background=color, backgroundcolor=cyan] \setupcaption [poem] [number=none] \starttext \dorecurse{2}{\samplefile{knuth}} \startplacefloat [poem] [location=left] \startframedtext [frame=off,width=fit,offset=0.25ex] \startlines [style=mono] lichtung manche meinen lechts und rinks kann man nicht velwechsern. werch ein illtum! \wordright{ernst jandl} \stoplines \stopframedtext \stopplacefloat \dorecurse{2}{\samplefile{knuth}} \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 ___
Re: [NTG-context] poem as a sidefloat
> Am 2019-09-25 um 20:45 schrieb Wolfgang Schuster > : > > Henning Hraban Ramm schrieb am 25.09.2019 um 19:35: >> Hi, I’d like to have a small poem beside my text. >> My approach doesn’t work, with or without \framed: >> >> Since I need this only once, I thought I don’t need to define or setup my >> own float. >> >> \setupfloat inherits from \setupframed, but the parameters width, style and >> background(color) don’t work. >> Aren’t they supposed to work in \startplacefloat? >> >> How can I suppress the caption? ("none" is supposed to work with >> \placefloat, but at least doesn’t in \startplacefloat) > The first argument of \startplacefloat takes the name of the float instance, > e.g. figure (\startplacefloat [figure]) and the second argument a limited > list of keys. All other options like the background color have to be set with > \setupfloat and \setupcation. >> With or without framed, vbox and lines didn’t change much. (Of course >> \framed adds a frame, but the text isn’t within). > You have to put the poem in a framed or framedtext environment with the > setting width=fit. There is no way to to do this with the float environment > alone. Thank you! The following works, except: - There’s too much space (2 lines?) within the frame before the poem. - I’d like to insert some space below the float, spaceafter doesn’t work. \definefloat[poem] \setupfloat[poem][ location=left, % doesn’t work width=0.33\textwidth, background=color,backgroundcolor=cyan, spaceafter=1em, % doesn’t work ] \setupcaption[poem][ location=none, number=no, ] \starttext \dorecurse{2}{\input knuth} \startplacefloat[poem][location=left,]% \framedtext[ frame=off, width=fit, style=\tt, %background=color,backgroundcolor=yellow, ]{% \startlines% lichtung manche meinen lechts und rinks kann man nicht velwechsern. werch ein illtum! \wordright{ernst jandl} \stoplines } \stopplacefloat \dorecurse{2}{\input knuth} \stoptext Grüßlinge, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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] poem as a sidefloat
Hi, I’d like to have a small poem beside my text. My approach doesn’t work, with or without \framed: Since I need this only once, I thought I don’t need to define or setup my own float. \setupfloat inherits from \setupframed, but the parameters width, style and background(color) don’t work. Aren’t they supposed to work in \startplacefloat? How can I suppress the caption? ("none" is supposed to work with \placefloat, but at least doesn’t in \startplacefloat) With or without framed, vbox and lines didn’t change much. (Of course \framed adds a frame, but the text isn’t within). \starttext \dorecurse{2}{\input knuth} \startplacefloat[ title=none, % doesn’t work numbering=no, % wrong location=left, width=.33\textwidth, % doesn’t work style=\tt, % doesn’t work background=color,backgroundcolor=cyan, % doesn’t work ]% %\framed[ % width=.33\textwidth, % style=\tt, % background=color,backgroundcolor=yellow, %]{\vbox{% \startlines lichtung manche meinen lechts und rinks kann man nicht velwechsern. werch ein illtum! \wordright{ernst jandl} \stoplines %}} \stopplacefloat \dorecurse{2}{\input knuth} \stoptext Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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 ___