[NTG-context] placefigure RTL
Hello, Is there a way to make \placefigure[left,right] work in RTL documents? Here's a MWE: \starttext \setupalign[r2l] \placefigure[none,right]{}{\externalfigure[cow]} \input knuth \placefigure[none,left]{}{\externalfigure[cow]} \input knuth \page \setupalign[l2r] \placefigure[none,right]{}{\externalfigure[cow]} \input knuth \placefigure[none,left]{}{\externalfigure[cow]} \input knuth \stoptext Thanks a lot, --MHB ___ 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] arbitrary context commands in xml file
On 3/5/2021 10:27 PM, denis.ma...@ub.unibe.ch wrote: Just to provide more information about what I was thinking: You do your typesetting based on an XML doc. Now it is time for the finishing touches. In a tex document you'd add the usual commands to manipulate the layout: \adaptlayout[lines=+1] \testpage[3] \looseness=-1 / \looseness=+1 \blank \setuptolerance etc. Now, of course you can define an injector for these commands, some are predefined, like page, column, blank. But, if my understanding is correct, you'd have to define one for each of the possible parameters. So, you'll need: \startsetups xml:directive:injector:testpagethree \testpage[3] \stopsetups \startsetups xml:directive:injector:testpagefour \testpage[4] \stopsetups etc., and \startsetups xml:directive:injector:addoneline \adaptlayout[lines=+1] \stopsetups \startsetups xml:directive:injector:addtwolines \adaptlayout[lines=+1] \stopsetups Here, I was thinking if something like this could be easier: you can also do this: \startxmlsetups xml:testpage \testpage[\xmlatt{#1}{n}] \stopxmlsetup and register that one (as in previous examples) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Log overful boxes
On 3/5/2021 10:35 PM, denis.ma...@ub.unibe.ch wrote: Thanks Hans. So, it's already available? how about just trying it ... - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Write to tuc file
On 3/5/2021 10:38 PM, denis.ma...@ub.unibe.ch wrote: Thanks for this as well, Hans. Looks promising. So, this is to select pages or page-ranges for processing? assuming that you have either marked pages or proper refs for chapters you can use the reported values and feed them into whatever i could add something to the select style but i guess then there is no uniformity in how users do this Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Write to tuc file
Thanks for this as well, Hans. Looks promising. So, this is to select pages or page-ranges for processing? > -Ursprüngliche Nachricht- > Von: Hans Hagen > Gesendet: Freitag, 5. März 2021 11:29 > An: Maier, Denis Christian (UB) ; ntg- > cont...@ntg.nl > Betreff: Re: AW: [NTG-context] Write to tuc file > > On 2/27/2021 6:28 PM, denis.ma...@ub.unibe.ch wrote: > > It's a book that will be published in two volumes, continually paginated. > > In the end I need two pdf files, but I thought it might be easier to treat > them as one volume and just split the files with some external tool > afterwards. > > > > I could also treat them as two individual books, but then I'd have to get > > the > last page number of volume 1 in volume 2. > In the early days of context (more than 2 decades ago) we had a printer > where we could inject from different trays and that is why we have a feature > in context to mark pages (so that directives for printers could be inserted). > This feature survived / evolved into marked pages. > > You can do this (oeps.tex): > > \starttext > > \chapter[one]{One} > > \markpage[first] test \page test \page > \markpage[second] test \page > > \chapter[two]{Two} > > test \page > \markpage[fourth] test > > \page > > % \doifelsemarkedpage{second}{YES}{NO} > % \doifelsemarkedpage{fourth}{YES}{NO} > > % \page > > % \doifelsemarkedpage{second}{YES}{NO} > % \doifelsemarkedpage{fourth}{YES}{NO} > > \stoptext > > So, I was wondering if we can expose that differently. > > >context --pages oeps > mtx-context | page : 0001 first > mtx-context | page : 0003 second > mtx-context | page : 0005 fourth > > >context --pages --page=second oeps > mtx-context | page : 0003 second > > >context --pages --page=second,fourth oeps > mtx-context | page : 0003 second > mtx-context | page : 0005 fourth > > But, as you're talking chapters, a variants (with less overhead) is: > > >context --pages --list=one,two oeps > mtx-context | list : 0001 one > mtx-context | list : 0004 two > > Which of course assumes that you have a reference for the chapters. > > This --pages feature is in the latest upload. > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Log overful boxes
Thanks Hans. So, it's already available? I'll add this to the list of things I'll have to add to the wiki. (And I finally need to switch to LMTX...) > -Ursprüngliche Nachricht- > Von: Hans Hagen > Gesendet: Donnerstag, 4. März 2021 15:12 > An: Maier, Denis Christian (UB) ; ntg- > cont...@ntg.nl > Betreff: Re: AW: [NTG-context] Log overful boxes > > On 3/4/2021 12:32 PM, denis.ma...@ub.unibe.ch wrote: > > Thanks, that's helpful. Is there a way to collect these pieces of > > information > and print them at the end together with rest of the processing information. > I'm thinking of something like: > > > > mkiv lua stats > 2 overful boxes, 3 underful boxes > > > > or: > > > > warning > 2 overful boxes, 3 underful boxes > > > > What do you think? > only when you document it on the wiki > > pack quality> > pack quality> 4 entries added to the log file : overfull=1 | underfull=3 > pack quality> > > in the log: > > pack quality> start > > pack quality> oeps.tex [ - 0010] : overfull hbox : m > pack quality> oeps.tex [ - 0011] : underfull hbox : m > pack quality> oeps.tex [ - 0012] : underfull hbox : mm > pack quality> oeps.tex [ - 0013] : underfull hbox : mmm > > pack quality> stop > > using the already available mechanism: > > \enabletrackers[builders.hpack.quality] > \enabletrackers[builders.hpack.overflow] > > \starttext > \hbox to 0em {m} > \hbox to 1em {m} > \hbox to 2em {mm} > \hbox to 3em {mmm} > \hbox to 3em {m m m} > \stoptext > > (so not much code needed; lmtx only) > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] arbitrary context commands in xml file
Just to provide more information about what I was thinking: You do your typesetting based on an XML doc. Now it is time for the finishing touches. In a tex document you'd add the usual commands to manipulate the layout: \adaptlayout[lines=+1] \testpage[3] \looseness=-1 / \looseness=+1 \blank \setuptolerance etc. Now, of course you can define an injector for these commands, some are predefined, like page, column, blank. But, if my understanding is correct, you'd have to define one for each of the possible parameters. So, you'll need: \startsetups xml:directive:injector:testpagethree \testpage[3] \stopsetups \startsetups xml:directive:injector:testpagefour \testpage[4] \stopsetups etc., and \startsetups xml:directive:injector:addoneline \adaptlayout[lines=+1] \stopsetups \startsetups xml:directive:injector:addtwolines \adaptlayout[lines=+1] \stopsetups Here, I was thinking if something like this could be easier: Wolfgang's solutions seems to provide that with different means. If I understand correctly, you'd just map an arbitrary XML element to this setup, and you can then do this: \testpage[4] Correct? If yes, that would be a nice solution, but those elements are probably not allowed if your document needs to be validated against a schema, yet processor instructions will be ignored during validation. Any ideas for alternative approaches? What do you think about a raw-tex injector? (Another possibility would be to use Wolfgang's suggestion, and then to use an XSLT stylesheet to remove those illegal nodes for validation purposes...) Best, Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von > denis.ma...@ub.unibe.ch > Gesendet: Freitag, 5. März 2021 16:26 > An: wolfgang.schuster.li...@gmail.com; ntg-context@ntg.nl > Betreff: Re: [NTG-context] arbitrary context commands in xml file > > Thanks. But won't that break the xml? I'll need a new element for this right? > But what if the schema doesn't allow this? > > > Von: Wolfgang Schuster > Gesendet: Freitag, 5. März 2021 16:01:25 > An: mailing list for ConTeXt users > Cc: Maier, Denis Christian (UB) > Betreff: Re: [NTG-context] arbitrary context commands in xml file > > denis.ma...@ub.unibe.ch schrieb am 05.03.2021 um 15:53: > > I mean without breaking the xml of course. Something like an ad hoc > injector... > > \startxmlsetups ... > \xmlflushcontext{#1} > \stopxmlsetups > > Wolfgang > > __ > _ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg- > context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : > https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > __ > _ ___ 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] TEXpage does not fit \placetable & \recurselevel always zero
Dear list, thank you very much for the help so far. I have two problems understanding the output of the code below. I am using version 2021.02.23 17:47. (1) The TEXpage is cut off after ~40 lines. Normally, the page is extended to fit its content. It's probably related to \placetable which I only use here because I need a centered table. I can set the height of the page manually, but the whole purpose of using TEXpage was to avoid that. (2) \recurselevel is always zero in the output. Normally, it counts the iterations. This issue is not relevant for my actual use-case, but I found that when writing the MWE. Best wishes, Jacob Kauffmann \setupTEXpage[width=10cm] \startTEXpage \placetable[force,none]{}{% \starttabulate[|c|c|] \NC A \NC B \NC\NR \HL \dorecurse{50}{\NC \expanded{\recurselevel} \NC \recurselevel \NC\NR} \stoptabulate } \stopTEXpage \stoptext ___ 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] tex live code freeze
Hi, The 2021 texlive code is currently being frozen. This means that Mojca will check-in the current context release right before tl gets deep frozen. The MKII code (mkii and mpii files) hasn't changed so it should still work well with pdftex and xetex although I admit that I haven't checked to what extend updates to those engines have side effects for context, but I assume none. Let me know if there are problems. The MKIV code (mkiv, mkvi, mpiv, lua files) has changed but not much, mostly as a side effect of the code split and move to LMTX where the focus is on now. There have been recent changes in the metafun code, but new functionality is LMTX only, simply because we use an extended library (more features). Of course there have been some bug fixes to MKIV and if you think more (bugs) should be fixed let us know. The yearly texlive release is also the 'official' yearly current release but of course after that there will be updates when needed. In these updates we don't distinguish between betas and currents: we dropped that some time ago because it was only confusing. Last/this year much of LMTX (mkxl, mpxl, lmt files) already got split and I expect that this year all the lua and mp files also will be independent so that at some point we have a more or less frozen MKIV that uses luatex (which doesn't change fundamentally apart from fixes so we don't need to adapt code to it i.e. MKIV should keep working just like MKII does with pdftex; updates to for instance fonts and languages will be applied). I get the impression that most users already moved to LMTX which helped getting it in the state it is now (thanks for all the testing). Although MKII/MKIV serves a reference for functionality, new stuff got and gets added to LMTX. I could backport some but it probably makes no sense (some is probably easy). There is of course untested code like the overload protection mechasnisms but I have that enabled on my machine (users can do that too) so I can notice side effects. The new engine (luametatex) doesn't change much. Recent changes are mostly cosmetic and I don't expect many more fundamental additions, but who knows ... (not all in there is yet used extensively) and maybe context users have interesting demands that trigger extra stuff (read: challenges me). So apart from new trickery at the tex macro end, we also reach a more stable state in LMTX. Soon I'll pick up some todo's. Some users want parallel stuff (keeps coming up), I also want to see how we can do more metafun - let me know what is missing as I'm currently in metafun mode - and go over some older lua code that started as experiment but hasn't been checked recently. I also want to cleanup the export code a bit but it's kind of boring to do and maybe we should ditch some pdf backend functionilty that adobe dropped from its viewers. And there are always manuals to complete / update ... Anyway, the current LMTX release is also a kind of yearly snapshot. So, if there is some last minute stuff that needs to be done to context MKII and MKIV before the tl code freeze, let us know. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] error with recent standalone (luametatex)
On 3/5/2021 4:35 PM, Alan Bowen wrote: Files that ran well with ver ConTeXt ver: 2021.02.20 16:50 LMTX and earlier now fail with the following message: tex error > tex error on line 74 in file c_Review-0201-01_Bojowald.tex: lua error: run callback [36]: [string "/Applications/LuaMetaTeX/tex/texmf-context/te..."]:1343: attempt to concatenate a boolean value (local 'v') I did a new upload that fixes is (had to do with 'nicer looking' logging). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] error with recent standalone (luametatex)
On 3/5/2021 4:35 PM, Alan Bowen wrote: Files that ran well with ver ConTeXt ver: 2021.02.20 16:50 LMTX and earlier now fail with the following message: tex error > tex error on line 74 in file c_Review-0201-01_Bojowald.tex: lua error: run callback [36]: [string "/Applications/LuaMetaTeX/tex/texmf-context/te..."]:1343: attempt to concatenate a boolean value (local 'v') can you run on a shorter path so that we can see where? - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] error with recent standalone (luametatex)
Files that ran well with ver ConTeXt ver: 2021.02.20 16:50 LMTX and earlier now fail with the following message: tex error > tex error on line 74 in file c_Review-0201-01_Bojowald.tex: lua error: run callback [36]: [string "/Applications/LuaMetaTeX/tex/texmf-context/te..."]:1343: attempt to concatenate a boolean value (local 'v') stack traceback: [string "/Applications/LuaMetaTeX/tex/texmf-context/te..."]:1343: in local 'w' [string "/Applications/LuaMetaTeX/tex/texmf-context/te..."]:1358: in function <[string "/Applications/LuaMetaTeX/tex/texmf-context/te..."]:1353> 64 \startparagraph 65 Some facts are compiled in the synthesis. The representations and inscriptions in the stairwells and kiosk show parallels to other cult buildings [702]. In several cases there are allusions to the ritual Opening of the Mouth [702]. 66 \stopparagraph 67 68 \startparagraph 69 In the synopsis, selected texts are compared [711–725]. The parallels are clearly arranged. 70 \stopparagraph 71 72 \startparagraph 73 The book contains bibliography [737–765], indices [767–809], tables [1a–41b], and color tables [1–7]. 74 >> \stopparagraph Is this a bug or has something changed that I am uns=aware of yet? Alan ___ 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] arbitrary context commands in xml file
Thanks. But won't that break the xml? I'll need a new element for this right? But what if the schema doesn't allow this? Von: Wolfgang Schuster Gesendet: Freitag, 5. März 2021 16:01:25 An: mailing list for ConTeXt users Cc: Maier, Denis Christian (UB) Betreff: Re: [NTG-context] arbitrary context commands in xml file denis.ma...@ub.unibe.ch schrieb am 05.03.2021 um 15:53: > I mean without breaking the xml of course. Something like an ad hoc > injector... \startxmlsetups ... \xmlflushcontext{#1} \stopxmlsetups Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] TEXpage does not fit \placetable & \recurselevel always zero
On 3/5/2021 3:44 PM, Jacob Kauffmann wrote: Dear list, thank you very much for the help so far. I have two problems understanding the output of the code below. I am using version 2021.02.23 17:47. (1) The TEXpage is cut off after ~40 lines. Normally, the page is extended to fit its content. It's probably related to \placetable which I only use here because I need a centered table. I can set the height of the page manually, but the whole purpose of using TEXpage was to avoid that. (2) \recurselevel is always zero in the output. Normally, it counts the iterations. This issue is not relevant for my actual use-case, but I found that when writing the MWE. Best wishes, Jacob Kauffmann \setupTEXpage[width=10cm] \startTEXpage \placetable[force,none]{}{% \starttabulate[|c|c|] \NC A \NC B \NC\NR \HL \dorecurse{50}{\NC \expanded{\recurselevel} \NC \recurselevel \NC\NR} \stoptabulate } \stopTEXpage \stoptext \startTEXpage[strut=no,offset=10pt] \starttabulate[|c|c|c|c|c|] \NC A \NC B \NC C \NC D \NC E \NC \NR \HL \dorecurse{50}{\NC ##1\NC ##1\NC ##1\NC ##1\NC ##1\NC\NR} \stoptabulate \stopTEXpage works ok here upto \starttext \startTEXpage[strut=no,offset=10pt] \starttabulate[|c|c|c|c|c|] \NC A \NC B \NC C \NC D \NC E \NC \NR \HL \dorecurse{1128}{\NC ##1\NC ##1\NC ##1\NC ##1\NC ##1\NC\NR} \stoptabulate \stopTEXpage \stoptext but you need a special printer for that anyway (don't use a place command inside a TEXpage) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] arbitrary context commands in xml file
denis.ma...@ub.unibe.ch schrieb am 05.03.2021 um 15:53: I mean without breaking the xml of course. Something like an ad hoc injector... \startxmlsetups ... \xmlflushcontext{#1} \stopxmlsetups Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] arbitrary context commands in xml file
I mean without breaking the xml of course. Something like an ad hoc injector... Von: ntg-context im Auftrag von denis.ma...@ub.unibe.ch Gesendet: Freitag, 5. März 2021 15:39:53 An: ntg-context@ntg.nl Betreff: [NTG-context] arbitrary context commands in xml file Hi Is there a way to add arbitrary context commands to an xml file without defining an injector first? Best Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] arbitrary context commands in xml file
Hi Is there a way to add arbitrary context commands to an xml file without defining an injector first? Best Denis ___ 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] reference chapters from another doc in this doc's toc
Hi, is it possible to include structure elements from other documents in a toc? E.g. when your having a multivolume book where each book is an individual book, but you want to have a TOC that covers all volumes? Best, Denis ___ 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] conditional formatting, checking the context (SOLVED)
Hi, in the example below I’m using a custom highlighting macro in titles. Now I don’t want this highlighting in the ToC or in bookmarks (in my real world example the changes affect bookmarks, not in the MWE). I know I can use the list= and bookmark= keys of \startchapter, but since the text is always the same for all, I’d like to check within the \SPECIAL macro if we’re within the chapter title or within a list or bookmarks. In preparing the MWE and this message I found a solution with the *chapter system mode. Wanted to share anyway ;) Hraban \define[1]\SPECIAL{\doifmodeelse{*chapter}{{\bf #1}}{#1}} \setupinteraction[state=start] \placebookmarks[chapter,title] \starttext \startchapter[title={This \SPECIAL{and} That}] \input knuth \stopchapter \startchapter[title={Something \SPECIAL{Other}}] \input tufte \stopchapter \completecontent[criterium=all] \stoptext ___ 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] Write to tuc file
On 2/27/2021 6:28 PM, denis.ma...@ub.unibe.ch wrote: It's a book that will be published in two volumes, continually paginated. In the end I need two pdf files, but I thought it might be easier to treat them as one volume and just split the files with some external tool afterwards. I could also treat them as two individual books, but then I'd have to get the last page number of volume 1 in volume 2. In the early days of context (more than 2 decades ago) we had a printer where we could inject from different trays and that is why we have a feature in context to mark pages (so that directives for printers could be inserted). This feature survived / evolved into marked pages. You can do this (oeps.tex): \starttext \chapter[one]{One} \markpage[first] test \page test \page \markpage[second] test \page \chapter[two]{Two} test \page \markpage[fourth] test \page % \doifelsemarkedpage{second}{YES}{NO} % \doifelsemarkedpage{fourth}{YES}{NO} % \page % \doifelsemarkedpage{second}{YES}{NO} % \doifelsemarkedpage{fourth}{YES}{NO} \stoptext So, I was wondering if we can expose that differently. >context --pages oeps mtx-context | page : 0001 first mtx-context | page : 0003 second mtx-context | page : 0005 fourth >context --pages --page=second oeps mtx-context | page : 0003 second >context --pages --page=second,fourth oeps mtx-context | page : 0003 second mtx-context | page : 0005 fourth But, as you're talking chapters, a variants (with less overhead) is: >context --pages --list=one,two oeps mtx-context | list : 0001 one mtx-context | list : 0004 two Which of course assumes that you have a reference for the chapters. This --pages feature is in the latest upload. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___