[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] How to make superscript text match footnote mark formatting?
\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? --Joel ___ 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: Define a new command that inherits from multiple other command options
ai2472206...@yeah.net schrieb am 25.04.2024 um 10:24: hi! I'm new to ConTeXt. I want to define a command with sidenote function. This [setupsidenote] command inherits the options of [setupmargindata], [setupcounter] and [setupframed]. just like [setupenumeration] inherits the option of [setupcounter]. I've defined the following sidenote command by searching, and I know how to define a new option for it. But what I don't know is how to get it to inherit the options of other commands and perform these features correctly. Any clue is warmly welcome. Hi ???, not all commands provide a way to inherit their options but the "framed" and "counter" mechanism supports it. To use the framed mechanism with your own command replace \installcommandhandler with \installframedcommandhandler. This creates a command named \inherited...framed which can be customized with the setups of the new namespace. begin example \unprotect \installnamespace {sidenote} \installframedcommandhandler \sidenote {sidenote} \sidenote \protect \starttext \inheritedsidenoteframed{Text in a frame!} \setupsidenote[framecolor=red,width=8cm,height=2cm] \inheritedsidenoteframed{Text in a frame!} \stoptext end example To use the counter mechanism with your commands you have to first use \installcounterassociation to create the two new commands \register...counter (this ensures the default counter values are used when you don't set anything) and \synchronize...counters (which updates the counter values when you use the setup of your own command). Unlike the framed mechanism this no longer works with the root instance of your own commands because we create a new counter only when you create a instance (with \define...) of the new command. begin example \unprotect \installnamespace{sidenote} \installcommandhandler \sidenote {sidenote} \sidenote \installcounterassociation{sidenote} \appendtoks \registersidenotecounter\currentsidenote \definecounter[\currentsidenote]% \to \everydefinesidenote \appendtoks \synchronizesidenotecounters \to \everysetupsidenote \protect \starttext % create a new sidenote instance with a associated counter \definesidenote[example] \start % use grouping to keep the sidenote instance local \def\currentsidenote{example}% set the sidenote instance to example \incrementcounter[example]% increment the example/sidenote counter \convertedcounter[example]% print the example/sidenote counter \stop % change the number format of the example/sidenote counter \setupsidenote[example][numberconversion=romannumerals] \start \def\currentsidenote{example} \incrementcounter[example] \convertedcounter[example] \stop \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: Define a new command that inherits from multiple other command options
Thanks for your reply. The kanji part requires a specific font and typescript file, which I defined on my own computer but forgot to add to this example. This is something I didn't take into account. It's true, I need to think about what exactly my command needs, not build an all-powerful command. It's my poor consideration. ___ 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: Define a new command that inherits from multiple other command options
> On 25 Apr 2024, at 09:24, ai2472206...@yeah.net wrote: > > But what I don't know is how to get it to inherit the options of other > commands and perform these features correctly. Your example didn't work for me - none of the Chinese|Japanese[1] characters showed. AFAIK there is no way to "inherit" functionality. You still need to write \setupsidenote to call \setupcounter, \setupframed at the right points to achieve the right effects. What you can do is have \setupsidenote accept all options in one big long list and then pass the ones that apply to setupcounter to each use of \setupcounter, pass on the ones that apply to setupframed to each use of \setupframed and so on. Thsi is releatively easy in Lua where you could define a list of all possible commands and which macro they apply to then loop through it looking to see if that option had been supplied and building a set of parameters for \setupframed, \setupcounter etc. Hope this makes sense. But I feel there's probably a better way - it's a lot of effort to go to in order to have a single "does it all macro" instead of calling two or three macros each time. Regards, [1] Apologies for my ignorance. — 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://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: wrong spacing after command with optional arguments
On 4/26/24 19:50, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 19:04: >> I tried this approach (I hope it isn’t wrong): >> >>\starttext >>\expanded\tolerant\def\MyCommand#_#,#_#,#_#,#_{% > > The \expanded modifier is wrong (I guess you meant \unexpanded) but > which check for the number of arguments you use doesn't matter in a > document. You are right, I meant \unexpanded. > The LMTX version of the \iffourthargument etc. checks is the > \ifarguments commands where you use \or to set a case for the number of > argument passed. Many thanks for explaining this too. >> But what are these "#_" (which don’t seem to come from TeX)? > > Hans added many additions to command parameters in Luametatex and #_ > means the argument to a commands has to be enclosed in braces while #1 > allows you to pass text without it. I get it now. > You can find a list with all new command parameters in lowlevel-macros.pdf. An interesting reading for the weekend. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: wrong spacing after command with optional arguments
Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 19:04: On 4/26/24 18:18, Wolfgang Schuster wrote: Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 17:29: What is wrong in my definition above? There is nothing wrong, this is just a side effect of the scanner used with the \do...groupempty commands. To have more control about this behavior use the \tolerant modifier for \def to change it. Many thanks for your reply, Wolfgang. I tried this approach (I hope it isn’t wrong): \starttext \expanded\tolerant\def\MyCommand#_#,#_#,#_#,#_{% \doiftextelse{#4}% {#4} {\doiftextelse{#3} {#3} {#2}}} The \expanded modifier is wrong (I guess you meant \unexpanded) but which check for the number of arguments you use doesn't matter in a document. The LMTX version of the \iffourthargument etc. checks is the \ifarguments commands where you use \or to set a case for the number of argument passed. \protected\tolerant\def\MyCommand#_#,#_#,#_#,#_% {\ifarguments % no arguments are passed \or #1% one argument is passed \or #2% two arguments are passed \or #3% three arguments are passed \or #4% four arguments are passed \fi} \MyCommand{}{second}{third}{fourth},\\ \MyCommand{}{second}{third}{fourth} e,\\ \MyCommand{}{second}{third},\\ \MyCommand{}{second}{third} e,\\ \MyCommand{}{second},\\ \MyCommand{}{second} e,\\ \stoptext BTW, this is the first time I see #_ instead of #1. There is no way to search for "#_" in the wiki. Grepping the source, "#_" seems to be used for optional arguments (mainly in syst-aux.mkxl). But what are these "#_" (which don’t seem to come from TeX)? Hans added many additions to command parameters in Luametatex and #_ means the argument to a commands has to be enclosed in braces while #1 allows you to pass text without it. In the following example \CommandA take in the first case "a" as argument while CommandB ignores it and would only accept "{a}" with braces around it. begin example \def\CommandA#1{(#1)} \tolerant\def\CommandB#_{(#1)} \starttext \CommandA abc\par \CommandB abc\blank \CommandA {ab}c\par \CommandB {ab}c\blank \stoptext end example You can find a list with all new command parameters in lowlevel-macros.pdf. 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
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: wrong spacing after command with optional arguments
On 4/26/24 18:18, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 17:29: >> What is wrong in my definition above? > > There is nothing wrong, this is just a side effect of the scanner used > with the \do...groupempty commands. To have more control about this > behavior use the \tolerant modifier for \def to change it. Many thanks for your reply, Wolfgang. I tried this approach (I hope it isn’t wrong): \starttext \expanded\tolerant\def\MyCommand#_#,#_#,#_#,#_{% \doiftextelse{#4}% {#4} {\doiftextelse{#3} {#3} {#2}}} \MyCommand{}{second}{third}{fourth},\\ \MyCommand{}{second}{third}{fourth} e,\\ \MyCommand{}{second}{third},\\ \MyCommand{}{second}{third} e,\\ \MyCommand{}{second},\\ \MyCommand{}{second} e,\\ \stoptext BTW, this is the first time I see #_ instead of #1. There is no way to search for "#_" in the wiki. Grepping the source, "#_" seems to be used for optional arguments (mainly in syst-aux.mkxl). But what are these "#_" (which don’t seem to come from TeX)? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: wrong spacing after command with optional arguments
Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 17:29: Dear list, I have the following sample: \starttext \def\MyCommand{\doquadruplegroupempty\doMyCommand} \def\doMyCommand#1#2#3#4{% \iffourthargument #4% \orelse\ifthirdargument #3% \else #2% \fi} \MyCommand{}{second}{third}{fourth},\\ \MyCommand{}{second}{third}{fourth} e,\\ \MyCommand{}{second}{third},\\ \MyCommand{}{second}{third} e,\\ \MyCommand{}{second},\\ \MyCommand{}{second} e,\\ \stoptext I don‘t know why only the command gets the space after right only when the four arguments are provided. What is wrong in my definition above? There is nothing wrong, this is just a side effect of the scanner used with the \do...groupempty commands. To have more control about this behavior use the \tolerant modifier for \def to change it. begin example \tolerant\def\CommandA#_#*#_#*#_#*#_{(#1)(#2)(#3)(#4)} \tolerant\def\CommandB#_#,#_#,#_#,#_{(#1)(#2)(#3)(#4)} \starttext A: \CommandA{a} xxx\par B: \CommandB{a} xxx\blank A: \CommandA{a}{b} xxx\par B: \CommandB{a}{b} xxx\blank A: \CommandA{a}{b}{c}xxx\par B: \CommandB{a}{b}{c}xxx\blank A: \CommandA{a}{b}{c}{d} xxx\par B: \CommandB{a}{b}{c}{d} xxx\blank \stoptext end example Another way to avoid this is to create a command with a key-value list. begin example \tolerant\def\Command[#1]% {\begingroup \getdummyparameters[#1]% \doifsomething{\dummyparameter{a}}{(\dummyparameter{a})}% \doifsomething{\dummyparameter{b}}{(\dummyparameter{b})}% \doifsomething{\dummyparameter{c}}{(\dummyparameter{c})}% \doifsomething{\dummyparameter{d}}{(\dummyparameter{d})}% \endgroup} \starttext \Command[a=1,b=2,c=3,d=4] xxx\par \Command[a=1,c=3] xxx\par \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
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] wrong spacing after command with optional arguments
Dear list, I have the following sample: \starttext \def\MyCommand{\doquadruplegroupempty\doMyCommand} \def\doMyCommand#1#2#3#4{% \iffourthargument #4% \orelse\ifthirdargument #3% \else #2% \fi} \MyCommand{}{second}{third}{fourth},\\ \MyCommand{}{second}{third}{fourth} e,\\ \MyCommand{}{second}{third},\\ \MyCommand{}{second}{third} e,\\ \MyCommand{}{second},\\ \MyCommand{}{second} e,\\ \stoptext I don‘t know why only the command gets the space after right only when the four arguments are provided. What is wrong in my definition above? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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] Re: The graph is not visible.
Hi, Thanks for your help. I did several tests playing only with the code of component 5 which interferes with that of component 14. @Aditya begingroup; . endgroup; does not work. @Hans save defaultfont, defaultscale; maybe also: save circle, p, q, b ; I get an empty rectangle in place of the graph in composant 5. @Taco The solution that works is to add component 14 to the code numeric a, b; Fabrice Le ven. 26 avr. 2024 à 10:45, Aditya Mahajan a écrit : > On Fri, 26 Apr 2024, Taco Hoekwater wrote: > > > > > > > > On 25 Apr 2024, at 23:12, Fabrice Couvreur < > fabrice1.couvr...@gmail.com> wrote: > > > > > > Hi, > > > Here is the code that interferes with the graph from the last chapter > but why ? > > > > Because of this “path b”: > > > > > path circle, p, q, b; > > > > which interferes with the assignment line from the other graphic code: > > > > > b := xpart(reverse C_f intersectionpoint reverse C_g); > > > > because there “b” is a now a path, not a numeric. > > > > Adding > > > >numeric a,b; > > > > fixes the problem in chapter 14. > > Woundn't newnumeric be better? > > There are very few instances where I want variables defined in one block > to be reused in another block. So, I almost always use > > \startMPcode > begingroup; > > endgroup; > \stopMPcode > > to avoid such issues. > > > 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 > > _______ > ___ 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: start/stopregister
On 4/26/24 10:22 AM, Hans Hagen wrote: That's because mkii is AI enhanced. Can you try this: Ah, I see where I was wrong, thank you! I'm mapping from xml, so I became confused with the optional parameters that I write as attributes, with a number of ifs... But now it should be clear! All best Thomas ___ 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: The graph is not visible.
On Fri, 26 Apr 2024, Taco Hoekwater wrote: > > > > On 25 Apr 2024, at 23:12, Fabrice Couvreur > > wrote: > > > > Hi, > > Here is the code that interferes with the graph from the last chapter but > > why ? > > Because of this “path b”: > > > path circle, p, q, b; > > which interferes with the assignment line from the other graphic code: > > > b := xpart(reverse C_f intersectionpoint reverse C_g); > > because there “b” is a now a path, not a numeric. > > Adding > >numeric a,b; > > fixes the problem in chapter 14. Woundn't newnumeric be better? There are very few instances where I want variables defined in one block to be reused in another block. So, I almost always use \startMPcode begingroup; endgroup; \stopMPcode to avoid such issues. 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: start/stopregister
On 4/26/2024 9:54 AM, Thomas A. Schmitz wrote: On 4/26/24 9:30 AM, Thomas A. Schmitz wrote: And here I am again! Both in mkiv and in mkxl, start/stopregister does not work when there is already an index entry before. Example below! All best Thomas \setuppapersize [A6] \starttext A\index{A} B \page A\startregister [index] {A} B\startregister [index] [B] {B} \dorecurse {10} {\input tufte} A\stopregister [index] {A} B\stopregister [index] [B] \page \placeregister[index] \stoptext And I'm not even sure if this is allowed to say anymore, but: works in mkii... That's because mkii is AI enhanced. Can you try this: \setuppapersize [A6] \starttext A\index{A} B \page \stopregister [index] [A] B> \stopregister [index] [B] \page \placeregister[index] \stoptext (Watch the [A] vs {A} usage where [A] is the label used for matching the potentially weiord nested start/stop ... maybe we need different aliases for these, like \fromregister and \toregister.) 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: start/stopregister
On 4/26/24 9:30 AM, Thomas A. Schmitz wrote: And here I am again! Both in mkiv and in mkxl, start/stopregister does not work when there is already an index entry before. Example below! All best Thomas \setuppapersize [A6] \starttext A\index{A} B \page A\startregister [index] {A} B\startregister [index] [B] {B} \dorecurse {10} {\input tufte} A\stopregister [index] {A} B\stopregister [index] [B] \page \placeregister[index] \stoptext And I'm not even sure if this is allowed to say anymore, but: works in mkii... Thomas ___ 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: start/stopregister
On 4/25/24 6:27 PM, Thomas A. Schmitz wrote: Ah, simple typo! After fixing abel to label, startregister gives the expected results again! Thanks Hans! I may be back with more register questions soon... And here I am again! Both in mkiv and in mkxl, start/stopregister does not work when there is already an index entry before. Example below! All best Thomas \setuppapersize [A6] \starttext A\index{A} B \page A\startregister [index] {A} B\startregister [index] [B] {B} \dorecurse {10} {\input tufte} A\stopregister [index] {A} B\stopregister [index] [B] \page \placeregister[index] \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: The graph is not visible.
> On 25 Apr 2024, at 23:12, Fabrice Couvreur > wrote: > > Hi, > Here is the code that interferes with the graph from the last chapter but why > ? Because of this “path b”: > path circle, p, q, b; which interferes with the assignment line from the other graphic code: > b := xpart(reverse C_f intersectionpoint reverse C_g); because there “b” is a now a path, not a numeric. Adding numeric a,b; fixes the problem in chapter 14. But why it does not affect chapters 6-13, that I do not understand. — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: The graph is not visible.
Hi, Here is the code that interferes with the graph from the last chapter but why ? \startMPcode pickup pencircle xscaled 1; defaultfont := "texgyrepagella-regular*default" ; defaultscale := 0.8 ; path circle, p, q, b; circle = fullcircle xscaled 5cm yscaled 3.5cm; p = (point 2 of circle .. (-0.15cm,1.5cm) ..(0,0)..(0.15cm,-1.5cm).. point 6 of circle); q = (subpath(0,2) of circle -- p -- subpath(6,8) of circle --cycle); b = (reverse p -- subpath(2,6) of circle -- cycle); definecolor [ name = "mp:red", r = 1 ]; definecolor [ name = "mp:blue", r = 0.54, g = 0.17, b = 0.89 ]; fill q withcolor "mp:red" withtransparency(1,0.4) ; fill b withcolor "mp:blue" withtransparency(1,0.4) ; draw circle; draw p; label("$\overline{\text{A}}$",( 1.5cm,0)); label("$\text{A}$",(-1.5cm,0)); label.top("E",(0,1.85cm)); \stopMPcode Le jeu. 25 avr. 2024 à 16:55, Fabrice Couvreur a écrit : > Hi Hans and Taco, > @Hans, I compiled by commenting and uncommenting one component at a time; > it is component 5 which interferes with the metapost code of component 14 > All I have to do now is find out what the cause is. > Fabrice > > Le jeu. 25 avr. 2024 à 16:40, Taco Hoekwater a écrit : > >> >> >> > On 25 Apr 2024, at 16:08, Fabrice Couvreur >> wrote: >> > >> > Hi Taco, >> > I knew I wouldn't be able to explain what was happening. >> > The code works perfectly and the figure is clearly visible in the >> component chapter-14 : >> >> It is probably not related to the figure itself. Something may be >> different in this component compared to the other ones. I cannot really >> say, of course. Still, using external image instead of inline metapost may >> be fix it. Not elegant, but if it works it works! >> >> Good luck, >> Taco >> >> >> > >> > \startcomponent[chapter-14] >> > \startMPpage >> > ... >> > \stopMPpage >> > \stopcomponent >> > >> > But if I compile my project, it disappears !! >> > >> > \startproduct[terminale-manual] >> > \startbodymatter >> > \component[chapter-1] >> > \component[chapter-2] >> > \component[chapter-3] >> > \component[chapter-4] >> > \component[chapter-5] >> > \component[chapter-6] >> > \component[chapter-7] >> > \component[chapter-8] >> > \component[chapter-9] >> > \component[chapter-10] >> > \component[chapter-11] >> > \component[chapter-12] >> > \component[chapter-13] >> > \component[chapter-14] >> > \stopbodymatter >> > \stopproduct >> >> — >> Taco Hoekwater E: t...@bittext.nl >> genderfluid (all pronouns) >> >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://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: start/stopregister
On 4/25/24 18:16, Hans Hagen wrote: Let's seen if we can make Thomas more of an expert as he's zooming in on the issue: extendregister { metadata = { name = name }, references = { abel = label }, } Let me know if you't see it. Ah, simple typo! After fixing abel to label, startregister gives the expected results again! Thanks Hans! I may be back with more register questions soon... Thomas ___ 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: start/stopregister
On 4/25/2024 4:51 PM, Taco Hoekwater wrote: On 25 Apr 2024, at 16:45, Thomas A. Schmitz wrote: On 4/25/24 16:13, Henning Hraban Ramm wrote: I’m using it like \startregister[index][bibliografie]{Bibliografie} … \stopregister[index][bibliografie] i.e. very similar to your example, and can confirm it doesn’t result in a page range in the index. Also gives no error. Since I've become an expert on tuc files since yesterday (ha!): if I compare the tuc from a mkiv and a mkxl run, I see that mkiv produces an entry ["lastrealpage"]=9 in the references table, mkxl doesn't. This appears to be the relevant bit, and it is connected with the replacement of realpageno by c_realpageno in line 638 of strc-reg.lmt references.lastrealpage = texgetcount(c_realpageno) Let's seen if we can make Thomas more of an expert as he's zooming in on the issue: extendregister { metadata = { name = name }, references = { abel = label }, } Let me know if you't see it. Possibly related: I noticed last week that mkxl does not update the legacy counter \pageno any more for every page. i'll check it Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)
I solved it, although it's kinda hacky. I'm pretty sure that publications.citevariants.short is not meant to be called directly. Do you know why `context.getdetail(dataset, tag, "author")` does not work in render_cite? It always returns nil. ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] \setupbtxlist[aps][ alternative=b, distance=.5em, ] \definebtx[aps:cite:special][aps:cite] \startluacode function render_cite(dataset, tag, righttext) local luadata = publications.datasets[dataset].luadata local entry = luadata[tag] local extrasign = "" if entry.author:lower():find("knuth") then extrasign = ">" end context("[" .. extrasign) print(righttext) publications.citevariants.short({dataset = dataset, reference = tag, variant = "short", righttext = righttext}) context("]") end \stopluacode \startsetups btx:aps:cite:special \btxcitereference \ctxlua{render_cite([==[\currentbtxdataset]==], [==[\currentbtxtag]==], [==[\currentbtxrighttext]==])} \stopsetups \setupbtx[aps:cite][alternative=special] \starttext \def\comma{,} Knuth developed \TeX~\cite[knuth1] Several persons said something~\cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` Gerion Am Dienstag, 23. April 2024, 16:03:50 MESZ schrieb Gerion Entrup: > Here is a solution for the first part of my question. This is based on > https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html > and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi: > > It display now the citation _and_ numbering labels in the short form: > ``` > \setupinteraction[state=start] > > \startbuffer[testdata] > @Book{knuth1, > author = {Donald E. Knuth}, > title = {TEX and METAFONT. New directions in typesetting}, > year = {1979}, > publisher = {Addison-Wesley}, > } > @Article{someother, > author = {Some Person and Some Otherperson}, > title = {Another title}, > year = {1900}, > } > \stopbuffer > > % enable tracing > \enabletrackers[publications, publications.crossref, publications.details, > publications.cite, publications.strings] > > \usebtxdataset[main][testdata.buffer] > \usebtxdefinitions[aps] > \setupbtx[dataset=main] > \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] > \setupbtxlist[aps][ > alternative=b, > distance=.5em, > ] > \setupbtx[aps:cite][alternative=short] > > \starttext > > Knuth developed \TeX \cite[knuth1] > Several persons said something \cite[someother]. > > \placelistofpublications[bibrendering] > > \stoptext > ``` > > The remaining part now is to mark publications of Knuth in a different way. > I have tried this and failed. Here is my code so far: > ``` > \startluacode > function render_cite(short, author) > print(author) > if author:lower():find("knuth") then > context("[>" .. short .. "]") > else > context("[" .. short .. "]") > end > end > \stopluacode > \definebtx[aps:cite:special][aps:cite] > \startsetups btx:aps:cite:special > \btxcitereference > \ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])} > \stopsetups > % use it with \cite[special][knuth1] > ``` > This has several problems: > - \btxflush{short} does not work as I expected that. How can I get the short > form? > - \btxflush to pass arguments to lua does not work as intended. On the lua > side the >variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. > Knuth". >How can I pass the data? > > I use Lua only because I find it more convenient as a programming language. > If a > plain tex solution is simpler, I'm happy to use that. > > > Another question that came up while studying the source code: > What effect have \c!, \s!, and \v!? These commands exist a lot in the above > cited files. > > Gerion > > > Am Mittwoch, 17. Ap
[NTG-context] Re: The graph is not visible.
Hi Hans and Taco, @Hans, I compiled by commenting and uncommenting one component at a time; it is component 5 which interferes with the metapost code of component 14 All I have to do now is find out what the cause is. Fabrice Le jeu. 25 avr. 2024 à 16:40, Taco Hoekwater a écrit : > > > > On 25 Apr 2024, at 16:08, Fabrice Couvreur > wrote: > > > > Hi Taco, > > I knew I wouldn't be able to explain what was happening. > > The code works perfectly and the figure is clearly visible in the > component chapter-14 : > > It is probably not related to the figure itself. Something may be > different in this component compared to the other ones. I cannot really > say, of course. Still, using external image instead of inline metapost may > be fix it. Not elegant, but if it works it works! > > Good luck, > Taco > > > > > > \startcomponent[chapter-14] > > \startMPpage > > ... > > \stopMPpage > > \stopcomponent > > > > But if I compile my project, it disappears !! > > > > \startproduct[terminale-manual] > > \startbodymatter > > \component[chapter-1] > > \component[chapter-2] > > \component[chapter-3] > > \component[chapter-4] > > \component[chapter-5] > > \component[chapter-6] > > \component[chapter-7] > > \component[chapter-8] > > \component[chapter-9] > > \component[chapter-10] > > \component[chapter-11] > > \component[chapter-12] > > \component[chapter-13] > > \component[chapter-14] > > \stopbodymatter > > \stopproduct > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://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: start/stopregister
> On 25 Apr 2024, at 16:45, Thomas A. Schmitz > wrote: > > On 4/25/24 16:13, Henning Hraban Ramm wrote: >> I’m using it like >> \startregister[index][bibliografie]{Bibliografie} >> … >> \stopregister[index][bibliografie] >> i.e. very similar to your example, and can confirm it doesn’t result in a >> page range in the index. Also gives no error. > > Since I've become an expert on tuc files since yesterday (ha!): if I compare > the tuc from a mkiv and a mkxl run, I see that mkiv produces an entry > ["lastrealpage"]=9 in the references table, mkxl doesn't. This appears to be > the relevant bit, and it is connected with the replacement of realpageno by > c_realpageno in line 638 of strc-reg.lmt > > references.lastrealpage = texgetcount(c_realpageno) Possibly related: I noticed last week that mkxl does not update the legacy counter \pageno any more for every page. Best wishes, Taco — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: start/stopregister
On 4/25/24 16:13, Henning Hraban Ramm wrote: I’m using it like \startregister[index][bibliografie]{Bibliografie} … \stopregister[index][bibliografie] i.e. very similar to your example, and can confirm it doesn’t result in a page range in the index. Also gives no error. Since I've become an expert on tuc files since yesterday (ha!): if I compare the tuc from a mkiv and a mkxl run, I see that mkiv produces an entry ["lastrealpage"]=9 in the references table, mkxl doesn't. This appears to be the relevant bit, and it is connected with the replacement of realpageno by c_realpageno in line 638 of strc-reg.lmt references.lastrealpage = texgetcount(c_realpageno) But that's as far as I could get... Thomas ___ 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: The graph is not visible.
> On 25 Apr 2024, at 16:08, Fabrice Couvreur > wrote: > > Hi Taco, > I knew I wouldn't be able to explain what was happening. > The code works perfectly and the figure is clearly visible in the component > chapter-14 : It is probably not related to the figure itself. Something may be different in this component compared to the other ones. I cannot really say, of course. Still, using external image instead of inline metapost may be fix it. Not elegant, but if it works it works! Good luck, Taco > > \startcomponent[chapter-14] > \startMPpage > ... > \stopMPpage > \stopcomponent > > But if I compile my project, it disappears !! > > \startproduct[terminale-manual] > \startbodymatter > \component[chapter-1] > \component[chapter-2] > \component[chapter-3] > \component[chapter-4] > \component[chapter-5] > \component[chapter-6] > \component[chapter-7] > \component[chapter-8] > \component[chapter-9] > \component[chapter-10] > \component[chapter-11] > \component[chapter-12] > \component[chapter-13] > \component[chapter-14] > \stopbodymatter > \stopproduct — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: The graph is not visible.
On 4/25/2024 4:08 PM, Fabrice Couvreur wrote: Hi Taco, I knew I wouldn't be able to explain what was happening. The code works perfectly and the figure is clearly visible in the component chapter-14 : \startcomponent[chapter-14] \startMPpage ... \stopMPpage \stopcomponent But if I compile my project, it disappears !! \startproduct[terminale-manual] \startbodymatter \component[chapter-1] \component[chapter-2] \component[chapter-3] \component[chapter-4] \component[chapter-5] \component[chapter-6] \component[chapter-7] \component[chapter-8] \component[chapter-9] \component[chapter-10] \component[chapter-11] \component[chapter-12] \component[chapter-13] \component[chapter-14] \stopbodymatter \stopproduct -- compile with specific preceding chapters commented -- when the interfering one is found, make a copy and strip till the problem is gone it might be that you redefine something metapost 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: start/stopregister
Am 25.04.24 um 15:44 schrieb Thomas A. Schmitz: Hi all, has \startregister been superseded in luametatex or is it not yet implemented? I tried to read strc-reg.lmt but couldn't figure out what is going on. The following silly minimal test produces the expected result with mkiv but not in mkxl. All best Thomas \setuppapersize [A6] \starttext A\index{A} B\startregister [index] [B] {B} \dorecurse {10} {\input tufte} A\index{A} B\stopregister [index] [B] \page \placeregister[index] \stoptext I’m using it like \startregister[index][bibliografie]{Bibliografie} … \stopregister[index][bibliografie] i.e. very similar to your example, and can confirm it doesn’t result in a page range in the index. Also gives no error. 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: The graph is not visible.
Hi Taco, I knew I wouldn't be able to explain what was happening. The code works perfectly and the figure is clearly visible in the component chapter-14 : \startcomponent[chapter-14] \startMPpage ... \stopMPpage \stopcomponent But if I compile my project, it disappears !! \startproduct[terminale-manual] \startbodymatter \component[chapter-1] \component[chapter-2] \component[chapter-3] \component[chapter-4] \component[chapter-5] \component[chapter-6] \component[chapter-7] \component[chapter-8] \component[chapter-9] \component[chapter-10] \component[chapter-11] \component[chapter-12] \component[chapter-13] \component[chapter-14] \stopbodymatter \stopproduct Le jeu. 25 avr. 2024 à 13:36, Taco Hoekwater a écrit : > H Fabrice, > > You did not provide a good minimum test because the graph by itself > renders fine: > > > > Best wishes, > Taco > (if all else fails, you can replace \startMPcode with \startMPpage and > generate a standalone graph that way) > > > On 25 Apr 2024, at 12:27, Fabrice Couvreur > wrote: > > > > Hi, > > I don't know if I can explain the problem I'm having. I made a project > with 14 chapters. In each of them, there are graphics embedding metapost > code. I proceed as follows : I compile each chapter alone with lmtx then I > compile the project containing the 14 chapters. I didn't encounter any > problems except with a graphic from the last chapter. It is indeed in > chapter 14 but not in the project ! I give the code for this graph. > > Thanks. > > Fabrice > > > > \startMPcode > > > >interim linejoin := mitered; > >interim ahangle := 30; > >numeric u, pi; > > > >pi = 3.141592653589793; > >u = 1.5cm; > > > >vardef graph_of_function (suffix f) (expr xmin, xmax, > xsep) = > > for x = xmin step xsep until xmax: (x, f(x)) .. endfor > (xmax, f(xmax)) > >enddef ; > > > >vardef vline (suffix f, g) (expr x) = (x, min(f(x), > g(x))) -- (x, max(f(x),g(x))) enddef; > > > >vardef area_between_functions (suffix f, g)(expr a, b, > xsep) = > > buildcycle(graph_of_function(f, a, b, xsep), vline(f, > g, b), > > reverse graph_of_function(g, a, b, xsep), reverse > vline(f, g, a)) > >enddef; > > > >vardef xaxis (expr xmin, xmax) = (xmin, 0) -- (xmax, 0) > enddef ; > >vardef yaxis (expr ymin, ymax) = (0, ymin) -- (0, ymax) > enddef ; > > > > > >xmin:=-pi/2; xmax := 3*pi/2; > >ymin := -1.5; ymax := 5; > > > > > >vardef f(expr x)= exp(-x)*(-cos(x)+sin(x)+1) enddef; > >vardef g(expr x)=-exp(-x)*cos(x) enddef; > >path C_f, C_g; > >C_f = graph_of_function(f,xmin, xmax, .1); > >C_g = graph_of_function(g, xmin, xmax, .1); > > > >a := xpart(C_f intersectionpoint C_g); > >b := xpart(reverse C_f intersectionpoint reverse C_g); > > > >fill (area_between_functions(f, g, a, b, 0.1)) scaled u > withcolor 0.4[white, blue]; > >draw C_f scaled u withcolor blue; > >draw C_g scaled u withcolor blue; > > > > > >\stopMPcode > > > ___ > > 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 > > > ___ > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://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] start/stopregister
Hi all, has \startregister been superseded in luametatex or is it not yet implemented? I tried to read strc-reg.lmt but couldn't figure out what is going on. The following silly minimal test produces the expected result with mkiv but not in mkxl. All best Thomas \setuppapersize [A6] \starttext A\index{A} B\startregister [index] [B] {B} \dorecurse {10} {\input tufte} A\index{A} B\stopregister [index] [B] \page \placeregister[index] \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: The graph is not visible.
H Fabrice, You did not provide a good minimum test because the graph by itself renders fine: fabr.pdf Description: Adobe PDF document Best wishes, Taco (if all else fails, you can replace \startMPcode with \startMPpage and generate a standalone graph that way) > On 25 Apr 2024, at 12:27, Fabrice Couvreur > wrote: > > Hi, > I don't know if I can explain the problem I'm having. I made a project with > 14 chapters. In each of them, there are graphics embedding metapost code. I > proceed as follows : I compile each chapter alone with lmtx then I compile > the project containing the 14 chapters. I didn't encounter any problems > except with a graphic from the last chapter. It is indeed in chapter 14 but > not in the project ! I give the code for this graph. > Thanks. > Fabrice > > \startMPcode > >interim linejoin := mitered; >interim ahangle := 30; >numeric u, pi; > >pi = 3.141592653589793; >u = 1.5cm; > >vardef graph_of_function (suffix f) (expr xmin, xmax, xsep) = > for x = xmin step xsep until xmax: (x, f(x)) .. endfor > (xmax, f(xmax)) >enddef ; > >vardef vline (suffix f, g) (expr x) = (x, min(f(x), g(x))) -- > (x, max(f(x),g(x))) enddef; > >vardef area_between_functions (suffix f, g)(expr a, b, xsep) = > buildcycle(graph_of_function(f, a, b, xsep), vline(f, g, > b), > reverse graph_of_function(g, a, b, xsep), reverse vline(f, > g, a)) >enddef; > >vardef xaxis (expr xmin, xmax) = (xmin, 0) -- (xmax, 0) enddef > ; >vardef yaxis (expr ymin, ymax) = (0, ymin) -- (0, ymax) enddef > ; > > >xmin:=-pi/2; xmax := 3*pi/2; >ymin := -1.5; ymax := 5; > > >vardef f(expr x)= exp(-x)*(-cos(x)+sin(x)+1) enddef; >vardef g(expr x)=-exp(-x)*cos(x) enddef; >path C_f, C_g; >C_f = graph_of_function(f,xmin, xmax, .1); >C_g = graph_of_function(g, xmin, xmax, .1); > >a := xpart(C_f intersectionpoint C_g); >b := xpart(reverse C_f intersectionpoint reverse C_g); > >fill (area_between_functions(f, g, a, b, 0.1)) scaled u > withcolor 0.4[white, blue]; >draw C_f scaled u withcolor blue; >draw C_g scaled u withcolor blue; > > >\stopMPcode > _______ > 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 > ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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] The graph is not visible.
Hi, I don't know if I can explain the problem I'm having. I made a project with 14 chapters. In each of them, there are graphics embedding metapost code. I proceed as follows : I compile each chapter alone with lmtx then I compile the project containing the 14 chapters. I didn't encounter any problems except with a graphic from the last chapter. It is indeed in chapter 14 but not in the project ! I give the code for this graph. Thanks. Fabrice \startMPcode interim linejoin := mitered; interim ahangle := 30; numeric u, pi; pi = 3.141592653589793; u = 1.5cm; vardef graph_of_function (suffix f) (expr xmin, xmax, xsep) = for x = xmin step xsep until xmax: (x, f(x)) .. endfor (xmax, f(xmax)) enddef ; vardef vline (suffix f, g) (expr x) = (x, min(f(x), g(x))) -- (x, max(f(x),g(x))) enddef; vardef area_between_functions (suffix f, g)(expr a, b, xsep) = buildcycle(graph_of_function(f, a, b, xsep), vline(f, g, b), reverse graph_of_function(g, a, b, xsep), reverse vline(f, g, a)) enddef; vardef xaxis (expr xmin, xmax) = (xmin, 0) -- (xmax, 0) enddef ; vardef yaxis (expr ymin, ymax) = (0, ymin) -- (0, ymax) enddef ; xmin:=-pi/2; xmax := 3*pi/2; ymin := -1.5; ymax := 5; vardef f(expr x)= exp(-x)*(-cos(x)+sin(x)+1) enddef; vardef g(expr x)=-exp(-x)*cos(x) enddef; path C_f, C_g; C_f = graph_of_function(f,xmin, xmax, .1); C_g = graph_of_function(g, xmin, xmax, .1); a := xpart(C_f intersectionpoint C_g); b := xpart(reverse C_f intersectionpoint reverse C_g); fill (area_between_functions(f, g, a, b, 0.1)) scaled u withcolor 0.4[white, blue]; draw C_f scaled u withcolor blue; draw C_g scaled u withcolor blue; \stopMPcode ___ 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: which parameter is for adjust the distance between items in a list?
You are right. I shall change the parameter `inbetween` in `\setupitemize`. Regards, Hong April 25, 2024 at 4:54 PM, "Henning Hraban Ramm" wrote: > Am 25.04.24 um 10:46 schrieb h...@hongfeng.ch: > >> thank you. >> >> just tried, not worked out yet. >> >> Here it is my text: >> >> ``` >> >> setuplist[height=0] >> >> \startitemize[n] >> >> \item It's impossible --- don't waste my time. >> >> \item It's possible, but not worth doing. >> >> \item I said it was a good ideal all along. >> >> \stopitemize >> >> ``` >> >> Now the distance between the items is equal to the blank space between >> paragraphs. >> >> I want to reduce it equal to the distance between the lines of a paragraph. > > You asked for a list, that is e.g. a table of contents (list of numbered > items like sections or > floats). > > If you want to affect itemizations, use \setupitemize (same as > \setupitemgroup[itemize]). > > https://wiki.contextgarden.net/Command/_setupitemgroup > > Besides, height is a different parameter. > > 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: utiliydata
On 4/25/2024 9:25 AM, Thomas A. Schmitz wrote: Nope, very sorry, can’t figure it out… I see job.register, I see I can access structures.refrences.collected, but what about the next level utilitydata.structures.references.collected={ [""]={ [“REF"]={ What does the empty key do? And how do I retrieve the value of REF.references.realpage? Thomas Sigh, as always: just when I had hit “send,” I figured it out: structures.references.collected[""][REF].references.realpage But I’m not sure if there is an easier/better way. And I still would like to know what the empty string as key does. it's the prefix (namespace) which here is empty (easier to use "" as key than have some exception) 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: which parameter is for adjust the distance between items in a list?
Am 25.04.24 um 10:46 schrieb h...@hongfeng.ch: thank you. just tried, not worked out yet. Here it is my text: ``` setuplist[height=0] \startitemize[n] \item It's impossible --- don't waste my time. \item It's possible, but not worth doing. \item I said it was a good ideal all along. \stopitemize ``` Now the distance between the items is equal to the blank space between paragraphs. I want to reduce it equal to the distance between the lines of a paragraph. You asked for a list, that is e.g. a table of contents (list of numbered items like sections or floats). If you want to affect itemizations, use \setupitemize (same as \setupitemgroup[itemize]). https://wiki.contextgarden.net/Command/_setupitemgroup Besides, height is a different parameter. 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: which parameter is for adjust the distance between items in a list?
thank you. just tried, not worked out yet. Here it is my text: ``` setuplist[height=0] \startitemize[n] \item It's impossible --- don't waste my time. \item It's possible, but not worth doing. \item I said it was a good ideal all along. \stopitemize ``` Now the distance between the items is equal to the blank space between paragraphs. I want to reduce it equal to the distance between the lines of a paragraph. Best, Hong April 25, 2024 at 4:22 PM, "Henning Hraban Ramm" wrote: > Am 25.04.24 um 10:20 schrieb h...@hongfeng.ch: > >> which parameter in `\setuplist` is used for adjusting the distance >> >> between the items of a list? > > Usually it’s the general line height. > > You can use "inbetween=\blank[3pt]" to insert extra space. > > (Untested) > > 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] Define a new command that inherits from multiple other command options
hi! I'm new to ConTeXt. I want to define a command with sidenote function. This [setupsidenote] command inherits the options of [setupmargindata], [setupcounter] and [setupframed]. just like [setupenumeration] inherits the option of [setupcounter]. I've defined the following sidenote command by searching, and I know how to define a new option for it. But what I don't know is how to get it to inherit the options of other commands and perform these features correctly. Any clue is warmly welcome. ``` % macros=mkvi \unprotect \installnamespace {sidenote} \installcommandhandler \sidenote {sidenote} \sidenote \setupsidenote[ align=, conversion=n, way=bytext, style=, ] \definecounter[SidenoteMarkNumber] [prefix=no] \definemargindata [SidenoteContent][outer] [margin=margin,width=\outermarginwidth] \setupmargindata [SidenoteContent][stack=yes,style=\it] \def\sidenotemark{\rawcountervalue[SidenoteMarkNumber]} \def\convertsidenotemark#1{\high{\convertnumber{#1}{\sidenotemark}}} \def\sidenote{\dosingleempty\dosidenote} \def\dosidenote[#1]#2{% \getparameters[SMsidenote] [align=\sidenoteparameter{align}, conversion=\sidenoteparameter{conversion}, way=\sidenoteparameter{way}, #1]% \setupcounter[SidenoteMarkNumber] [#1] \incrementcounter[SidenoteMarkNumber] \convertsidenotemark{\SMsidenoteconversion}% mark in text \SidenoteContent[#1]{\setscript[hanzi]\setup[\SMsidenotealign]% \convertsidenotemark{\SMsidenoteconversion}% mark with note #2 }} \protect \starttext 天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。寒来暑往,秋收冬\sidenote[align=flushleft] {天地玄黄,宇宙洪荒。} \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: which parameter is for adjust the distance between items in a list?
Am 25.04.24 um 10:20 schrieb h...@hongfeng.ch: which parameter in `\setuplist` is used for adjusting the distance between the items of a list? Usually it’s the general line height. You can use "inbetween=\blank[3pt]" to insert extra space. (Untested) 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] which parameter is for adjust the distance between items in a list?
which parameter in `\setuplist` is used for adjusting the distance between the items of a list? ___ 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: utiliydata
> > Nope, very sorry, can’t figure it out… I see job.register, I see I can access > structures.refrences.collected, but what about the next level > > utilitydata.structures.references.collected={ > [""]={ > [“REF"]={ > > What does the empty key do? And how do I retrieve the value of > > REF.references.realpage? > > Thomas Sigh, as always: just when I had hit “send,” I figured it out: structures.references.collected[""][REF].references.realpage But I’m not sure if there is an easier/better way. And I still would like to know what the empty string as key does. Thomas ___ 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: utiliydata
> On 24. Apr 2024, at 17:59, Hans Hagen wrote: > > grep for "job." (i bet you can figure it out and compensate the embaressment > that way) > > Hans Nope, very sorry, can’t figure it out… I see job.register, I see I can access structures.refrences.collected, but what about the next level utilitydata.structures.references.collected={ [""]={ [“REF"]={ What does the empty key do? And how do I retrieve the value of REF.references.realpage? Thomas ___ 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: what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?
garu...@azules.eu schrieb am 20.04.2024 um 23:00: I can not figure out why this progress bar only works when \showframe is activated. When you comment on \showframe, it's as if \realpageno is at zero. (current version: 2024.04.01 08:59) \showframe \startuseMPgraphic{MonGraphisme_MP} numeric n ; n := \number\realpageno ; numeric m ; m := \number\lastpageno ; numeric h ; h := \overlayheight ; numeric w ; w := \overlaywidth ; numeric e ; e := 3mm; numeric r ; r := (((n-1)/(m-1))*w); fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ; fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred; \stopuseMPgraphic \defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}] \setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}] \starttext \dorecurse{10}{\input tufte\page} \stoptext Any clue is warmly welcome You need \setupbackgrounds[state=repeat] which is set when you use \showframe. 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: documentation: parameters of \setuplist
Am 23.04.24 um 23:14 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 23.04.2024 um 21:43: Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm: I tried to complete https://wiki.contextgarden.net/Command/setuplist, but I don’t understand all parameters. Can anyone explain these please: * state (start stop): what does this en-/disable? collecting entries? * label (yes no none Name): language dependent labels? as a prefix or what? You can use the key to set language dependent texts for the section counters in the list entry, with "yes" the values from the document are used but you can also set whatever label you want. Thank you! So it is related to \setuplabeltext as I suspected, while I didn’t understand why we need label _and_ prefix, until I recognized there’s only pageprefix… (I had prefix in my list of parameters, maybe some MkII leftover). \setuplabeltext [en] [chapter=Chapter , appendix=Appendix , hraban=Hraban ] %\setuplist[chapter][label=hraban,width=3cm] \setuplist[chapter][label=yes,width=3cm] Yes, now I understand. 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: documentation: parameters of \setuplist
Am 24.04.24 um 01:00 schrieb Bruce Horrocks: In the source there is a comment relating to location: %D Regular list entries are bound to a specific location in order to get the right %D pagenumber etc.\ associated. When pushing something inbetween (in mkiv) it ends %D up directtly in the list. This is the default because otherwise users will wonder %D why spacing might get messed up (due to an unseen but present node). It is %D possible to force a location by explicitly setting \type {location} to \type %D {here}. %D %D Another way to force a certain order is to set the \type {order} variable when %D placing a list. The \type {command} option only pushes commands into the right %D order, and \type {all} orders all entries (which might be too much). In this case %D no specific location is needed with the inbetween method. Maybe additional %D mechanisms show up some day. See \type {inbetween-001.tex} for an example. I don't really understand what capability the comment is referring to let alone be able to create an example demonstrating the difference. Thank you, so it looks like "location=here" is only used with \writebetweenlist to get the current page number. 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: Why don't footnotes appear in floats or figures?
On 4/24/24 02:15, Joel via ntg-context wrote: > [...] Any idea how I can get current footnote value? Hi Joel, current footnote value can be accessed with \rawcountervalue[footnote], such as in: \starttext \dorecurse{25} {\ \footnote{Footnote \recurselevel}: \rawcountervalue[footnote]\par} \stoptext Just in case it helps, 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: utiliydata
On 4/24/2024 5:41 PM, Thomas A. Schmitz wrote: Hi all, I’m slightly embarrassed because this should be easy, but I can’t figure out how to do this: in the tuc/tua file, I have the complete references of my document. How can I access it from within my Lua code? For instance, something like utilitydata.structures.references.collected.”MyReference”.references.realpage How can this be accessed? grep for "job." (i bet you can figure it out and compensate the embaressment that way) 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] utiliydata
Hi all, I’m slightly embarrassed because this should be easy, but I can’t figure out how to do this: in the tuc/tua file, I have the complete references of my document. How can I access it from within my Lua code? For instance, something like utilitydata.structures.references.collected.”MyReference”.references.realpage How can this be accessed? Thanks a lot and best wishes Thomas ___ 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: documentation: parameters of \setuplist
> On 23 Apr 2024, at 20:43, Henning Hraban Ramm wrote: > > Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm: >> I tried to complete https://wiki.contextgarden.net/Command/setuplist, but I >> don’t understand all parameters. >> Can anyone explain these please: >> * state (start stop): what does this en-/disable? collecting entries? >> * label (yes no none Name): language dependent labels? as a prefix or what? >> * location (none, here): disable placement? when makes this sense? >> * symbol (one two three none default): where is this used? > > One solved, still 4 to go… Please, anyone who used these? In the source there is a comment relating to location: %D Regular list entries are bound to a specific location in order to get the right %D pagenumber etc.\ associated. When pushing something inbetween (in mkiv) it ends %D up directtly in the list. This is the default because otherwise users will wonder %D why spacing might get messed up (due to an unseen but present node). It is %D possible to force a location by explicitly setting \type {location} to \type %D {here}. %D %D Another way to force a certain order is to set the \type {order} variable when %D placing a list. The \type {command} option only pushes commands into the right %D order, and \type {all} orders all entries (which might be too much). In this case %D no specific location is needed with the inbetween method. Maybe additional %D mechanisms show up some day. See \type {inbetween-001.tex} for an example. I don't really understand what capability the comment is referring to let alone be able to create an example demonstrating the difference. — 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://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: Why don't footnotes appear in floats or figures?
Okay, I've been trying many things with this \startpostponing code--if I understand what's happening, its moving the figures to a later page. I'm not sure that's quite ideal, its not fully working with my actual documents, and leaves lots of empty white space, when I'm already in a situation where I need to reduce page count. So I thought an alternative route: (1) have a code that checks "what is current footnote number?" that sets that as a variable \def\currentfoodnote{\somevariableincontextthatgetsfoodnotenumber} (2) adjust my placefigure macro such that the footnote is outside the placefigure, but color it white so its invisible: \define\showafigure{ \cite[author2019]<--somehow hide this invisible \placefigure{Caption\superscript{\currentfootnote}}}{\externalfigure[cow][width=\textwidth]} <--this places a superscript number inside the caption, but it isn't the true marker(3) in the caption, place a superscript number with value to \currentfootnoteIts basically a fake footnote, just a superscript number of the same value as the real footnote. Shouldn't this result work? Any idea how I can get current footnote value? --Joel On Monday, April 22, 2024 at 07:22:24 AM MDT, vm via ntg-context wrote: On 22/04/2024 14:38, Joel via ntg-context wrote: > Is this the correct way to be using the \startpostponing code (see > example below)? > > \starttext > \input knuth > \startpostponing > \placefigure{Caption\footnote{message > A}}{\externalfigure[cow][width=\textwidth]} > \stoppostponing > \stoppostponing double stop ? ___ 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: documentation: parameters of \setuplist
Henning Hraban Ramm schrieb am 23.04.2024 um 21:43: Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm: I tried to complete https://wiki.contextgarden.net/Command/setuplist, but I don’t understand all parameters. Can anyone explain these please: * state (start stop): what does this en-/disable? collecting entries? * label (yes no none Name): language dependent labels? as a prefix or what? You can use the key to set language dependent texts for the section counters in the list entry, with "yes" the values from the document are used but you can also set whatever label you want. \setuplabeltext [en] [chapter=Chapter , appendix=Appendix , hraban=Hraban ] %\setuplist[chapter][label=hraban,width=3cm] \setuplist[chapter][label=yes,width=3cm] \starttext \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \chapter{First chapter} \chapter{Second chapter} \stopbodymatter \startappendices \chapter{First appendix} \stopappendices \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: documentation: parameters of \setuplist
Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm: I tried to complete https://wiki.contextgarden.net/Command/setuplist, but I don’t understand all parameters. Can anyone explain these please: * state (start stop): what does this en-/disable? collecting entries? * label (yes no none Name): language dependent labels? as a prefix or what? * location (none, here): disable placement? when makes this sense? * symbol (one two three none default): where is this used? One solved, still 4 to go… Please, anyone who used these? 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] Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)
Here is a solution for the first part of my question. This is based on https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi: It display now the citation _and_ numbering labels in the short form: ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] \setupbtxlist[aps][ alternative=b, distance=.5em, ] \setupbtx[aps:cite][alternative=short] \starttext Knuth developed \TeX \cite[knuth1] Several persons said something \cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` The remaining part now is to mark publications of Knuth in a different way. I have tried this and failed. Here is my code so far: ``` \startluacode function render_cite(short, author) print(author) if author:lower():find("knuth") then context("[>" .. short .. "]") else context("[" .. short .. "]") end end \stopluacode \definebtx[aps:cite:special][aps:cite] \startsetups btx:aps:cite:special \btxcitereference \ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])} \stopsetups % use it with \cite[special][knuth1] ``` This has several problems: - \btxflush{short} does not work as I expected that. How can I get the short form? - \btxflush to pass arguments to lua does not work as intended. On the lua side the variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. Knuth". How can I pass the data? I use Lua only because I find it more convenient as a programming language. If a plain tex solution is simpler, I'm happy to use that. Another question that came up while studying the source code: What effect have \c!, \s!, and \v!? These commands exist a lot in the above cited files. Gerion Am Mittwoch, 17. April 2024, 15:44:12 MESZ schrieb Gerion Entrup: > Hi, > > > The APS style is an example of a number-based citation system. As you > > are looking for a tag-based citation, it might be better to start with > > something like the APA style. > > I'm kind of satisfied with the publication-list layout of the APS style so I > chose > this as a base. If it is simpler to start with the APA style, I can do that. > > My hope is that it is possible to just change the "label" that is used for > referencing and keep everything else as is. > > > Is there some specification for your short tag-based citation style? > > biblatex implements this with the "alphabetic" style. I'm not aware of > a specification, though. Does the "short" form in ConTeXt exist for a > specific reason? :) > > Gerion > > > On Tue, 16 Apr 2024 06:04:35 +0200 > > Gerion Entrup wrote: > > > > > Hi, > > > > > > I'm trying to customize a cite format in a bibliography. Currently, > > > I'm using the aps style which fits so far, except of the plain number > > > as reference. In concrete, I want to change the following: > > > - Use the first letter of the last name and the year as reference > > > (this should be exactly the short form). It is more less also > > > described here [1]. > > > - Highlight publications of a certain author with an extra char (e.g. > > > '>') > > > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > > should be highlighted): ``` > > > \setupinteraction[state=start] > > > > > > \startbuffer[testdata] > > > @Book{knuth1, > > > author = {Donald E. Knuth}, > > > title = {TEX and METAFONT. New directions in typesetting}, > > > year = {1979}, > > > publisher = {Addison-Wesley}, > > > } > > > @Article{someother, > > > author = {Some Person and Some Otherperson}, > > > title = {Another title}, > > > year = {1900}, > > > } > > > \stopbuffer > > > > > > % enable tracing > > > \enabletrackers[publications, publications.crossref, > > > publications.details, publications.cite, publications.strings]
[NTG-context] Re: Why are ConTeXt-SBL endnotes empty?
Changing location=none to location=text still left me with the bullet points appearing in a big list at the end of my chapter, but without any messages in them. On Monday, April 22, 2024 at 07:54:39 AM MDT, Joel via ntg-context wrote: A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to compile. I'm forced to try again (due to some other issue with footnotes), and instead of compiling to error, it compiles, but the footnote's message ends up being empty. Why is it appearing empty? Is there a fix? Here is a minimum working example: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --Joel ___ 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: Why are ConTeXt-SBL endnotes empty?
See here : https://wiki.contextgarden.net/Footnotes Jean-Pierre > Le 22 avr. 2024 à 16:47, Pablo Rodriguez via ntg-context > a écrit : > > On 4/22/24 15:51, Joel via ntg-context wrote: >> A few years back, I tried using endnotes with ConTeXt-SBL, and it failed >> to compile. I'm forced to try again (due to some other issue with >> footnotes), and instead of compiling to error, it compiles, but the >> footnote's message ends up being empty. >> >> Why is it appearing empty? Is there a fix? > > Hi Joel, > > the bibliography part doesn’t work for me at all. > > But notes may be placed as their location is text (and you add a real > footnote). > > This works fine: > > \setupnote[footnote][location=text] > > \starttext > \input knuth > \footnote{Footnote} > \cite[clark1989] > > \placenotes[footnote] > > \startchapter[title=Bibliography] > \placelistofpublications > \stopchapter > \stoptext > > I never used a bibliography in ConTeXt, so that part is left to you. > > I hope it helps, > > 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: documentation: parameters of \setuplist
Am 22.04.24 um 18:30 schrieb Duncan Hothersall: Hi Hraban, I can help with one - aligntitle means an unnumbered section will align in the table of contents under the number rather than the title. So for example if you have a TOC combining \section and \subject entries, they would look like this: 1 ... A section A subject rather than 1 ... A section .. A subject Thank you! I added it in the wiki. 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: documentation: parameters of \setuplist
Hi Hraban, I can help with one - aligntitle means an unnumbered section will align in the table of contents under the number rather than the title. So for example if you have a TOC combining \section and \subject entries, they would look like this: 1 ... A section A subject rather than 1 ... A section .. A subject Duncan On Mon, 22 Apr 2024 at 17:09, Henning Hraban Ramm wrote: > I tried to complete https://wiki.contextgarden.net/Command/setuplist, > but I don’t understand all parameters. > > Can anyone explain these please: > > * state (start stop): what does this en-/disable? collecting entries? > * label (yes no none Name): language dependent labels? as a prefix or what? > * location (none, here): disable placement? when makes this sense? > * aligntitle (yes no): align which part to what? > * symbol (one two three none default): where is this used? > > > Expect more questions… > > 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] documentation: parameters of \setuplist
I tried to complete https://wiki.contextgarden.net/Command/setuplist, but I don’t understand all parameters. Can anyone explain these please: * state (start stop): what does this en-/disable? collecting entries? * label (yes no none Name): language dependent labels? as a prefix or what? * location (none, here): disable placement? when makes this sense? * aligntitle (yes no): align which part to what? * symbol (one two three none default): where is this used? Expect more questions… 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: Why are ConTeXt-SBL endnotes empty?
On 4/22/24 15:51, Joel via ntg-context wrote: > A few years back, I tried using endnotes with ConTeXt-SBL, and it failed > to compile. I'm forced to try again (due to some other issue with > footnotes), and instead of compiling to error, it compiles, but the > footnote's message ends up being empty. > > Why is it appearing empty? Is there a fix? Hi Joel, the bibliography part doesn’t work for me at all. But notes may be placed as their location is text (and you add a real footnote). This works fine: \setupnote[footnote][location=text] \starttext \input knuth \footnote{Footnote} \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext I never used a bibliography in ConTeXt, so that part is left to you. I hope it helps, 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] Why are ConTeXt-SBL endnotes empty?
A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to compile. I'm forced to try again (due to some other issue with footnotes), and instead of compiling to error, it compiles, but the footnote's message ends up being empty. Why is it appearing empty? Is there a fix? Here is a minimum working example: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --Joel ___ 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: Why don't footnotes appear in floats or figures?
On 22/04/2024 14:38, Joel via ntg-context wrote: Is this the correct way to be using the \startpostponing code (see example below)? \starttext \input knuth \startpostponing \placefigure{Caption\footnote{message A}}{\externalfigure[cow][width=\textwidth]} \stoppostponing \stoppostponing double stop ? ___ 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: minwidth not working ?
> -Ursprüngliche Nachricht- > Von: Wolfgang Schuster > Gesendet: Samstag, 20. April 2024 11:56 > An: Denis Maier > Cc: mailing list for ConTeXt users ; denis.ma...@unibe.ch > Betreff: Re: [NTG-context] Re: minwidth not working ? > > Denis Maier schrieb am 19.04.2024 um 22:55: > > >> Wolfgang Schuster hat am > >> 19.04.2024 20:32 CEST geschrieben: > >> denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47: > >>> > >>> Hi, > >>> > >>> Shouldn’t minwidth set a default minimal width for external figures? > >>> But this here does not work > >>> > >>> [...] > >>> > >>> Am I missing something here? > >> > >> There are no minwidth/minheight values for \externalfigure. > >> > >> Wolfgang > >> > > So the wiki is wrong here? > > https://wiki.contextgarden.net/Command/setupexternalfigure > > Yes the comment at the end of page is wrong and the text about the strut > setting can also be removed, only the orientation value is missing in the > command table. > > Wolfgang Thanks you for the clarification, Wolfgang. I've changed the wiki page. 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: Why don't footnotes appear in floats or figures?
I've managed to get a minimum working example. If you check, you'll see the 5th footnote inside a placefigure doesn't render anywhere: \starttext \input knuth \placefigure{Caption\footnote{message A}}{\externalfigure[cow][width=\textwidth]} \input knuth \placefigure{Caption\footnote{message B}}{\externalfigure[cow][width=\textwidth]} \input knuth \placefigure{Caption\footnote{message C}}{\externalfigure[cow][width=\textwidth]} \input knuth \placefigure{Caption\footnote{message D}}{\externalfigure[cow][width=\textwidth]} \input knuth \placefigure{Caption\footnote{message E}}{\externalfigure[cow][width=\textwidth]} \input knuth \placefigure{Caption\footnote{message F}}{\externalfigure[cow][width=\textwidth]} \stoptext Is this the correct way to be using the \startpostponing code (see example below)? \starttext \input knuth \startpostponing \placefigure{Caption\footnote{message A}}{\externalfigure[cow][width=\textwidth]} \stoppostponing \stoppostponing \input knuth \startpostponing \placefigure{Caption\footnote{message B}}{\externalfigure[cow][width=\textwidth]} \stoppostponing \input knuth \startpostponing \placefigure{Caption\footnote{message C}}{\externalfigure[cow][width=\textwidth]} \stoppostponing \input knuth \startpostponing \placefigure{Caption\footnote{message D}}{\externalfigure[cow][width=\textwidth]} \stoppostponing \input knuth \startpostponing \placefigure{Caption\footnote{message E}}{\externalfigure[cow][width=\textwidth]} \stoppostponing \input knuth \startpostponing \placefigure{Caption\footnote{message F}}{\externalfigure[cow][width=\textwidth]} \stoppostponing \stoptext On Monday, April 22, 2024 at 02:31:30 AM MDT, Hans Hagen via ntg-context wrote: On 4/22/2024 2:45 AM, Joel via ntg-context wrote: > I'm three days out from sending my work to an editor, and found some > serious problem: many footnotes just aren't rendering. > > I have a history text that uses ConTeXt-SBL for the citations, as such, > it has lots of footnotes. Sometimes the footnotes are just in the main > text, but sometimes also in figure captions, inside floats, inside > tables that are inside floats, inside tabulations inside floats, etc. > > What I find alarming is it is frequently not rendering all of the > footnote messages at the bottom of the page. The actual footnote number > within the body is rendered, but no number is listed in at the bottom of > the page. So I might see a list of footnotes, for instance, on page 1, I > only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped. > > > --- > 1 message > 2 message > 3 message > 5 message > 6 message > > After a lot of trial-and-error and checking logs and checking my BibTeX > files for errors, running everything through BibTex Tidy, etc., and > failures to make a minimum working example, I found a single pattern: > > If the footnote marker appears on the SAME page as the footnote text, it > has no problem rendering the footnote. But, if ConTeXt decides to move a > float a page or two later on--as it frequently seems to do---such that > the footnote marker and footnote text at bottom of page should be on > DIFFERENT pages, the footnote message at the bottom of the page won't > render. > > I've seen some 2+ year old mailing list posts suggesting ConTeXt might > have issues with footnotes; they appear to be similar to my issue--is > that still a problem? Is there a fix or workaround? Old fixes I could > finding in the mailing list don't seem to work with current versions of > ConTeXt anymore. you need to consider the complications of such notes ... - tex needs to take the notes into account when determining a page break - it does so by the insert mechanism - when floats can't be placed they also become inserts (top and bottom) - when there are inserts in inserts th eproblem becomes more complex (so notes inside floats) - in traditional tex deeply burried inserts disappearm less so in lmtx There are things that are hard to get right. This works: \startpostponing \startplacefigure[location=here,title={test \footnote{oeps 1}}] \blackrule[width=1tw] here \footnote{hello 1} and \footnote{hello 2} and \footnote{hello 3} done \stopplacefigure \stoppostponing \dorecurse{10}{\samplefile{tufte}\par} Because here the inserts (notes) will migrate but even then one can get them out of order (unless we renumber, which then is sensitiev for oscillation). I occasionally wonder if top floats could be done more directly but bottom notes still would have an out-of-sync problem - Hans Hagen | PRAGMA ADE Ridd
[NTG-context] floats re-ordering and numbering
Hi, I've found that occasionally the order of floats change, but the numbering still reflects the order in the input file. Is that the intended behaviour? Is there a way to number to floats according to their order in the (visual) output? Best, Denis %%% \setupexternalfigures [location={local,global,default}] \setupfloats[compress=no] \setupfloat[figure][default=top] \starttext \input knuth \placefigure{Cow 1}{\externalfigure[cow][ width=.5\textwidth, ]} \placefigure{Cow 2}{\externalfigure[cow][ width=.8\textwidth, ]} \placefigure{Cow 3}{\externalfigure[cow][ width=.7\textwidth, ]} \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: Why don't footnotes appear in floats or figures?
On 4/22/2024 2:45 AM, Joel via ntg-context wrote: I'm three days out from sending my work to an editor, and found some serious problem: many footnotes just aren't rendering. I have a history text that uses ConTeXt-SBL for the citations, as such, it has lots of footnotes. Sometimes the footnotes are just in the main text, but sometimes also in figure captions, inside floats, inside tables that are inside floats, inside tabulations inside floats, etc. What I find alarming is it is frequently not rendering all of the footnote messages at the bottom of the page. The actual footnote number within the body is rendered, but no number is listed in at the bottom of the page. So I might see a list of footnotes, for instance, on page 1, I only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped. --- 1 message 2 message 3 message 5 message 6 message After a lot of trial-and-error and checking logs and checking my BibTeX files for errors, running everything through BibTex Tidy, etc., and failures to make a minimum working example, I found a single pattern: If the footnote marker appears on the SAME page as the footnote text, it has no problem rendering the footnote. But, if ConTeXt decides to move a float a page or two later on--as it frequently seems to do---such that the footnote marker and footnote text at bottom of page should be on DIFFERENT pages, the footnote message at the bottom of the page won't render. I've seen some 2+ year old mailing list posts suggesting ConTeXt might have issues with footnotes; they appear to be similar to my issue--is that still a problem? Is there a fix or workaround? Old fixes I could finding in the mailing list don't seem to work with current versions of ConTeXt anymore. you need to consider the complications of such notes ... - tex needs to take the notes into account when determining a page break - it does so by the insert mechanism - when floats can't be placed they also become inserts (top and bottom) - when there are inserts in inserts th eproblem becomes more complex (so notes inside floats) - in traditional tex deeply burried inserts disappearm less so in lmtx There are things that are hard to get right. This works: \startpostponing \startplacefigure[location=here,title={test \footnote{oeps 1}}] \blackrule[width=1tw] here \footnote{hello 1} and \footnote{hello 2} and \footnote{hello 3} done \stopplacefigure \stoppostponing \dorecurse{10}{\samplefile{tufte}\par} Because here the inserts (notes) will migrate but even then one can get them out of order (unless we renumber, which then is sensitiev for oscillation). I occasionally wonder if top floats could be done more directly but bottom notes still would have an out-of-sync problem - 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: Why don't footnotes appear in floats or figures?
On 4/22/24 02:45, Joel via ntg-context wrote: > I'm three days out from sending my work to an editor, and found some > serious problem: many footnotes just aren't rendering. Joel, please provide a minimal sample, otherwise it is really hard to help. > I've seen some 2+ year old mailing list posts suggesting ConTeXt might > have issues with footnotes; they appear to be similar to my issue--is > that still a problem? Is there a fix or workaround? Old fixes I could > finding in the mailing list don't seem to work with current versions of > ConTeXt anymore. \postponenotes and \flushnotes might be an option. \setlocalfootnotes and \placelocalfootnotes might be another option. 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] Why don't footnotes appear in floats or figures?
I'm three days out from sending my work to an editor, and found some serious problem: many footnotes just aren't rendering. I have a history text that uses ConTeXt-SBL for the citations, as such, it has lots of footnotes. Sometimes the footnotes are just in the main text, but sometimes also in figure captions, inside floats, inside tables that are inside floats, inside tabulations inside floats, etc. What I find alarming is it is frequently not rendering all of the footnote messages at the bottom of the page. The actual footnote number within the body is rendered, but no number is listed in at the bottom of the page. So I might see a list of footnotes, for instance, on page 1, I only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped. ---1 message2 message3 message5 message6 message After a lot of trial-and-error and checking logs and checking my BibTeX files for errors, running everything through BibTex Tidy, etc., and failures to make a minimum working example, I found a single pattern: If the footnote marker appears on the SAME page as the footnote text, it has no problem rendering the footnote. But, if ConTeXt decides to move a float a page or two later on--as it frequently seems to do---such that the footnote marker and footnote text at bottom of page should be on DIFFERENT pages, the footnote message at the bottom of the page won't render. I've seen some 2+ year old mailing list posts suggesting ConTeXt might have issues with footnotes; they appear to be similar to my issue--is that still a problem? Is there a fix or workaround? Old fixes I could finding in the mailing list don't seem to work with current versions of ConTeXt anymore. --Joel___ 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: kpfonts
Thanks a lot In the wiki there is no mention to that, isn't there? Xavier On Sat, 20 Apr 2024 14:08:21 +0200 Wolfgang Schuster ha escrit: > Xavier B. schrieb am 20.04.2024 um 13:51: > > Hi, > > > > Just a courious: is there kpfonts available for context? > > I love kpfonts. > > \setupbodyfont[kpfonts] > > \starttext > \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: [off topic] non-English programming languages: Arab and Cuneiform
Oh, I do, fascinating stuff! Regarding languages, I also came by a very interesting writing system, called Ditema tsa Dinoko, designed to write different african languages: https://en.wikipedia.org/wiki/Ditema_tsa_Dinoko Not really a programming language, but I could see one developing from this, and it would be gorgeous. El sáb, 20 abr 2024 a las 16:52, Henning Hraban Ramm () escribió: > Came across this, I guess some of you might find it interesting: > > https://nas.sr/%D9%82%D9%84%D8%A8/ > > https://github.com/MrLogarithm/emeszida > > > > ___ > 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 > > ___ > -- Andrés Conrado Montoya Andi Kú andresconr...@gmail.com http://sesentaycuatro.com http://messier87.com http://chiquitico.org Los fines no justifican los medios, porque la medida verdadera de nuestro carácter está dada por los medios que estamos dispuestos a utilizar, no por los fines que proclamamos. “You develop an instant global consciousness, a people orientation, an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, ‘Look at that, you son of a bitch.’” — Apollo 14 astronaut Edgar Mitchell ___ 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] [off topic] non-English programming languages: Arab and Cuneiform
Came across this, I guess some of you might find it interesting: https://nas.sr/%D9%82%D9%84%D8%A8/ https://github.com/MrLogarithm/emeszida ___ 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] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?
I can not figure out why this progress bar only works when \showframe is activated. When you comment on \showframe, it's as if \realpageno is at zero. (current version: 2024.04.01 08:59) \showframe \startuseMPgraphic{MonGraphisme_MP} numeric n ; n := \number\realpageno ; numeric m ; m := \number\lastpageno ; numeric h ; h := \overlayheight ; numeric w ; w := \overlaywidth ; numeric e ; e := 3mm; numeric r ; r := (((n-1)/(m-1))*w); fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ; fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred; \stopuseMPgraphic \defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}] \setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}] \starttext \dorecurse{10}{\input tufte\page} \stoptext Any clue is warmly welcome ___ 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: kpfonts
Mikael Sundqvist schrieb am 20.04.2024 um 14:04: Hi, On Sat, Apr 20, 2024 at 2:03 PM Xavier B. wrote: Hi, Just a courious: is there kpfonts available for context? I love kpfonts. Thanks in advance, Xavier Yes, just download the fonts and do \setupbodyfont[kpfonts] The fonts are included in the LMTX installation. 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: kpfonts
Xavier B. schrieb am 20.04.2024 um 13:51: Hi, Just a courious: is there kpfonts available for context? I love kpfonts. \setupbodyfont[kpfonts] \starttext \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: kpfonts
Hi, On Sat, Apr 20, 2024 at 2:03 PM Xavier B. wrote: > > Hi, > > Just a courious: is there kpfonts available for context? > I love kpfonts. > > Thanks in advance, > Xavier Yes, just download the fonts and do \setupbodyfont[kpfonts] /Mikael ___ 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] kpfonts
Hi, Just a courious: is there kpfonts available for context? I love kpfonts. Thanks in advance, Xavier ___ 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: minwidth not working ?
Denis Maier schrieb am 19.04.2024 um 22:55: Wolfgang Schuster hat am 19.04.2024 20:32 CEST geschrieben: denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47: Hi, Shouldn’t minwidth set a default minimal width for external figures? But this here does not work [...] Am I missing something here? There are no minwidth/minheight values for \externalfigure. Wolfgang So the wiki is wrong here? https://wiki.contextgarden.net/Command/setupexternalfigure Yes the comment at the end of page is wrong and the text about the strut setting can also be removed, only the orientation value is missing in the command table. 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 isolate serious errors from warnings?
> On 18 Apr 2024, at 01:09, Joel via ntg-context wrote: ... > Or maybe to use > to send the errors to another file for careful study? > (using Linux if that matters) You can run the job from the command line and redirect to a file: $ context file.tex > output.log 2>&1 but that is essentially the same as the .log file that is produced by default when you run from the command line. As your book is large you could try adding \writestatus commands at suitable points so that when your messages appear in the log you know that processing reached that far in the book. Also you could use \writestatus to output messages before and after known problem areas so you can look to see if there is any telltale output in the log and then search for that elsewhere. HTH — 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://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: minwidth not working ?
Wolfgang Schuster hat am 19.04.2024 20:32 CEST geschrieben: denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47: Hi, Shouldn’t minwidth set a default minimal width for external figures? But this here does not work == \setupexternalfigures [ maxwidth=\textwidth, minwidth=\textwidth, location={local,global,default}, ] \starttext \externalfigure[cow.pdf] \externalfigure[cow.pdf][width=\textwidth] \stoptext == Am I missing something here? There are no minwidth/minheight values for \externalfigure. Wolfgang So the wiki is wrong here? https://wiki.contextgarden.net/Command/setupexternalfigure 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: minwidth not working ?
denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47: Hi, Shouldn’t minwidth set a default minimal width for external figures? But this here does not work == \setupexternalfigures [ maxwidth=\textwidth, minwidth=\textwidth, location={local,global,default}, ] \starttext \externalfigure[cow.pdf] \externalfigure[cow.pdf][width=\textwidth] \stoptext == Am I missing something here? There are no minwidth/minheight values for \externalfigure. 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: Weird (?) float placement for specific widths of image
Denis Maier via ntg-context schrieb am 19.04.2024 um 17:48: Hi again, just a quick follow up on this one. Can anyone reproduce this? Would be good to know how this can be fixed. I have this in a real document, and as I’m typesetting a XML source I cannot just adjust slightly adjust the dimensions to get rid of that. \setupfloats[compress=no] 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: Weird (?) float placement for specific widths of image
On 4/19/24 17:48, Denis Maier via ntg-context wrote: > Hi again, > > just a quick follow up on this one. Can anyone reproduce this? Hi Denis, I can reproduce it. > Would be good to know how this can be fixed. I have this in a real > document, and as I’m typesetting a XML source I cannot just adjust > slightly adjust the dimensions to get rid of that. It seems that you can place the figures somehow (https://www.pragma-ade.nl/general/qrcs/setup-en.pdf#page=169): See the extreme example: \showframe\showgrid\showstruts \setupexternalfigures [location={local,global,default}] \starttext \placefigure{A Cow}{\externalfigure[cow][ height=.5\textheight, ]} \placefigure{A Cow}{\externalfigure[cow][ height=.3\textheight, %height=.4\textheight, ]} \placefigure{A Cow}{\externalfigure[cow][ width=3cm, %width=2cm, ]} \placefigure[inleft]{A Cow}{\externalfigure[cow][width=2cm]} \placefigure[inright]{A Cow}{\externalfigure[cow][width=2cm]} \stoptext Just in case it helps, 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: minwidth not working ?
On 4/19/24 17:51, Denis Maier via ntg-context wrote: > Hi again, > > another follow up. Can anyone confirm this issue? Is there a way to set > the minimal width of graphics? Hi Denis, maximum widht or height work fine, but their minimum counterparts seem not to be working at all: \showframe \starttext \doloopoverlist{none, width, height, maxwidth, maxheight} {\externalfigure[cow.pdf][\recursestring=.125\textwidth]} \page \doloopoverlist{none, width, height, minwidth, minheight} {\externalfigure[cow.pdf][\recursestring=.33\textwidth]} \stoptext Just to confirm the issue, 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: minwidth not working ?
Hi again, another follow up. Can anyone confirm this issue? Is there a way to set the minimal width of graphics? Best, Denis Von: Maier, Denis Christian (UB) Gesendet: Mittwoch, 10. April 2024 12:47 An: ntg-context@ntg.nl Betreff: minwidth not working ? Hi, Shouldn't minwidth set a default minimal width for external figures? But this here does not work == \setupexternalfigures [ maxwidth=\textwidth, minwidth=\textwidth, location={local,global,default}, ] \starttext \externalfigure[cow.pdf] \externalfigure[cow.pdf][width=\textwidth] \stoptext == Am I missing something here? 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: Weird (?) float placement for specific widths of image
Hi again, just a quick follow up on this one. Can anyone reproduce this? Would be good to know how this can be fixed. I have this in a real document, and as I'm typesetting a XML source I cannot just adjust slightly adjust the dimensions to get rid of that. Best, Denis Von: denisma...@mailbox.org Gesendet: Mittwoch, 10. April 2024 13:37 An: 'ntg-context@ntg.nl' Betreff: Weird (?) float placement for specific widths of image Hi, another graphics/floats question: consider the following example % \setupexternalfigures [location={local,global,default}] \starttext \placefigure{A Cow}{\externalfigure[cow][ height=.5\textheight, ]} \placefigure{A Cow}{\externalfigure[cow][ height=.3\textheight, %height=.4\textheight, ]} \placefigure{A Cow}{\externalfigure[cow][ width=3cm, %width=2cm, ]} \placefigure{A Cow}{\externalfigure[cow][width=2cm]} \placefigure{A Cow}{\externalfigure[cow][width=2cm]} \stoptext% On the first page, the images appear stacked above each other while on the second page they appear next to each other. It took me some time to reproduce this behaviour, and I can't claim to understand what is happening. But it seems to be related to the specific widths of the images. When I change them to other values the behaviour disappears. Is this a bug? Anything I can do about this? 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: How to isolate serious errors from warnings?
On 4/18/2024 8:26 AM, Henning Hraban Ramm wrote: Am 18.04.24 um 02:09 schrieb Joel via ntg-context: I'm about to have a lengthy (2,000+ page) document published. Normally if it compiles and looks okay, I regard that as meaning no errors appeared, but I've noticed that sometimes ConTeXt will still compile, even if something isn't displayed on screen as it should: (1) I tried placing a table inside a startitemize environment, as instead of it not compiling, it left a message in the document warning that wasn't supported. (2) In another case, I had an image that ConTeXt couldn't find, as I mispelled the filenmame, and it fully compiled and made a PDF, without me noticing. (3) Or maybe in some case, a font couldn't be found for a specific character, so a single character in the file isn't displaying. Those are just some examples; I intended for something to be printed on the PDF, but it isn't showing there. Since a document of this size will have a lot of messages, is there a way to adjust the settings, from "show everything" to "show some" to "show only serious errors"? Or maybe to use > to send the errors to another file for careful study? (using Linux if that matters) You can enable trackers like \enabletrackers[figures.*] But that just gives more log messages for debugging. You get the list of all trackers with: context --global m-trackers.mkiv For your use case, directives are more helpful, like \enabledirectives[logs.errors=*] (i.e. break at every error) AFAIK that just handles missing characters, references and modules ATM, but this information might be outdated. You get all directives with context --global m-directives.mkiv often the log files has some summaries at the end - 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: Wiki - test/proposal to further clarify documentation
> On 17 Apr 2024, at 13:17, Henning Hraban Ramm wrote: > > Am 17.04.24 um 13:57 schrieb Bruce Horrocks: >> - There are at least two books, and a third being written but not yet >> released: these fit into the Tutorials and Explanation quadrants. > > Which published books do you mean? Not published in the sense of having an ISBN assigned but the ones I had in mind were: - "ConTeXt Mark IV An Excursion" by Ton Otten (ma-cd-en.pdf in the distribution) - "A not so short introduction to ConTeXt Mark IV" by Joaquín Ataz-López and your in-progress one. 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://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: preventing column break after section title
On Thu, Apr 18 2024, Peter Münster wrote: > How could I prevent a column break after the second section title please? Ok, found it: \setupitemize[each][autointro] -- Peter ___ 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] preventing column break after section title
Hi, How could I prevent a column break after the second section title please? Minimal example: \starttext \startcolumns[n=2] \section{title 1} \dorecurse{22}{bla\par} \section{title 2} % Here starts a new column. \startitemize \dorecurse{15}{\item bla} \stopitemize \stopcolumns \stoptext I’ve tried "\setuphead[section][after={\columnbreak[no]}]", but it does not help. TIA for any hints, -- Peter ___ 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: Wiki - test/proposal to further clarify documentation
Am 17.04.24 um 23:25 schrieb Garulfo: - exactly, it's not a question of proposing new documents, but of proposing another complementary way of accessing and browsing existing ones. - Actually, the wiki is (or can be) a hub for the 4 needs: - "Reference" like https://wiki.contextgarden.net/Command/setuphead - "How-To Guides" like https://wiki.contextgarden.net/Titles - "Tutorials": - hosted https://wiki.contextgarden.net/Detailed_Example - linked https://github.com/mpsmath/stepbystep - "Explanation" : mostly linked manuals and books https://wiki.contextgarden.net/Command/setuphead and https://wiki.contextgarden.net/Titles are examples of how difficult it can be to understand where to find a particular information. It might be worth keeping only the key examples on reference pages like https://wiki.contextgarden.net/Command/*** and moving the "how-to" examples to a separate page (or pages). I agree. Let’s accept this as a rule for further wiki editing. Also, explain parameters with top priority in Command/setup* pages (keeping them in Command/define* pages etc. doesn’t hurt, but at least experienced users should know where to find something without searching). 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: How to isolate serious errors from warnings?
Am 18.04.24 um 02:09 schrieb Joel via ntg-context: I'm about to have a lengthy (2,000+ page) document published. Normally if it compiles and looks okay, I regard that as meaning no errors appeared, but I've noticed that sometimes ConTeXt will still compile, even if something isn't displayed on screen as it should: (1) I tried placing a table inside a startitemize environment, as instead of it not compiling, it left a message in the document warning that wasn't supported. (2) In another case, I had an image that ConTeXt couldn't find, as I mispelled the filenmame, and it fully compiled and made a PDF, without me noticing. (3) Or maybe in some case, a font couldn't be found for a specific character, so a single character in the file isn't displaying. Those are just some examples; I intended for something to be printed on the PDF, but it isn't showing there. Since a document of this size will have a lot of messages, is there a way to adjust the settings, from "show everything" to "show some" to "show only serious errors"? Or maybe to use > to send the errors to another file for careful study? (using Linux if that matters) You can enable trackers like \enabletrackers[figures.*] But that just gives more log messages for debugging. You get the list of all trackers with: context --global m-trackers.mkiv For your use case, directives are more helpful, like \enabledirectives[logs.errors=*] (i.e. break at every error) AFAIK that just handles missing characters, references and modules ATM, but this information might be outdated. You get all directives with context --global m-directives.mkiv 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] How to isolate serious errors from warnings?
I'm about to have a lengthy (2,000+ page) document published. Normally if it compiles and looks okay, I regard that as meaning no errors appeared, but I've noticed that sometimes ConTeXt will still compile, even if something isn't displayed on screen as it should: (1) I tried placing a table inside a startitemize environment, as instead of it not compiling, it left a message in the document warning that wasn't supported. (2) In another case, I had an image that ConTeXt couldn't find, as I mispelled the filenmame, and it fully compiled and made a PDF, without me noticing. (3) Or maybe in some case, a font couldn't be found for a specific character, so a single character in the file isn't displaying. Those are just some examples; I intended for something to be printed on the PDF, but it isn't showing there. Since a document of this size will have a lot of messages, is there a way to adjust the settings, from "show everything" to "show some" to "show only serious errors"? Or maybe to use > to send the errors to another file for careful study? (using Linux if that matters) --Joel ___ 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 ___