[NTG-context] Re: Using structureuservariables before the heading
Ok, \starttexdefinition allows blanks, apparently just like setups. But, it still fails exactly like the version with \def \setuphead[chapter][ before={Before: \structureuservariable{author}\blank}, beforesection={Beforesection: \structureuservariable{author}\blank}, insidesection={Insidesection: \structureuservariable{author}\blank}, after={After: \structureuservariable{author}\blank}, ] \def\myChapterCommand#1#2{\structureuservariable{author}\space\blank} \define[2]\myChapterCommand{\structureuservariable{author}\blank #1\space#2} %\def\myChapterCommand#1#2{\structureuservariable{author}\blank #1\space#2} % does not work % \starttexdefinition myChapterCommand #1 #2 % doesn't work either, but at least blanks should work % \structureuservariable{author} % Test % \blank % #1\space#2 % \stoptexdefinition \starttext \myChapterCommand{1}{asdf} \startchapter[title=First][author=First Author] \input knuth \stopchapter \startchapter[title=Second][author=Second Author] \input knuth \stopchapter \setuphead[chapter] [ before=,after=,beforesection=,insidesection=, command=\myChapterCommand, ] \startchapter[title=Third][author={Third Author}] \input knuth \stopchapter \stoptext Von: denis.ma...@unibe.ch Gesendet: Dienstag, 12. September 2023 17:48 An: ntg-context@ntg.nl Betreff: [NTG-context] Using structureuservariables before the heading Hi, is it possible to access a structureuservariable before the heading's title ? Using the key does not seem to work. As an aside, I've tried to use the < command > key to provide my own command, but while \define works here (but ignores \blank), \def gives me an error. Why is that? How would you add blanks to a user-defined command? Best, Denis \setuphead[chapter][ before={Before: \structureuservariable{author}\blank}, beforesection={Beforesection: \structureuservariable{author}\blank}, insidesection={Insidesection: \structureuservariable{author}\blank}, after={After: \structureuservariable{author}\blank}, ] \def\myChapterCommand#1#2{\structureuservariable{author}\space\blank} \define[2]\myChapterCommand{\structureuservariable{author}\blank #1\space#2} %\def\myChapterCommand#1#2{\structureuservariable{author}\blank #1\space#2} % does not work \starttext \macro{1}{2} \startchapter[title=First][author=First Author] \input knuth \stopchapter \startchapter[title=Second][author=Second Author] \input knuth \stopchapter \setuphead[chapter] [ before=,after=,beforesection=,insidesection=, command=\myChapterCommand, ] \startchapter[title=Third][author=Third Author] \input knuth \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Using structureuservariables before the heading
Hi, is it possible to access a structureuservariable before the heading's title ? Using the key does not seem to work. As an aside, I've tried to use the < command > key to provide my own command, but while \define works here (but ignores \blank), \def gives me an error. Why is that? How would you add blanks to a user-defined command? Best, Denis \setuphead[chapter][ before={Before: \structureuservariable{author}\blank}, beforesection={Beforesection: \structureuservariable{author}\blank}, insidesection={Insidesection: \structureuservariable{author}\blank}, after={After: \structureuservariable{author}\blank}, ] \def\myChapterCommand#1#2{\structureuservariable{author}\space\blank} \define[2]\myChapterCommand{\structureuservariable{author}\blank #1\space#2} %\def\myChapterCommand#1#2{\structureuservariable{author}\blank #1\space#2} % does not work \starttext \macro{1}{2} \startchapter[title=First][author=First Author] \input knuth \stopchapter \startchapter[title=Second][author=Second Author] \input knuth \stopchapter \setuphead[chapter] [ before=,after=,beforesection=,insidesection=, command=\myChapterCommand, ] \startchapter[title=Third][author=Third Author] \input knuth \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: XML: flush to lua function
Hi, xml.text(t) is safer than directly accessing t.dt[1]. Note: you may need to strip some XML tags from that content. If the element is not straight-up data but has nested elements, then this will return the full xml representation instead: A short title=> ‘A short title' <A short title>=> ‘' <A short title> => '<A short title>' Best wishes, Taco > On 12 Sep 2023, at 08:56, wrote: > > Ok, I’ve found a way, see below. > But maybe someone has some nice lua (or other) tricks to share… (I’m not sure > accessing t.dt[1] is particularly safe when operating on nested structures.) > Best, > Denis > \startbuffer[test] > > > > A short title > asdf asdf asdf jklö jklö jklö > > > A longer title bla bla bla bla bla bla bla bla > > asdf asdf asdf jklö jklö jklö > > > > \stopbuffer > \startxmlsetups xml:test > \xmlsetsetup{#1}{*}{-} > \xmlsetsetup{#1}{doc|chapter|p}{xml:*} > \stopxmlsetups > \xmlregisterdocumentsetup{test}{xml:test} > \startxmlsetups xml:doc >\xmlflush{#1} > \stopxmlsetups > \setuphead[chapter][expansion=yes] % make sure the stuff gets expanded on > time > \startxmlsetups xml:chapter > \startchapter >[ > > title={\xmlfilter{#1}{/title/command(xml:chapter:title)}}, > > marking={\xmlfilter{#1}{/title/command(xml:chapter:title:marking)}}, >] >\xmlflush{#1} > \stopchapter > \stopxmlsetups > \startxmlsetups xml:p > \xmlflush{#1}\par > \stopxmlsetups > \startluacode > function xml.functions.getMarking(t) > _,n = t.dt[1]:gsub("%S+","") > if n > 10 then local words = {} > for word in t.dt[1]:gmatch("%S+") do table.insert(words, word) end > local resWords = {} > resWords = { unpack( words, 1, 7 ) } > res = table.concat(resWords, " ") .. " …" > else res = t.dt[1] > end > context(res) > end > \stopluacode > \startxmlsetups xml:chapter:title:marking > \xmlfunction{#1}{getMarking} > \stopxmlsetups > \startxmlsetups xml:chapter:title > \xmlflush{#1} > \stopxmlsetups > \setupheadertexts[chapter] > \starttext > \xmlprocessbuffer{test}{test}{} > \stoptext > Von: denis.ma...@unibe.ch > Gesendet: Montag, 11. September 2023 16:47 > An: ntg-context@ntg.nl > Betreff: [NTG-context] XML: flush to lua function > Hi, > I have the following xml setup with a lua function: > \startluacode > function markingLength(s) > _,n = s:gsub("%S+","") > if n > 3 then context("yes" .. " …") else > context("no") end > end > \stopluacode > \startxmlsetups xml:ink:ink-title:marking > %\ctxlua{markingLength(\xmlflush{#1})} % does not work > \ctxlua{markingLength{"1 2 3 4"}} > \stopxmlsetups > While the function works, I cannot use xmlflush here. How can I properly > pass the xml content to the lua function? > 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://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: XML: flush to lua function
Ok, I've found a way, see below. But maybe someone has some nice lua (or other) tricks to share... (I'm not sure accessing t.dt[1] is particularly safe when operating on nested structures.) Best, Denis \startbuffer[test] A short title asdf asdf asdf jklö jklö jklö A longer title bla bla bla bla bla bla bla bla asdf asdf asdf jklö jklö jklö \stopbuffer \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{doc|chapter|p}{xml:*} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \setuphead[chapter][expansion=yes] % make sure the stuff gets expanded on time \startxmlsetups xml:chapter \startchapter [ title={\xmlfilter{#1}{/title/command(xml:chapter:title)}}, marking={\xmlfilter{#1}{/title/command(xml:chapter:title:marking)}}, ] \xmlflush{#1} \stopchapter \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1}\par \stopxmlsetups \startluacode function xml.functions.getMarking(t) _,n = t.dt[1]:gsub("%S+","") if n > 10 then local words = {} for word in t.dt[1]:gmatch("%S+") do table.insert(words, word) end local resWords = {} resWords = { unpack( words, 1, 7 ) } res = table.concat(resWords, " ") .. " ..." else res = t.dt[1] end context(res) end \stopluacode \startxmlsetups xml:chapter:title:marking \xmlfunction{#1}{getMarking} \stopxmlsetups \startxmlsetups xml:chapter:title \xmlflush{#1} \stopxmlsetups \setupheadertexts[chapter] \starttext \xmlprocessbuffer{test}{test}{} \stoptext Von: denis.ma...@unibe.ch Gesendet: Montag, 11. September 2023 16:47 An: ntg-context@ntg.nl Betreff: [NTG-context] XML: flush to lua function Hi, I have the following xml setup with a lua function: \startluacode function markingLength(s) _,n = s:gsub("%S+","") if n > 3 then context("yes" .. " ...") else context("no") end end \stopluacode \startxmlsetups xml:ink:ink-title:marking %\ctxlua{markingLength(\xmlflush{#1})} % does not work \ctxlua{markingLength{"1 2 3 4"}} \stopxmlsetups While the function works, I cannot use xmlflush here. How can I properly pass the xml content to the lua function? 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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Bug(?) in https://wiki.contextgarden.net/Tabulate#Spanning_Multiple_Pages
Hi, In https://wiki.contextgarden.net/Tabulate#Spanning_Multiple_Pages the wiki has "internal error: convert failed". Removing \color[red] from \setuptabulate in that example gives a working example (at least in a separate file on my machine). I tried changing the title specification to title={\color[red]{Fenchurch St. Paul}}, as well as title={{\color[red]{Fenchurch St. Paul}}}, but both of these reward me with a runaway context process. Can someone point out the correct way to do what the wiki intended? Thanks. Jim P.S. Bonus question: should an incorrect use of color really cause an (apparent) infinite loop, or is that a second issue which deserves to be on some to-do list? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Hi Lutz, thanks very much for that example, it does show me a way to answer my question. Although the messages from Wolfgang had already solved my problem, your solution in instructional in a different way, and so quite helpful. Cheers. Jim On Sat, Sep 9, 2023 at 21:38 (+0200), Lutz Haseloff wrote: > Hi Jim, > perhaps does this work for you? > > \setuplist[chapter][headnumber=no] > \setuphead[chapter][number=no] > \starttext > \completecontent > \page > \chapter{Chapter one} > \input knuth > \chapter{Chapter two} > \input ward > \stoptext > > Greetings Lutz > Am 9. September 2023 20:11:55 MESZ schrieb Jim : >>Hi, >>I am creating a document which is divided with the unnumbered levels >>(\title, \subject, ...). >>I would like a table of contents showing the names and page numbers, >>something like >>Blah blah blah2 >>Blah blah 4 >>... >>However, notwithstanding what I see in >>https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents >>I can't get this to happen with unnumbered divisions. >>The above wiki reference says "the following might do that trick" but I >>think "might" is the keyword, since even the wiki doesn't show the "No >>number" entry in the \completecontent. >>I find it hard to imagine that I am the only Context user who wants to do >>this. Can anyone point me in the direction of a working example? >>And am I misinterpreting the wiki, or is the wiki page broken? >>Thanks. >> Jim >>___ >>If your question is of interest to others as well, please add an entry to the >>Wiki! >>maillist : ntg-context@ntg.nl / >>https://www.ntg.nl/mailman/listinfo/ntg-context >>webpage : https://www.pragma-ade.nl / http://context.aanhet.net >>archive : https://bitbucket.org/phg/context-mirror/commits/ >>wiki : https://contextgarden.net >>___ > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Hi Wolfgang, On Sat, Sep 9, 2023 at 23:12 (+0200), Wolfgang Schuster wrote: > Jim schrieb am 09.09.2023 um 22:34: >> Wolfgang, >> thanks very much for your help. As a long-time plain TeX user, but a >> ConTeXt n00b, that would have taken me a long time to figure out. >> Having said that (and not to be ungrateful), for both of your examples >> below, in my tests only the subsubject shows up in the contents. I tried >> this both with the context distribution (updated a few minutes ago) and >> with the version that is in texlive (also updated a few minutes ago). Do >> all three items show up in your contents listing? > Hi Jim, > both examples worked for me without problems and even the online compiler > on the wiki produces the expected result. Are you sure all 3 \setuphead > lines are in your document? Argh. Mea culpa. My mail program did not show me that your first answer had non-breakable spaces after '[title]' and '[subject]' (but not after '[subsubject]'). And I quickly copied and pasted those into a file without checking the character set. Replacing those with ASCII spaces makes everything work nicely, thanks very much. Amusingly (sort of), there was a bun-fight on the texhax mailing list recently when someone's message came across with non-breakable spaces in it, causing the recipient to complain that something didn't work, when the originator vehemently asserted that it did. (I was neither of those two people, although I did help the originator trace where the nbsp's got into his message.) It's like deja vu all over again. Did you insert your helpful solution into the wiki somewhere, or just test them in the wiki compiler? I just reloaded https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents and don't see your code there, but since yours does work and those (apparently) do not work, it would be nice to have your code there. Cheers. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Wolfgang, thanks very much for your help. As a long-time plain TeX user, but a ConTeXt n00b, that would have taken me a long time to figure out. Having said that (and not to be ungrateful), for both of your examples below, in my tests only the subsubject shows up in the contents. I tried this both with the context distribution (updated a few minutes ago) and with the version that is in texlive (also updated a few minutes ago). Do all three items show up in your contents listing? Thanks. Jim On Sat, Sep 9, 2023 at 21:17 (+0200), Wolfgang Schuster wrote: > Jim schrieb am 09.09.2023 um 20:11: >> Hi, >> I am creating a document which is divided with the unnumbered levels >> (\title, \subject, ...). >> I would like a table of contents showing the names and page numbers, >> something like >> Blah blah blah2 >> Blah blah 4 >> ... >> However, notwithstanding what I see in >> https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents >> I can't get this to happen with unnumbered divisions. >> The above wiki reference says "the following might do that trick" but I >> think "might" is the keyword, since even the wiki doesn't show the "No >> number" entry in the \completecontent. >> I find it hard to imagine that I am the only Context user who wants to do >> this. Can anyone point me in the direction of a working example? >> And am I misinterpreting the wiki, or is the wiki page broken? > 1. You have to change the value of the incrementnumber key for title, > subject etc. > 2. You have to specify which sections are shown in the table of content > because by default only the numbered sections are listed. > begin example 1 > \setuphead [title] [incrementnumber=list] > \setuphead [subject] [incrementnumber=list] > \setuphead [subsubject] [incrementnumber=list] > \definehead [contentstitle] [title] > \setupcombinedlist [content] > [list={chapter,title,section,subject,subsection,subsubject}] > \starttext > \completecontent > \title{Title} > \subject{Subject} > \subsubject{Subsubject} > \stoptext > end example 1 > begin example 2 > \setuphead [title] [incrementnumber=list] > \setuphead [subject] [incrementnumber=list] > \setuphead [subsubject] [incrementnumber=list] > \definehead [contentstitle] [title] > \starttext > \contentstitle{Contents} > \placelist[chapter,title,section,subject,subsection,subsubject] > \title{Title} > \subject{Subject} > \subsubject{Subsubject} > \stoptext > end example 2 > Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Hi Jim, perhaps does this work for you? \setuplist[chapter][headnumber=no] \setuphead[chapter][number=no] \starttext \completecontent \page \chapter{Chapter one} \input knuth \chapter{Chapter two} \input ward \stoptext Greetings Lutz Am 9. September 2023 20:11:55 MESZ schrieb Jim : >Hi, > >I am creating a document which is divided with the unnumbered levels >(\title, \subject, ...). > >I would like a table of contents showing the names and page numbers, >something like > >Blah blah blah2 >Blah blah 4 >... > >However, notwithstanding what I see in >https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents >I can't get this to happen with unnumbered divisions. > >The above wiki reference says "the following might do that trick" but I >think "might" is the keyword, since even the wiki doesn't show the "No >number" entry in the \completecontent. > >I find it hard to imagine that I am the only Context user who wants to do >this. Can anyone point me in the direction of a working example? > >And am I misinterpreting the wiki, or is the wiki page broken? > >Thanks. > > Jim >___ >If your question is of interest to others as well, please add an entry to the >Wiki! > >maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context >webpage : https://www.pragma-ade.nl / http://context.aanhet.net >archive : https://bitbucket.org/phg/context-mirror/commits/ >wiki : https://contextgarden.net >___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Jim schrieb am 09.09.2023 um 20:11: Hi, I am creating a document which is divided with the unnumbered levels (\title, \subject, ...). I would like a table of contents showing the names and page numbers, something like Blah blah blah2 Blah blah 4 ... However, notwithstanding what I see in https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents I can't get this to happen with unnumbered divisions. The above wiki reference says "the following might do that trick" but I think "might" is the keyword, since even the wiki doesn't show the "No number" entry in the \completecontent. I find it hard to imagine that I am the only Context user who wants to do this. Can anyone point me in the direction of a working example? And am I misinterpreting the wiki, or is the wiki page broken? 1. You have to change the value of the incrementnumber key for title, subject etc. 2. You have to specify which sections are shown in the table of content because by default only the numbered sections are listed. begin example 1 \setuphead [title] [incrementnumber=list] \setuphead [subject] [incrementnumber=list] \setuphead [subsubject] [incrementnumber=list] \definehead [contentstitle] [title] \setupcombinedlist [content] [list={chapter,title,section,subject,subsection,subsubject}] \starttext \completecontent \title{Title} \subject{Subject} \subsubject{Subsubject} \stoptext end example 1 begin example 2 \setuphead [title] [incrementnumber=list] \setuphead [subject] [incrementnumber=list] \setuphead [subsubject] [incrementnumber=list] \definehead [contentstitle] [title] \starttext \contentstitle{Contents} \placelist[chapter,title,section,subject,subsection,subsubject] \title{Title} \subject{Subject} \subsubject{Subsubject} \stoptext end example 2 Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Table of contents of unnumbered titles
Hi, I am creating a document which is divided with the unnumbered levels (\title, \subject, ...). I would like a table of contents showing the names and page numbers, something like Blah blah blah2 Blah blah 4 ... However, notwithstanding what I see in https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents I can't get this to happen with unnumbered divisions. The above wiki reference says "the following might do that trick" but I think "might" is the keyword, since even the wiki doesn't show the "No number" entry in the \completecontent. I find it hard to imagine that I am the only Context user who wants to do this. Can anyone point me in the direction of a working example? And am I misinterpreting the wiki, or is the wiki page broken? Thanks. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: how to define an environment with key=value arguments
Am 08.09.23 um 17:02 schrieb Henning Hraban Ramm: We can discuss the details next week and you put the resulting template on the wiki. Ah, I guess I understand the template mechanism. Yet again glorious setups. Will probably manage. So far: \definepageinjection[chapter:start][ page=left, alternative=setups, setups=frontispiz, color=white, background=color, backgroundcolor=Eifel, ] \startsetups[frontispiz] \starttransparent[tlumi]% \externalfigure[\structureuservariable{image}][ width=\measure{MaxWidth}, ]% \stoptransparent% \stopsetups \setuphead[chapter][ page=right, style=\ChapterFont, beforesection={\pageinjection[chapter:start]}, command=\ChapterStart, before={\startcolumnset[Spalten]}, after={\vskip-\lineheight}, % fix column start inbetween=, aftersection={\stopcolumnset}, ] \startchapter[title={Prolog 2: Reiseführer}][ motto={(quotation.}}, % used in \ChapterStart image={00 Lavakeller Mendig g}, % wrong blank=2, ] Not a MWE, I know. Here’s a screenshot: https://yemaya.fiee.net/s/G2NcwE8qQrLAx8B (Funny, I never needed all of before, after, beforesection and aftersection so far.) The injection is a frame, that’s great, because I can set the background, and \externalfigure starts at (0,0). But it uses its own page size, I don’t understand why. I need the bleed/trim area. If I use \setlayer in the setup, the content gets placed on the next page, i.e. under the text. \structureuservariable{image} in the setup gets the value from the _next_ chapter. Maybe the approach in from the source with \dummyparameter\c!name would work better, but I don’t know how to transfer it. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: how to define an environment with key=value arguments
Henning Hraban Ramm schrieb am 08.09.2023 um 12:22: Hi, for an involved image placement (full page image starting each chapter, several stacked elements), I’d like an environment that accepts key-value arguments, like \startMyFigure[page=left,title={My caption}] \externalfigure[dummy]… \stopMyFigure I don’t think that a real float makes sense, even if the interface looks similar, since it’s always a full page in a fixed place, I need no numbering and can place the caption myself. Does it make sense to use \definestartstop? How would I “plugin“ the argument handling? Or should I better define start and stop separately? \def\startMyFigure[#1]{ % e.g. use utilities.parsers.settings_to_hash(#1) } \def\stopMyFigure{} Probably I’ll need to catch the content (\externalfigure, might become more) and use it in a \setlayer – so perhaps something like \definebuffer[MyFigure] \define\stopMyFigure{% \setlayer[page]{\getMyFigure}}} } ? But then I don’t know how to handle the arguments. Probably it makes most sense to do it in Lua, like \startluacode interfaces.implement { name = "startMyFigure", public = true, arguments = {"hash",}, actions = function(h, a) -- … end, } \stopluacode But I didn’t find how to do environments. When you just need an environment with a optional argument to pass user values you can use the userdata environment but be aware that you have some limitations (like verbatim) because the mechanism uses a buffer to store the content. For images (and other content) which are placed on a separate page at the start of a chapter you can use the pageinjection mechanism which was added for this purpose. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] how to define an environment with key=value arguments
Hi, for an involved image placement (full page image starting each chapter, several stacked elements), I’d like an environment that accepts key-value arguments, like \startMyFigure[page=left,title={My caption}] \externalfigure[dummy]… \stopMyFigure I don’t think that a real float makes sense, even if the interface looks similar, since it’s always a full page in a fixed place, I need no numbering and can place the caption myself. Does it make sense to use \definestartstop? How would I “plugin“ the argument handling? Or should I better define start and stop separately? \def\startMyFigure[#1]{ % e.g. use utilities.parsers.settings_to_hash(#1) } \def\stopMyFigure{} Probably I’ll need to catch the content (\externalfigure, might become more) and use it in a \setlayer – so perhaps something like \definebuffer[MyFigure] \define\stopMyFigure{% \setlayer[page]{\getMyFigure}}} } ? But then I don’t know how to handle the arguments. Probably it makes most sense to do it in Lua, like \startluacode interfaces.implement { name = "startMyFigure", public= true, arguments = {"hash",}, actions = function(h, a) -- … end, } \stopluacode But I didn’t find how to do environments. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] XML, multiple spaces encoded as %20 get merged into one space
Hi, I have the example below that uses the three images in the attachment. For some reason multiple spaces encoded as %20 get merged into a single %20. The first image () does not get included even though the name is correct. The second image () gets included. Filename is correct. The third image () gets included even though the actual file name does not contain two spaces (but @xlink:href does). Any ideas what is going on here? Then, in the case of the link, the two %20 end up as a single %20. Best, Denis \setupinteraction[state=start] \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{document|fig}{xml:*} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:fig \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:graphic \externalfigure[\xmlfilter{#1}{./url('xlink:href')}] \stopxmlsetups \startxmlsetups xml:link https://uv-v4.netlify.app/\#?manifest=\xmlfilter{#1}{./url('xlink:href')} \stopxmlsetups \startxmlsetups xml:fig \startplacefigure[title=Test] \startalignment[center] \goto {\xmlfilter{#1}{/graphic/command(xml:graphic)}} [url(\xmlfilter{#1}{/link/command(xml:link)})] \stopalignment \stopplacefigure \goto{test}[url(\xmlfilter{#1}{/link/command(xml:link)})] \stopxmlsetups \startbuffer[test] https://iiif.ub.unibe.ch/presentation/v2.1/berner-inkunabeln/manifest/Inc%20IV%2076%20%20Spiegel%20vorn_Teigstempel"/> https://iiif.ub.unibe.ch/presentation/v2.1/berner-inkunabeln/manifest/Inc%20IV%2076%20%20Spiegel%20vorn_Teigstempel"/> https://iiif.ub.unibe.ch/presentation/v2.1/berner-inkunabeln/manifest/Inc%20IV%2076%20%20Spiegel%20vorn_Teigstempel"/> \stopbuffer \starttext \xmlprocessbuffer{test}{test}{} \stoptext test two spaces.pdf Description: test two spaces.pdf test one space.pdf Description: test one space.pdf test not two spaces.pdf Description: test not two spaces.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: out of order sectionsblocks
On 9/5/2023 4:06 AM, Rik Kabel wrote: The following example generates a log file which begins with the line structure > lists > out of order sectionsblocks, maybe use \setsectionblock My larger document has over a hundred of these at the beginning. \setupnote [endnote] [location=none] \starttext \startbodymatter \startchapter[title={Body}] \startparagraph \input knuthmath \startendnote \input knuth-gpt \stopendnote \stopparagraph \stopchapter \stopbodymatter \startbackmatter \startchapter[title={Notes}] \placenotes [endnote] \stopchapter \stopbackmatter \stoptext Can the message be suppressed? Is there a better way to set up the document to have endnotes for text in other-than-backmatter sectionblocks appear in the backmatter sectionblock? i'll bring the mewssage under tracker control and assume that you will answer all questions wrt side effects (in this case probably harmless but who knows when there is a real messed up block order cq. multiple same blocks used) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] out of order sectionsblocks
The following example generates a log file which begins with the line structure > lists > out of order sectionsblocks, maybe use \setsectionblock My larger document has over a hundred of these at the beginning. \setupnote [endnote] [location=none] \starttext \startbodymatter \startchapter[title={Body}] \startparagraph \input knuthmath \startendnote \input knuth-gpt \stopendnote \stopparagraph \stopchapter \stopbodymatter \startbackmatter \startchapter[title={Notes}] \placenotes [endnote] \stopchapter \stopbackmatter \stoptext Can the message be suppressed? Is there a better way to set up the document to have endnotes for text in other-than-backmatter sectionblocks appear in the backmatter sectionblock? -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Adjust pagenumbering while skipping first page
On 9/4/2023 6:09 PM, Jeroen wrote: The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1? \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setcounter [userpage] [0] \setuppagenumbering [location=] \startdocument \setupfooter[state=stop] \startfrontmatter frontpage \stopfrontmatter \setupfooter[state=start] \startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter \stopdocument \setupfootertexts [title] [\pagenumber\space of \lastpagenumber] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Adjust pagenumbering while skipping first page
The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1? \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setcounter [userpage] [0] \setuppagenumbering [location=] \startdocument \setupfooter[state=stop] \startfrontmatter frontpage \stopfrontmatter \setupfooter[state=start] \startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter \stopdocument ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Different Layout for First Page
I have a document with the first page in startfrontmatter and all other pages in startbodymatter. The layout setting is as following \setuplayout [backspace=20mm, width=175mm, topspace=15mm, header=0mm, footer=2mm, height=275mm, bottomheight=1mm, footerdistance=10mm] \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setupfooter[state=stop] \startfrontmatter \input{frontpage.tex} \stopfrontmatter \setupfooter[state=start] \startbodymatter \input{introduction.tex} \stopbodymatter What would be the easiest way to change the layout only for the first page since it has no footer. For the first page, I would like to have the text run all the way to the bottom with \vfill where normally the footer would be. Thanks Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Reinserting a section title followed by (continued) after a page break
On 9/4/2023 5:55 AM, Calvin Ross wrote: On the off chance anyone seeing this is interested, I have a solution uploaded as part of a module I wrote for screenplay and stageplay writing: https://github.com/cjayross/drama.mkiv/blob/4a9b2576c8630fd03352d95f99456092f6e21190/drama.mkiv#L480 A few remarks: - you can best name modules like t-drama and then t-drame-screenplay and so in order to avoid clashes with files in the tex tree - you really have to be careful with defining additional intercace constants; as you don't define them for other interface languages there is no real reason for them - be aware that when you add key sto existign commands, future clashes can occur - best define new commands CamelCase so that ther ei sno clash with existing or future commands - as you basically define in mkii style, you can use \setevalue {xxx} {\getvalue{yyy}} which is a bit more readable If you load the module in lmtx you get an error on \checkparameters which is not available in lmtx (here \ifparameters is a primitive) because \doifelseassignment is the real tester (checkparameters is more an mkii thing). However, when you \enabledirectives[overloadmode=error] loading will be aborted earlier on because you overload existing macros. It sounds worse than it is because if you use mkiv/lmtx there are easier ways to define an enviroment, think: \unprotect \installnamespace {Slug} \installcommandhandler \Slug {Slug} \Slug \protect \setupSlug[this=that] \Slugparameter{this} etc Which would reduce the amount of code. Anyway, I advise users of LMTX to testtheir local definitions with \enabledirectives[overloadmode=error] or at least \enabledirectives[overloadmode=warning] The solution ended up being very detailed and tightly coupled to this particular problem. However, the general approach was to use box registers to capture the portions of dialog marked using a command sequence (`\continue` in this case) that designates acceptable locations to insert a page break in the dialog. The markup is then placed into the document in pieces with each placement testing the `\pagetotal` against the `\pagegoal` to measure whether the current piece will fit on the current page. This solution had to up using `\synchronizeoutput` as opposed to `\triggerpagebuilder`. I'm not sure why there's a difference in behavior between the two, but the former seems to fix bugs where the `\pagetotal`s would output the measure of the previous page rather than the current one -- leading to sporadic page breaks. This is indeed a problem. Forcing the page builder is not always the solution, but neither is synchronize output. The first one triggers a check for pending contributions while the second forces it using a penalty which can have side effects. One problem is that pagegoal and pagetotal are not always reliable. There is a wrap up about this which isnot yet in the disibution because it is part of a larger experiment. In luametatex we have a few more ways to influence the page builder and also get more reliable info about the state so far. It is something Mikael and I are experimenting with (using large complex mixed text/math documents) in the perspective of par and page building. We will come back to this later this year but some already trickled into context lmtx. So, keep an eye on what shows up, Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Reinserting a section title followed by (continued) after a page break
On the off chance anyone seeing this is interested, I have a solution uploaded as part of a module I wrote for screenplay and stageplay writing: https://github.com/cjayross/drama.mkiv/blob/4a9b2576c8630fd03352d95f99456092f6e21190/drama.mkiv#L480 The solution ended up being very detailed and tightly coupled to this particular problem. However, the general approach was to use box registers to capture the portions of dialog marked using a command sequence (`\continue` in this case) that designates acceptable locations to insert a page break in the dialog. The markup is then placed into the document in pieces with each placement testing the `\pagetotal` against the `\pagegoal` to measure whether the current piece will fit on the current page. This solution had to up using `\synchronizeoutput` as opposed to `\triggerpagebuilder`. I'm not sure why there's a difference in behavior between the two, but the former seems to fix bugs where the `\pagetotal`s would output the measure of the previous page rather than the current one -- leading to sporadic page breaks. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: (feature proposal) link to attachments: /GoToE
Am 03.09.23 um 13:03 schrieb Pablo Rodriguez: On 9/3/23 12:46, Hans Hagen wrote: On 9/3/2023 12:17 PM, Pablo Rodriguez wrote: [...] This basic implementation of GoToE links would be extremely helpful to access embedded documents (believe it or not, this is something I explain almost every week at work). I would be happy to provide the code to implement this, but I’m afraid this is way beyond my knowledge. remind me in a month or so ... i'm not going to touch that part of the code now (some other priorities) Perfectly fine for me, Hans. While I don’t know what’s missing under the hood, I think there’s just a “reference” key missing in \attachment or \setupattachment: \setupinteraction[state=start] \starttext \samplefile{lorem} \attachment[ file={hacker.jpg}, title={Hacker}, symbol=Paperclip, author=Hans, location=inmargin, reference=foobar, ] As you can see in \in{attachment}[foobar], we’re hacking away … \stoptext Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: list of modules: need changes/testing/response
Am 30.08.23 um 22:22 schrieb Wolfgang Schuster: * t-account (2009, Wolfgang) I have an updated version I can put online but there is no need to keep it. If you think it’s usable, just update it. * t-algorithmic (2013, Wolfgang) Can be removed. * t-animation (2013, Wolfgang) Should stay on the wiki. * t-annotation (2013, Wolfgang) Can be removed, the userdata environment is a good alternative for the module. * t-fancybreak (2015, Wolfgang) Should stay on the wiki. * t-fullpage (2017, Wolfgang) Can be removed, the "tight" layout is a good alternative. * t-title (2017, Wolfgang) Can be removed. Thank you! Same as I just wrote to Peter: I’ll just remove the modules from the install list for the time being. CU at the meeting, Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: list of modules: need changes/testing/response
Henning Hraban Ramm schrieb am 30.08.2023 um 20:15: Hi all, esp. module authors! I went through the list of modules on https://modules.contextgarden.net/ (dl/) and the list that controls module installation for “--script install-modules". I removed all font-related modules from the list (not yet from the garden), since they’re probably all obsolete & outdated. Consider publishing typescripts in the wiki. The following modules don’t adhere to the necessary structure and need changes: * t-handlecsv (2023, Pablo) * metaducks (2021, Jairo) * presvoz (2023, Pablo) All of them have a name directory on top of the TDS (tex, doc). If you used a git checkout URL, please try again, for me it worked today. Several modules need testing if they still work and make sense. If their authors are present, I’d appreciate a comment if we should keep them. I’d like to delete at least everything older than 10 years. [...] * t-account (2009, Wolfgang) I have an updated version I can put online but there is no need to keep it. * t-algorithmic (2013, Wolfgang) Can be removed. * t-animation (2013, Wolfgang) Should stay on the wiki. * t-annotation (2013, Wolfgang) Can be removed, the userdata environment is a good alternative for the module. * t-fancybreak (2015, Wolfgang) Should stay on the wiki. * t-fullpage (2017, Wolfgang) Can be removed, the "tight" layout is a good alternative. * t-title (2017, Wolfgang) Can be removed. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: list of modules: need changes/testing/response
Dear Hraban I'm a regular user of t-transliterator (2021, Philipp), so please don't delete it Marcus Vinicius On Wed, Aug 30, 2023 at 3:16 PM Henning Hraban Ramm wrote: > > Hi all, esp. module authors! > > I went through the list of modules on https://modules.contextgarden.net/ > (dl/) and the list that controls module installation for “--script > install-modules". > > I removed all font-related modules from the list (not yet from the > garden), since they’re probably all obsolete & outdated. > Consider publishing typescripts in the wiki. > > > The following modules don’t adhere to the necessary structure and need > changes: > * t-handlecsv (2023, Pablo) > * metaducks (2021, Jairo) > * presvoz (2023, Pablo) > All of them have a name directory on top of the TDS (tex, doc). > If you used a git checkout URL, please try again, for me it worked today. > > > Several modules need testing if they still work and make sense. > If their authors are present, I’d appreciate a comment if we should keep > them. I’d like to delete at least everything older than 10 years. > > * grph-downsample.lua (2019) is known to fail in current LMTX >(I hope for an integrated solution during the meeting.) >t-degrade (2018) is AFAIK an older version of it – delete? > > * high (2018) and pret-c (2018) are syntax highlighters. >Are they better than the vim and scite modules? >Does it make sense to keep/update them? > > * karnaugh (2021, VicSanRoPe; probably OK, I just don’t understand it) > * t-account (2009, Wolfgang) > * t-algorithmic (2013, Wolfgang) > * t-animation (2013, Wolfgang) > * t-annotation (2013, Wolfgang) > * t-bnf (2006, Now) > * t-chromato (2008, Peter) > * t-construction-plan (2008, Peter) > * t-crossref (2016, Zenlima) > * t-cyrillicnumbers (2016, Philipp) > * t-fancybreak (2015, Wolfgang) > * t-french (2011, Peter) > * t-fullpage (2017, Wolfgang) > * t-gantt (2012, Adam) > * t-gm (2015, Luigi) > * t-gnuplot (2013, Mojca) > * t-greek (2013, Thomas – is this more than fonts?) > * t-gs (2015, Luigi) > * t-inifile (2008, Peter) > * t-layout (2007, Patrick) > * t-letterspace (2016, Philipp) > * t-mathsets (2011, Aditya) > * t-rst (2016, Philipp) > * t-rsteps (2006, David) > * t-simplebib (2016, Zenlima) > * t-taspresent (2008, Thomas – AFAIK an old version of simpleslides) > * t-title (2017, Wolfgang) > * t-transliterator (2021, Philipp) > * t-typearea (2008, Peter) > * t-visualcounter (2018, Aditya, isn’t there a newer version?) > > Modules not mentioned are probably fine. > > Hraban > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] list of modules: need changes/testing/response
Hi all, esp. module authors! I went through the list of modules on https://modules.contextgarden.net/ (dl/) and the list that controls module installation for “--script install-modules". I removed all font-related modules from the list (not yet from the garden), since they’re probably all obsolete & outdated. Consider publishing typescripts in the wiki. The following modules don’t adhere to the necessary structure and need changes: * t-handlecsv (2023, Pablo) * metaducks (2021, Jairo) * presvoz (2023, Pablo) All of them have a name directory on top of the TDS (tex, doc). If you used a git checkout URL, please try again, for me it worked today. Several modules need testing if they still work and make sense. If their authors are present, I’d appreciate a comment if we should keep them. I’d like to delete at least everything older than 10 years. * grph-downsample.lua (2019) is known to fail in current LMTX (I hope for an integrated solution during the meeting.) t-degrade (2018) is AFAIK an older version of it – delete? * high (2018) and pret-c (2018) are syntax highlighters. Are they better than the vim and scite modules? Does it make sense to keep/update them? * karnaugh (2021, VicSanRoPe; probably OK, I just don’t understand it) * t-account (2009, Wolfgang) * t-algorithmic (2013, Wolfgang) * t-animation (2013, Wolfgang) * t-annotation (2013, Wolfgang) * t-bnf (2006, Now) * t-chromato (2008, Peter) * t-construction-plan (2008, Peter) * t-crossref (2016, Zenlima) * t-cyrillicnumbers (2016, Philipp) * t-fancybreak (2015, Wolfgang) * t-french (2011, Peter) * t-fullpage (2017, Wolfgang) * t-gantt (2012, Adam) * t-gm (2015, Luigi) * t-gnuplot (2013, Mojca) * t-greek (2013, Thomas – is this more than fonts?) * t-gs (2015, Luigi) * t-inifile (2008, Peter) * t-layout (2007, Patrick) * t-letterspace (2016, Philipp) * t-mathsets (2011, Aditya) * t-rst (2016, Philipp) * t-rsteps (2006, David) * t-simplebib (2016, Zenlima) * t-taspresent (2008, Thomas – AFAIK an old version of simpleslides) * t-title (2017, Wolfgang) * t-transliterator (2021, Philipp) * t-typearea (2008, Peter) * t-visualcounter (2018, Aditya, isn’t there a newer version?) Modules not mentioned are probably fine. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Bug between \definealternativestyle and makeup?
Ouch, thanks for opening my eyes! Le 27/08/23 à 21:42, Mikael Sundqvist a écrit : Remove the period: \definecharacterkerning [mykerning] [factor=0.15] \definealternativestyle[mystyle][{\setcharacterkerning[mykerning]}] \definemakeup [title] [doublesided=empty, pagestate=start] \starttext \starttitlemakeup Title \stoptitlemakeup \stoptext /Mikael On Sun, Aug 27, 2023 at 9:32 PM Alex Leray wrote: Hi, I found that using \definealternativestyle in conjunction with Makeup insert a page before my Makeup page. Any idea? Thanks * * * \definecharacterkerning [mykerning] [factor=0.15] \definealternativestyle[mystyle][{\setcharacterkerning[mykerning]}]. %%% BUG!!! \definemakeup [title] [doublesided=empty, pagestate=start] \starttext \starttitlemakeup Title \stoptitlemakeup \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ -- Alexandre Leray +32 487 947 030 Avez-vous pensé à (vous) offrir Médor ? https://medor.coop/ideescadeau ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Bug between \definealternativestyle and makeup?
Remove the period: \definecharacterkerning [mykerning] [factor=0.15] \definealternativestyle[mystyle][{\setcharacterkerning[mykerning]}] \definemakeup [title] [doublesided=empty, pagestate=start] \starttext \starttitlemakeup Title \stoptitlemakeup \stoptext /Mikael On Sun, Aug 27, 2023 at 9:32 PM Alex Leray wrote: > > Hi, > > I found that using \definealternativestyle in conjunction with Makeup > insert a page before my Makeup page. > > Any idea? > > Thanks > > * * * > > \definecharacterkerning [mykerning] [factor=0.15] > \definealternativestyle[mystyle][{\setcharacterkerning[mykerning]}]. %%% > BUG!!! > > \definemakeup [title] [doublesided=empty, pagestate=start] > \starttext > \starttitlemakeup > Title > \stoptitlemakeup > \stoptext > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Bug between \definealternativestyle and makeup?
Hi, I found that using \definealternativestyle in conjunction with Makeup insert a page before my Makeup page. Any idea? Thanks * * * \definecharacterkerning [mykerning] [factor=0.15] \definealternativestyle[mystyle][{\setcharacterkerning[mykerning]}]. %%% BUG!!! \definemakeup [title] [doublesided=empty, pagestate=start] \starttext \starttitlemakeup Title \stoptitlemakeup \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Better option for a macro with lots of arguments
On 8/23/2023 4:12 AM, Andres Conrado Montoya wrote: I have been using the following macro to add a bunch of sections to the start of chapters in a book, it works but I think is kind of weak: %%% \define[7]\metadatos{ \startsection[title={Resumen}] #1 \stopsection \startsection[title={Palabras clave}] #2 \stopsection \start \language[en] \startsection[title={Abstract}] #3 \stopsection \startsection[title={Keywords}] #4 \stopsection \stop \startsection[title={¿Cómo citar este capítulo? / How to cite this book?}] \startsubsection[title={Apa}] #5 \stopsubsection \startsubsection[title={Chicago}] #6 \stopsubsection \startsubsection[title={MLA}] #7 \stopsubsection \stopsection } \starttext % Then I call the macro like this: \metadatos{spanish abstract \input knuth}{some, comma, separated, keywords, in, spanish}{english abstract \input knuth}{same, comma, separated, keywords, in, english}{Apa citation style for this article}{Chicago citation style for this article}{MLA citation style for this article} \stoptext %%% I've been exploring different ways to do it better, but with not much luck, I was thinking something based in key=value assignments? setups? datasets? Not really sure, but If you know a better solution or point me in the direction of something I can use to replace that macro, it would be greatly appreciated. \startsetups [document:start] \doifdocumentvariable {englishabstract} { \startsection[title={Resumen}] \documentvariable{englishabstract} \stopsection } \doifdocumentvariable {spanisabstract} { \startsection[title={Palabras clave}] \documentvariable{spanishabstract} \stopsection } ... \stopsetups \startbuffer english ... \stopbuffer \startbuffer spanish ... \stopbuffer \startsetups [document:stop] ... \stopsetups \startdocument [spanisabstract={\getbuffer[spanish]}, ] ... \stopdocument untested, just keyed in - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Better option for a macro with lots of arguments
I have been using the following macro to add a bunch of sections to the start of chapters in a book, it works but I think is kind of weak: %%% \define[7]\metadatos{ \startsection[title={Resumen}] #1 \stopsection \startsection[title={Palabras clave}] #2 \stopsection \start \language[en] \startsection[title={Abstract}] #3 \stopsection \startsection[title={Keywords}] #4 \stopsection \stop \startsection[title={¿Cómo citar este capítulo? / How to cite this book?}] \startsubsection[title={Apa}] #5 \stopsubsection \startsubsection[title={Chicago}] #6 \stopsubsection \startsubsection[title={MLA}] #7 \stopsubsection \stopsection } \starttext % Then I call the macro like this: \metadatos{spanish abstract \input knuth}{some, comma, separated, keywords, in, spanish}{english abstract \input knuth}{same, comma, separated, keywords, in, english}{Apa citation style for this article}{Chicago citation style for this article}{MLA citation style for this article} \stoptext %%% I've been exploring different ways to do it better, but with not much luck, I was thinking something based in key=value assignments? setups? datasets? Not really sure, but If you know a better solution or point me in the direction of something I can use to replace that macro, it would be greatly appreciated. -- 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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: An strange error with section and page
Xavier B. schrieb am 22.08.2023 um 19:32: Hi, I have a long document [https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-exercicis.conTeXt.pdf] which I migrated from MKIV to LMTX version of ConTeXt. As Wolfgang recommened. I migrated old syntax to new one and replace \page[yes] before each section to \setupheads[section][style={\bf \ssc}, alternative=margin, page=yes] but now after each section there is a new page. Why? I don't know. Can someone help me to see what happens? The source code is here [https://repo.or.cz/apunts-espa-matematiques.git] You're using the structure for section of the following example in your document. This is a problem because subjects are the same level as section or to be precise, subjects are unnumbered versions of sections and inherit all settings from them unless configured otherwise. While the solution here is to convert all subject headings to subsubject (be sure to also take care of even lower section) a quick way to fix the page break is to disable the page-value for subject, look at the commented line in the example how this can be done. begin example \setuphead[section][page=yes] %\setuphead[subject][page=no] \starttext \startsection[title=Section] \startsubject [title=Subject] \stopsubject \stopsection \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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: your opinion about list structures
Hi Hraban, a late reply concerning the ToCs in your book: maybe you could an two-toc-approach like in the Memoir manual? One could show only the chapters, another would contain everything. Best, Denis > -Ursprüngliche Nachricht- > Von: Henning Hraban Ramm > Gesendet: Donnerstag, 10. August 2023 15:22 > An: mailing list for ConTeXt users > Betreff: [NTG-context] your opinion about list structures > > Hi, this is about my ConTeXt book again. > > [ToC] > > At the moment, my table of contents has chapters and sections and is 8 pages > long. I would probably hardly use it. > > Maybe it would be better to show only chapters (29 content + 12 appendix = 2 > pages) and include a list of sections after the chapter title (or not at all). > > [Registers] > > I split between command and topic index (9 pages each), because I find it > annoying to have the commands between the topics. > I also include the topics that are mentioned in titles in the index, because > I hate > it if I must look in two places. > (Otherwise I wouldn't think about omitting the sections from the ToC.) > > At the moment there's also an index of todo items, but that will disappear > before print. > > [Glossary] > > There's a short dictionary of technical terms in the appendix (8.5 p.). > Each lemma is also included in the index. > > Should I add a list of abbreviations? (TDS, TEI, OCG, RAL, PDF, SVG.?) They're > in the index and explained where they matter - I don't think the meaning of > many abbreviations like file types is important. > > [Other lists] > > Should I include a list of colors, like the output of \showcolor[crayola]? (I > think > it would only bloat the book, and everyone can create the list themselves.) > > I have lists of supported languages (should get checked), fonts in the > distribution and all math fonts, because these are not easily reproducible > (AFAIK). > > > So, what do you think, and how do you like to work with technical books? > What kind of information (about ConTeXt or documents/printing in > general) do you find hard to find? > > Hraban > ___ > > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww > .ntg.nl%2Fmailman%2Flistinfo%2Fntg- > context&data=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5f7a14d8 > 5386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7C1%7C0 > %7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000% > 7C%7C%7C&sdata=wp5lFDSJq9915y4de%2BNuNiULb09yT%2FpDr%2FWXrq > OcdVI%3D&reserved=0 > webpage : > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww > .pragma- > ade.nl%2F&data=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5f7a14 > d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7C1%7 > C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC > 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000 > %7C%7C%7C&sdata=TLdBrqOp1GuhmQRLiaydxRox1aeaO%2BWASrA%2FBa > OAs%2BI%3D&reserved=0 / > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontex > t.aanhet.net%2F&data=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5 > f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7 > C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWI > joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C > 3000%7C%7C%7C&sdata=T%2FP42p3V5RzC%2B%2BwX5vByYtXy3LFOHce5 > Eues%2F8PPsug%3D&reserved=0 > archive : > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbu > cket.org%2Fphg%2Fcontext- > mirror%2Fcommits%2F&data=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6 > e26b5f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d79 > 77e%7C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d > 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% > 3D%7C3000%7C%7C%7C&sdata=MR51GITNqb9ludzBJMwmu4AqE%2BaWw > 0%2BIPpPm76Nwv%2BE%3D&reserved=0 > wiki : > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fconte > xtgarden.net%2F&data=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b > 5f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e% > 7C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJ > WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D > %7C3000%7C%7C%7C&sdata=ubpCSLzX4vdgb7WNlaK7ASRwd94Ugv0TtuF8 > wzDnnts%3D&reserved=0 > ___ > _
[NTG-context] Re: Not getting a page break in the ToC
On 8/22/2023 8:51 AM, Andres Conrado Montoya wrote: Apologies, I just found the solution: https://wiki.contextgarden.net/Command/setinjector El lun, 21 ago 2023 a las 23:43, Andres Conrado Montoya (< andresconr...@gmail.com>) escribió: I'm trying to force a page break in a table of contents, using what is recommended at https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break However, it does not work. Here's a MWE: \definelistextra[page][before=\page] \starttext \starttitle[title={Table of contents}] \placecontent[extras={2=page}] \stoptitle \startchapter[title={First chapter}] \input knuth \stopchapter \startchapter[title={Second chapter}] \input knuth \stopchapter \startchapter[title={Third chapter}] \input knuth \stopchapter \stoptext Is there a new way of obtaining a page break before a given part, chapter or section in the ToC? Here is another method: \showpageprogress % [all] %resetforcedbreak \starttext \registerforcedbreak[8][before] \dorecurse{10}{\samplefile{tufte}\par} \page \resetforcedbreak \registerforcedbreak[12][after] \dorecurse{10}{\samplefile{tufte}\par} \stoptext (by-product of some new mechanisms that we are exploring) (not yet wikified) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Not getting a page break in the ToC
Apologies, I just found the solution: https://wiki.contextgarden.net/Command/setinjector El lun, 21 ago 2023 a las 23:43, Andres Conrado Montoya (< andresconr...@gmail.com>) escribió: > I'm trying to force a page break in a table of contents, using what is > recommended at > https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break > > However, it does not work. Here's a MWE: > > \definelistextra[page][before=\page] > \starttext > \starttitle[title={Table of contents}] > \placecontent[extras={2=page}] > \stoptitle > \startchapter[title={First chapter}] > \input knuth > \stopchapter > \startchapter[title={Second chapter}] > \input knuth > \stopchapter > \startchapter[title={Third chapter}] > \input knuth > \stopchapter > \stoptext > > Is there a new way of obtaining a page break before a given part, chapter > or section in the ToC? > > Thank you in advance. > > -- > 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 > -- 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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Not getting a page break in the ToC
I'm trying to force a page break in a table of contents, using what is recommended at https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break However, it does not work. Here's a MWE: \definelistextra[page][before=\page] \starttext \starttitle[title={Table of contents}] \placecontent[extras={2=page}] \stoptitle \startchapter[title={First chapter}] \input knuth \stopchapter \startchapter[title={Second chapter}] \input knuth \stopchapter \startchapter[title={Third chapter}] \input knuth \stopchapter \stoptext Is there a new way of obtaining a page break before a given part, chapter or section in the ToC? Thank you in advance. -- 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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Applying \sc for smallcaps across styles
Many thanks, Pablo. Yes, you are right. As mentioned in the reply to Wolfgang, will edit the wiki to reflect the legacy\deprecated status of \sc. As for grep: Normally I use the nice "find in files" feature of Notepad++ -) Am editing the wiki and have moved the original link to the more general title https://wiki.contextgarden.net/Small_caps_across_styles_(bold,_italics,_etc.) Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 On Aug 19, 2023, 11:39 AM -0600, Pablo Rodriguez , wrote: ** Caution: EXTERNAL Sender ** On 8/19/23 16:03, Hamid,Idris wrote: [...] Yes, there is an easy workaround: \definefontfeature[smallcaps][smcp=yes] Hi Idris, just a minor comment. This is already defined in lines 96-99 of font-pre.mkxl: \definefontfeature [smallcaps] [always] [smcp=yes] And also in lines 77-82 of font-pre.mkiv: \definefontfeature [smallcaps] [always] [smcp=yes, tlig=yes, trep=yes] % texligatures=yes,texquotes=yes Just in case it helps, grep is a useful tool when applied to tex/texmf-context/tex/context/base/mkxl (or /tex/texmf-context/tex/context/base/mkiv, if needed). Cheers Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ntg.nl%2Fmailman%2Flistinfo%2Fntg-context&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635786855448%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O65qArrxT44MNSYNEi%2B7OsejORDTDLkZ5R7TtQIWyL4%3D&reserved=0 webpage : https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pragma-ade.nl%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UC%2Fx86X%2BW2LZXIE56pCTGSRUB7rtvzLnrXjK%2FAJ26PA%3D&reserved=0 / https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontext.aanhet.net%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hk3RuySs6VFwerUtJVUZPI9VRh3uy7Oi8%2FP7hCXusqI%3D&reserved=0 archive : https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fphg%2Fcontext-mirror%2Fcommits%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2F76KLSob%2BFKJBe0GNDYQbkQrocVRIRBjxVFRV4pkVVc%3D&reserved=0 wiki : https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcontextgarden.net%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Vx7%2FNbHk0VmHlTYydydxk7NnB95LfrE%2BUaSsUJNnhsw%3D&reserved=0 ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Enable interaction on custom apa cite variant
Hi, I would like a variant of cite per the APA specification that removes the bracket when quoted in mathematical definitions, theorems, etc. I could of course do it manually for reach using right= and left= but I didn't want to do it every time. I have come up with this MWE: \startbuffer[ref] @book{burago2022course, title={A course in metric geometry}, author={Burago, Dmitri and Burago, Yuri and Ivanov, Sergei}, volume={33}, year={2022}, publisher={American Mathematical Society} } \stopbuffer \setupinteraction[state=start, color=blue] \setupcolors[state=start] \usebtxdataset[ref.buffer] \usebtxdefinitions[apa] \definebtx [apa:cite:theorem] [apa:cite] \startsetups btx:apa:cite:theorem \btxflushauthorname{author} \btxcomma \btxflush{year} \fastsetup{btx:cite:righttext} \stopsetups \setupenumeration[ before={\blank[medium]}, after={\blank[medium]}, alternative=serried, right=, headcommand=\groupedcommand{}{.}, distance=0.5em, width=fit, headstyle=bold, titlestyle=bold, way=bytext, conversion=numbers, prefix=chapter, list=all, title=yes, indentnext=no, ] \defineenumeration[definition][ text=Defintion, style=normal, number=no, ] \starttext \startdefinition{\cite[righttext={{ p.\nbsp 1}}, alternative=theorem][burago2022course]} This is something \stopdefinition \startsubject[title={References}] \placelistofpublications \startsubject \stoptext The problem with this is that the citation is not interactive like it would be if I used apa:cite:authoryear and just removed the parentheses in the options. How do I get it to highlight blue and be interactive like the default behaviour when you turn on interaction? Also this is probably overkill so if there is a better way to achieve this... Jethro ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: disable header for endnotes
On 8/16/2023 5:02 AM, jbf wrote: I wonder if someone might be able to help me with this. I have a book in three parts and the author wants endnotes. No problem. I can produce those with \setupfootnotes[location=text] and then \placefootnotes. However, I would like the header to read 'Notes' on the recto page (or indeed be blank with no header), but I am currently getting the header that belongs to the main setup for headers, which happens to be: \startsetups[middle] \hfill \getmarking[section] \hfill \stopsetups \setupheadertexts [{\hfill\documentvariable{metadata:title}\hfill}][] [\setups{middle}][] How do I deal with the \placefootnotes command so that it ignores this and either gives me no header, or perhaps a new header with 'Notes' in place of [section] (which is achieved in centered position with setups[middle])? Julian I use the following for a notes chapter at the end of a book. It produces headings that indicate the pages for which the notes apply. Perhaps you can adapt it to your needs: In the environment file: \definemarking [notePage] \startsetups noteHeadingsText {\em Notes for page \doifelse{\fetchmark[notePage][top]}{\fetchmark[notePage][bottom]} { \getmarking[notePage][top]} {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}} \stopsetups \startsetups noteHeadings:on \setupheadertexts[][\setups{noteHeadingsText}] [\setups{noteHeadingsText}][] \stopsetups In the text: \startbackmatter \startchapter[reference={cha:notes}, list={Notes}, % toc bookmark={Notes}, % pdf bookmark title={Notes}] % chapter head [Lettrine=no] \setups{noteHeadings:on} \placenotes[endnote] \stopchapter -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: An error which is not in .log file
Mmmm thanks. How can I pass so [scale=0.9] to starttikzpicture? On Wed, 16 Aug 2023 06:27:34 +0200 Wolfgang Schuster ha escrit: > Xavier B. schrieb am 16.08.2023 um 00:12: > > Thanks. > > > > After some work on it, following your advice, I reduce the compilation > > problem to several "wrong" files. > > One was trivialy fixed because I did not close one environment, but other > > don't. Please help: > > 1. You need \starttext and \stoptext at the begin and end of your > example file. > > 2. You forgot to close the following environment: > \startexercici[reference=exercici:problemes-de-fraccions-13, > title={tasca per fer junts}] > > 3. \starttikzpicure doesn't allow arguments which results in font error > messages (char ... missing). This is an error in the ConTeXt version of > the \starttikzpicture command and should be fixed. > > Wolfgang > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: An error which is not in .log file
Xavier B. schrieb am 16.08.2023 um 00:12: Thanks. After some work on it, following your advice, I reduce the compilation problem to several "wrong" files. One was trivialy fixed because I did not close one environment, but other don't. Please help: 1. You need \starttext and \stoptext at the begin and end of your example file. 2. You forgot to close the following environment: \startexercici[reference=exercici:problemes-de-fraccions-13, title={tasca per fer junts}] 3. \starttikzpicure doesn't allow arguments which results in font error messages (char ... missing). This is an error in the ConTeXt version of the \starttikzpicture command and should be fixed. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: An error which is not in .log file
Thanks. After some work on it, following your advice, I reduce the compilation problem to several "wrong" files. One was trivialy fixed because I did not close one environment, but other don't. Please help: The error is here and I attach file. modules > 'pgfmath' is not found structure > sectioning > section @ level 3 : 0.0.1 -> Problemes de fraccions structure > sectioning > subject @ level 3 : 0.0.1 -> Preguntes tex error > tex error on line 25 in file ./dev.tex: \textfont0 is undefined in ordinal, font id 0, character 63) \startexercici[reference=exercici:problemes-de-fraccions-1, title={oli}] Calculeu quina part del dipòsit queda buida, sabent que l'aigua ocupa $2/5$ del recipient i l'oli, $1/4$ (vegeu figura~\in[fig:oli-aigua-diposit]). 15 \usetikzlibrary[trees] 16 \usetikzlibrary[calc, intersections, through, backgrounds, arrows, shapes.geometric, fadings, decorations.pathreplacing, shadings, shapes.geometric, patterns, fit, positioning, shapes.symbols, chains] 17 \usemodule[pgfmath] 18 %\usemodule[filter] 19 20 21 \startsection[title={Problemes de fraccions}, reference={seccio:problemes-de-fraccions}] 22 23 \subject{Preguntes} 24 25 >> \startexercici[reference=exercici:problemes-de-fraccions-1, title={oli}] Calculeu quina part del dipòsit queda buida, sabent que l'aigua ocupa $2/5$ del recipient i l'oli, $1/4$ (vegeu figura~\in[fig:oli-aigua-diposit]). 26 27 \startplacefigure[reference=fig:oli-aigua-diposit, location=force, title={Dipòsit omplit amb aigua i oli}] 28 \bTABLE[frame=off,align={middle,lohi},width=fit] 29 \bTR 30 \bTD 31 \starttikzpicture[scale=0.75] 32 % recipient 33 \draw (0,0) -- (0,10) -- (2,10) -- (2,0) -- cycle; 34 35 % aigua Somewhere in the math formula just ended, you used the stated character from an undefined font family. For example, plain TeX doesn't allow \it or \sl in subscripts. Proceed, and I'll try to forget that I needed that character. mtx-context | fatal error: return code: 1 Thanks in advance, On Tue, 15 Aug 2023 21:44:53 +0200 Wolfgang Schuster ha escrit: > Xavier B. schrieb am 15.08.2023 um 21:36: > > On Tue, 15 Aug 2023 21:13:54 +0200 > > Wolfgang Schuster ha escrit: > > > >> There is also something wrong with the structure of your document when > >> need \page[yes] after each file. > > Why is it trouble? > > When you start each subfile with \section or \subject you can use > \setuphead to force a pagebreak at the start of each new section and not > with a \page command in the document. > > Wolfgang > system > system > ConTeXt ver: 2023.08.15 18:48 LMTX fmt: 2023.8.15 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/home/xan/bin/context-current/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/home/xan/bin/context-current/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './dev', input './dev.tex', result './dev' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './dev.tex' modules > 'tikz' is loaded open source > level 2, order 3, name '/home/xan/bin/context-current/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' open source > level 3, order 4, name 'pgfutil-common.tex' close source> level 3, order 4, name 'pgfutil-common.tex' open source > level 3, order 5, name 'pgfutil-context.def' close source> level 3, order 5, name 'pgfutil-context.def' open source > level 3, order 6, name 'pgfrcs.code.tex' open source > level 4, order 7, name 'pgf.revision.tex' close source> level 4, order 7, name 'pgf.revision.tex' close source> level 3, order 7, name 'pgfrcs.code.tex' open source > level 3, order 8, name 'pgfsys.code.tex' open source > level 4, order 9, name 'pgfkeys.code.tex' open source > level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex' close source> level 4, order 10, name 'pgfkeys.code.tex' cld > stack > cld > stack > use : slot = context.functions.register(f) cld > stack > and : context.functions.unregister(slot) cld > sta
[NTG-context] Re: An error which is not in .log file
Hi, I suggest to comment out/add \stoptext until the error go,and that way narrow it down. The usual way... /Mikael Den tis 15 aug. 2023 19:50Xavier B. skrev: > I don't have line 276. This is what I have (169 lines): > > % Fitxer ConTeXt MIV > > % carregam les opcions d'entorn > \environment ng-entorn-minimal.conTeXt > \environment ng-entorn-taules.conTeXt > \environment ng-entorn-teoria.conTeXt > \environment ng-entorn-colors.conTeXt > > % bibliografia > \usebtxdataset[default][ng-bibliografia.bib] > \setupbtx[dataset=default] > \usebtxdefinitions[aps] > > % el text > > \starttext > > \startfrontmatter > \input ng-pre-portada.conTeXt > \input ng-pre-llicencia.conTeXt > \input ng-pre-informacio-document.conTeXt > \completecontent > \stopfrontmatter > > > \startbodymatter > > \startpart[title=Aritmètica] > > \input ng-aritmetica-nombres-naturals-operacions.conTeXt > \page[yes] > \input ng-aritmetica-divisibilitat.conTeXt > \page[yes] > \input ng-aritmetica-sencers-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt > \page[yes] > \input ng-aritmetica-percentatges.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-sencers.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-fraccions.conTeXt > \page[yes] > \input ng-aritmetica-arrodoniment-i-truncament.conTeXt > \page[yes] > \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt > \page[yes] > \input ng-aritmetica-sequencies.conTeXt > \page[yes] > \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt > \page[yes] > \input ng-aritmetica-propietats-de-les-potencies.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-calcul.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-problemes.conTeXt > \stoppart > > \startpart[title=Relacions entre variables] > > \input ng-relacions-variables-proporcionalitat-directa.conTeXt > \page[yes] > \input ng-relacions-variables-percentatges-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-repartiments-proporcionals.conTeXt > \page[yes] > \input ng-relacions-variables-proporcionalitat-inversa.conTeXt > \page[yes] > \input ng-relacions-variables-conversio-unitats.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-lineal-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-afi-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt > \stoppart > > \startpart[title=Àlgebra] > \input ng-algebra-equacions-primer-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt > \page[yes] > \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt > \page[yes] > \input > ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt > \stoppart > > \startpart[title=Geometria] > > \input ng-geometria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-homotecies.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt > \stoppart > > \startpart[title=Estadística] > \input ng-estadistica-tipus-de-variables.conTeXt > \page[yes] > \input ng-estadistica.conTeXt > \page[yes] > \input ng-estadistica-parametres-dispersio.conTeXt > \page[yes] > \input ng-estadistica-grafics-i-diagrames.conTeXt > \stoppart > > \startpart[title=Probabilitat] > \input ng-probabilitat-experiments-simples.conTeXt > \page[yes] > \input ng-probabilitat-experiments-compostos.conTeXt > \page[yes] > \input ng-probabilitat-probabilitat-condicionada.conTeXt > \page[yes] > \input ng-probabilitat-algebra-de-successos.conTeXt > \stoppart > > \stopbodymatter > > > \startappendices > > \startpart[title=Apunts teòrics] > \input ng-teoria-proporcionalitat-numerica.conTeXt > \page[yes] > \input ng-teoria-equacions-de-segon-grau.conTeXt > \page[yes] > \input ng-teoria-funcio-quadratica.conTeXt > \page[yes] > \input ng-teoria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-teoria-apendix-figures-usuals-arees-volums.co
[NTG-context] Re: An error which is not in .log file
I don't have line 276. This is what I have (169 lines): % Fitxer ConTeXt MIV % carregam les opcions d'entorn \environment ng-entorn-minimal.conTeXt \environment ng-entorn-taules.conTeXt \environment ng-entorn-teoria.conTeXt \environment ng-entorn-colors.conTeXt % bibliografia \usebtxdataset[default][ng-bibliografia.bib] \setupbtx[dataset=default] \usebtxdefinitions[aps] % el text \starttext \startfrontmatter \input ng-pre-portada.conTeXt \input ng-pre-llicencia.conTeXt \input ng-pre-informacio-document.conTeXt \completecontent \stopfrontmatter \startbodymatter \startpart[title=Aritmètica] \input ng-aritmetica-nombres-naturals-operacions.conTeXt \page[yes] \input ng-aritmetica-divisibilitat.conTeXt \page[yes] \input ng-aritmetica-sencers-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt \page[yes] \input ng-aritmetica-percentatges.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-sencers.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-fraccions.conTeXt \page[yes] \input ng-aritmetica-arrodoniment-i-truncament.conTeXt \page[yes] \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt \page[yes] \input ng-aritmetica-sequencies.conTeXt \page[yes] \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt \page[yes] \input ng-aritmetica-propietats-de-les-potencies.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-calcul.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-problemes.conTeXt \stoppart \startpart[title=Relacions entre variables] \input ng-relacions-variables-proporcionalitat-directa.conTeXt \page[yes] \input ng-relacions-variables-percentatges-problemes.conTeXt \page[yes] \input ng-relacions-variables-repartiments-proporcionals.conTeXt \page[yes] \input ng-relacions-variables-proporcionalitat-inversa.conTeXt \page[yes] \input ng-relacions-variables-conversio-unitats.conTeXt \page[yes] \input ng-relacions-variables-funcio-lineal-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-afi-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt \stoppart \startpart[title=Àlgebra] \input ng-algebra-equacions-primer-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt \stoppart \startpart[title=Geometria] \input ng-geometria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-homotecies.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt \stoppart \startpart[title=Estadística] \input ng-estadistica-tipus-de-variables.conTeXt \page[yes] \input ng-estadistica.conTeXt \page[yes] \input ng-estadistica-parametres-dispersio.conTeXt \page[yes] \input ng-estadistica-grafics-i-diagrames.conTeXt \stoppart \startpart[title=Probabilitat] \input ng-probabilitat-experiments-simples.conTeXt \page[yes] \input ng-probabilitat-experiments-compostos.conTeXt \page[yes] \input ng-probabilitat-probabilitat-condicionada.conTeXt \page[yes] \input ng-probabilitat-algebra-de-successos.conTeXt \stoppart \stopbodymatter \startappendices \startpart[title=Apunts teòrics] \input ng-teoria-proporcionalitat-numerica.conTeXt \page[yes] \input ng-teoria-equacions-de-segon-grau.conTeXt \page[yes] \input ng-teoria-funcio-quadratica.conTeXt \page[yes] \input ng-teoria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-teoria-apendix-figures-usuals-arees-volums.conTeXt \page[yes] \input ng-teoria-proporcionalitat-geometrica.conTeXt \page[yes] \input ng-teoria-estadistica.conTeXt \page[yes] \input ng-teoria-probabilitat.conTeXt \stoppart \stopappendices \startbackmatter \input ng-pre-continguts-aliens.conTeXt \page[yes] % Bibliografia \startchapter[title=Referències] \placelistofpublications \stopchapter %% Índex alfabètic \completeindex \stopbackmatter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Very strange error:
Xavier B. schrieb am 15.08.2023 um 00:03: Now - \startexercici[]{} --> \startexercici[reference=...,title=...] with LMTX this \startitemize \sym{\in[REFERENCE]} \stopitemize does not work. You have to provide a example for the error because it works for me. \starttext \startsection [reference=foo,title=Foo] \startitemize \sym{\in[foo]} xxx \stopitemize \stopsection \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Very strange error:
Now > > - \startexercici[]{} --> > \startexercici[reference=...,title=...] > with LMTX this \startitemize \sym{\in[REFERENCE]} \stopitemize does not work. Some change here too? Thanks, ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Very strange error:
Thanks, Wolfgang, for pointing this replacements. I will try to change that but it's a lot of work. Appreciate Xavier On Mon, 14 Aug 2023 19:07:09 +0200 Wolfgang Schuster ha escrit: > > > > You're correct, \head is the cause of the error and it's better to > replace it with > > \starthead {...} > ... > \stophead > > but there are more things which can be changed to use modern syntax (in > many cases part of ConTeXt since nearly a decade). > > > A few examples: > > - \startexercici[]{} --> > \startexercici[reference=...,title=...] > > - \placetable[][]{}{...} --> > \startplacetable[reference=...,location=...,title=...] ... \stopplacetable > > - Llimones \hfill 6 --> Llimones \filler[symbol] 6 > > - \bigskip --> \blank[big] > > > Wolfgang > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Very strange error:
Rik Kabel schrieb am 14.08.2023 um 18:42: On 8/14/2023 11:41 AM, Xavier B. wrote: After I run context (LMTX version) to my document (attached) I get this error: tex error > tex error on line 540 in file ./dev.tex: The file ended when scanning an argument. I don't know how to start... Can anyone help me? Thanks, Xavier PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I get no errors. I suspect that LMTX is a bit more strict about parsing. You have omitted the required \par for each \head. You're correct, \head is the cause of the error and it's better to replace it with \starthead {...} ... \stophead but there are more things which can be changed to use modern syntax (in many cases part of ConTeXt since nearly a decade). A few examples: - \startexercici[]{} --> \startexercici[reference=...,title=...] - \placetable[][]{}{...} --> \startplacetable[reference=...,location=...,title=...] ... \stopplacetable - Llimones \hfill 6 --> Llimones \filler[symbol] 6 - \bigskip --> \blank[big] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] units module for LMTX?
I see there is no units module available anymore [1][2]: mtxrun --script install-modules --list [xan@coronari apunts-espa]$ mtxrun --script install-modules --list mtx-install-modules | loading entries from file '/home/xan/bin/context-current/tex/texmf-context/tex/context/modules/third/mtx-install-imp-tikz.lua' mtx-install-modules | loading entries from file '/home/xan/bin/context-current/tex/texmf-context/tex/context/modules/third/mtx-install-imp-modules.lua' mtx-install-modules | mtx-install-modules | account : https://modules.contextgarden.net/dl : t-account.zip mtx-install-modules | algorithmic : https://modules.contextgarden.net/dl : t-algorithmic.zip mtx-install-modules | animation : https://modules.contextgarden.net/dl : t-animation.zip mtx-install-modules | annotation : https://modules.contextgarden.net/dl : t-annotation.zip mtx-install-modules | bibmod-doc : https://modules.contextgarden.net/dl : bibmod-doc.zip mtx-install-modules | bnf : https://modules.contextgarden.net/dl : t-bnf.zip mtx-install-modules | chromato: https://modules.contextgarden.net/dl : t-chromato.zip mtx-install-modules | collating : https://modules.contextgarden.net/dl : Environment-for-collating-marks.zip mtx-install-modules | crossref: https://modules.contextgarden.net/dl : t-crossref.zip mtx-install-modules | cyrillicnumbers : https://modules.contextgarden.net/dl : t-cyrillicnumbers.zip mtx-install-modules | degrade : https://modules.contextgarden.net/dl : t-degrade.zip mtx-install-modules | enigma : https://modules.contextgarden.net/dl : enigma.zip mtx-install-modules | fancybreak : https://modules.contextgarden.net/dl : t-fancybreak.zip mtx-install-modules | filter : https://modules.contextgarden.net/dl : t-filter.zip mtx-install-modules | french : https://modules.contextgarden.net/dl : t-french.zip mtx-install-modules | fullpage: https://modules.contextgarden.net/dl : t-fullpage.zip mtx-install-modules | gantt : https://modules.contextgarden.net/dl : t-gantt.zip mtx-install-modules | gfsdidot: https://modules.contextgarden.net/dl : gfsdidot.zip mtx-install-modules | gm : https://modules.contextgarden.net/dl : t-gm.zip mtx-install-modules | gnuplot : https://modules.contextgarden.net/dl : t-gnuplot.zip mtx-install-modules | greek : https://modules.contextgarden.net/dl : t-greek.zip mtx-install-modules | grph-downsample : https://modules.contextgarden.net/dl : grph-downsample.lua.zip mtx-install-modules | gs : https://modules.contextgarden.net/dl : t-gs.zip mtx-install-modules | high: https://modules.contextgarden.net/dl : high.zip mtx-install-modules | inifile : https://modules.contextgarden.net/dl : t-inifile.zip mtx-install-modules | karnaugh: https://modules.contextgarden.net/dl : karnaugh.zip mtx-install-modules | layout : https://modules.contextgarden.net/dl : t-layout.zip mtx-install-modules | letter : https://modules.contextgarden.net/dl : t-letter.zip mtx-install-modules | letterspace : https://modules.contextgarden.net/dl : t-letterspace.mkiv.zip mtx-install-modules | lettrine: https://modules.contextgarden.net/dl : t-lettrine.zip mtx-install-modules | lua-widow-control : https://modules.contextgarden.net/dl : lua-widow-control.zip mtx-install-modules | mathsets: https://modules.contextgarden.net/dl : t-mathsets.zip mtx-install-modules | pocketdiary : https://modules.contextgarden.net/dl : PocketDiary-V2.zip Environment-for-collating-marks.zip Collection-of-calendars-based-on-PocketDiary-module.zip mtx-install-modules | pret-c.lua : https://modules.contextgarden.net/dl : pret-c.lua.zip mtx-install-modules | rst : https://modules.contextgarden.net/dl : t-rst.zip mtx-install-modules | rsteps : https://modules.contextgarden.net/dl : t-rsteps.zip mtx-install-modules | simplebib : https://modules.contextgarden.net/dl : t-simplebib.zip mtx-install-modules | simplefonts : https://modules.contextgarden.net/dl : t-simplefonts.zip mtx-install-modules | simpleslides: https://modules.contextgarden.net/dl : t-simpleslides.zip mtx-install-modules | stormfontsupport: https://modules.contextgarden.net/dl : stormfontsupport.zip mtx-install-modules | taspresent : https://modules.contextgarden.net/dl : t-taspresent.zip mtx-install-modules | tikz: https://mirrors.ctan.org/install : graphics/pgf/base/pgf.tds.zip graphics/pgf/contrib/pgfplots.tds.zip graphics/pgf/contrib/circuitikz.tds.zip mtx-install-modules | title : https://modules.contextgarden.net/dl : t-title.zip mtx-install-modu
[NTG-context] Re: Pass string into text background graphic
On 8/12/2023 7:19 PM, Thangalin wrote: Thanks Hans. The \newinteger approach would always increment the value, regardless of conditionals within the MetaPost code (i.e., it was like legend := "\ConcurrentTextGet" would always invoke the macro just be referencing the MPgraphic and nothing would prevent its execution). This meant that the Get indexes would not correspond to the Set indexes. Switching to \definenumber resolved the issue. There were a few other oddities, such as the "Get" counter incrementing twice. Here's the code: you could remove the \localcontrolled around the advance \definenumber[ConcurrentTextSetCounter][prefix=no] \definenumber[ConcurrentTextGetCounter][prefix=no] \setnumber[ConcurrentTextSetCounter][0] \setnumber[ConcurrentTextGetCounter][0] % Map each label as global key/value pairs. \def\ConcurrentTextSet#1{% \incrementnumber[ConcurrentTextSetCounter]% \setxvariable {concurrent} {text:\rawcountervalue[ConcurrentTextSetCounter]} {#1}} % Account for the counter incrementing twice and the index being 1-based. \def\ConcurrentTextGet{% \incrementnumber[ConcurrentTextGetCounter]% \getvariable {concurrent} why twice ? you only have to typeset the text once, right? {text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}} \startuseMPgraphic{GraphicConcurrent} numeric index; index := 1; % Differentiate between new text blocks and those crossing pages. if (multikind[ index ] = "single") or (multikind[ index ] = "first"): string legend; legend := "\ConcurrentTextGet"; % For new text blocks, write the title. picture p; p := textext.rt( legend ) shifted ulcorner multipars[ index ] shifted (1cm, 0); % Draw the horizontal rule only for the initial text block. draw ulcorner multipars[ index ] shifted (1mm + xpart lrcorner p, 0) -- urcorner multipars[ index ]; % Draw the vertical rule for the initial text block. draw llcorner multipars[ index ] -- ulcorner multipars[ index ] -- ulcorner multipars[ index ] shifted (9mm, 0); draw p; else: % Draw only the vertical rule only when crossing page boundaries. draw llcorner multipars[ index ] -- ulcorner multipars[ index ]; fi \stopuseMPgraphic \definetextbackground[TextConcurrentFrame][ mp=GraphicConcurrent, frame=off, topoffset=1em, leftoffset=1em, before=\blank[2*big], after=\blank, location=paragraph, ] \startsetups concurrent:before \ConcurrentTextSet{% % Be sure to format "a.m." and other special phrases. \expandafter\TextReplacement{% \xmlatt{\getvariable{div}{concurrent}}{data-title}% } } \startTextConcurrentFrame \stopsetups \startsetups concurrent:after \stopTextConcurrentFrame \stopsetups \definestartstop[concurrent][ before=\directsetup{concurrent:before}, after=\directsetup{concurrent:after} ] This allows for typesetting a wider range of pandoc-style Markdown annotations, such as: ::: {.concurrent title="Terminal Berth 5, 3:17 a.m."} text goes here ::: With these changes, the titles now only appear at the start of the demarcated text, in any combination of "concurrent" annotation instances spanning any number of pages. Much appreciated. Cheers! P.S. The following line requires KeenWrite themes: \expandafter\TextReplacement{ ... } For details, see: - https://github.com/DaveJarvis/keenwrite-themes/blob/main/xhtml/xml-blocks.tex - https://github.com/DaveJarvis/keenwrite-themes/blob/main/boschet/replace.tex ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Pass string into text background graphic
Thanks Hans. The \newinteger approach would always increment the value, regardless of conditionals within the MetaPost code (i.e., it was like legend := "\ConcurrentTextGet" would always invoke the macro just be referencing the MPgraphic and nothing would prevent its execution). This meant that the Get indexes would not correspond to the Set indexes. Switching to \definenumber resolved the issue. There were a few other oddities, such as the "Get" counter incrementing twice. Here's the code: \definenumber[ConcurrentTextSetCounter][prefix=no] \definenumber[ConcurrentTextGetCounter][prefix=no] \setnumber[ConcurrentTextSetCounter][0] \setnumber[ConcurrentTextGetCounter][0] % Map each label as global key/value pairs. \def\ConcurrentTextSet#1{% \incrementnumber[ConcurrentTextSetCounter]% \setxvariable {concurrent} {text:\rawcountervalue[ConcurrentTextSetCounter]} {#1}} % Account for the counter incrementing twice and the index being 1-based. \def\ConcurrentTextGet{% \incrementnumber[ConcurrentTextGetCounter]% \getvariable {concurrent} {text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}} \startuseMPgraphic{GraphicConcurrent} numeric index; index := 1; % Differentiate between new text blocks and those crossing pages. if (multikind[ index ] = "single") or (multikind[ index ] = "first"): string legend; legend := "\ConcurrentTextGet"; % For new text blocks, write the title. picture p; p := textext.rt( legend ) shifted ulcorner multipars[ index ] shifted (1cm, 0); % Draw the horizontal rule only for the initial text block. draw ulcorner multipars[ index ] shifted (1mm + xpart lrcorner p, 0) -- urcorner multipars[ index ]; % Draw the vertical rule for the initial text block. draw llcorner multipars[ index ] -- ulcorner multipars[ index ] -- ulcorner multipars[ index ] shifted (9mm, 0); draw p; else: % Draw only the vertical rule only when crossing page boundaries. draw llcorner multipars[ index ] -- ulcorner multipars[ index ]; fi \stopuseMPgraphic \definetextbackground[TextConcurrentFrame][ mp=GraphicConcurrent, frame=off, topoffset=1em, leftoffset=1em, before=\blank[2*big], after=\blank, location=paragraph, ] \startsetups concurrent:before \ConcurrentTextSet{% % Be sure to format "a.m." and other special phrases. \expandafter\TextReplacement{% \xmlatt{\getvariable{div}{concurrent}}{data-title}% } } \startTextConcurrentFrame \stopsetups \startsetups concurrent:after \stopTextConcurrentFrame \stopsetups \definestartstop[concurrent][ before=\directsetup{concurrent:before}, after=\directsetup{concurrent:after} ] This allows for typesetting a wider range of pandoc-style Markdown annotations, such as: ::: {.concurrent title="Terminal Berth 5, 3:17 a.m."} text goes here ::: With these changes, the titles now only appear at the start of the demarcated text, in any combination of "concurrent" annotation instances spanning any number of pages. Much appreciated. Cheers! P.S. The following line requires KeenWrite themes: \expandafter\TextReplacement{ ... } For details, see: - https://github.com/DaveJarvis/keenwrite-themes/blob/main/xhtml/xml-blocks.tex - https://github.com/DaveJarvis/keenwrite-themes/blob/main/boschet/replace.tex concurrent.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Pass string into text background graphic
On 8/11/2023 9:57 PM, Thangalin wrote: Hi list, I'm attempting to make a stylized border around paragraphs that can span pages. The border runs along the side and the top. (Ideally the top border wouldn't repeat, but that's a minor issue.) The issue I'm having is that the title for the text doesn't always appear. Instead, there's a small gap along the top border where the title should be. Am I going about this the wrong way? % SOT \startbuffer[demo] Text Goes Here Different Text Goes Here \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body}{xml:*} \xmlsetsetup{\xmldocument}{div}{xml:*}\stopxmlsetups \xmlregistersetup{xml:xhtml} \startxmlsetups xml:html \xmlflush{#1}\stopxmlsetups \startxmlsetups xml:body \xmlflush{#1}\stopxmlsetups \startxmlsetups xml:div \setvariable{div}{\xmlatt{#1}{class}}{#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop\stopxmlsetups \startusableMPgraphic{GraphicConcurrent} begingroup; string legend; picture title; picture border; picture bg; numeric tw; numeric th; legend := \MPstring{concurrent}; title := nullpicture; border := nullpicture; bg := textext( "\strut " & legend ); tw := xpart lrcorner bg - xpart llcorner bg; th := ypart ulcorner bg - ypart llcorner bg; addto title also image( fill unitsquare xysized (tw + 8, th) shifted ulcorner multipars[1] shifted 28 right shifted 8 down withcolor white; draw textext.drt( legend ) shifted ulcorner multipars[1] shifted 32 right shifted 3 down; ); addto border also image( for i = 1 upto nofmultipars: draw llcorner multipars[i] -- ulcorner multipars[i] shifted 8 down .. ulcorner multipars[i] shifted 8 right -- urcorner multipars[i] withpen pencircle scaled 0.75 withcolor black; endfor; ); draw image( draw border; draw title; ); endgroup;\stopusableMPgraphic \definetextbackground[TextConcurrentFrame][ mp=GraphicConcurrent, frame=off, topoffset=1em, leftoffset=1em, location=paragraph, ] \definestartstop[concurrent][ before={% \blank[big]% LEGEND: \xmlatt{\getvariable{div}{concurrent}}{data-title}% \blank[big]% \setMPtext{concurrent}{\xmlatt{\getvariable{div}{concurrent}}{data-title}} \startTextConcurrentFrame}, after={\stopTextConcurrentFrame\blank[big]}, ] \starttext \xmlprocessbuffer{main}{demo}{}\stoptext % EOT If I change the following line: legend := \MPstring{concurrent}; to: legend := "some string"; Then the title "some string" is repeated. It seems like the value for \MPstring{concurrent} is being cached in some situations and ignored in others. Essentially, I'm trying to visually offset multiple paragraphs using a left-hand vertical rule along with a top horizontal rule that has a title. Each new "concurrent" section needs its own header that doesn't repeat. Is there a ConTeXt-way to accomplish this feat? There's always a way out but not always a pretty one. One problem is that these graphics are done later, when a page gets assembled, so you get the current value at that time. Then there is grouping so you need to assign global. Now, there can be caching but you use expanded string so that's not the issue. % draw image ( draw rawtextext(legend) notcached) ; That is seldom needed. So below is a solution. When you cross pages with a frame you need to make sure the text is done once. I let you figure that out (after all you came this far so i guess you know). For historic reasons (mkii / performance) it's not the easiest mechanism. % We store each one independent: \newinteger\ConcurrentTextSetCounter \newinteger\ConcurrentTextGetCounter \protected\def\ConcurrentTextSet#1% {\global\advance\ConcurrentTextSetCounter\plusone \setxvariable {concurrent} {text:\the\ConcurrentTextSetCounter} {#1}} \def\ConcurrentTextGet % we want full expansion here {\localcontrolled{\global\advance\ConcurrentTextGetCounter\plusone}% \getvariable {concurrent} {text:\the\ConcurrentTextGetCounter}} % We also use the helpers (so at least we can see what we do): \startuseMPgraphic{GraphicConcurrent}{text} % % {mpos:region:draw} % draw_multi_pars ; string legend ; legend := "\ConcurrentTextGet"; show legend; % draw image ( draw rawtextext(legend) notcached) ; picture p ; p := textext.rt(legend) shifted ulcorner multipars[1] shifted (1cm,0) ; draw llcorner multipars[1] -- ulcorner multipars[1] -- ulcorner multipars[1] shifted (9mm,0) ; draw ulcorner multipars[1] shifted (1mm + xpart lrcorner p
[NTG-context] Pass string into text background graphic
Hi list, I'm attempting to make a stylized border around paragraphs that can span pages. The border runs along the side and the top. (Ideally the top border wouldn't repeat, but that's a minor issue.) The issue I'm having is that the title for the text doesn't always appear. Instead, there's a small gap along the top border where the title should be. Am I going about this the wrong way? % SOT \startbuffer[demo] Text Goes Here Different Text Goes Here \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body}{xml:*} \xmlsetsetup{\xmldocument}{div}{xml:*}\stopxmlsetups \xmlregistersetup{xml:xhtml} \startxmlsetups xml:html \xmlflush{#1}\stopxmlsetups \startxmlsetups xml:body \xmlflush{#1}\stopxmlsetups \startxmlsetups xml:div \setvariable{div}{\xmlatt{#1}{class}}{#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop\stopxmlsetups \startusableMPgraphic{GraphicConcurrent} begingroup; string legend; picture title; picture border; picture bg; numeric tw; numeric th; legend := \MPstring{concurrent}; title := nullpicture; border := nullpicture; bg := textext( "\strut " & legend ); tw := xpart lrcorner bg - xpart llcorner bg; th := ypart ulcorner bg - ypart llcorner bg; addto title also image( fill unitsquare xysized (tw + 8, th) shifted ulcorner multipars[1] shifted 28 right shifted 8 down withcolor white; draw textext.drt( legend ) shifted ulcorner multipars[1] shifted 32 right shifted 3 down; ); addto border also image( for i = 1 upto nofmultipars: draw llcorner multipars[i] -- ulcorner multipars[i] shifted 8 down .. ulcorner multipars[i] shifted 8 right -- urcorner multipars[i] withpen pencircle scaled 0.75 withcolor black; endfor; ); draw image( draw border; draw title; ); endgroup;\stopusableMPgraphic \definetextbackground[TextConcurrentFrame][ mp=GraphicConcurrent, frame=off, topoffset=1em, leftoffset=1em, location=paragraph, ] \definestartstop[concurrent][ before={% \blank[big]% LEGEND: \xmlatt{\getvariable{div}{concurrent}}{data-title}% \blank[big]% \setMPtext{concurrent}{\xmlatt{\getvariable{div}{concurrent}}{data-title}} \startTextConcurrentFrame}, after={\stopTextConcurrentFrame\blank[big]}, ] \starttext \xmlprocessbuffer{main}{demo}{}\stoptext % EOT If I change the following line: legend := \MPstring{concurrent}; to: legend := "some string"; Then the title "some string" is repeated. It seems like the value for \MPstring{concurrent} is being cached in some situations and ignored in others. Essentially, I'm trying to visually offset multiple paragraphs using a left-hand vertical rule along with a top horizontal rule that has a title. Each new "concurrent" section needs its own header that doesn't repeat. Is there a ConTeXt-way to accomplish this feat? Cheers! t.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: xml: matches always child of other element
Hi Denis, Ok, after a bit of more testing I can now come up with another example. The version using startstop works, but with the normal command, I'm always getting back the content of the first element. I thought it might be an expansion issue, but \expanded and also expansion=yes or expansion=xml on \definedescription have no effect. Perhaps most interestingly, adding using the startstop variant together with the command variant gives correct results for the command as well (xml:index-entry-term-3). I have now found a way to proceed with my project (I'll just use the startstop variant), but I'd still be interested in understanding what is happening here. Does anyone know? Or is there anything I'm doing wrong here? This is kind of tricky but here is a variant test \startxmlsetups xml:index-entry-term-1 % does not work \indexentry{1: \xmlflush{#1}} % test \par \indexentry{2: \xmlflush{#1}} 3: \xmlflush{#1} \par \stopxmlsetups it has to do with the fact that when you don't use a start / stop the next paragraph is sees as description content so then you grab the same entry (sort of) nested you can uncomment the "test \par" to see the side effects (twice one versus 1/2) it's kind of hard to debug this, i admit, Hans %% \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{index}{xml:*} \xmlsetsetup{#1}{index-entry}{xml:index-entry} %\xmlsetsetup{#1}{term}{xml:index-entry-term} \xmlsetsetup{#1}{term}{xml:index-entry-term-2} \xmlsetsetup{#1}{term}{xml:index-entry-term-3} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} % Index \startxmlsetups xml:book-back \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index \xmlflush{#1} \stopxmlsetups \definedescription[indexentry][] %\definedescription[indexentry][expansion=yes] % has no effect %\definedescription[indexentry][expansion=xml] % has no effect \startxmlsetups xml:index-entry \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term % does not work \expanded{\indexentry{\xmlflush{#1}}} \indexentry{\xmlflush{#1}} \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term-2 % works \startindexentry{\xmlflush{#1}} \xmlflush{#1} \stopindexentry \stopxmlsetups \startxmlsetups xml:index-entry-term-3 % works \expanded{\indexentry{\xmlflush{#1}}} \indexentry{\xmlflush{#1}} \startindexentry{\xmlflush{#1}} \xmlflush{#1} \stopindexentry \stopxmlsetups \startbuffer[test] One Two Three \stopbuffer \starttext \xmlprocessbuffer{test}{test}{} \stoptext %% Von: denis.ma...@unibe.ch Gesendet: Montag, 24. Juli 2023 15:57 An: ntg-context@ntg.nl Betreff: [NTG-context] Re: xml: matches always child of other element Interestingly, we should be in the right subtree as this modified example is supposed to demonstrate (we're getting the correct numbers under each index-entry-term, just the terms are incorrect in all but the first case): \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{index}{xml:*} \xmlsetsetup{#1}{index-entry}{xml:index-entry} %\xmlsetsetup{#1}{index-entry}{xml:index-entry-2} \xmlsetsetup{#1}{term}{xml:index-entry-term} \xmlsetsetup{#1}{nav-pointer-group}{xml:*} \xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer} \xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} % Index \startxmlsetups xml:book-back \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index \startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},] \xmlflush{#1} \stopsectionlevel \stopxmlsetups \startxmlsetups xml:index-title \xmlflush{#1} \stopxmlsetups \definedescription[indexentry] [alternative=top, headstyle=normal, headcommand=\hskip-1cm, margin=1cm, inbetween=, ] \startxmlsetups xml:index-entry \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-2 \xmlfilter{#1}{/term/command(xml:index-entry-term)}% \xmlverbatim{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term \indexentry{\xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:nav-pointer-group \xmlconcat{#1}{/nav-pointer}{, } \stopxmlsetups \startxmlsetups xml:nav-pointer \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:nav-pointer-link \xmlflush{#1} \stopxmlsetups \startbuffer[test] Index
[NTG-context] Re: your opinion about list structures
Hi Hraban Here are my thoughts on your ConTeXt Book. [TOC] Definitely only show Chapters and Appendices. A list of sections could go under the Chapter Title, it would more useful there. I don't think there is also a need include sub-sections, (if you have them) it could make the list inordinately long. [Registers] My own preference would be a command and a topic index if only for convenience sake. [Glossary] I don't think an index of abbreviations is necessary if they are already in the index. [Other Lists] I don't think a list of colours is necessary, you could just point them to the wiki. Just my thoughts, and I look forward to read the English version of your book. (smiling) Best Wishes Keith McKay p.s. It's been so long since I worked with technical books that I would have to blow the dust off them. On 10/08/2023 14:21, Henning Hraban Ramm wrote: Hi, this is about my ConTeXt book again… [ToC] At the moment, my table of contents has chapters and sections and is 8 pages long. I would probably hardly use it. Maybe it would be better to show only chapters (29 content + 12 appendix = 2 pages) and include a list of sections after the chapter title (or not at all). [Registers] I split between command and topic index (9 pages each), because I find it annoying to have the commands between the topics. I also include the topics that are mentioned in titles in the index, because I hate it if I must look in two places. (Otherwise I wouldn’t think about omitting the sections from the ToC.) At the moment there‘s also an index of todo items, but that will disappear before print. [Glossary] There’s a short dictionary of technical terms in the appendix (8.5 p.). Each lemma is also included in the index. Should I add a list of abbreviations? (TDS, TEI, OCG, RAL, PDF, SVG…?) They’re in the index and explained where they matter – I don’t think the meaning of many abbreviations like file types is important. [Other lists] Should I include a list of colors, like the output of \showcolor[crayola]? (I think it would only bloat the book, and everyone can create the list themselves.) I have lists of supported languages (should get checked), fonts in the distribution and all math fonts, because these are not easily reproducible (AFAIK). So, what do you think, and how do you like to work with technical books? What kind of information (about ConTeXt or documents/printing in general) do you find hard to find? Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] your opinion about list structures
Hi, this is about my ConTeXt book again… [ToC] At the moment, my table of contents has chapters and sections and is 8 pages long. I would probably hardly use it. Maybe it would be better to show only chapters (29 content + 12 appendix = 2 pages) and include a list of sections after the chapter title (or not at all). [Registers] I split between command and topic index (9 pages each), because I find it annoying to have the commands between the topics. I also include the topics that are mentioned in titles in the index, because I hate it if I must look in two places. (Otherwise I wouldn’t think about omitting the sections from the ToC.) At the moment there‘s also an index of todo items, but that will disappear before print. [Glossary] There’s a short dictionary of technical terms in the appendix (8.5 p.). Each lemma is also included in the index. Should I add a list of abbreviations? (TDS, TEI, OCG, RAL, PDF, SVG…?) They’re in the index and explained where they matter – I don’t think the meaning of many abbreviations like file types is important. [Other lists] Should I include a list of colors, like the output of \showcolor[crayola]? (I think it would only bloat the book, and everyone can create the list themselves.) I have lists of supported languages (should get checked), fonts in the distribution and all math fonts, because these are not easily reproducible (AFAIK). So, what do you think, and how do you like to work with technical books? What kind of information (about ConTeXt or documents/printing in general) do you find hard to find? Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Map XML attributes to variables, dynamically
On 8/10/2023 10:50 AM, Hans Hagen via ntg-context wrote: On 8/10/2023 10:37 AM, Hans Hagen wrote: On 8/10/2023 10:14 AM, Thangalin wrote: Here's an MWE: attached the more final version - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - % follow up on mail discussion with T \startbuffer[demo] Text Goes Here Different Text Goes Here \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body|div}{xml:*} \stopxmlsetups \xmlregistersetup{xml:xhtml} \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:div \setupstartstop [\xmlatt{#1}{class}] [title=\xmlatt{#1}{data-title}]% \start[\xmlatt{#1}{class}]% \xmlflush{#1} \stop \blank used wherever needed: \namedstartstopparameter{concurrent}{title} \blank \stopxmlsetups \definestartstop [concurrent] [before=\startsection[title={TITLE: \namedstartstopparameter{concurrent}{title}}], after=\stopsection]% \starttext \xmlprocessbuffer{main}{demo}{} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Map XML attributes to variables, dynamically
On 8/10/2023 10:37 AM, Hans Hagen wrote: On 8/10/2023 10:14 AM, Thangalin wrote: Here's an MWE: % SOT \startbuffer[demo] Text Goes Here Different Text Goes Here \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body}{xml:*} \xmlsetsetup{\xmldocument}{div}{xml:*} \stopxmlsetups \xmlregistersetup{xml:xhtml} \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:div \setvariable{div}{\xmlatt{#1}{class}}{#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups \definestartstop[concurrent][ before={TITLE: \xmlatt{\getvariable {div} {concurrent} {title}}}, ] \starttext \xmlprocessbuffer{main}{demo}{} \stoptext % EOT It doesn't look like the variables are taking, regardless of whether {title} or {data-title} are used. \startxmlsetups xml:div \setvariable{div}{\xmlatt{#1}{class}}{#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups \definestartstop [concurrent] [before={TITLE: \xmlatt{\getvariable{div}{concurrent}}{data-title}}] -- watch the braces -- use data-title and not title Hans You can actually do this: \startxmlsetups xml:div \setupstartstop [\xmlatt{#1}{class}] [before={TITLE: \xmlatt{#1}{data-title}}]% \start[\xmlatt{#1}{class}]% \xmlflush{#1} \stop \stopxmlsetups \definestartstop [concurrent] and you then can also do \namedstartstopparameter{concurrent}{before} when needed, which save you the intermediate variable because it's already in before, so from that it's a natural step to \startxmlsetups xml:div \setupstartstop [\xmlatt{#1}{class}] [title=\xmlatt{#1}{data-title}, before={TITLE: \namedstartstopparameter{concurrent}{title}}]% \start[\xmlatt{#1}{class}]% \xmlflush{#1} \stop \stopxmlsetups \definestartstop [concurrent] and then with: \namedstartstopparameter{concurrent}{title} (i'll add this example to the test suite as demo) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Map XML attributes to variables, dynamically
On 8/10/2023 10:14 AM, Thangalin wrote: Here's an MWE: % SOT \startbuffer[demo] Text Goes Here Different Text Goes Here \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body}{xml:*} \xmlsetsetup{\xmldocument}{div}{xml:*} \stopxmlsetups \xmlregistersetup{xml:xhtml} \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:div \setvariable{div}{\xmlatt{#1}{class}}{#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups \definestartstop[concurrent][ before={TITLE: \xmlatt{\getvariable {div} {concurrent} {title}}}, ] \starttext \xmlprocessbuffer{main}{demo}{} \stoptext % EOT It doesn't look like the variables are taking, regardless of whether {title} or {data-title} are used. \startxmlsetups xml:div \setvariable{div}{\xmlatt{#1}{class}}{#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups \definestartstop [concurrent] [before={TITLE: \xmlatt{\getvariable{div}{concurrent}}{data-title}}] -- watch the braces -- use data-title and not title Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Map XML attributes to variables, dynamically
Here's an MWE: % SOT \startbuffer[demo] Text Goes Here Different Text Goes Here \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body}{xml:*} \xmlsetsetup{\xmldocument}{div}{xml:*} \stopxmlsetups \xmlregistersetup{xml:xhtml} \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:div \setvariable{div}{\xmlatt{#1}{class}}{#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups \definestartstop[concurrent][ before={TITLE: \xmlatt{\getvariable {div} {concurrent} {title}}}, ] \starttext \xmlprocessbuffer{main}{demo}{} \stoptext % EOT It doesn't look like the variables are taking, regardless of whether {title} or {data-title} are used. On Thu, Aug 10, 2023 at 12:44 AM Hans Hagen wrote: > On 8/10/2023 9:10 AM, Thangalin wrote: > > > Environments for the DIV element gets translated using: > > > > \startxmlsetups xml:div > > \setvariable {div} {\xmlatt{#1}{class}} {#1} > > >\start[\xmlatt{#1}{class}]\xmlflush{#1}\stop > > \stopxmlsetups > > \setMPtext{1}{\usermap[concurrent.title]} > > \setMPtext{2}{\usermap[concurrent.location]} > > \setMPtext{1}{% >\xmlatt {\getvariable {div} {concurrent} {title}% > } > > > I can verify the attribute values exist by exporting them to the > document: > something like that .. untested as no mwe > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Map XML attributes to variables, dynamically
On 8/10/2023 9:10 AM, Thangalin wrote: Environments for the DIV element gets translated using: \startxmlsetups xml:div \setvariable {div} {\xmlatt{#1}{class}} {#1} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups \setMPtext{1}{\usermap[concurrent.title]} \setMPtext{2}{\usermap[concurrent.location]} \setMPtext{1}{% \xmlatt {\getvariable {div} {concurrent} {title}% } I can verify the attribute values exist by exporting them to the document: something like that .. untested as no mwe Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Map XML attributes to variables, dynamically
Hello! A Markdown document resembles the following: ::: {.concurrent title="Berth 5" location="San Diego"} Text Goes Here ::: ::: {.concurrent title="Road" location="Beale AFB"} Different Text Goes Here ::: The XHTML generated from that document resembles: Text Goes Here Different Text Goes Here Environments for the DIV element gets translated using: \startxmlsetups xml:div \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups This creates "\startconcurrent" and "\stopconcurrent", which are later defined using "\definestartstop[concurrent]". I'd like to dynamically define all the data- attributes to make key/value pairs accessible from the document. For example, I have this: \definestartstop[concurrent][ before={% \blank[big]% \setMPtext{1}{Berth 5}% \startTextConcurrentFrame}, after={\stopTextConcurrentFrame\blank[big]}, ] I'd like to replace \setMPText calls with a reference to a dynamically created variable reference. For example: \setMPtext{1}{\usermap[concurrent.title]} \setMPtext{2}{\usermap[concurrent.location]} I can verify the attribute values exist by exporting them to the document: \startxmlsetups xml:div title:\xmlatt{#1}{data-title} location:\xmlatt{#1}{data-location} \start[\xmlatt{#1}{class}]\xmlflush{#1}\stop \stopxmlsetups How would you change the xml:div setup to create a map of its attributes as key/value pairs? Thank you! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: upload
On 8/9/2023 11:42 AM, Hans Hagen wrote: Hi, I uploaded a new lmtx. There are some new features that wil be revealed in the future (likely after the meeting) but here is one: Two problems with this upload. First, page number suppression no longer works. Second, table captions are not displayed. \setuppagenumbering [alternative=doublesided,location=] \setupcaption[style=sans,headstyle=sans] \starttext \startchapter[title={Page Numbering Test}] \startplacetable[location={here,spit,force},title={Title?}] \starttabulate[|rp|lp|] \HL \NC tufte \NC \input tufte \NC \AR \NC ward \NC \input ward \NC \AR \NC montgomery \NC \input montgomery \NC \AR \HL \stoptabulate \stopplacetable \dorecurse{7}{ \input tufte \par} \stopchapter \stoptext -- RIk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Triaging tikz error: Cannot parse this coordinate
On 8/8/2023 7:43 PM, Hans Hagen wrote: On 8/8/2023 6:13 PM, Xavier B. wrote: After some time, I could write a minimal example with tikz with strange error: Cannot parse this coordinate. Can someone help me to find the bug? I attach the file and the log. Help very appreciate I run \starttikzpicture \foreach \p in {(6,2)} { \tracingall \startscope[shift={\p}] \draw[color=green!60, thick] (0,0) -- (1,1); \stopscope } \stoptikzpicture looks like some parsing issue, are you sure that you can assign \p to shift this way? ok, i found it but i'm not going to make it custom to fix tikz you need to use this: \normalexpanded{\noexpand\startscope[shift={\p}]} instead of \startscope[shift={\p}] this can be automated with (maybe we need a m-fixz module for that) % fix \appendtoks \let\normaltikzstartscope\startscope \def\startscope[#1]% {\normalexpanded {\noexpand\normaltikzstartscope[#1]}}% \to \everyinsidetikzpicture % end of fix but for that you need to use the attached module so that we hook it in aftert tikz sets itself up the fix you can put in your style or in a cont-loc.mkxl in a local tree 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 - %D \module %D [ file=m-tikz, %Dversion=2021.07.12, %D title=\CONTEXT\ Extra Modules, %D subtitle=TIKZ support, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. %D A fixed variant of the t-tikz module distributed with tikz. For practical reasons %D per 2021 we split the module for \MKIV\ and \LMTX. (Maybe some day I'll optimize %D TIKZ a bit.) %D %D All these t-* modules in the tikz distribution make no sense as we can just load %D them here which is way cleaner. There is also some mkii filename mapping going on %D that is not needed on todays systems (windows has no 8.3 limitation and on unix %D tds finally adopted a case insensitive approach.) %D Just in case someone does a hard input ... \ifdefined\pgfdefined\endinput \fi \ifdefined\pgfcoredefined\endinput \fi %D ... but normally we end up here: \startmodule[tikz] \ifdefined\pdflastxpos \else \unprotect \frozen\overloaded\protected\def\pdflastxpos{\numexpr\clf_lastxpos\relax} \frozen\overloaded\protected\def\pdflastypos{\numexpr\clf_lastypos\relax} \protect \fi \newcatcodetable \tikzcatcodes \startcatcodetable \tikzcatcodes \catcode\tabasciicode \spacecatcode \catcode\endoflineasciicode \endoflinecatcode \catcode\formfeedasciicode\endoflinecatcode \catcode\spaceasciicode \spacecatcode \catcode\endoffileasciicode \ignorecatcode \catcode\circumflexasciicode \superscriptcatcode \catcode\underscoreasciicode \subscriptcatcode \catcode\ampersandasciicode \alignmentcatcode \catcode\backslashasciicode \escapecatcode \catcode\leftbraceasciicode \begingroupcatcode \catcode\rightbraceasciicode \endgroupcatcode \catcode\dollarasciicode \mathshiftcatcode \catcode\hashasciicode\parametercatcode \catcode\commentasciicode \commentcatcode \catcode\atsignasciicode \lettercatcode \catcode\exclamationmarkasciicode \othercatcode \catcode\questionmarkasciicode\lettercatcode \catcode\tildeasciicode \activecatcode \catcode\barasciicode \othercatcode \stopcatcodetable \permanent\protected\def\starttikzinput {\pushoverloadmode \pushcatcodetable \setcatcodetable\tikzcatcodes \pushmacro\meaning \let\meaning\meaningless \autoparagraphmode\zerocount} \permanent\protected\def\stoptikzinput {\autoparagraphmode\plusone \popcatcodetable \popmacro\meaning \popoverloadmode} \permanent\protected\def\tikzinputfile#1% {\starttikzinput \input{#1}\relax \stoptikzinput} \permanent\protected\def\tikzerrormessage#1#2#3% {\writestatus{#1}{#2}} % For now we need this but we need to educate the user to wrap settings in the % wrappers. So some day the next line will go. I need to check what commands are % possible outside a picture. \overloadmode\zerocount \newtoks\everytikzpicture \newtoks\everyinsidetikzpicture % \appendtoks % \resetcharacterspacing % \to \everytikzpicture \permanent\protected\def\starttikzsettings {\pushoverloadmode \pushmacro\meaning \let\meaning\meaningless \autoparagraphmode\zerocount} \permanent
[NTG-context] Typing with text wrapping
Hi all, I'm having another issue with my project. I'm trying to typeset fragments of HTML, including tabs and (repeating) spaces. I'd like to have my snippet with some words in bold. So I used `typing` together with the `escape` option. But now, I'd like my snippets to wrap when the lines are too long. The snippets can un over several pages so that recipe[^1] doesn't work for me. [^1]: https://www.contextgarden.net/Verbatim_with_line_breaks> Is there a way to do that? Here is my code: ``` \definepapersize[page][width=105mm,height=148.5mm] \setuppapersize[page, portrait][page, portrait] \definehead[poem][section] \setuphead[poem][] \definetyping[CUSTOM] \setuptyping[CUSTOM][escape={[[,]]}] \starttext \showgrid \startpoem[title={My title}][] \startCUSTOM[] \stopCUSTOM \stoppoem \stoptext ``` Thanks! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Using
Thanks Hans! Le 4/08/23 à 23:21, Hans Hagen a écrit : On 8/4/2023 7:42 PM, Alex Leray wrote: Hello, I'm trying to figure out why this is not working (whereas \startlines\stoplines works): ``` \definehead[poem][section] \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] \starttext \startpoem[title={Glijden}][] Lorem ipsum dolor sit amet consectetur. \stoppoem \stoptext ``` I get the following traceback: ``` tex error > tex error on line 6 in file /home/ali/work/being_human/test.tex: ! Undefined control sequence \strc_sectioning_initialize_increment ->\edef \currentheadincrement verbatim is tricky because it changes the catcodes here is a trick: \definehead [poem] [section] \setuphead [poem] [after=\startlines\tt, % after the head is placed aftersection=\stoplines] % when we end this section \startpoem[title={Glijden}] Lorem ipsum dolor sit amet consectetur. Lorem ipsum dolor sit amet consectetur. \stoppoem it is not pretty coding but it seems to work ok Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ -- Alexandre Leray +32 487 947 030 Avez-vous pensé à (vous) offrir Médor ? https://medor.coop/ideescadeau ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Bibliography cite
Dear Alan, Thanks for your response. What I need in fact is this Knuth (1984:12). I am sorry for the confusion. I will try your suggestions! Robert > Op 4 aug. 2023, om 13:57 heeft Alan Braslau het > volgende geschreven: > > Indeed, one does not need the comma, it is programmed in the style. > You can see this in the manual, on p. 43 documenting citations. > > The style is setup to put the righttext inside the parenthesis for > alternative=authoryear and outside of the year parenthesis for > alternative=authoryears. > > I looked carefully in the APA Style Guide and did not find any suggestion > that one should use Knuth (1984, p. 3). The variant (Knuth, 1984, p. 3) is > documented. > > You can make the following changes (untested) > \setupbtx [apa:cite:author:years] [right=] > \setupbtx [apa:cite:authoryears] [right={)}] > to get the other behavior. > > -- > Alan > > > On 01/08/23 01/08/23, 23:26, Robert via ntg-context wrote: >> Thank you, Alan for the suggestion. >> I tried as you said: \cite[alternative=authoryears,righttext={{, p. >> 3}}][Knuth1984]. >> Yet the result is this: Knuth (1984), , p. 3 >> If I leave out the first comma, the result is: Knuth (1984), p. 3 >> Righttext probably refers to the text outside the parentheses. >> Thank you in advance, >> Robert. >>> Op 1 aug. 2023, om 22:42 heeft Alan Braslau het >>> volgende geschreven: >>> >>> Using the APA specification: >>> >>> \usebtxdefinitions >>>[apa] >>> >>> >>> you can then >>> >>> \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] >>> mentions …. >>> >>> >>> The tricky part concerning righttext= is the double {{ }}, needed because >>> the text contains a comma. The reason for this is simple, as righttext is a >>> comma-separated list, where each entry corresponds to a cited reference, as >>> in \cite[righttext={a,b}] [ref1,ref2] >>> so a is associated with ref1 and b is associated with ref2. >>> >>> Alan >>> >>> >>> >>> On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: >>>> Dear List members, >>>> For my academic work with context I need the following cite according to >>>> Apa standards: >>>> Knuth (1984, p. 12) mentions …. >>>> The matrix is this: >>>> AUTHOR (, p.~n). >>>> I reckon this can somehow be accomplished with the \setupbtx command. >>>> (Standard these and other variants are possible: AUTHOR () and AUTHOR >>>> , p. n.) >>>> I tried different setups: \setupbtx[apa:cite:authoryear], and >>>> \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and >>>> other options, but none of them give the desired result. >>>> Thank you for any suggestions. >>>> Regards, >>>> Robert >>>> @article{Knuth1984, >>>> author={Knuth, Donald E.}, >>>> title={Literate Programming}, >>>> journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, >>>> Pages={97--111}, >>>> } >> ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Using
On 8/4/2023 7:42 PM, Alex Leray wrote: Hello, I'm trying to figure out why this is not working (whereas \startlines\stoplines works): ``` \definehead[poem][section] \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] \starttext \startpoem[title={Glijden}][] Lorem ipsum dolor sit amet consectetur. \stoppoem \stoptext ``` I get the following traceback: ``` tex error > tex error on line 6 in file /home/ali/work/being_human/test.tex: ! Undefined control sequence \strc_sectioning_initialize_increment ->\edef \currentheadincrement verbatim is tricky because it changes the catcodes here is a trick: \definehead [poem] [section] \setuphead [poem] [after=\startlines\tt,% after the head is placed aftersection=\stoplines] % when we end this section \startpoem[title={Glijden}] Lorem ipsum dolor sit amet consectetur. Lorem ipsum dolor sit amet consectetur. \stoppoem it is not pretty coding but it seems to work ok Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Using
Hello, I'm trying to figure out why this is not working (whereas \startlines\stoplines works): ``` \definehead[poem][section] \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] \starttext \startpoem[title={Glijden}][] Lorem ipsum dolor sit amet consectetur. \stoppoem \stoptext ``` I get the following traceback: ``` tex error > tex error on line 6 in file /home/ali/work/being_human/test.tex: ! Undefined control sequence \strc_sectioning_initialize_increment ->\edef \currentheadincrement {\headparameter \c!incrementnumber }\ifcsname \??headincrement \currentheadincrement \endcsname \lastnamedcs \else \settrue \c_strc_sectioning_increment \settrue \c_strc_sectionin... \strc_sectioning_handle ... \currentheadsection }\strc_sectioning_initialize_autolevel \strc_sectioning_initialize_increment \strc_sectioning_initialize_placement \strc_sectioning_initialize_number \the \everybeforesectionheadhandle \let \getheadn... \strc_sectioning_start_named_section ...parameter \c!beforesection \the \everybeforehead \strc_sectioning_handle {#1}{#2}{#3} \headparameter \c!insidesection l.6 \startpoem[title={Glijden}][] 1 \definehead[poem][section] 2 \setuphead[poem][beforesection={\starttyping}, aftersection={\stoptyping}] 3 4 \starttext 5 6 >> \startpoem[title={Glijden}][] 7 Lorem ipsum dolor sit amet consectetur. 8 \stoppoem 9 10 \stoptext 11 mtx-context | fatal error: return code: 256 ``` Any idea? thanks a lot! Alex ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Bibliography cite
Indeed, one does not need the comma, it is programmed in the style. You can see this in the manual, on p. 43 documenting citations. The style is setup to put the righttext inside the parenthesis for alternative=authoryear and outside of the year parenthesis for alternative=authoryears. I looked carefully in the APA Style Guide and did not find any suggestion that one should use Knuth (1984, p. 3). The variant (Knuth, 1984, p. 3) is documented. You can make the following changes (untested) \setupbtx [apa:cite:author:years] [right=] \setupbtx [apa:cite:authoryears] [right={)}] to get the other behavior. -- Alan On 01/08/23 01/08/23, 23:26, Robert via ntg-context wrote: Thank you, Alan for the suggestion. I tried as you said: \cite[alternative=authoryears,righttext={{, p. 3}}][Knuth1984]. Yet the result is this: Knuth (1984), , p. 3 If I leave out the first comma, the result is: Knuth (1984), p. 3 Righttext probably refers to the text outside the parentheses. Thank you in advance, Robert. Op 1 aug. 2023, om 22:42 heeft Alan Braslau het volgende geschreven: Using the APA specification: \usebtxdefinitions [apa] you can then \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] mentions …. The tricky part concerning righttext= is the double {{ }}, needed because the text contains a comma. The reason for this is simple, as righttext is a comma-separated list, where each entry corresponds to a cited reference, as in \cite[righttext={a,b}] [ref1,ref2] so a is associated with ref1 and b is associated with ref2. Alan On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: Dear List members, For my academic work with context I need the following cite according to Apa standards: Knuth (1984, p. 12) mentions …. The matrix is this: AUTHOR (, p.~n). I reckon this can somehow be accomplished with the \setupbtx command. (Standard these and other variants are possible: AUTHOR () and AUTHOR , p. n.) I tried different setups: \setupbtx[apa:cite:authoryear], and \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and other options, but none of them give the desired result. Thank you for any suggestions. Regards, Robert @article{Knuth1984, author={Knuth, Donald E.}, title={Literate Programming}, journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, Pages={97--111}, } ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Bibliography cite
Thank you, Alan for the suggestion. I tried as you said: \cite[alternative=authoryears,righttext={{, p. 3}}][Knuth1984]. Yet the result is this: Knuth (1984), , p. 3 If I leave out the first comma, the result is: Knuth (1984), p. 3 Righttext probably refers to the text outside the parentheses. Thank you in advance, Robert. > Op 1 aug. 2023, om 22:42 heeft Alan Braslau het > volgende geschreven: > > Using the APA specification: > > \usebtxdefinitions >[apa] > > > you can then > > \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] > mentions …. > > > The tricky part concerning righttext= is the double {{ }}, needed because the > text contains a comma. The reason for this is simple, as righttext is a > comma-separated list, where each entry corresponds to a cited reference, as > in \cite[righttext={a,b}] [ref1,ref2] > so a is associated with ref1 and b is associated with ref2. > > Alan > > > > On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: >> Dear List members, >> For my academic work with context I need the following cite according to Apa >> standards: >> Knuth (1984, p. 12) mentions …. >> The matrix is this: >> AUTHOR (, p.~n). >> I reckon this can somehow be accomplished with the \setupbtx command. >> (Standard these and other variants are possible: AUTHOR () and AUTHOR >> , p. n.) >> I tried different setups: \setupbtx[apa:cite:authoryear], and >> \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and >> other options, but none of them give the desired result. >> Thank you for any suggestions. >> Regards, >> Robert >> @article{Knuth1984, >> author={Knuth, Donald E.}, >> title={Literate Programming}, >> journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, >> Pages={97--111}, >> } ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Bibliography cite
Using the APA specification: \usebtxdefinitions [apa] you can then \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] mentions …. The tricky part concerning righttext= is the double {{ }}, needed because the text contains a comma. The reason for this is simple, as righttext is a comma-separated list, where each entry corresponds to a cited reference, as in \cite[righttext={a,b}] [ref1,ref2] so a is associated with ref1 and b is associated with ref2. Alan On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: Dear List members, For my academic work with context I need the following cite according to Apa standards: Knuth (1984, p. 12) mentions …. The matrix is this: AUTHOR (, p.~n). I reckon this can somehow be accomplished with the \setupbtx command. (Standard these and other variants are possible: AUTHOR () and AUTHOR , p. n.) I tried different setups: \setupbtx[apa:cite:authoryear], and \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and other options, but none of them give the desired result. Thank you for any suggestions. Regards, Robert @article{Knuth1984, author={Knuth, Donald E.}, title={Literate Programming}, journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, Pages={97--111}, } ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Bibliography cite
Dear List members, For my academic work with context I need the following cite according to Apa standards: Knuth (1984, p. 12) mentions …. The matrix is this: AUTHOR (, p.~n). I reckon this can somehow be accomplished with the \setupbtx command. (Standard these and other variants are possible: AUTHOR () and AUTHOR , p. n.) I tried different setups: \setupbtx[apa:cite:authoryear], and \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and other options, but none of them give the desired result. Thank you for any suggestions. Regards, Robert @article{Knuth1984, author={Knuth, Donald E.}, title={Literate Programming}, journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, Pages={97--111}, } ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Reinserting a section title followed by (continued) after a page break
I'm trying to use ConTeXt for playwriting, and I think it would be best to use sections for dialog. However, if a dialog's text is interrupted by a page break, it is customary to restate the character name followed by (continued) on the following page: --- open --- John My name is John, and I seek help with my --- page break --- John (cont'd) typesetting needs... --- end --- Maybe what I need is instead a mark? Here's a catch though, I will also need this to work for simultaneous dialog as well. This kind of dialog is represented by having dialog sections in columns: --- open --- Alice Bob John, you fool.John, you imbecile. --- page break --- Alice (cont'd) Don't you know that everyone uses Word to typeset their plays? --- end --- How can I do this kind of thing in ConTeXt? At the moment, I've been looking into adding a hook to shipout to prepend a section header with the last custom mark I've set. Even still, I don't know if this would work, or how to go about achieving this. If columns would be too difficult to implement, I'd be fine with living without (continued) support in them since they are pretty rare. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] caption for moved sidefloat in the margin
Hi again, I’m reading through the details manual and set up some figures as sidefloats that are offset to the margin. This works well. Now I’d like to have their captions in the margin, below the figure. If I set location=innermargin, then the caption is beside the image, i.e. somewhere at the edge. If I don’t, I can’t get it to move to the left edge of the image. How can I do that? Hraban """ \useMPlibrary[dum] \setuplayout[ backspace=5cm, width=12cm, ] \definefloat[marginfigure] \setupfloat[marginfigure][ leftmargindistance=-\leftmargintotal, rightmargindistance=-\rightmargintotal, default={inner,none,low,high}, ] \setupcaption[marginfigure][ style={\ss\tfx}, align={flushleft}, width=\leftmarginwidth, %location={innermargin,low}, ] \starttext \showframe \startplacemarginfigure[ location={inner,3*hang}, title={My caption should be flushleft and aligned with the image.}, ] \externalfigure[dummy][width=.66\textwidth] \stopplacemarginfigure \samplefile{lorem} \stoptext """ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Key distance with enumeration
Hi, I don't understand why the distance between the dot and the first letter of the text is not always the same (see with theorem). Thanks Fabrice \setupenumerations [before={\blank}, after={\blank}, alternative=serried, distance=1cm, title=yes, titleleft=, titleright=, titlestyle=normal, prefix=no, prefixsegments=chapter, way=bychapter, prefixconversionset=digit, counter=, headcommand=\groupedcommand{}{.}, numbercommand=\groupedcommand{}{}, titlecommand=\groupedcommand{(}{)}, width=broad] \defineenumeration [definition] [text=Définition, number=yes, style=italic] \defineenumeration [theorem] [text=Théorème, number=yes, style=italic] \starttext \startdefinition Un polynôme est une application de R dans R somme d'un nombre fini de monômes. \stopdefinition \starttheorem La forme réduite d'un polynôme est unique à l'ordre près des monômes qui le constituent. \stoptheorem \startdefinition Le degré d'un polynôme {\bi non nul} est le degré du monôme de plus haut degré figurant dans son écriture réduite. \stopdefinition \startdefinition Le terme constant d'un polynôme est le coefficient (éventuellement nul) de son monôme de degré 0. \stopdefinition \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: xml: matches always child of other element
Ok, after a bit of more testing I can now come up with another example. The version using startstop works, but with the normal command, I'm always getting back the content of the first element. I thought it might be an expansion issue, but \expanded and also expansion=yes or expansion=xml on \definedescription have no effect. Perhaps most interestingly, adding using the startstop variant together with the command variant gives correct results for the command as well (xml:index-entry-term-3). I have now found a way to proceed with my project (I'll just use the startstop variant), but I'd still be interested in understanding what is happening here. Does anyone know? Or is there anything I'm doing wrong here? Best, Denis %% \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{index}{xml:*} \xmlsetsetup{#1}{index-entry}{xml:index-entry} %\xmlsetsetup{#1}{term}{xml:index-entry-term} \xmlsetsetup{#1}{term}{xml:index-entry-term-2} \xmlsetsetup{#1}{term}{xml:index-entry-term-3} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} % Index \startxmlsetups xml:book-back \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index \xmlflush{#1} \stopxmlsetups \definedescription[indexentry][] %\definedescription[indexentry][expansion=yes] % has no effect %\definedescription[indexentry][expansion=xml] % has no effect \startxmlsetups xml:index-entry \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term % does not work \expanded{\indexentry{\xmlflush{#1}}} \indexentry{\xmlflush{#1}} \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term-2 % works \startindexentry{\xmlflush{#1}} \xmlflush{#1} \stopindexentry \stopxmlsetups \startxmlsetups xml:index-entry-term-3 % works \expanded{\indexentry{\xmlflush{#1}}} \indexentry{\xmlflush{#1}} \startindexentry{\xmlflush{#1}} \xmlflush{#1} \stopindexentry \stopxmlsetups \startbuffer[test] One Two Three \stopbuffer \starttext \xmlprocessbuffer{test}{test}{} \stoptext %% Von: denis.ma...@unibe.ch Gesendet: Montag, 24. Juli 2023 15:57 An: ntg-context@ntg.nl Betreff: [NTG-context] Re: xml: matches always child of other element Interestingly, we should be in the right subtree as this modified example is supposed to demonstrate (we're getting the correct numbers under each index-entry-term, just the terms are incorrect in all but the first case): \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{index}{xml:*} \xmlsetsetup{#1}{index-entry}{xml:index-entry} %\xmlsetsetup{#1}{index-entry}{xml:index-entry-2} \xmlsetsetup{#1}{term}{xml:index-entry-term} \xmlsetsetup{#1}{nav-pointer-group}{xml:*} \xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer} \xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} % Index \startxmlsetups xml:book-back \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index \startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},] \xmlflush{#1} \stopsectionlevel \stopxmlsetups \startxmlsetups xml:index-title \xmlflush{#1} \stopxmlsetups \definedescription[indexentry] [alternative=top, headstyle=normal, headcommand=\hskip-1cm, margin=1cm, inbetween=, ] \startxmlsetups xml:index-entry \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-2 \xmlfilter{#1}{/term/command(xml:index-entry-term)}% \xmlverbatim{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term \indexentry{\xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:nav-pointer-group \xmlconcat{#1}{/nav-pointer}{, } \stopxmlsetups \startxmlsetups xml:nav-pointer \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:nav-pointer-link \xmlflush{#1} \stopxmlsetups \startbuffer[test] Index First 1 2 3 Second 4 Third 5 6 7 \stopbuffer \starttext \xmlprocessbuffer{test}{test}{} \stoptext Von: denis.ma...@unibe.ch<mailto:denis.ma...@unibe.ch> mailto:denis.ma...@unibe.ch>> Gesendet: Montag, 24. Juli 2023 13:38 An: ntg-context@ntg.nl<
[NTG-context] Re: xml: matches always child of other element
Interestingly, we should be in the right subtree as this modified example is supposed to demonstrate (we're getting the correct numbers under each index-entry-term, just the terms are incorrect in all but the first case): \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{index}{xml:*} \xmlsetsetup{#1}{index-entry}{xml:index-entry} %\xmlsetsetup{#1}{index-entry}{xml:index-entry-2} \xmlsetsetup{#1}{term}{xml:index-entry-term} \xmlsetsetup{#1}{nav-pointer-group}{xml:*} \xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer} \xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} % Index \startxmlsetups xml:book-back \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index \startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},] \xmlflush{#1} \stopsectionlevel \stopxmlsetups \startxmlsetups xml:index-title \xmlflush{#1} \stopxmlsetups \definedescription[indexentry] [alternative=top, headstyle=normal, headcommand=\hskip-1cm, margin=1cm, inbetween=, ] \startxmlsetups xml:index-entry \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-2 \xmlfilter{#1}{/term/command(xml:index-entry-term)}% \xmlverbatim{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term \indexentry{\xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:nav-pointer-group \xmlconcat{#1}{/nav-pointer}{, } \stopxmlsetups \startxmlsetups xml:nav-pointer \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:nav-pointer-link \xmlflush{#1} \stopxmlsetups \startbuffer[test] Index First 1 2 3 Second 4 Third 5 6 7 \stopbuffer \starttext \xmlprocessbuffer{test}{test}{} \stoptext Von: denis.ma...@unibe.ch Gesendet: Montag, 24. Juli 2023 13:38 An: ntg-context@ntg.nl Betreff: [NTG-context] xml: matches always child of other element Hi, I must be missing something obvious, but in this example the pattern for always matches the first element, not the one under the current . Interestingly, using xml:index-entry-2 instead of the normal version matches correctly... Any hints what is going off the rails here? Best, Denis \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{index}{xml:*} \xmlsetsetup{#1}{index-entry}{xml:index-entry} %\xmlsetsetup{#1}{index-entry}{xml:index-entry-2} \xmlsetsetup{#1}{term}{xml:index-entry-term} \xmlsetsetup{#1}{nav-pointer-group}{xml:*} \xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer} \xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} % Index \startxmlsetups xml:book-back \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index \startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},] \xmlflush{#1} \stopsectionlevel \stopxmlsetups \startxmlsetups xml:index-title \xmlflush{#1} \stopxmlsetups \definedescription[indexentry] [alternative=top, headstyle=normal, headcommand=\hskip-1cm, margin=1cm, inbetween=, ] \startxmlsetups xml:index-entry \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-2 \xmlfilter{#1}{/term/command(xml:index-entry-term)}% \xmlverbatim{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term \indexentry{\xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:nav-pointer-group \xmlconcat{#1}{/nav-pointer}{, } \stopxmlsetups \startxmlsetups xml:nav-pointer \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:nav-pointer-link \xmlflush{#1} \stopxmlsetups \startbuffer[test] Index First 1 2 3 Second 1 Third 1 \stopbuffer \starttext \xmlprocessbuffer{test}{test}{} \sto
[NTG-context] xml: matches always child of other element
Hi, I must be missing something obvious, but in this example the pattern for always matches the first element, not the one under the current . Interestingly, using xml:index-entry-2 instead of the normal version matches correctly... Any hints what is going off the rails here? Best, Denis \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{index}{xml:*} \xmlsetsetup{#1}{index-entry}{xml:index-entry} %\xmlsetsetup{#1}{index-entry}{xml:index-entry-2} \xmlsetsetup{#1}{term}{xml:index-entry-term} \xmlsetsetup{#1}{nav-pointer-group}{xml:*} \xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer} \xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} % Index \startxmlsetups xml:book-back \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index \startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},] \xmlflush{#1} \stopsectionlevel \stopxmlsetups \startxmlsetups xml:index-title \xmlflush{#1} \stopxmlsetups \definedescription[indexentry] [alternative=top, headstyle=normal, headcommand=\hskip-1cm, margin=1cm, inbetween=, ] \startxmlsetups xml:index-entry \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:index-entry-2 \xmlfilter{#1}{/term/command(xml:index-entry-term)}% \xmlverbatim{#1} \stopxmlsetups \startxmlsetups xml:index-entry-term \indexentry{\xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:nav-pointer-group \xmlconcat{#1}{/nav-pointer}{, } \stopxmlsetups \startxmlsetups xml:nav-pointer \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:nav-pointer-link \xmlflush{#1} \stopxmlsetups \startbuffer[test] Index First 1 2 3 Second 1 Third 1 \stopbuffer \starttext \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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Suppress label in captions without suppressing number
On 7/20/2023 5:30 PM, denis.ma...@unibe.ch wrote: Hi, is there an option to suppress the label in captions without suppressing the number as well? I know, I can use \setuplabeltext[de][figure=,], but this will delete the label text globally... Is there a better way via \setupcaption? \definefloat[NLfigure][figure] \setuplabeltext[en][NLfigure=] \starttext \samplefile{ward} \startplacefigure[title={oeps}] \stopplacefigure \samplefile{tufte} \startplaceNLfigure[title={oeps}] \stopplaceNLfigure \samplefile{tufte} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Link from a PDF to a reference of an embedded PDF
Hi, I found the "interaction" parameter in the documentation for setupexternalfigure/externalfigure [1]. I, however do not quite understand it. When embedding another PDF with this command, it seems to be possible to include the references of the underlying PDF. It is possible to link to them within the main context document? In [2], I found something maybe related but it requires a tuc file. Example: inner.tex: ``` \starttext \startsection[title=References, reference=sec:ref] Some text \placeformula[eq:foo] \startformula 1 + 2 = 3 \stopformula or: \startitemize[n] \item[item:bla] bla \item[item:blub] blub \stopitemize Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub]. \stoptext ``` outer.tex: ``` \starttext \externalfigure[inner.pdf][width=10cm, interactive=reference] Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub]. \stoptext ``` Can I somehow access the references of inner.tex from outer.tex? For me, it is not that relevant, that the correct number is set, but the interaction within the outer PDF should work, so clicking on the reference should scroll to the correct content. Background of my question: I normally do graphics in a separate PDFs. Some graphics consists of source code together with a graphical representation and I want to be able to link to single source code lines. Gerion [1] https://wiki.contextgarden.net/Command/setupexternalfigure [2] https://wiki.contextgarden.net/References#References_to_an_external_file signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: new upload
On 7/10/2023 10:43 AM, denis.ma...@unibe.ch wrote: Page puilder mode sounds interesting! What are you plans for that? Things like: - overflow area - vertical expansion - more detailed tracing - more accurate \testpage - initial and as-we-go stretch/shrink manipulation Most is already there but in the process of being documented and tested. Atached is an example (from the manual) that shows somethign that can be handy for those who typeset novels and such. (vz is a variant on hz and is something that Hermann Zapf suggested long ago when we discussed vertical expansion.) Other tricks are: \setupalign[vertical,height] \setpagelooseness[-2] and such which can be used to influence the current page. 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 - vz.pdf Description: Adobe PDF document \starttext \startbuffer[vz-1] \starttext \showframe[text] \enabletrackers[layout.vz] \setuplayout[width=middle,headerdistance=5mm,vz=no] \clubpenalty 1 \widowpenalty 1 \dostepwiserecurse{0}{30}{1}{ \dorecurse{#1}{\strut dummy line ##1\par} \dorecurse{4}{\samplefile{tufte}\par} } \stoptext \stopbuffer \startbuffer[vz-2] \starttext \showframe[text] \enabletrackers[layout.vz] \setuplayout[width=middle,headerdistance=5mm,vz=yes] \clubpenalty 1 \widowpenalty 1 \dostepwiserecurse{0}{30}{1}{ \dorecurse{#1}{\strut dummy line ##1\par} \dorecurse{4}{\samplefile{tufte}\par} } \stoptext \stopbuffer \startbuffer[vz-3] \starttext \showframe[text] \enabletrackers[layout.vz] \setuplayout[width=middle,headerdistance=5mm,vz=2] \clubpenalty 1 \widowpenalty 1 \dostepwiserecurse{0}{30}{1}{ \dorecurse{#1}{\strut dummy line ##1\par} \dorecurse{4}{\samplefile{tufte}\par} } \stoptext \stopbuffer \startplacefigure[location=here,reference=fig:vz-1,title={Cheating with vertical expansion: \type {[vz=no]}.}] \startcombination[4*1] {\typesetbuffer[vz-1][width=\combinationwidth,page=1,frame=on]} {} {\typesetbuffer[vz-1][width=\combinationwidth,page=2,frame=on]} {} {\typesetbuffer[vz-1][width=\combinationwidth,page=3,frame=on]} {} {\typesetbuffer[vz-1][width=\combinationwidth,page=4,frame=on]} {} \stopcombination \stopplacefigure \startplacefigure[location=here,reference=fig:vz-2,title={Cheating with vertical expansion: \type {[vz=yes]}.}] \startcombination[4*1] {\typesetbuffer[vz-2][width=\combinationwidth,page=1,frame=on]} {} {\typesetbuffer[vz-2][width=\combinationwidth,page=2,frame=on]} {} {\typesetbuffer[vz-2][width=\combinationwidth,page=3,frame=on]} {} {\typesetbuffer[vz-2][width=\combinationwidth,page=4,frame=on]} {} \stopcombination \stopplacefigure \startplacefigure[location=here,reference=fig:vz-3,title={Cheating with vertical expansion: \type {[vz=2]}.}] \startcombination[4*1] {\typesetbuffer[vz-3][width=\combinationwidth,page=1,frame=on]} {} {\typesetbuffer[vz-3][width=\combinationwidth,page=2,frame=on]} {} {\typesetbuffer[vz-3][width=\combinationwidth,page=3,frame=on]} {} {\typesetbuffer[vz-3][width=\combinationwidth,page=4,frame=on]} {} \stopcombination \stopplacefigure \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Title pages makeup extra blank pages
Alan Braslau schrieb am 06.07.2023 um 17:14: On 06/07/23 06/07/23, 17:07, Wolfgang Schuster wrote: Add "doublesided=no" to your makeup settings. Wolfgang Thank you. I have doublesided=no in the makeup, but this makeup is not used by \startpagefigure. The problem is with \startpagefigure that is outside of makeup, that is it is using the standard makeup (with doublesided=yes). Is this a bug, that is should \startpagefigure use the makeup of the included PDF document and ignore the local makeup? Or is this, rather, what is intended, requiring one to wrap the included pages in an explicit makeup (as I am now doing)? \pagefigure[...][...] (no need for \startpagefigure .. \stoppagefigure) is a combination of \startTeXpage and \externalfigure and you shouldn't put the command in a makeup environment. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Title pages makeup extra blank pages
On 06/07/23 06/07/23, 17:07, Wolfgang Schuster wrote: Add "doublesided=no" to your makeup settings. Wolfgang Thank you. I have doublesided=no in the makeup, but this makeup is not used by \startpagefigure. The problem is with \startpagefigure that is outside of makeup, that is it is using the standard makeup (with doublesided=yes). Is this a bug, that is should \startpagefigure use the makeup of the included PDF document and ignore the local makeup? Or is this, rather, what is intended, requiring one to wrap the included pages in an explicit makeup (as I am now doing)? Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Title pages makeup extra blank pages
Alan Braslau via ntg-context schrieb am 06.07.2023 um 11:58: On 06/07/23 06/07/23, 10:14, Henning Hraban Ramm wrote: Am 06.07.23 um 09:34 schrieb Alan Braslau via ntg-context: inserts a "blank" page (with header/footer) between the two Coverpages and a second "blank" page after the backside title page. I don’t know if it helps, but did you set \setupsectionblock[frontpart][page=no] ? I had \setupsectionblock[frontpart][page=] and setting page=no does not change anything. I get the same behavior in my Volume 2 product, which does not have any \frontmatter. I solved the problem by rather using: \definemakeup[cover][page][page=no,doublesided=no] \definelayout[cover][page] \startmakeup [cover] \filterpages[Coverpages][1] \stoppagemakeup \startmakeup [cover] \filterpages[Coverpages][2] \stoppagemakeup \startlayout[page] \filterpages[...] \stoplayout Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Title pages makeup extra blank pages
Alan Braslau via ntg-context schrieb am 06.07.2023 um 09:34: Hello, Trying to use: \startdocument \startpagefigure[Coverpages.pdf][page=1]\stoppagefigure \startpagefigure[Coverpages.pdf][page=2]\stoppagefigure % before \startmakeup [titlepage] front \stopmakeup \startmakeup [titlepage] back \stopmakeup \startfrontmatter ... \stopfrontmatter ... \stopdocument inserts a "blank" page (with header/footer) between the two Coverpages and a second "blank" page after the backside title page. Not including the two \startpagefigure lines eliminates the blank page following the back side title page (and the other one between the two Coverpages, of course). This is not a MWE as it occurs in a complicated project but not in mwe snippets. I suspect that this artifact is somehow related to the page={...} settings later in the document. How can I turn OFF all automatic page generation settings for the very beginning of my document? Any ideas? (Title page makeup has always been somewhat of a mystery to me.) Add "doublesided=no" to your makeup settings. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Title pages makeup extra blank pages
Am 06.07.23 um 11:58 schrieb Alan Braslau: Maybe it’s also a problem of \startdocument – I always get a first empty page and don’t understand why. One gets an empty first page if there is *any* text content anywhere in the setups or environment files before the \startdocument. My problem actually was \startMPcode; had nothing to do with \startdocument or your code, sorry. Also sorry, seems like I can’t help you. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Title pages makeup extra blank pages
On 06/07/23 06/07/23, 10:14, Henning Hraban Ramm wrote: Am 06.07.23 um 09:34 schrieb Alan Braslau via ntg-context: inserts a "blank" page (with header/footer) between the two Coverpages and a second "blank" page after the backside title page. I don’t know if it helps, but did you set \setupsectionblock[frontpart][page=no] ? I had \setupsectionblock[frontpart][page=] and setting page=no does not change anything. I get the same behavior in my Volume 2 product, which does not have any \frontmatter. I solved the problem by rather using: \definemakeup[cover][page][page=no,doublesided=no] \definelayout[cover][page] \startmakeup [cover] \filterpages[Coverpages][1] \stoppagemakeup \startmakeup [cover] \filterpages[Coverpages][2] \stoppagemakeup Thank you for your suggestion! Maybe it’s also a problem of \startdocument – I always get a first empty page and don’t understand why. One gets an empty first page if there is *any* text content anywhere in the setups or environment files before the \startdocument. -- Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] definedocument, begin & closing
Hi, if I use \startdocument, the setups "document:start" and "document:stop" get inserted at the beginning and end. But if I define my own document, it doesn’t work. What’s wrong? """ \definedocument[presentation] \startsetups[presentation:start] {\bfd\documentvariable{title}} \stopsetups \startsetups[presentation:stop] Thanks for all the fish. \stopsetups \startpresentation[title=Something] anything \stoppresentation """ Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Title pages makeup extra blank pages
Am 06.07.23 um 09:34 schrieb Alan Braslau via ntg-context: inserts a "blank" page (with header/footer) between the two Coverpages and a second "blank" page after the backside title page. I don’t know if it helps, but did you set \setupsectionblock[frontpart][page=no] ? Maybe it’s also a problem of \startdocument – I always get a first empty page and don’t understand why. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Title pages makeup extra blank pages
Hello, Trying to use: \startdocument \startpagefigure[Coverpages.pdf][page=1]\stoppagefigure \startpagefigure[Coverpages.pdf][page=2]\stoppagefigure % before \startmakeup [titlepage] front \stopmakeup \startmakeup [titlepage] back \stopmakeup \startfrontmatter ... \stopfrontmatter ... \stopdocument inserts a "blank" page (with header/footer) between the two Coverpages and a second "blank" page after the backside title page. Not including the two \startpagefigure lines eliminates the blank page following the back side title page (and the other one between the two Coverpages, of course). This is not a MWE as it occurs in a complicated project but not in mwe snippets. I suspect that this artifact is somehow related to the page={...} settings later in the document. How can I turn OFF all automatic page generation settings for the very beginning of my document? Any ideas? (Title page makeup has always been somewhat of a mystery to me.) Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] expansion of section title
Am 27.06.23 um 21:01 schrieb Wolfgang Schuster via ntg-context: Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55: \defineregister[todos] % add a "todos" index entry with the current section title \define[1]\TODO{\todos{\structurevariable{title}}} \chapter{Something} \TODO{This is still empty!} % at the end of the book \chapter{work list} \placetodos \define[1]\TODO{\expanded{\todos{\structurevariable{title Thank you, that works. I thought I tried that, but probably forgot the braces. What is the purpose of the argument for \TODO when you don't use it? I simplified too much, the actual definition is (now): \define[1]\TODO{\inouter{\tt\color[ColTodo]{TODO}}\expanded{\todos{\structurevariable{title}}}\color[ColTodo]{\bf #1}\autoinsertnextspace} Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Problem with bibliography in apa
Dear List, I am using ConTeXt with TeXlive 2023. This problem did not exist in TeXlive 2022. Also, I tried to use ConTeXt by installing it from the ConTeXt page and had the same problem. When I use the apa format in the bibliography, the text "internal(number)" appears at the beginning of each citation: For example: --- A Chapter A text (Anonymous, 2023). And (Unknown, 2022). Bibliography internal(1)Anonymous, A. (2023).Any book.Publisher Unknown. internal(2)Unknown, A. (2022).An untitled book.Publisher Non-existent. -- The source code is: \usebtxdataset[biblio.bib] \usebtxdefinitions[apa] \starttext \startchapter[title={A Chapter}] A text \cite[book1]. And \cite[book2] \stopchapter \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --- The bibliographic database is: @book{book1, author={Author Anonymous}, title={An untitled book}, year=2023, publisher={Publisher Unknown}, } @book{book2, author={Author Unknown}, title={An untitled book}, year=2022, publisher={Publisher Non-existent},} Best regards, Marcelo Chaparro___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] expansion of section title
Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55: \defineregister[todos] % add a "todos" index entry with the current section title \define[1]\TODO{\todos{\structurevariable{title}}} \chapter{Something} \TODO{This is still empty!} % at the end of the book \chapter{work list} \placetodos \define[1]\TODO{\expanded{\todos{\structurevariable{title What is the purpose of the argument for \TODO when you don't use it? Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] expansion of section title
I think I had a good idea how to keep an overview of the “todos” in my book project: \defineregister[todos] % add a "todos" index entry with the current section title \define[1]\TODO{\todos{\structurevariable{title}}} \chapter{Something} \TODO{This is still empty!} % at the end of the book \chapter{work list} \placetodos But the section title is always "work list" in the "todos" index. I guess I need some expansion and tried \expanded, \safeexpanded, \expandoneargafter, \fullexpandoneargafter, but probably not in the right place. How does this work? Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] floatcombinations seem to not work correctly after lmtx update
Hi, I recently updated my Context (lmtx). Unfortunately, I'm not aware of the previous version anymore. The current one is 2023.06.04 18:58. After the update one of my documents broke at floatcombinations. The relevant code is this one: ``` \useMPlibrary[dum] \setupcombinations[alternative=text] \definefloat[subfigure][local=yes] \setupcaption[subfigure][numberconversion=a, prefix=no, headseparator={)}] \setuplabeltext[subfigure=] \appendvalue{stopplacefigure}{\resetcounter[subfigure]} \starttext test sdlkf jlsdjf lksjdf \startplacefigure[title=Test] \startfloatcombination[nx=3] \startplacesubfigure[title=Test] \externalfigure[dummy][width=0.3\textwidth] \stopplacesubfigure \startplacesubfigure[title=Test] \externalfigure[dummy][width=0.3\textwidth] \stopplacesubfigure \startplacesubfigure[title=Test] \externalfigure[dummy][width=0.3\textwidth] \stopplacesubfigure \stopfloatcombination \stopplacefigure lskdjf lskjfd lksjdfljsdkjf \stoptext ``` In this minimal example everything works. However, in my real document the subfigures have enormous space between them so just two pictures are visible (see the attached png). Do you have a clue, why this happens? Otherwise, I would take the preamble of the real document and try to lower it down to have a reproducible example (but that takes a lot of time, so I wanted to ask beforehand). Best, Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Off topic: Does a 'free for commercial use' flared-sans font exist in the world?
On 6/18/2023 10:20 AM, Bruce Horrocks via ntg-context wrote: On 16 Jun 2023, at 17:35, Gerben Wierda via ntg-context wrote: I know this is off topic, but I suspect this community is actually one of the best places to find an answer. I really like Optima, and what I really like about it is the 'flared style'. But I would like to move to a flared-sans font that gives me more licensing freedom. I haven't been able to find one after extensive searching. The only one who were reasonably priced (not free) were the URW Classico ones in Adobe Creative Cloud, but those can only be used in Adobe programs like InDesign (and not TeX). I found some flared-sans fonts, but not one with at least regular, italic, bold, and bold-italic. Is there really not a single flared-sans font that is really free (so also for commercial use) to use out there? Not free but good value: Fontspring have a font called Ophian that looks (to my untrained eye!) a reasonable match with Optima. <https://www.fontspring.com/fonts/fontsite/ophian> Optima has a very recognizable and distinctive design. One of my favourites. The palatino nova is another favourite and has a nice sans (casual). $22 for the first licence added to the shopping cart then reductions show for the subsequent licences. I'm guessing you'll need two: desktop in order to install on a PC and publish a printed book, and eBook to allow distribution of a PDF or eBook, so 33 USD in total. There's no time limit nor number of copies limit as far as I can see - just one eBook licence per title. Maybe there will be VAT etc added when you get to checkout - I didn't go that far. Yes, but it smells a bit like some clone. I have an official optima nova cd (in type one format, i can't afford the opentype right now) as well as the official palatino nova cd (in opentype format); I got them from the master himself, which makes them even more special. (It reminds me that I need to check if we can drop in replacements in the pagella math.) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Off topic: Does a 'free for commercial use' flared-sans font exist in the world?
> On 16 Jun 2023, at 17:35, Gerben Wierda via ntg-context > wrote: > > I know this is off topic, but I suspect this community is actually one of the > best places to find an answer. > > I really like Optima, and what I really like about it is the 'flared style'. > > But I would like to move to a flared-sans font that gives me more licensing > freedom. I haven't been able to find one after extensive searching. The only > one who were reasonably priced (not free) were the URW Classico ones in Adobe > Creative Cloud, but those can only be used in Adobe programs like InDesign > (and not TeX). > > I found some flared-sans fonts, but not one with at least regular, italic, > bold, and bold-italic. > > Is there really not a single flared-sans font that is really free (so also > for commercial use) to use out there? Not free but good value: Fontspring have a font called Ophian that looks (to my untrained eye!) a reasonable match with Optima. <https://www.fontspring.com/fonts/fontsite/ophian> $22 for the first licence added to the shopping cart then reductions show for the subsequent licences. I'm guessing you'll need two: desktop in order to install on a PC and publish a printed book, and eBook to allow distribution of a PDF or eBook, so 33 USD in total. There's no time limit nor number of copies limit as far as I can see - just one eBook licence per title. Maybe there will be VAT etc added when you get to checkout - I didn't go that far. Regards, — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] setuphead page=right and blank even page.
Alan Braslau schrieb am 11.06.2023 um 20:12: On 10/06/23 10/06/23, 12:42, Wolfgang Schuster via ntg-context wrote: Alan Braslau via ntg-context schrieb am 10.06.2023 um 12:28: Hello, \setuphead [part,chapter,title] [page=right] will start a part, chapter, or title on an odd page (right), inserting a "blank" even page if necessary. How can I get this blank even page to be truely blank, that is with no headers nor footers? I tried several thinks and must be missing something really simple and obvious. \setuphead [...] [page={yes,header,footer,right}] Wolfgang Thank you for this hint. It works (almost) as expected: Strangely, I had to add, explicitly, \startfrontmatter \component FrontMatterStuff \page[yes,header,footer,right] \stopfrontmatter \startbodymatter ... \stopbodymatter In order to get the frontmatter end with a totally blank page before a right Chapter 1 header. Using just the setuphead resulted in headers and footers on the "blank" left page. No problems for Chapters 2, etc. Section block force by default a page break which can produce unexpected headers/footers on the first chapter etc. You can fix this by disabling the page break at the start/end of the section block with \setupsectionblock [bodypart] [page=] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___