[NTG-context] issue with interaction=all and \insertpages
Dear list, I have the following sample: \setuplayout[page] \setupinteraction [state=start, color=, contrastcolor=, focus=standard] \enabledirectives[references.border=red] \setupexternalfigures[interaction=all, method=pdf] \setupinteractionscreen[option={portrait, paper}] \starttext %~ \insertpages[http://gaceta.rsme.es/abrir.php?id=1495][width=0pt] \insertpages[GacRSocMatEsp.pdf][width=0pt] \stoptext I have some issues with it. 1. For some strange reason, the first \insertpages command with a remote file cannot deal with the interaction from the file (no internal or external links). 2. The local file includes internal destinations to page parts. After imposition, destinations to page for internal links cannot reach the page parts as links in original document do. 3. Even external links are converted. On last page, https://www.cs.umb.edu/~offner/files/pi.pdf is rewritten as https://www.cs.umb.edu/õffner/files/pi.pdf. Besides the rewritten link, would it be possible that links are added so they reach the same destinations as their source PDF document? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with fonts in Lua
On 9/15/20 1:15 PM, Wolfgang Schuster wrote: > \setuplanguage [es] [patterns={es,gr}] Just a minor issue, ancient Greek is "agr" (instead of "gr"). That being said, Heraklit is a good match for Palatino (both by Hermann Zapf). The digitized version is available from https://greekfontsociety-gfs.gr/_assets/fonts/GFS_Heraklit.zip (direct link). So the final sample might read: \definefallbackfamily [mainface] [rm] [GFS Heraklit] [preset=range:greek,force=yes] \definefontfamily [mainface] [rm] [TeX Gyre Pagella] \definefontfamily [mainface] [ss] [TeX Gyre Heros] [scale=0.75] \setuplanguage [es] [patterns={es,gr}] \setupbodyfont [mainface, 15pt] \mainlanguage[es] \starttext \samplefile{cervantes-es} \samplefile{aristotle-grc}} \stoptext Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] About font combination in ConTeXt MKIV
On 9/9/20 6:24 PM, Charles Vejnar wrote: > Dear Manuel, > > To combine multiple fonts, I do something like this: > > \definefallbackfamily [mainface] [serif] [DejaVu > Serif][range=boxdrawing,force=yes] > \definefontfamily [mainface] [serif] [Tinos] > \setupbodyfont[mainface, 11pt] > > You might be able to use a Unicode block (ie range) for ancient Greek > characters (my range being boxdrawing). Hi Manuel and Charles, \definefallbackfamily[mainface][rm][New Athena Unicode] [preset=range:greek, force=yes] \definefontfamily[mainface][rm][Libertinus] \setupbodyfont[mainface] \starttext ab τῇ \stoptext Some scripts have predefined ranges thanks to Wolfgang, which avoid specifing all blocks for a given script. Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] packed items not working in latest from 2020.09.03 12:08
On 9/3/20 8:09 PM, Hans Hagen wrote: > On 9/3/2020 4:52 PM, Pablo Rodriguez wrote: >> [...] >> I’m afraid that packed item lists are misbehaving. >> >> Could anyone confirm this? > can you check again (new lmtx) Many thanks for the new upload, Hans. Now packed lists work as expected. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] packed items not working in latest from 2020.09.03 12:08
Dear list, I have the following sample: \starttext \startitemize[n] \startitem Item\stopitem \startitem Item\stopitem \startitem Item\stopitem \startitem Item\stopitem \stopitemize \startitemize[a, packed] \startitem Item\stopitem \startitem Item\stopitem \startitem Item\stopitem \startitem Item\stopitem \stopitemize \stoptext I’m afraid that packed item lists are misbehaving. Could anyone confirm this? Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] footnotes missing in heads
On 9/3/20 12:12 PM, Hans Hagen wrote: > On 9/3/2020 7:50 AM, Pablo Rodriguez wrote: >> Dear list, >> >> the following minimal sample: >> >> \starttext >> \chapter{Chapter\footnote{Note}} >> \section{Section\footnote{Note}} >> \stoptext >> >> Using current latest (from 2020.09.02 20:37) doesn’t display the footnotes. >> >> I’m afraid this may be a bug. Could anyone confirm this? > not so much a bug as an uncatched case (the way to deal with deeply > nested inserts is different in lmtx than in mkiv) > > (btw, it's not the latest ... that bit already changed a while ago) Many thanks for the new latest, Hans. I noticed this some time ago, but I thought my code was wrong. Yesterday I checked it with a minimal sample. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] footnotes missing in heads
Dear list, the following minimal sample: \starttext \chapter{Chapter\footnote{Note}} \section{Section\footnote{Note}} \stoptext Using current latest (from 2020.09.02 20:37) doesn’t display the footnotes. I’m afraid this may be a bug. Could anyone confirm this? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] catch % in gsub("%", "\\letterpercent")
On 8/27/20 7:35 PM, Wolfgang Schuster wrote: > [...] > You have to replace %% with \letterpercent\letterpercent because you're > still playing with TeX rules. > > \startxmlsetups xml:special > \startitem > \cldcontext{string.gsub("\xmlraw{#1}{.}","\letterpercent\letterpercent","\\letterpercent{}")} > \stopitem > \stopxmlsetups Many thanks for your reply, Wolfgang. Now I understand what was going on. > To avoid these limitations create a new Lua function and call only this > function in the setup: > > \startluacode > > moduledata = moduledata or { } > > function moduledata.special(str) > return string.gsub(str,"%%","\\letterpercent{}") > end > > \stopluacode > > \startxmlsetups xml:special > \startitem > \cldcontext{moduledata.special([[\xmlraw{#1}{.}]])} > \stopitem > \stopxmlsetups Now I see that I have a lot to learn. Many thanks again for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] wrong 2TOPSIDE?
Dear list, I have the following sample: \startmode[*first] \startbuffer[abcde] \setuppapersize[A5, landscape] \setupbodyfont[100pt] \starttext \dorecurse{158}{% \startmakeup[page][style=\bf\ss, align=center, pagestatus=start] \recurselevel \stopmakeup} \stoptext \stopbuffer \savebuffer[abcde][singular.tex] \executesystemcommand{context --purgeall --result=\jobname-singular.pdf \jobname-singular.tex} \ctxlua{os.remove(tex.jobname.."-singular.tex")} \stopmode \startnotmode[*first] \setuppapersize[A5, landscape][A4] \setuparranging[2TOPSIDE] \setuplayout[page] \setupinteractionscreen[option={portrait,paper}] \starttext \insertpages[\jobname-singular.pdf][width=0pt] \stopnotmode \stoptext I would say that last page (number 158 on #81) is misplaced. I think it should be on #80. Could anyone confirm this? I’m also experiencing issues (I don’t get the first 11 imposed pages), because I have to use: \executesystemcommand{context --purgeall --result=\jobname-singular.pdf --environment=\jobname-singular.tex \jobname-singular.xml} Is there a fix for this? I’m reporting this right now, but I won’t be reaching a computer until next Wednesday. (I know I’m going to forget, if I don’t write this now.) Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] catch % in gsub("%", "\\letterpercent")
On 8/27/20 6:16 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 27.08.2020 um 17:56: >> [...] >>\startxmlsetups xml:special >> \startitem >> \cldcontext{string.gsub([[\xmlraw{#1}{.}]], "%%", >> "\\letterpercent")} >> \stopitem >>\stopxmlsetups > [...] > and to escape special characters you can use context.escape() Many thanks for your reply, Wolfgang. I’m afraid that I need to keep $ in order to get some formulas: \cldcontext{(string.gsub([[\xmlraw{#1}{.}]], '', '$'):gsub("", "\\ifmmode $\\fi"))}} Actually this is way more complex, but I need to catch % and have to substitution above. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] catch % in gsub("%", "\\letterpercent")
On 8/27/20 5:30 PM, Taco Hoekwater wrote: >> [...] >> Using Lua gsub(), I need to replace something like: >> >> string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent") > > Double it: %% > > See also https://www.lua.org/manual/5.3/manual.html#6.4.1 , but the > mention of %% is a bit hidden. Many thanks for your replies, Taco and Hans. I’m afraid this doesn’t work (and I need \xmlraw there): \startbuffer[demo] The % best paragraph. \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{html}{xml:gen} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:gen \startitemize \xmlfilter{#1}{/**/span[@class='special']/command(xml:special)} \stopitemize \stopxmlsetups \startxmlsetups xml:special \startitem \cldcontext{string.gsub([[\xmlraw{#1}{.}]], "%%", "\\letterpercent")} \stopitem \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext What am I missing or doing wrong there? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] catch % in gsub("%", "\\letterpercent")
Dear list, I have and \xmlraw command that gives some text with percent signs. ConTeXt parses them as comments (so no output). Using Lua gsub(), I need to replace something like: string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent") How do I need to invoke % to get the character found? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] setuplayout vs Indesign!
On 8/26/20 12:13 PM, jbf wrote: > [...] > Maybe, one of these days, someone with experience in both ConTeXt and > InDesign (since InDesign is used by very many commercial publishers, but > I am trying to convince one of them of the value of ConTeXt) could offer > a comparison of the layout terminology/measurements/requirements for > both. I for one would find that very helpful. Hi Julian, https://wiki.contextgarden.net/Layout#Typesetting_areas contains a graphical description of the areas and https://wiki.contextgarden.net/Layout#Table_of_Parameters contains a simple explanation. I wonder whether this might help you. Sorry, but I’m afraid I never used InDesign. Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] sudden error
On 8/23/20 1:24 AM, jbf wrote: > Am suddenly getting the error: > > close source > level 1, order 3, name > '/home/me/Documents/Freedom/Context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' > ! error: (type 0): cannot find file ''mtx-context | fatal error: > return code: 256 > > I really don't think I have done anything to remove any essential parts > of ConTeXt. Of course I can reinstall, but before I do, it would be good > to understand what could have caused this error or if, indeed, it might > be easily fixed even without reinstalling (a standalone). Hi Julian, not sure of which error might be, since it is not clear to me whether you use LMTX or MkIV. Could you please run "mtxrun --generate" and invoke ConTeXt normally? I think this may solve your problem. I hope it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] removing word in filtered XML
On 8/21/20 2:59 PM, Hans Hagen wrote: > On 8/20/2020 4:20 PM, Pablo Rodriguez wrote: > >>\replaceword[whatever][this or][no] >>\replaceword[whatever][that][] > this feature creep is in the next upload Hans, many thanks for the new feature. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] removing word in filtered XML
On 8/20/20 1:10 PM, Hans Hagen wrote: > On 8/20/2020 12:38 PM, Pablo Rodriguez wrote: >> [...] >> This time, I have to remove two words, such as in: >> >>string.gsub([[\xmlraw{#1}{.}]]," del ", " "):gsub(" de la ", " ")} >> >> But they could be more (and replacements might be added to that list). >> >> Is there a more elegant way than appending :gsub()? >> >> Is there also a proper way for word scanning? >> >> A "word" can be "Word ", " word " " word." " word?" (and so on). I would >> like to avoid having to code all combinations (of course, if this were >> already available). > > old stuff present for a long time ... probaly documented somewhere ... > if not than you have to wikify it ... Many thanks for your reply, Hans. It is already wikified (https://wiki.contextgarden.net/Ligatures#Replacements). I wonder whether \replaceword could be extended to replace multiple words and also to remove them. \starttext \replaceword[whatever][this or][no] \replaceword[whatever][that][] \startlines it is this or that {\setreplacements[whatever]it is this or that} {\setreplacements[whatever]it is this or that} it is this or that \stoplines \stoptext Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] removing word in filtered XML
On 8/20/20 11:27 AM, Hans Hagen wrote: > On 8/19/2020 6:10 PM, Pablo Rodriguez wrote: >> [...] >> Is there any way to remove " of " and " of the " in the filtered content >> (xml:special)? >> >> Sorry, Lua code is crap for sure. > [...] > \startxmlsetups xml:initialize > \xmlsetsetup{#1}{html}{xml:gen} > \xmlsetsetup{#1}{span[@class='special']}{xml:span:special} > \stopxmlsetups > [...] > \startxmlsetups xml:span:special > (\cldcontext{(string.gsub([[\xmlraw{#1}{.}]]," of the ", ""))}) > \stopxmlsetups Many thanks for your reply, Hans. I now see that \xmlraw is the way to go. I have two questions in word replacement and Lua (maybe there is some lpeg magic that could be used). This time, I have to remove two words, such as in: string.gsub([[\xmlraw{#1}{.}]]," del ", " "):gsub(" de la ", " ")} But they could be more (and replacements might be added to that list). Is there a more elegant way than appending :gsub()? Is there also a proper way for word scanning? A "word" can be "Word ", " word " " word." " word?" (and so on). I would like to avoid having to code all combinations (of course, if this were already available). Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] removing word in filtered XML
On 8/20/20 11:08 AM, Taco Hoekwater wrote: > [...] > There is pretty much always ‘a way’, but I do not know of a ’nice’ way. > Your problem is that lxml.flush() and friends do not return a value, > they just do a direct context(‘’) call behind the scenes with no > return string for you to modify. Many thanks for your explanation, Taco. > Also, the special (catcode, space handling) rules for setups and \cldcontext > do not help you. > > That does not mean it can’t be done. As I don’t know a of a nice way, > here is a low-level ‘ugly' way: > > \startluacode > function filter(a) > local div = lxml.getid(a) > process(div) > lxml.flush(div) > end > function process(div) > for c=1,#div.dt do > if type(div.dt[c]) == 'string' then > div.dt[c] = string.gsub(div.dt[c], " of the ", "") > else > process(div.dt[c]) > end > end > end > \stopluacode > > \startxmlsetups xml:special >\ctxlua{filter([[#1]])} > \stopxmlsetups > > process() is recursive because your xml:special gets the whole . > Not sure if you intended it that way. And if it can be done nicer, I > am sure someone will correct me :) You’re right, my xml:special wasn’t intended to get the whole . I was tinkering with a previous sample. And I removed an \xmlfilter. Since I got no output, I didn’t see what I was missing. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] removing word in filtered XML
Dear list, I have the following sample: \startbuffer[demo] This is One of the best a paragraph. This is another paragraph. This is another Two of the best paragraph. This is another Three paragraph. This is another Four of five paragraph. \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{html}{xml:gen} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:gen \xmlfilter{#1}{/**/div/command(xml:special)} \stopxmlsetups \startxmlsetups xml:special %~ \startitem \cldcontext{string.gsub(lxml.flush([[#1]]), " of the ", "")}\stopitem \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext Is there any way to remove " of " and " of the " in the filtered content (xml:special)? Sorry, Lua code is crap for sure. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] reading a single element from XML
On 8/16/20 11:46 AM, Taco Hoekwater wrote: > \xmlfilter is your friend: > > \startxmlsetups xml:initialize >\xmlsetsetup{#1}{html}{xml:gen} > \stopxmlsetups > > \xmlregistersetup{xml:initialize} > > \startxmlsetups xml:gen > \xmlfilter{#1}{/**/span[@class='special']/command(xml:special)} > \stopxmlsetups > > \startxmlsetups xml:special >\bgroup\bfd\ssd\xmlflush{#1}\egroup > \stopxmlsetups Many thanks for your reply, Taco. This was extremely handy and helpful (it is also the first time I understand what \xmlfilter is used for). My final solution required nesting filters, which worked perfectly fine (included below). Many thanks for your help, Pablo Just for the record: \startbuffer[demo] This is One a paragraph. This is another paragraph. This is another Two paragraph. This is another Three paragraph. This is another Four paragraph. This is A a paragraph. This is another paragraph. This is another B paragraph. This is another C paragraph. This is another D paragraph. \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{html}{xml:gen} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:gen \xmlfilter{#1}{/**/div/command(xml:chapter)} \stopxmlsetups \startxmlsetups xml:chapter \startsection[title=\xmlatt{#1}{id}] \startitemize[packed] \xmlfilter{#1}{**/span[@class='special']/command(xml:special)} \stopitemize \stopsection \stopxmlsetups \startxmlsetups xml:special \startitem\xmlflush{#1}\stopitem \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] reading a single element from XML
Dear list, I have the following sample: \startbuffer[demo] This is Only a paragraph. This is another paragraph. This is another paragraph. This is another paragraph. This is another paragraph. \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1} {html|body|div|p} {xml:flush} \xmlsetsetup{#1} {html/**/span[@class='special']} {xml:special} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:flush \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:special \bgroup\bfd\ssd\xmlflush{#1}\egroup \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext How can I select only ? I mean, how can I have "Only" and nothing more in the output PDF document? I thought that lpath "html/**/span[@class='special']" would work, but I don’t know what I’m missing. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] compilation error in LMTX
On 8/15/20 8:14 PM, Pablo Rodriguez wrote: > On 8/15/20 7:23 PM, Hans Hagen wrote: >> On 8/15/2020 5:25 PM, Pablo Rodriguez wrote: >> >>> Which is the meaning of error number 139? It might help me to know what >>> I should be looking at. >>> Hm, but does the current version also quit? I fixed a mp issue. > > The version that works for me is 2020.08.09. Some previous versions > didn’t work. And versions from 2020.08.11 and both from 2020.08.14 quit. I have just checked and version from 2020.08.11 work too. Both versions from 2020.08.14 quit. I will hunt for the bug next month. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] compilation error in LMTX
On 8/15/20 7:23 PM, Hans Hagen wrote: > On 8/15/2020 5:25 PM, Pablo Rodriguez wrote: > >> Which is the meaning of error number 139? It might help me to know what >> I should be looking at. > > Hm, but does the current version also quit? I fixed a mp issue. Since my source is huge, I might need to play with enabling and disabling tracing. I can set it to runs: \startluacode if environment.currentrun == 1 then context([[\tracingall]]) trackers.enable("*") end \stopluacode Is there a way that I can limit it to certain pages? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] compilation error in LMTX
On 8/15/20 7:23 PM, Hans Hagen wrote: > On 8/15/2020 5:25 PM, Pablo Rodriguez wrote: > >> Which is the meaning of error number 139? It might help me to know what >> I should be looking at. >> Hm, but does the current version also quit? I fixed a mp issue. The version that works for me is 2020.08.09. Some previous versions didn’t work. And versions from 2020.08.11 and both from 2020.08.14 quit. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] compilation error in LMTX
On 8/14/20 9:47 AM, Hans Hagen wrote: > On 8/14/2020 9:26 AM, Pablo Rodriguez wrote: > >> Latest from 2020.08.11 works fine for my huge document, but current >> latest (from today) breaks compilation. So I use latest from 2020.08.11. > > i really need a MWE example then .. all runs well here Sorry, Hans, I wish I could provide a sample, but all I get is this message (with current latest): pages > flushing realpage 55, userpage 55, subpage 1 mtx-context | fatal error: return code: 139 Given that the file is Page changed and I will try to see what can I do with \tracingall and \enabletrackers[*]. Which is the meaning of error number 139? It might help me to know what I should be looking at. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] compilation error in LMTX
On 8/14/20 8:47 AM, Hans Hagen wrote: > On 8/14/2020 2:38 AM, Jannik Voges wrote: >> [...] >> I have a similar problem with long context-documents (but not all long >> context-documents are affected and I don't know what triggers the >> error). Sometimes, the errors (error code 139) are happening on second >> or third runs (but it might happen on first runs too). When I remove the >> chapter where the error happens and all later chapters from the document >> it might happen, that the error occurs in an earlier chapter. >> In addition to that, documents, which had this error yesterday, can now >> be compiled without the problem and other documents without the error >> yesterday have the error today. Its really strange. > > i uploaded a new lmtx but as i'm in the middle of a few things it's a > gamble if that solves your problem Jannik, it is wise to make a backup of your installed ConTeXt version when updating. Especially now that LMTX is in testing mode. Latest from 2020.08.11 works fine for my huge document, but current latest (from today) breaks compilation. So I use latest from 2020.08.11. Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 10:11 PM, Wolfgang Schuster wrote: > Wolfgang Schuster schrieb am 13.08.2020 um 20:47: >> [...] >> You can use nested frames: >> >> \startsetups[...] >> \startframed[offset=overlay,frame=off] >> \framed[width=.22\textiwdth]{\pinter} >> \framed[width=.24\textiwdth]{\latint} >> \framed[width=.08\textiwdth]{\pcentr} >> \framed[width=.24\textiwdth]{\latext} >> \framed[width=.22\textiwdth]{\pexter} >> \stopframed >> \stopsetups > > To get the correct width with column change \textwidth > to \makeupwidth or just use \hsize which is the width > of the footer. Many thanks for both replies, Wolfgang. They have solved the issues I had in this thread and also the other ones I reported today that involved error 139. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] tabulation and \textwidth
Dear list, I have this sample: \showframe \startsetups[footers] \starttabulate [|cw(.5\textwidth)| cw(.5\textwidth)|] [unit=0pt] \NC one\NC two\NC\NR \stoptabulate \stopsetups \setupfootertexts[\directsetup{footers}] \starttext \dorecurse{20}{\input{zapf.tex}\par} \startitemize[columns, two] \dorecurse{20} {\startitem\input{zapf.tex}\stopitem} \stopitemize \startitemize[columns, three] \dorecurse{15} {\startitem\input{zapf.tex}\stopitem} \stopitemize \startitemize[columns, four] \dorecurse{10} {\startitem\input{zapf.tex}\stopitem} \stopitemize \stoptext How can I avoid that tabulation alters the \textwidth so that it remains constant and item columns doesn’t afect it? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 6:06 PM, Wolfgang Schuster wrote: >> [...] >> What am I doing wrong here? (To avoid an error, I get other errors.) > > There are not enough information to help you. I discovered what was wrong: I had an xtable on the footer to set the page numbering. So I replaced it with the following tabulation: \starttabulate [|lw(.22\textwidth)| cw(.24\textwidth)| cw(.08\textwidth)| cw(.24\textwidth)| rw(.22\textwidth)|] [unit=0pt] \NC\pinter\NC\latint\NC\pcentr\NC\latext\NC\pexter\NC\NR \stoptabulate But this gave me error number 139 (the same one as reported at https://mailman.ntg.nl/pipermail/ntg-context/2020/099113.html): pages > flushing realpage 187, userpage 187, subpage 3 mtx-context | fatal error: return code: 139 Compilation failed. This happened using LMTX previous to latest (2020.08.09, I think). Now I switched to 2020.08.03 14:25, which seems to have no issues with my documents. This needs further investigation, I hope to do that in a not so distant future. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Help on tweaking alignment, page numbers and ToC
On 8/13/20 6:06 PM, Nicola wrote: > [...] > Thanks. That works with my MWE, but in my document I actually have > a chapter, and chapters start on the right page, even if I add page=no > to \setuppagenumbering: > [...] > I have no idea how to allow chapters to start at arbitrary pages when > alternative=doublesided. Use \page[yes, blank] instead of \page[yes, blank, right]. I hope this helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Help on tweaking alignment, page numbers and ToC
On 8/13/20 5:17 PM, Nicola wrote: > Hi, > I still have an issue with blank pages... > >>> 2. Vertically center the ToC (wrt to the text area). >> >> Use a makeup for the TOC (if and only if it takes a single page). > > Yes, the ToC takes a single page. The makeup seems to insert a blank > page afterwards. MWE: Hi Nicola, all makeups do that by default. "doublesided=no" is what you need. My warning about only taking a page is that makeups don’t split content in pages. I hope it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 3:11 PM, Wolfgang Schuster wrote: > [...] > With the options "split=no" and "split=repeat" ConTeXt puts the table in > a \vbox but with "split=yes" this doesn't happen. > > To check is this is the problem he can put the table in a float > environment and disable the caption and counter. > > \startplacetable[location={force,none}] > \startembeddedxtable > ... > \stopembeddedxtable > \stopplacetable Many thanks for your reply, Wolfgang. These are my defaults for tables in the document: \setupxtable [frame=off, option=stretch, split=repeat, header=repeat] The following avoids the reported break, but it doesn’t split the table: \startxmlsetups xml:table:split \blank \startplacetable[location={force,none}] \startembeddedxtable[split=yes] \xmlflush{#1} \stopembeddedxtable \stopplacetable \blank \stopxmlsetups If I add "split" to \startplacetable, I get the same \prevdepth error in the second run. What am I doing wrong here? (To avoid an error, I get other errors.) Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 2:33 PM, Taco Hoekwater wrote: > [...] > I forgot to answer this. Simple explanation: > > * 'restricted horizontal mode' is inside an \hbox{} or something similar like > a header/footer, > where line breaks are forbidden > * ‘horizontal mode’ is inside a paragraph, where line breaks are possible > > But the ‘restricted’ part is not relevant to your problem, \prevdepth > is forbidden in horizontal mode regardless of restrictions; it is > only allowed in vertical mode. Manny thanks for your explanation, Taco. > Somehow your table ends up being typeset in a horizontal context, > based on the error message (at least, if we assume that the error > message was triggered by a table). I think it is easy to trigger the error: \setupxtable[split=yes] \starttext \ifvmode yes\else no\fi \startxtable[align={middle,lohi},columndistance=0em] \startxrow \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \stopxrow \stopxtable \stoptext > But why that is? I do not have any other good ideas. And > unfortunately lots of different things in ConTeXt can trigger an > implicit horizontal context.> > For debugging, you could try adding this to the preamble (or grouped > around each xtable, for slightly less damage to the vertical > spacing):> > \let\prevdepth\relax > \newdimen\prevdepth > > that should at least remove the error report. The vertical spacing > in the pdf output will be wrong (!!!), but perhaps the output can > provide a clue about what triggered the problem. No idea of what is going wrong here. My setups are even simplistic: \setupxtable [frame=off, option=stretch, split=repeat, header=repeat] \setupxtable [split-table] [split=yes] \startxmlsetups xml:table:split \blank \startembeddedxtable[split-table] \xmlflush{#1} \stopembeddedxtable \blank \stopxmlsetups But it seems that this cannot be fixed without investing much time. I’m afraid I don’t have this time now. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 1:16 PM, Taco Hoekwater wrote: >> On 13 Aug 2020, at 13:07, Pablo Rodriguez wrote: >> [...] >> I get the following error message (that breaks compilation) when I add >> \setupxtable[split=yes]: >> >> You can't use '\prevdepth' in restricted horizontal mode >> [...] >> My questions are: what is the restricted horizontal mode (as different >> from the horizontal mode)? Why might it be triggered with >> \startxtable[split=yes] in the huge source, but not in the single file? > > At a wild guess, as I had a similar problem in my XML: try using > \startembeddedxtable > instead of \startxtable. In my case, what happened was that a row of the > xtable > ended up in the header/footer, generating the same error message you got. > > Not sure if it is actually the same problem, but switching is worth a shot. > The \startxtable does not like to be wrapped into other environments, > so \startembeddedxtable is much better for that. Many thanks for your reply, Taco. Sorry for not realizing that I was missing it: I already use \startembeddedxtable to deal with XML. The first time I tried to add table support to my environment for XML, I cound’t make \startxtable work. I wonder what triggers the error with a huge file. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] weird issue with xtable
Dear list, in order to avoid a problem already reported (https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html), I added to an indiviual table \startxtable[split=yes] (being the default in the document \setupxtable[split=repeat, header=repeat]). But I’m experiencing a weird issue with that approach. I get the following error message (that breaks compilation) when I add \setupxtable[split=yes]: You can't use '\prevdepth' in restricted horizontal mode The single document (actually, an XML file) compiles just fine, but when combined together to generate a PDF document over 1000 pages, I get the error above. My questions are: what is the restricted horizontal mode (as different from the horizontal mode)? Why might it be triggered with \startxtable[split=yes] in the huge source, but not in the single file? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] compilation error in LMTX
Dear list, compiling a huge XML document (output PDF > 1200 pages), I get the following error with latest current (2020.08.11 15:59): pages > flushing realpage 187, userpage 187, subpage 3 mtx-context | fatal error: return code: 139 Compilation failed. Some hints about what I cannot avoid considering a cryptic error message: 1. There is no previous warning when compiling previous pages. 1. The compulation error appears on the third run. 1. ConTeXt latest from 2020.08.07 23:37 compiles this just fine. Sorry, there is no minimal sample here. Any ideas about this? Or at least, any chances for the source that is breaking compilation? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Page number 0 in Table of Contents with makeup
On 8/11/20 10:11 PM, Nicola wrote: > Consider this example: > > \definemakeup[toc][align=middle] > \setuppagenumbering[alternative=doublesided] > \starttext > \startfrontmatter > \startmakeup[toc] > \placecontent > \stopmakeup > %\setuppagenumber[number=1] > \startchapter[title={A}]\stopchapter > \startchapter[title={B}]\stopchapter > \stopfrontmatter > \stoptext > > The first entry in the ToC has page number 0. I can fix it by > uncommenting the commented line or by removing the makeup. Is this > expected behaviour? If so, why? Hi Nicola, makeups have pagestate set to stop by default. \definemakeup[toc][align=middle, pagestate=start] solves your issue. I hope it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Help on tweaking alignment, page numbers and ToC
On 8/11/20 8:34 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 11.08.2020 um 14:53: >> On 8/11/20 1:32 PM, Nicola wrote: >> [...] >>> 3. Suppress page numbers and headers in all blank pages. >> >> Break pages with \page[yes, blank]. > > Not the best solution for empty pages before a new chapter. When I copied the code, I removed right from the \page. Now I realize that without page, that pagebreak is almost useless. >> I never used environments (other than the ones to typeset XML sources), >> so this is my best option . > > A environment is nothing more than a external file for the style, the > only difference between \input{...} and \environment[...] is that > ConTeXt loads environment files only once. Many thanks for the explanation. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Help on tweaking alignment, page numbers and ToC
On 8/11/20 9:24 PM, Nicola wrote: > Thank Pablo, Wolfgang, > I have learned more by reading your replies than by myself in the rest > of the afternoon. Hi Nicola, if you found replies useful, please update the wiki (this may help others). > Just one more thing: > [...] > I'd prefer all the titles to be aligned: > > Preface >I XYZ > ... > VIII XYZ > ... > > I have tried to do my homework by playing with \setuphead, but I am > afraid I need your help on this. Sorry, but too tired to type a sample. How about setting distance for \setuplist[chapter] in the sectionblock frontpart with the desired width? I hope it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Help on tweaking alignment, page numbers and ToC
On 8/11/20 1:32 PM, Nicola wrote: > Hi, > first of all, let me say *thank you* for the vast improvements on > ConTeXt Garden! Browsing the documentation and finding stuff is so > much easier and pleasant than it used to be (also the site seems > faster). Hi Nicola, Garulfo invested a lot of time and effort in the new wiki layout and contents. Taco is always improving the software that runs the wiki (and the source). Many thanks to them and to all other developers. > Thanks to the docs, dropcaps and protrusion have no secrets for me, > but I am still struggling with some basic tasks (see the document > below): > > 0. Push text to the bottom of the text area (see copyright). Well, \setupalignment tweaks position in line (I’d rather say). Bottom isn’t an option there. Adding \null\vfill before the alignment does the job. > 1. Increase the space between Roman numbers and titles in the ToC. distance with dimension is the key in \setuplist. > 2. Vertically center the ToC (wrt to the text area). Use a makeup for the TOC (if and only if it takes a single page). > 3. Suppress page numbers and headers in all blank pages. Break pages with \page[yes, blank]. > 4. Suppress headers in the front matter. This would be my educated guess: \startsectionblockenvironment[frontpart] \setupheader[state=stop] \stopsectionblockenvironment > 5. Style and position page numbers differently in the front and body >matter (e.g., centered only in the front matter). Alignment only (style comes with the proper option ): \setuppagenumbering[location={bottom, inmargin}] \startsectionblockenvironment[frontpart] \setuppagenumbering[location={bottom, centered}] \stopsectionblockenvironment > As my full document uses environments, I would like most setups to > be in the environment, if possible. E.g., is it possible to replace > > \setuphead[chapter][after={}] > > (see below) with an environment setup that applies only to the ToC? Either you create and set up a \chapter command for the TOC (such as \chapterTOC) to use it only once, or you create a sectionblock that you apply only for the TOC (and define the chapter settings for that sectionblock). I never used environments (other than the ones to typeset XML sources), so this is my best option . I hope it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] orphans and widows not working in LMTX?
On 8/9/20 9:59 PM, Joseph Canedo wrote: > Hi Pablo, > I've reported similar issue to Hans 2 days ago, from my checks he fixed > it in LMTX version 2020.08.07 23:37. I have not downloaded more recent > version yet. > Hoping it helps Hi Joseph, many thanks for your comment and your previous issue report. The issue has been fixed in current latest from 2020.08.09 22:03. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 8/9/20 10:09 PM, Hans Hagen wrote: > On 8/9/2020 8:52 PM, Pablo Rodriguez wrote: >> On 8/9/20 8:45 PM, Jairo A. del Rio wrote: >>> On my computer mtxrun --generate works, but context --make fails and the >>> command line outputs: >> >> I ran "mtxrun --script cache --erase" before running "mtxrun --generate" >> (as I do with each update). > can you try again > > (in case of a broken mtxrun, change the error line to "tex and tex.error") Many thanks for the fast reply, Hans. It works fine now. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 8/9/20 8:45 PM, Jairo A. del Rio wrote: > On my computer mtxrun --generate works, but context --make fails and the > command line outputs: I ran "mtxrun --script cache --erase" before running "mtxrun --generate" (as I do with each update). Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 8/9/20 8:08 PM, Hans Hagen wrote: > Hi, > > I uploaded a new lmtx ... not much done due to the heat (entered reading > mode instead) but ... apart from some work in progress ... we now have > some basic bitwise operations (maybe we need some more). So far we have: I’m afraid that even "mtxrun --generate" gives an error message: lua error : context/tex/texmf-linux-64/bin/mtxrun.lua:13981: attempt to index a nil value (global 'tex') I think something is missing there. Many thhanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] orphans and widows not working in LMTX?
Dear list, I have the following sample: \showframe\showgrid \setuppapersize[A7] \setuplayout[setups=*lessstrict] \startsetups[*lessstrict] \widowpenalty=1000 \clubpenalty=1000 \brokenpenalty=1000 \stopsetups \setupbodyfont[15pt] \starttext \dorecurse{5}{a\\ b\\ c\\ d\par} \stoptext Compiling it with current latest in LMTX (2020.08.07 23:37) leaves an orphan line on page 2 (page #2 starts with "d"). MkIV beta from 2020.01.30 14:13 moves the the last line to avoid the orphan (page #2 starts with "c"). Could anyone confirm the issue with orphans/widows in LMTX? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in current latest (2019.10.11 15:57)?
On 8/3/20 7:26 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 03.08.2020 um 19:06: >> Hi Hans, >> >> the following sample complains about an undefined command with ConTeXt >> latest (2019.10.11 15:57): >> >> \starttext >> {\em æb} >> \stoptext >> >> I think this might be a bug in LMTX. > > The following two constants are missing from syst-ini.mkxl > (\semisimplegroupcode is needed for \triggergroupedcommand): > > \chardef\aligngroupcode = 6 > \chardef\semisimplegroupcode= 14 Many thanks for your fast reply, Wolfgang. Already fixed it on my computer and it works fine now. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] lmtx update
On 7/31/20 10:32 AM, Hans Hagen wrote: > Hi, > > Sorry for the long mail ... > > One of the changes in lmtx is that we freeze the properties that > determine the paragraph shape as well as breaking into lines in such a > way that we have predictable behaviour. As a side effect it can be that > existing code (lmtx only) will behave differently (will be fixed when we > notice) but also that some low level user tweaking can not work, i.e. > they are just ignored, but only when they happen mid paragraph which > actually is always debatable anyway. Hi Hans, many thanks for your explanation. I wonder whether the new improvements could prevent body text running into the footnotes (as some of us have already reported). > [...] > No one ever requested it so see it an a quick and dirty example but > don't hesitate to ask for more anyway (we like an occasional challenge). If you are open for suggestions, I would ask for a footnotes that behave as a page index, such as in: \setuplanguage[en][patterns={en,agr}] \setuppapersize[A6] \setupbodyfont[dejavu] \definenote[dict] \setupnote[dict][n=2,rule=off, split=strict, inbetween=\hskip1.5em] \setupnotation[dict][number=no, style={\tfx\setupinterlinespace[line=2.5ex]}] \starttext Πρῶτον δεῖ θέσθαι τί ὄνομα\dict{ὄνομα, -ατος, τό: noun} καὶ τί ῥῆμα\dict{ῥῆμα, -ατος, τό: verb}, ἔπειτα τί ἐστιν ἀπόφασις\dict{ἀπόφασις, -εως, ἡ: negation} καὶ κατάφασις\dict{κατάφασις, εως, ἡ: affirmation} καὶ ἀπόφανσις\dict{ἀπόφανσις, -εως, ἡ: statement} καὶ λόγος. \stoptext What I need there is that these notes are alphabetically sorted, such as in a standard register. As I proposed that (years ago), you told me it was too complex. I wonder whether this would be easier with the current developments. Many thanks for your improvements to ConTeXt, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] bug in current latest (2019.10.11 15:57)?
Hi Hans, the following sample complains about an undefined command with ConTeXt latest (2019.10.11 15:57): \starttext {\em æb} \stoptext I think this might be a bug in LMTX. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] question on page transitions
Dear list, I have a question about page transitions (lines 297-304 from scrn-pag.mkvi): \def\scrn_transitions_set_indeed {\begingroup \edef\currentinteractionscreendelay{\interactionscreenparameter\c!delay}% \clf_setpagetransition n {\scrn_transitions_list}% delay \ifx\currentinteractionscreendelay\v!none \zerocount\else\currentinteractionscreendelay\fi \relax \endgroup} I wonder whether the "delay" option in \setupinteractionscreen defines the number of seconds for the page or for the transition. From what I read in the code above, I would say that the duration is defined for the transition itself. Inspecting the output PDF code in generated documents, the duration is set for the page. In PDF code. /Page <> sets the number of seconds for the page (https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#search=duration). /Page <> >> sets the number of seconds for the transition (https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.2295795). With the followling sample: \setuppapersize[A9,landscape] \setupinteraction[state=start] \setupinteractionscreen[option=max, delay=5] \setuppagetransitions[random] \setupbodyfont[50pt] \starttext \dorecurse{2}{% \startmakeup[page][style=\bf\ss, align=center] \recurselevel \stopmakeup% } \stoptext The output PDF document may contain a /Page object such as: 6 0 obj << /Contents 4 0 R /Dur 5 /Trans << /Di 90 /M /O /S /Fly >> /Type /Page >> endobj This forces the viewer to advance the page after 5s. To have a transition duration of 5s, it should read: 6 0 obj << /Contents 4 0 R /Trans << /D 5 /Di 90 /M /O /S /Fly >> /Type /Page >> endobj https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.2104292 shows the difference between /Dur and /D. Could anyone confirm whether this should be fixed (or I’m missing something)? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Presentation effects
On 7/25/20 3:48 PM, Kumar Appaiah wrote: > Dear ConTeXt users, > > I have been trying to get the presentation effects listed here to > work: > > https://wiki.contextgarden.net/Presentation_effects > > But I am unable to build the example. I am using the Debian ConTeXt > (version 2020.03.10.20200331-1). Please let me know if I am missing > something. Hi Kumar, this sample works with both Acrobat for Linux and Evince (using LMTX latest): \setuppapersize[A9,landscape] \setupinteraction[state=start] \setupinteractionscreen[option=max] \setuppagetransitions[random] \setupbodyfont[50pt] \starttext \dorecurse{25}{% \startmakeup[page][style=\bf\ss, align=center] \recurselevel \stopmakeup% } \stoptext Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] indentnext option for \setuplanguage?
Hans, as Garulfo mentioned in a previous message (https://mailman.ntg.nl’t /pipermail/ntg-context/2020/098826.html), French may require that all paragraphs are indented (no matter what comes before the paragraph). Spanish also requires that. How about a key for "indentnext" in \setuplanguage? That makes it easier to have documents that require all "indentnext" keys set to "yes". I don’t mean changing the default behaviour for any language. Could the "indentext" option be added to \setuplanguage? Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] \insertpages and remote file
Dear list, I have the following sample: \setupinteraction[state=start] \starttext \insertpages [https://eur-lex.europa.eu/legal-content/EL/TXT% /PDF/?uri=CELEX:32015D0022] [width=0pt] \attachment[file=https://eur-lex.europa.eu/% legal-content/EL/TXT/PDF/?uri=CELEX:32015D0022] \attachment[https://eur-lex.europa.eu/legal-content/% EL/TXT/PDF/?uri=CELEX:32015D0022] \stoptext The docuemnt may be attached to the PDF document, but pages cannot be inserted to generate a booklet. Attachment doesn’t work either when the "file" key is removed (see second one. Would it be possible that \insertpages and \filterpages could deal with these urls? Or what am I missing here? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with current latest (2020.07.20)
On 7/21/20 1:56 PM, Hans Hagen wrote: > On 7/20/2020 9:44 PM, Garulfo wrote: >> I don't know if there is link with this thread, but after update I get >> the following with "context --make" or "context --make fr" >> >> resolvers > lua > unknown file 'mult-fmt.lua' >> error loading file: mult-fmt.lua (aborting)resolvers | formats | > hm, typo in zip builder ... i'll fix it but first i need to do something > else Many thanks for the new version, Hans. At least on Linux, it works perfectly fine. (Tomorrow I have to check the Windows part .) Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with current latest (2020.07.20)
On 7/20/20 9:44 PM, Garulfo wrote: > I don't know if there is link with this thread, but after update I get > the following with "context --make" or "context --make fr" > > resolvers > lua > unknown file 'mult-fmt.lua' > error loading file: mult-fmt.lua (aborting)resolvers | formats | Hans and Garulfo, I’m afraid the current latest doesn’t generate PDF documents. Sample code: \starttext \input zapf \stoptext Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with current latest (2020.07.20)
On 7/20/20 6:58 PM, Hans Hagen wrote: > On 7/20/2020 5:11 PM, Pablo Rodriguez wrote: >> [...] >> Acrobat DC in Windows displays characters fine. > > (Here I only test with summatra and occasionally with acrobat reader or > some old acrobat prof.) Sorry, I use Acrobat Reader DC in Winows (no Professional version). >> luametatex.pdf cannot be opened with Evince, Acrobat for Linux or xpdf >> (e45c09ed2055fab7e8de40fa5f99da4ce46e6849f306a57ac34d99487e025049). >> mupdf-gl has to repair the xref. > > can you check again ... i reverted something (not xref related) that > according to the spec should be ok but it doesn't surprise me that some > viewers don't like it (i'll look into it another time) I’m afraid it doesn’t work. Same problem with luametatex.pdf (SHA256 ca501f4ee5c933ee2c2e6a4ebff053c77fd89cfe90ac1b084398d5772fad80c6). > I can open the file in an ubuntu viewer but I'm not sure what it uses > under the hood (don't care much either as a viewer is kind of an > abstraction for the user). Acrobat Reader 9.x for Linux and xpdf cannot open it. And mupdf-gl needs to fix the xref. Trying to uncompress the PDF document with Multivalent20060102, I get this error message (and no compression): luametatex.pdf: expected: 'xref' but saw 'vI' @ byte 1182902 I wonder whether this might give you a hint of what might be problematic here. (BTW, there is a 0x14 char between "v" and "I".) Many thanks again for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with current latest (2020.07.20)
On 7/20/20 3:41 PM, Hans Hagen wrote: > On 7/20/2020 3:01 PM, Pablo Rodriguez wrote: >> Dear list, >> >> with current latest (LuaTeX 2.06 20200717 + ConTeXt MkIV 2020.07.20 >> 10:48), I cannot open luametatex.pdf (its SHA256 reads >> cff8b660b65f4f8c121c170bcd59545c5467a7db02614da137e622ef1c5f3964). >> >> Acrobat for Linux complains about malformed document and Evince doesn’t >> display anything. Latest mupdf-gl complains about broken xref (mupdf >> complains too): >> >>error: cannot recognize xref format >>warning: trying to repair broken xref >>warning: repairing PDF document >> >> I experience issues in Windows with current latest: >> >> \starttext >> \input zapf >> \stoptext >> >> The output PDF document opens in SumatraPDF fine. But in Acrobat DC, no >> character is displayed. > can you check again Many thanks for your fast reply, Hans. Acrobat DC in Windows displays characters fine. luametatex.pdf cannot be opened with Evince, Acrobat for Linux or xpdf (e45c09ed2055fab7e8de40fa5f99da4ce46e6849f306a57ac34d99487e025049). mupdf-gl has to repair the xref. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with current latest (2020.07.20)
Dear list, with current latest (LuaTeX 2.06 20200717 + ConTeXt MkIV 2020.07.20 10:48), I cannot open luametatex.pdf (its SHA256 reads cff8b660b65f4f8c121c170bcd59545c5467a7db02614da137e622ef1c5f3964). Acrobat for Linux complains about malformed document and Evince doesn’t display anything. Latest mupdf-gl complains about broken xref (mupdf complains too): error: cannot recognize xref format warning: trying to repair broken xref warning: repairing PDF document I experience issues in Windows with current latest: \starttext \input zapf \stoptext The output PDF document opens in SumatraPDF fine. But in Acrobat DC, no character is displayed. Could anyone confirm the issues with current latest? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] french translation of ConTeXt interface - progress (v3)
On 7/19/20 8:27 PM, Garulfo wrote: > Thanks a lot !! > > I'm beginning to be able to typeset some simple example without any > struggle. > > https://wiki.contextgarden.net/File:modele_bonjour_le_monde.pdf > > The input file is attached in this mail. Congratulation for your excellent work, Garulfo. Your translation is really amazing. > I have only one remaining issue with this example: the indentation. > Despite \setupindenting[medium, yes], the paragraphs are not > systematically indented, and I don't really understand the pattern > behind it. The default is "indentnext=no" for \setupheads and \setupfloats. The pattern is clear: see what comes before the unindented paragraph. BTW, I don’t understand this: \langueprincipale[fr] \langue[fr] Is \mainlanguage not enough? (This would also set \language.) \mainlanguage[fr] \starttext \startTEXpage[offset=2em] mainlanguage: {\tt\currentmainlanguage} language: {\tt\currentlanguage} \stopTEXpage \stoptext I hope it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] embolden font in LMTX
On 7/16/20 10:36 AM, Hans Hagen wrote: >> [...] > I have a fix. This kind of trickery is complicated by the fact that mkiv > and lmtx follow a bit different route and that there is still mkiv code > around that does the lmtx backend stuff (mkiv also had a lua pdf backend > but it was dropped at some point because it made no sense to keep it). > > Features like these effects often are the result of playing around (as i > always want something weirdly new to present at e.g. a BT or CTX meeting > or just because it rains outside and I have a stack of new cd's to > listen to). For sure they can be made better if there is demand. > > The same is true for variables fonts, emoji etc ... all these were > supported as soon as the fonts showed up providing them, but it's hard > to predict if any of that is actually used or useful. > > Anyway, you seem to use most trickery so ... fix in next upload (but I > really do need to strip away old code some day). Many thanks for your reply, Hans. I was checking the digitization of »Heraklit« (originally by Hermann Zapf) and I noticed that embolden didn’t work properly in LMTX. Just in case anyone is interested, the links for a discussion about the project and download are https://typedrawers.com/discussion/3569/ and https://www.greekfontsociety-gfs.gr/typefaces/20th_21st_century#GFS_Heraklit. Many thanksf or your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] embolden font in LMTX
Dear list, I have the following sample: \definefontfamily [mainface] [rm] [TeX Gyre Pagella] [it={style:regular, features:{default, slanted}}, bi={style:regular, features:{default, boldened, slanted}}, bf={style:regular, features:{default, boldened}}] \setupbodyfont[mainface] \starttext \input{zapf}\\ {\it \input{zapf}}\\ {\bf \input{zapf}}\\ {\bi \input{zapf}}\\ \stoptext I’m afraid that LMTX (current latest 2020.07.13 23:53) cannot deal with the boldened feature. MkIV (from 2020.01.30 14:13) works just fine. Am I missing something or have I hit a bug? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] lpath to select last item
On 7/8/20 11:59 AM, Hans Hagen wrote: > On 7/7/2020 10:46 PM, Pablo Rodriguez wrote: >> [...] >> Which would be the right lpath to select the last item in each list? > This should work but we're one off so i need to fix that. > > \startbuffer[demo] > > > first > any > last > > > \stopbuffer > > \startxmlsetups xml:demo:base >\xmlsetsetup{#1}{document|ul|li}{xml:*} >\xmlsetsetup{#1}{ul/li[1]}{xml:item:first} >\xmlsetsetup{#1}{ul/li[-1]}{xml:item:last} > \stopxmlsetups Many thanks for your help, Hans. This is like magic to me. But I’m afraid that my description was inaccurate. I need to mark the last item from nested lists, but considering each (such as in my sample), not the whole document. Just in case it isn’t clear, this is the XML source with desired items marked: Heading list***this one*** Heading list list ***this one*** Heading list list list ***this one*** I hope it is clear now that it is the last item in a nested list, but for each element. Many thanks for your help again, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] lpath to select last item
Dear list, I have the following sample: \startbuffer[demo] Heading list Heading list list Heading list list list \stopbuffer \startxmlsetups xml:demo:base \xmlsetsetup{#1}{document|h2|ul|li}{xml:*} %~ \xmlsetsetup{#1}{ul/li/!ul}{xml:last:item} % nothing changes %~ \xmlsetsetup{#1}{ul/li/!li}{xml:last:item} % blank item inserted %~ \xmlsetsetup{#1}{h2/**/ul/li}{xml:last:item} % nothing changes \xmlsetsetup{#1}{h2/***/ul/li/!ul}{xml:last:item} % shouldn’t be this one? \stopxmlsetups \xmlregistersetup{xml:demo:base} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:h2 \section{\xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:ul \startitemize\xmlflush{#1}\stopitemize \stopxmlsetups \startxmlsetups xml:li \startitem\xmlflush{#1}\stopitem \stopxmlsetups \startxmlsetups xml:last:item \startitem\red\xmlflush{#1}\stopitem \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext I need to be able to select the last (the one with no child) in the element. I thought that the lpath for that would be "h2/***/ul/li/!ul", but I don’t know what I’m missing, since it doesn’t work at all. Which would be the right lpath to select the last item in each list? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bad interaction between \setupinteraction and \defineenumeration
On 7/6/20 8:48 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 06.07.2020 um 20:04: >> [...] >> Hans, could you check this? (I’m afraid it doesn’t work with current >> latest [2020.07.06 19:30])? > > I'm not Hans but this fixed the problem for me (strc-con.mkiv): > > \def\strc_constructions_register_yes[#1][#2]% #1=optional user data > #2=interfaced-settings >{\begingroup % similar to structure so > we might generalize this > ... > \clf_setinternalreference > - prefix{\referenceprefix}% > + prefix{\currentconstructionreferenceprefix}% > reference {\currentconstructionreference}% > internal \locationcount > view {\interactionparameter\c!focus}% > \relax > ... > \fi} Many thanks for your the fix, Wolfgang. It works perfectly fine here too. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX and soft links (Linux)
On 7/6/20 7:45 PM, Hans Hagen wrote: > On 7/6/2020 7:26 PM, Pablo Rodriguez wrote: >> [...] >> But an open question (to Hans, Wolfgang and other LMTX developers) is >> why softlinks in Linux (in Unix, my guess) only work for files and not >> for directories. Sorry, but this doesn’t make sense to me. > > The current upload should be better (according to taco and me). Many thanks for your the fix, Hans and Taco. Soft links to directories work fine for me Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bad interaction between \setupinteraction and \defineenumeration
On 7/6/20 3:58 PM, Jairo A. del Rio wrote: > So, cannot I use focus=standard and cross-references together? Hmm. I > think it should be fixed... But maybe it's an intended feature. Thanks, > Otared. Hi Jairo, "focus=standard" works fine with footnotes. \setupinteraction[state=start,focus=standard,color=,contrastcolor=] \defineenumeration[proposition][referenceprefix=prop] \starttext \startproposition[1] \input ward\footnote{Only a footnote} \stopproposition \in[prop:1] \stoptext Your sample doesn’t work, because of the reference prefix. Right now, the /Names reads in the PDF code: /Names [ (1) 5 0 R ] It seems that "referenceprefix" is forgotten there, which should read with the sample code from above: /Names [ (prop:1) 5 0 R ] Hans, could you check this? (I’m afraid it doesn’t work with current latest [2020.07.06 19:30])? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX and soft links (Linux)
On 7/5/20 10:16 PM, Jairo A. del Rio wrote: > Indeed, it works. A fast "cp -rs" solved it. Anyways, I'd rather prefer > a less "manual" method. Thank you very much, Pablo. Hi Jairo, glad to read it helped. But an open question (to Hans, Wolfgang and other LMTX developers) is why softlinks in Linux (in Unix, my guess) only work for files and not for directories. Sorry, but this doesn’t make sense to me. Many thanks for your help, Pablo > El dom., 5 de jul. de 2020 a la(s) 14:52, Pablo Rodriguez escribió: > > On 7/5/20 9:14 PM, Jairo A. del Rio wrote: > > I'm using both LMTX from the ConTeXt standalone installation and a TeX > > Live installation. Since I'm using binaries from the standalone (and > > added LMTX to path, etc.), I created soft links in texmf-modules via > > > > ln -s /usr/local/texlive/2020/texmf-dist/tex > ~/lmtx/tex/texmf-modules/tex > > > > and similar (lmtx is my directory for the standalone). > > > > LuaTeX finds files without any issues. However LuaMetaTeX gives the > > following error: > > > > runtime error : input file (name of file) is not found, quitting > > > > The same result is for modules, .sty files and .tex files. Is this > > intentional, a bug in LMTX, or is a better solution possible? In case > > it's useful, I'm working with Ubuntu 20.04. Thank you a lot. > > Hi Jairo, > > I experience something very similar in Linux too. > > LMTX follows softlinks to files, but no softlink to directories. > > I don’t know why this happens, but it behaves this way. > > Just in case it helps, > > Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX and soft links (Linux)
On 7/5/20 9:14 PM, Jairo A. del Rio wrote: > I'm using both LMTX from the ConTeXt standalone installation and a TeX > Live installation. Since I'm using binaries from the standalone (and > added LMTX to path, etc.), I created soft links in texmf-modules via > > ln -s /usr/local/texlive/2020/texmf-dist/tex ~/lmtx/tex/texmf-modules/tex > > and similar (lmtx is my directory for the standalone). > > LuaTeX finds files without any issues. However LuaMetaTeX gives the > following error: > > runtime error : input file (name of file) is not found, quitting > > The same result is for modules, .sty files and .tex files. Is this > intentional, a bug in LMTX, or is a better solution possible? In case > it's useful, I'm working with Ubuntu 20.04. Thank you a lot. Hi Jairo, I experience something very similar in Linux too. LMTX follows softlinks to files, but no softlink to directories. I don’t know why this happens, but it behaves this way. Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] missing command for xmlinfo in latest?
Dear list, I have the following sample: \startbuffer[demo] text \stopbuffer \startxmlsetups xml:demo:base \xmlsetsetup{#1}{document}{xml:demo:doc} \stopxmlsetups \xmlregistersetup{xml:demo:base} \startxmlsetups xml:demo:doc \xmlinfo{#1} \xmlflush{#1} \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext It crashes with latest form 2020.06.29 19:47, because of the use of \xmlinfo and some undefined command. Could anyone confirm the issue? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] margin comment above heading
On 6/17/20 11:26 PM, Henning Hraban Ramm wrote: > [...] > Pablo, do I understand right that you’re converting XML and the > comment comes last in that structure, but you need it first?> I.e. > the real question is how to process the XML structure in a different > order, right? Hraban, yes, this is my real question. I have to learn how to select the last child using lpath ("[position()==last()]", I guess). > That would avoid shifting boxes around, which might be possible, but > ugly and hard to control. This make sense. Messing code to force ConTeXt to work as it isn’t intended may to other unintended consequences as well. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] margin comment above heading
On 6/17/20 10:47 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 16.06.2020 um 22:17: >> Dear list, >> >> I have the following sample: >> >>\startsetups[tinytiny] >> \setupwhitespace[-2em] >> \setupbodyfont[0.01pt] >> \setupinterlinespace[1sp] >>\stopsetups This was from a previous form of the sample. If the paragraph is really tiny, it would be easier not to have a page break between that paragraph and the >>\setupinteraction[state=start] >>\showframe\showgrid >>\starttext >> \blank[force, 10em] >> \section{Move comment above this heading} >> \startparagraph[setups=tinytiny] >> \dontleavehmode >> \comment[location={rightmargin}, color=orange] >> {comment} >> \stopparagraph >>\stoptext >> >> Is there a way to move the comment above the heading that goes before? > > Like this? > > \setupinteraction[state=start] > > \showframe > \showgrid > > \starttext > > \blank[force,10em] > > \comment[location={rightmargin},color=orange]{comment} > \section{Move comment above this heading} > > \stoptext This is what I intend, but not changing the order of \section before \comment (if that is possible, which I don’t know). Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] margin comment above heading
Dear list, I have the following sample: \startsetups[tinytiny] \setupwhitespace[-2em] \setupbodyfont[0.01pt] \setupinterlinespace[1sp] \stopsetups \setupinteraction[state=start] \showframe\showgrid \starttext \blank[force, 10em] \section{Move comment above this heading} \startparagraph[setups=tinytiny] \dontleavehmode \comment[location={rightmargin}, color=orange] {comment} \stopparagraph \stoptext Is there a way to move the comment above the heading that goes before? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with \comment
On 6/16/20 8:00 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 16.06.2020 um 19:20: >> [...] >> I think it might be a bug. Could anyone confirm this? > > Why is everything a bug? > > Some elements like margin blocks or register entries need an anchor. Sorry, Wolfgang, I discovered after reporting the issue that inmargin comments need to be in horizontal mode. Many thanks for your help and sorry for the noise, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] wrong page for annotation and \pagenumber
On 6/16/20 4:58 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 16.06.2020 um 16:31: >> [...] >> I’m afraid that you get the same result, so there may be a bug there. > > There is no bug. When you take a look at my pagenumber example you see a > few lines at the top show the number of the previous page, this happens > because TeX collects more than necessary which means in your example > above the layer is placed when TeX was still on the first page. Many thanks for your reply, Wolfgang. I’m afraid that TeX is too tricky for me in that case (or I simply think that it is misbehaving there). > In your example you can add \testpage to \section to force a page break > when there isn't enough space available to place the heading, this moves > also the layer placement to the next page. I’m afraid this doesn’t work with my real document. I need another approach. This sample reflects my problem: \setupinteraction[state=start] %~ \showframe\showgrid \starttext \dorecurse{41}{one line\par} \ \comment[location={rightmargin}]{comment} \stoptext Since layers are problematic for the task, I insert the comments right after the text (which actually comes from \xmlflush{#1} [XML sources]). I’m afraid that the paragraph before \comment comes from \xmlflush, so I cannot avoid it. This is unproblematic for most cases, but the sample above displays the problem of adding a comment in a new paragraph. It might add a new page. To avoid this issue: how could I prevent the pagebreak before \comment and the addition of a pagebreak above? If that were possible, I could add a \blank[-2*line] that would place the comment right. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with \comment
Dear list, when trying to report another issue, I found the following one (using latest from 2020.06.12 17:43): \setupinteraction[state=start] \starttext a\contextversion \comment[location={rightmargin}]{comment} \stoptext For some strange reason, \comment isn’t added when there is no other content in the paragraph. I think it might be a bug. Could anyone confirm this? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] wrong page for annotation and \pagenumber
On 6/16/20 4:53 AM, Rudolf Bahr wrote: > [...] > Hi Pablo, > > I fear I don't understand what issue you mean, therefore I append my output > here. Many thanks for your reply, Rudolf. The issue is that the layer is placed on the first page, where it should be placed on the second page. This sample shows thie problem in a simpler way: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext I’m afraid that you get the same result, so there may be a bug there. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with remote \attachment
Hi Hans, one of my documents uses \attachment to embed PDF documents (well, it contains many). I have been doing this for more than a year, but right now it is way slower: over 250s vs. 7s compilation time (with and without the attachment). It takes me 6s to download the document directly with curl using the same address. I’m afraid this might be also related to the server where the file is downloaded from. The document seems to be downloaded in each run. I wonder whether this could be improved with these proposals: 1. Only download the document on the first run of each compilation. 2. Before that, check last modified information (from "curl -I") and avoid downloading if the already downloaded file is newer that the remote version. 3. It would be better if downloaded files could have the remote time ("curl -R"), instead download time. CreationDate and ModDate might differ from upload time. A sample for that would be https://etsc.eu/wp-content/uploads/2014_06_smart_factsheet_alco_gate_sweden.pdf. These are dates from the PDF document: CreationDate: Mon Jul 7 14:57:05 2014 CEST ModDate:Mon Jul 7 14:57:07 2014 CEST And this is what "curl -I" displays about uploading time: Last-Modified: Sat, 24 Mar 2018 13:51:29 GMT Would it be possible to implement these proposals to improve remote file embedding? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] wrong page for annotation and \pagenumber
On 6/15/20 4:09 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 15.06.2020 um 14:52: >> Dear list, >> >> I have the following number with wrong annotation placement and wrong >> page number, which would be both on the second page: >> [...] >> Could anyone confirm the issue? > > \pagenumber is only reliable headers/footer texts or page backgrounds, > for everything else you need a multi pass mechanism (save the page > number in the first run and provide it in the second). Many thanks for your reply, Wolfgang. I thought this was caused by the deployment of "\placelist[section][alternative=d]". But my new sample shows clearly that this isn’t the cause. My question is now is how to get the right page for the layer in this sample: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] wrong page for annotation and \pagenumber
Dear list, I have the following number with wrong annotation placement and wrong page number, which would be both on the second page: \setupinteraction[state=start] \definelayer[pgnumber] \setupbackgrounds[page][background=pgnumber] \starttext \placelist[section][alternative=d] \dorecurse{16}{\section{Section}} \pagenumber/\lastpagenumber \setlayer[pgnumber] {\comment{\pagenumber}} \stoptext Could anyone confirm the issue? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] using annotations for extended print handling
Dear list, I have an over a thousand pages document generated with ConTeXt. I need to print and chapters and part of chapters (or send to other people). /PrintPageRange is great (and you can even generate a new document containing only the pages in /PrintPageRange). But the issue here is that I would need to recompile the document again for each new required /PrintPageRange. Another approach would be to add PDF annotations (outside page boundaries) to store the desired information. So I created text annotations (using \comment) with author information composed from unit number (such as "i3", "ii9" or "iii28"), info on the unit part (such as "-explanation", "-synopsis", "-exercises", or others) and position ("-start" and "-stop"). This would make author fields such as "i3-start" (which has a corresponding "i3-stop", or "ii22-synopsis-start" (with the corresponding closing annotation). To make easier to identify these annotations, they all share the same title. As contents, all these text annotations have the page number. From the generated PDF document, I need to read all text annotations in order to extract two fields from those annotations that contain a "whatever" /Subj. These fields are /T and /Contents. I guess that the way to deal with the (over 700) annotations would be to store both fields in a Lua table. But this is only a suspicion, since I don’t know how to read the values, how to store them, or how to compare them with specific units or unit parts to get these page numbers. I mean, with a command such as \extractpages{i5,i8-exercises,i15-explanation} would get the pages for each "-start" and "-stop" that could be passed automatically to a \filterpages command. A sample that generates something similar: \setuppapersize[A8] \setupinteraction[state=start] \starttext \dorecurse{5}{\part{\romannumerals{\recurselevel}} \dorecurse{15}{\chapter{\recurselevel} \comment [title=whatever, color=yellow, %~ the following code is to have expansion in interaction author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].."-start")}}] {\pagenumber} \doloopoverlist{explanation,exercises,synopsis}{\chapter{\recurselevel} %~ I would like to use \recursestring, but it is undefined here \comment [title=whatever, color=green, author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].. [[-\recurselevel]].."-start")}}] {\pagenumber} \dorecurse{5}{\null\page} \comment [title=whatever, color=blue, author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].. [[-\recurselevel]].."-stop")}}] {\pagenumber} } \comment [title=whatever, color=red, author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].."-stop")}}] {\pagenumber} } } \stoptext Is there a way to deal with the annotations in the document generated from the code above, in the way I described before? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] \recursestring undefined when inside \dorecurse
Dear list, I have the following sample: \starttext \dorecurse{25}{\recurselevel\par} \doloopoverstring{a,b,c}{\recursestring} } \stoptext Both LMTX and MkIV complain about \recursestring for being undefined. I wonder whether this is inteded or it is a bug. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug with \hyphenatedurl in latest?
On 6/12/20 2:26 PM, Pablo Rodriguez wrote: > [...] > I’m afraid I’m experiencing a problem with \hyphenatedurl: > > \starttext > \hyphenatedurl{} > \stoptext > > The sample above outuputs "tterhat". Many thanks for your fast fix in latest, Hans. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] bug with \hyphenatedurl in latest?
Hans, many thanks for the new latest. I’m afraid I’m experiencing a problem with \hyphenatedurl: \starttext \hyphenatedurl{} \stoptext The sample above outuputs "tterhat". Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unicode chars and \insertpages (Win7)
On 5/30/20 7:38 PM, Hans Hagen wrote: > On 5/30/2020 6:49 PM, Pablo Rodriguez wrote: >> On 5/29/20 9:45 AM, Hans Hagen wrote: >> [...] >>> That said: I never use non-ascii non-spacy names ... it's the most >>> portable. >> >> This was my first file with an exception to that rule. > ah, i see, i need to enable something (i never came to doing that > because it's a new feature of the pdf lib) > > it needs testign but i can't send you a test file because your mail host > doesn't accept our mails (bounce) and i'm not going to waste time > figuring that out Sorry, Hans, I don’t know why GMX rejects messages from xs4all.nl (without reading the bounce message). I wonder whether the test file might be sent to the list in this case. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unicode chars and \insertpages (Win7)
On 5/29/20 9:45 AM, Hans Hagen wrote: > On 5/28/2020 9:49 PM, Pablo Rodriguez wrote: >>[...] >> \insertpages[ξ_file.pdf] >> >> Using latest on Linux, it works perfectly fine. On Windows (I’m still on >> Win7), it doesn’t work unless I replace "ξ" with an ASCII character. >> >> Could this be fixed or is it really a limiatation of Windows? > It depends on the version and engine. [...] > In luametatex things are different. There all windows specific > operations have wide-character support, that is, the utf8 goes via utf16 > and codepages and such: filenames, environment variables, command line > arguments, whatever. Hans, sorry for the late reply. I reported this because I use LuaMetaTeX and I thought Unicode was fully available for Windows. > That said: I never use non-ascii non-spacy names ... it's the most > portable. This was my first file with an exception to that rule. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] annotations in \insertpages
Dear list, I have the following sample: \setupinteraction[state=start] \starttext \attachment[file=https://kbdeveloper.qoppa.com/wp-content/uploads/blank_signed.pdf] \insertpages[https://kbdeveloper.qoppa.com/wp-content/uploads/blank_signed.pdf][interaction=all] \stoptext Is there any way to get the annotation image in the inserted page? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Unicode chars and \insertpages (Win7)
Dear list, I have the following sample: \startext \insertpages[ξ_file.pdf] \stoptext Using latest on Linux, it works perfectly fine. On Windows (I’m still on Win7), it doesn’t work unless I replace "ξ" with an ASCII character. Could this be fixed or is it really a limiatation of Windows? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \doifinset
On 5/28/20 12:23 AM, Hans Hagen wrote: > On 5/27/2020 10:39 PM, Wolfgang Schuster wrote: >> Pablo Rodriguez schrieb am 27.05.2020 um 22:31: >>> [...] >>> I think this may be a bug, since the sample above would only get "yes" >>> with { i7}. >> >> No spaces are allowed in these lists. Older versions of the command >> removed the spaces before the entries but the current version is stricter. > > we can use the old one, so only the raw variants then ignore the space; > best to be downward compatible, even if this was never the formal spec > (more a side effect) Just in case it might be relevant. I have been using \doifinsetelse for two months now. Backwards compatibility is not an issue for me (after Luigi provided a better approach to the issue) Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \doifinset
On 5/27/20 11:58 PM, luigi scarso wrote: >> On Wed, May 27, 2020 at 11:28 PM Pablo Rodriguez wrote: >> Without commas, lists are harder both to read and to write (at least, to me). > > what about > > \starttext > \startTEXpage[offset=1em] > \doifinsetelse{i7}{% > i4,% > i5,% > i7,% > } > {yes}{no} > \stopTEXpage > \stoptext > > here seems to work. Many thanks for your reply, Luigi. This is a better approach for me. Many thanks for help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \doifinset
On 5/27/20 10:39 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 27.05.2020 um 22:31: >> [...] >> I think this may be a bug, since the sample above would only get "yes" >> with { i7}. > No spaces are allowed in these lists. Older versions of the command > removed the spaces before the entries but the current version is stricter. Many thanks for your reply, Wolfgang. Without commas, lists are harder both to read and to write (at least, to me). Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] bug in \doifinset
Hi Hans, the following sample: \starttext \startTEXpage[offset=1em] \doifinsetelse{i7}{i4, i5, i7} {yes}{no} \stopTEXpage \stoptext outputs "yes" with latest from 2020.05.18 16:50, but "no" with latest from 2020.05.25 23:39. I think this may be a bug, since the sample above would only get "yes" with { i7}. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with environment and Lua
On 5/26/20 9:01 PM, Hans Hagen wrote: > On 5/26/2020 8:24 PM, Pablo Rodriguez wrote: > >> I have added an \xmlflushcontext to a non-minimal environment file and >> it crashes again and again. > > then you probably use the wrong command Many thanks for your reply, Hans. I have just discovered that I get different HTML math output in pandoc. From these inputs in the same source file: 1 $I = V × D$ 2 $\top{v_e} \approx \top{v}_t$ I get these HTML outputs: 1 I = D × V 2 $\bar{v}_e \approx \bar{v}_t $ The first one is problematic to get with \xmlflushcontext. This was the problem and I have to check this with the pandoc people. Sorry for the noise and many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with environment and Lua
Dear list, I have added an \xmlflushcontext to a non-minimal environment file and it crashes again and again. I get the following errors: lua error > lua error on line 8 in file cont-yes.mkiv: function call [560]: ...ext/tex/texmf-context/tex/context/base/mkiv/lxml-tex.lua:918: bad argument #2 to 'lpegmatch' (string expected, got table) mtx-context | fatal error: return code: 256 Is there any way to be able to know which XML code outputs a table instead of the string ConTeXt expects and complaints about? I already spent three hours and I got nothing. In cases like that, it would be useful that ConTeXt could translate XML + environments to ConTeXt sources. This would make easier to spot errors on documents or issues in ConTeXt. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change of Optima to Optima Nova: how to get Optima Nova working?
On 5/24/20 1:50 PM, Gerben Wierda wrote: [...] I’ve decided to buy the Optima Nova font. But now that I use it, I run into the problem that suddenly my fallback for Cyrillic has stopped working. Hi Gerben, the only reason may be that fallback families only work if the main family works too (I have just discovered that). BTW, the issue with Optima Nova is that the font family seems to be rather tricky. It seems to be "Optima nova Pro". >>> \definefontfamily >>> [archimate] >>> [ss] >>> [Optima Nova] >>> [ tf=file:/Library/Fonts/OptimaNovaLTPro-Medium.otf, >>> it=file:OptimaNovaLTPro-MediumIta.otf, >>> bf=file:OptimaNovaLTPro-Bold.otf, >>> bi=file:OptimaNovaLTPro-BoldIta.otf, >>> ] > [...] > The first problem was solved, I had to rebuild the font database: > > mtxrun --script fonts --reload After rebuilding the font database (required to use new fonts added to the system), you don’t need to specify files, as long as you invoke the right family name, such as in: \definefontfamily [archimate] [ss] [Optima nova Pro]% or whatever the family name is > And latin text works. Fallback for cyrillic doesn’t yet. Which is the output from "mtxrun --script fonts --list --all --pattern=Helvetica"? Could you try the following sample and report back? \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, force=yes] \definefontfamily [archimate] [ss] [Optima nova Pro] \setupbodyfont[archimate] \starttext The quick brown... Ядро метамодели. \stoptext If not you don’t get Cyrillic with Helvetica, please add the relevant line from the log. I hope it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to define a font with an effect as a font with \definefont
On 5/23/20 9:50 PM, Gerben Wierda wrote: > [...] >>> \definefontfeature >>> [effect-widen] >>> [effect={width=.2,delta=0.3}] >>> >>> \definefallbackfamily >>> [archimate] >>> [ss] >>> [Helvetica] >>> [preset=range:cyrillic, >>> tf=style:light, >>> it=style:lightoblique, >>> bf=style:regular, >>> bi=style:oblique, >>> force=yes, >>> features={default,effect-widen}] >>> >>> \definefontfamily >>> [archimate] >>> [ss] >>> [Optima] >>> [features={default,effect-widen}] > > Does this apply the effect only to Latin characters in Optima and not to > Cyrcillic characters in Helvetica? I am trying to understand the syntax > and if I read this it seems to get applied to cyrillic in this case. Sorry, Gerben, it was only an example to show that you could apply the feature to any font or fallback family. If you remove "features={default, effect-widen}" from "\definefallbackfamily", the effect won’t be applied to Helvetica. I hope it is clear now, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to define a font with an effect as a font with \definefont
On 5/23/20 8:06 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 23.05.2020 um 20:02: >> On 5/23/20 11:52 AM, Gerben Wierda wrote: >>> [] >>> Actually, my setup is Optima with Helvetica used for Cyrillic: >>> >>> \definefallbackfamily >>> [archimate] >>> [ss] >>> [Helvetica] >>> [preset=range:cyrillic, >>> tf=style:light, >>> it=style:lightoblique, >>> bf=style:regular, >>> bi=style:oblique, >>> force=yes, >>> rscale=1.0] >>> \definefontfamily [archimate] [ss] [Optima] >>> \setupbodyfont[archimate] >>> >>> And I would like the effect to work on just the Optima font (which is a >>> bit light for this use) >> >> Hi Gerben, >> >> this code may work for you: > > Don't forget to apply the "default" features to get ligatures and kerning. Many thanks for the correction, Wolfgang. I forgot to add the default features after correcting another typo in the code. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to define a font with an effect as a font with \definefont
On 5/23/20 11:52 AM, Gerben Wierda wrote: > [] > Actually, my setup is Optima with Helvetica used for Cyrillic: > > \definefallbackfamily > [archimate] > [ss] > [Helvetica] > [preset=range:cyrillic, > tf=style:light, > it=style:lightoblique, > bf=style:regular, > bi=style:oblique, > force=yes, > rscale=1.0] > \definefontfamily [archimate] [ss] [Optima] > \setupbodyfont[archimate] > > And I would like the effect to work on just the Optima font (which is a > bit light for this use) Hi Gerben, this code may work for you: \definefontfeature [effect-widen] [effect={width=.2,delta=0.3}] \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular, bi=style:oblique, force=yes, features={effect-widen}] \definefontfamily [archimate] [ss] [Optima] [features={effect-widen}] \setupbodyfont[archimate] \starttext \doloopoverlist{\tf, \it, \bf, \bi}{ \recursestring\hyphenatedword{Николаевич typography}\par} \stoptext BTW, rscale is set to 1.0 by default (as far as I can tell). Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV
On 5/20/20 11:25 PM, Hans Hagen wrote: > On 5/20/2020 10:26 PM, Jairo A. del Rio wrote: >> I did. It turns out that installing graphicsmagick does the trick (pun >> intended) for Noto Color Emoji. However, the issue persists for SVG >> fonts and the same message appears, despite of having cleaned the cache >> (I've used mtxrun --script cache --erase). Using the code Pablo sent, >> with EmojiOne Color instead of Twemoji Mozilla, I get the following >> error messages: > > So, what version do you use? This happens also to me witht the font from https://github.com/eosrei/emojione-color-font/releases/latest. Using latest in both Windows and Linux 64bit (2020.05.18 16:50). Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV
On 5/20/20 9:39 PM, Hans Hagen wrote: >> [...] >> LMTX (2020.05.18 16:50) displays only black and white icons. >> >> I think this might be a bug in LMTX. >> >> Could you confirm the issue? > what if you wipe the cache Many thanks for your reply, Hans. icons are black and white, no color after wiping the cache. Made no difference with a brand-new install either. Just accidentally, I discovered this is an issue in Evince. LMTX should handle color in LMTX with other PDF code than in MkIV. MuPDF displays colorful. So do acroread for Linux, xpdf, SumatraPDF and even Okular. Sorry for the noise, since Evince seems to be the culprit. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV
On 5/20/20 12:26 PM, Jairo A. del Rio wrote: > [...] > Only Twemoji Mozilla and Segoe UI Emoji worked for me, so, what am I > doing wrong? Hi Jairo, using latest ConTeXt with the following sample, I get these results: \definefontfamily[emoj][rm][Twemoji Mozilla][features={color}] \setupbodyfont[emoj] \starttext 臘 \stoptext MkIV (2020.01.30 14:13) displays colored icons. LMTX (2020.05.18 16:50) displays only black and white icons. I think this might be a bug in LMTX. Could you confirm the issue? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LMTX not working in Windows 10
On 5/19/20 5:55 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 19.05.2020 um 16:42: >> [...] >> I’m getting exactly the same error on Windows (x64). >> >> Where could we get the latest binary? > > You can download the binary from the following link but only the 32bit > version for Windows is up-to-date. > > http://dl.contextgarden.net/build/luametatex/ Wolfgang, many thanks for the information. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___