[NTG-context] Re: The graph is not visible.
Hi, Here is the code that interferes with the graph from the last chapter but why ? \startMPcode pickup pencircle xscaled 1; defaultfont := "texgyrepagella-regular*default" ; defaultscale := 0.8 ; path circle, p, q, b; circle = fullcircle xscaled 5cm yscaled 3.5cm; p = (point 2 of circle .. (-0.15cm,1.5cm) ..(0,0)..(0.15cm,-1.5cm).. point 6 of circle); q = (subpath(0,2) of circle -- p -- subpath(6,8) of circle --cycle); b = (reverse p -- subpath(2,6) of circle -- cycle); definecolor [ name = "mp:red", r = 1 ]; definecolor [ name = "mp:blue", r = 0.54, g = 0.17, b = 0.89 ]; fill q withcolor "mp:red" withtransparency(1,0.4) ; fill b withcolor "mp:blue" withtransparency(1,0.4) ; draw circle; draw p; label("$\overline{\text{A}}$",( 1.5cm,0)); label("$\text{A}$",(-1.5cm,0)); label.top("E",(0,1.85cm)); \stopMPcode Le jeu. 25 avr. 2024 à 16:55, Fabrice Couvreur a écrit : > Hi Hans and Taco, > @Hans, I compiled by commenting and uncommenting one component at a time; > it is component 5 which interferes with the metapost code of component 14 > All I have to do now is find out what the cause is. > Fabrice > > Le jeu. 25 avr. 2024 à 16:40, Taco Hoekwater a écrit : > >> >> >> > On 25 Apr 2024, at 16:08, Fabrice Couvreur >> wrote: >> > >> > Hi Taco, >> > I knew I wouldn't be able to explain what was happening. >> > The code works perfectly and the figure is clearly visible in the >> component chapter-14 : >> >> It is probably not related to the figure itself. Something may be >> different in this component compared to the other ones. I cannot really >> say, of course. Still, using external image instead of inline metapost may >> be fix it. Not elegant, but if it works it works! >> >> Good luck, >> Taco >> >> >> > >> > \startcomponent[chapter-14] >> > \startMPpage >> > ... >> > \stopMPpage >> > \stopcomponent >> > >> > But if I compile my project, it disappears !! >> > >> > \startproduct[terminale-manual] >> > \startbodymatter >> > \component[chapter-1] >> > \component[chapter-2] >> > \component[chapter-3] >> > \component[chapter-4] >> > \component[chapter-5] >> > \component[chapter-6] >> > \component[chapter-7] >> > \component[chapter-8] >> > \component[chapter-9] >> > \component[chapter-10] >> > \component[chapter-11] >> > \component[chapter-12] >> > \component[chapter-13] >> > \component[chapter-14] >> > \stopbodymatter >> > \stopproduct >> >> — >> Taco Hoekwater E: t...@bittext.nl >> genderfluid (all pronouns) >> >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >> (mirror) >> archive : https://github.com/contextgarden/context >> wiki : https://wiki.contextgarden.net >> >> ___ >> > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
Hi Hans and Taco, @Hans, I compiled by commenting and uncommenting one component at a time; it is component 5 which interferes with the metapost code of component 14 All I have to do now is find out what the cause is. Fabrice Le jeu. 25 avr. 2024 à 16:40, Taco Hoekwater a écrit : > > > > On 25 Apr 2024, at 16:08, Fabrice Couvreur > wrote: > > > > Hi Taco, > > I knew I wouldn't be able to explain what was happening. > > The code works perfectly and the figure is clearly visible in the > component chapter-14 : > > It is probably not related to the figure itself. Something may be > different in this component compared to the other ones. I cannot really > say, of course. Still, using external image instead of inline metapost may > be fix it. Not elegant, but if it works it works! > > Good luck, > Taco > > > > > > \startcomponent[chapter-14] > > \startMPpage > > ... > > \stopMPpage > > \stopcomponent > > > > But if I compile my project, it disappears !! > > > > \startproduct[terminale-manual] > > \startbodymatter > > \component[chapter-1] > > \component[chapter-2] > > \component[chapter-3] > > \component[chapter-4] > > \component[chapter-5] > > \component[chapter-6] > > \component[chapter-7] > > \component[chapter-8] > > \component[chapter-9] > > \component[chapter-10] > > \component[chapter-11] > > \component[chapter-12] > > \component[chapter-13] > > \component[chapter-14] > > \stopbodymatter > > \stopproduct > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
> On 25 Apr 2024, at 16:08, Fabrice Couvreur > wrote: > > Hi Taco, > I knew I wouldn't be able to explain what was happening. > The code works perfectly and the figure is clearly visible in the component > chapter-14 : It is probably not related to the figure itself. Something may be different in this component compared to the other ones. I cannot really say, of course. Still, using external image instead of inline metapost may be fix it. Not elegant, but if it works it works! Good luck, Taco > > \startcomponent[chapter-14] > \startMPpage > ... > \stopMPpage > \stopcomponent > > But if I compile my project, it disappears !! > > \startproduct[terminale-manual] > \startbodymatter > \component[chapter-1] > \component[chapter-2] > \component[chapter-3] > \component[chapter-4] > \component[chapter-5] > \component[chapter-6] > \component[chapter-7] > \component[chapter-8] > \component[chapter-9] > \component[chapter-10] > \component[chapter-11] > \component[chapter-12] > \component[chapter-13] > \component[chapter-14] > \stopbodymatter > \stopproduct — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
On 4/25/2024 4:08 PM, Fabrice Couvreur wrote: Hi Taco, I knew I wouldn't be able to explain what was happening. The code works perfectly and the figure is clearly visible in the component chapter-14 : \startcomponent[chapter-14] \startMPpage ... \stopMPpage \stopcomponent But if I compile my project, it disappears !! \startproduct[terminale-manual] \startbodymatter \component[chapter-1] \component[chapter-2] \component[chapter-3] \component[chapter-4] \component[chapter-5] \component[chapter-6] \component[chapter-7] \component[chapter-8] \component[chapter-9] \component[chapter-10] \component[chapter-11] \component[chapter-12] \component[chapter-13] \component[chapter-14] \stopbodymatter \stopproduct -- compile with specific preceding chapters commented -- when the interfering one is found, make a copy and strip till the problem is gone it might be that you redefine something metapost Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
Hi Taco, I knew I wouldn't be able to explain what was happening. The code works perfectly and the figure is clearly visible in the component chapter-14 : \startcomponent[chapter-14] \startMPpage ... \stopMPpage \stopcomponent But if I compile my project, it disappears !! \startproduct[terminale-manual] \startbodymatter \component[chapter-1] \component[chapter-2] \component[chapter-3] \component[chapter-4] \component[chapter-5] \component[chapter-6] \component[chapter-7] \component[chapter-8] \component[chapter-9] \component[chapter-10] \component[chapter-11] \component[chapter-12] \component[chapter-13] \component[chapter-14] \stopbodymatter \stopproduct Le jeu. 25 avr. 2024 à 13:36, Taco Hoekwater a écrit : > H Fabrice, > > You did not provide a good minimum test because the graph by itself > renders fine: > > > > Best wishes, > Taco > (if all else fails, you can replace \startMPcode with \startMPpage and > generate a standalone graph that way) > > > On 25 Apr 2024, at 12:27, Fabrice Couvreur > wrote: > > > > Hi, > > I don't know if I can explain the problem I'm having. I made a project > with 14 chapters. In each of them, there are graphics embedding metapost > code. I proceed as follows : I compile each chapter alone with lmtx then I > compile the project containing the 14 chapters. I didn't encounter any > problems except with a graphic from the last chapter. It is indeed in > chapter 14 but not in the project ! I give the code for this graph. > > Thanks. > > Fabrice > > > > \startMPcode > > > >interim linejoin := mitered; > >interim ahangle := 30; > >numeric u, pi; > > > >pi = 3.141592653589793; > >u = 1.5cm; > > > >vardef graph_of_function (suffix f) (expr xmin, xmax, > xsep) = > > for x = xmin step xsep until xmax: (x, f(x)) .. endfor > (xmax, f(xmax)) > >enddef ; > > > >vardef vline (suffix f, g) (expr x) = (x, min(f(x), > g(x))) -- (x, max(f(x),g(x))) enddef; > > > >vardef area_between_functions (suffix f, g)(expr a, b, > xsep) = > > buildcycle(graph_of_function(f, a, b, xsep), vline(f, > g, b), > > reverse graph_of_function(g, a, b, xsep), reverse > vline(f, g, a)) > >enddef; > > > >vardef xaxis (expr xmin, xmax) = (xmin, 0) -- (xmax, 0) > enddef ; > >vardef yaxis (expr ymin, ymax) = (0, ymin) -- (0, ymax) > enddef ; > > > > > >xmin:=-pi/2; xmax := 3*pi/2; > >ymin := -1.5; ymax := 5; > > > > > >vardef f(expr x)= exp(-x)*(-cos(x)+sin(x)+1) enddef; > >vardef g(expr x)=-exp(-x)*cos(x) enddef; > >path C_f, C_g; > >C_f = graph_of_function(f,xmin, xmax, .1); > >C_g = graph_of_function(g, xmin, xmax, .1); > > > >a := xpart(C_f intersectionpoint C_g); > >b := xpart(reverse C_f intersectionpoint reverse C_g); > > > >fill (area_between_functions(f, g, a, b, 0.1)) scaled u > withcolor 0.4[white, blue]; > >draw C_f scaled u withcolor blue; > >draw C_g scaled u withcolor blue; > > > > > >\stopMPcode > > > ___ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > > webpage : https://www.pragma-ade.nl / https://context.aanhet.net > (mirror) > > archive : https://github.com/contextgarden/context > > wiki : https://wiki.contextgarden.net > > > ___ > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net &
[NTG-context] Re: documentation: parameters of \setuplist
Henning Hraban Ramm schrieb am 23.04.2024 um 21:43: Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm: I tried to complete https://wiki.contextgarden.net/Command/setuplist, but I don’t understand all parameters. Can anyone explain these please: * state (start stop): what does this en-/disable? collecting entries? * label (yes no none Name): language dependent labels? as a prefix or what? You can use the key to set language dependent texts for the section counters in the list entry, with "yes" the values from the document are used but you can also set whatever label you want. \setuplabeltext [en] [chapter=Chapter , appendix=Appendix , hraban=Hraban ] %\setuplist[chapter][label=hraban,width=3cm] \setuplist[chapter][label=yes,width=3cm] \starttext \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \chapter{First chapter} \chapter{Second chapter} \stopbodymatter \startappendices \chapter{First appendix} \stopappendices \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Log entries about confusing level change
On 3/8/2024 3:38 AM, Rik Kabel wrote: Hello all, The following example produces two log entries that seem a bit odd. The log entries are: backend > bookmarks > confusing level change at level 3 around '1 body1' backend > bookmarks > confusing level change at level 3 around 'back1' and they refer to the first chapter of the bodymatter and the first chapter of the backmatter, respectively. The example: \setupinteraction [state=start] \placebookmarks [chapter] \starttext \startfrontmatter \startchapter [title=front1] \samplefile {knuth-gpt} \stopchapter \stopfrontmatter \startbodymatter \startchapter [title=body1] \samplefile {knuth-gpt} \stopchapter \stopbodymatter \startbackmatter \startchapter [title=back1] \samplefile {knuth-gpt} \stopchapter \stopbackmatter \stoptext Does the level change message suggest that something is missing in the document? normally harmless so i can add an extra check but bookmarks can be a pain when less structure is used (somewhat weird low level pdf stuff) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Log entries about confusing level change
Hello all, The following example produces two log entries that seem a bit odd. The log entries are: backend > bookmarks > confusing level change at level 3 around '1 body1' backend > bookmarks > confusing level change at level 3 around 'back1' and they refer to the first chapter of the bodymatter and the first chapter of the backmatter, respectively. The example: \setupinteraction [state=start] \placebookmarks [chapter] \starttext \startfrontmatter \startchapter [title=front1] \samplefile {knuth-gpt} \stopchapter \stopfrontmatter \startbodymatter \startchapter [title=body1] \samplefile {knuth-gpt} \stopchapter \stopbodymatter \startbackmatter \startchapter [title=back1] \samplefile {knuth-gpt} \stopchapter \stopbackmatter \stoptext Does the level change message suggest that something is missing in the document? -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Section numbering does not work
> Am 13.02.2024 um 16:54 schrieb Wolfgang Schuster > : > > Oliver Marugg schrieb am 13.02.2024 um 00:17: >> Hi >> Section numbering does not work until I remove \startbackmatter >> \stopbackmatter. I had a longer text file and I stripped it down until I >> found this? >> Greets Oliver >> Running freshly installed context ARM64 on m1 and updated it via sh >> install.sh on ARM64 macos 14.3.1: >> >> context --version >> mtx-context | ConTeXt Process Management 1.05 >> mtx-context | >> mtx-context | main context file: >> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv >> mtx-context | current version: 2024.01.24 22:39 >> mtx-context | main context file: >> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl >> mtx-context | current version: 2024.01.24 22:39 >> -- >> Stripped down MWE: >> \setuppapersize[A4] [A4] >> \starttext >> \completecontent[criterium=all] >> % ToC >> \page >> \chapter{CHAP 1} >> TEXT >> \startbackmatter >> \startchapter[title=Literature] >> \placelistofpublications >> \stopchapter >> \stopbackmatter >> \stoptext > > Besides enabling numbering for the backpart you can use the appendix block > which has numbering by default. > > %\defineconversionset[appendix:default][n] > > \starttext > > \startfrontmatter > \completecontent[criterium=all] > \stopfrontmatter > > \startbodymatter > \startchapter[title=CHAP 1] > TEXT > \stopchapter > \stopbodymatter > > \startappendices > \startchapter[title=Literature] > \placelistofpublications > \stopchapter > \stopappendices > > \stoptext > > Wolfgang Thanks Wolfgang for your practical hint. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Section numbering does not work
Oliver Marugg schrieb am 13.02.2024 um 00:17: Hi Section numbering does not work until I remove \startbackmatter \stopbackmatter. I had a longer text file and I stripped it down until I found this? Greets Oliver Running freshly installed context ARM64 on m1 and updated it via sh install.sh on ARM64 macos 14.3.1: context --version mtx-context | ConTeXt Process Management 1.05 mtx-context | mtx-context | main context file: /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2024.01.24 22:39 mtx-context | main context file: /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2024.01.24 22:39 -- Stripped down MWE: \setuppapersize[A4] [A4] \starttext \completecontent[criterium=all] % ToC \page \chapter{CHAP 1} TEXT \startbackmatter \startchapter[title=Literature] \placelistofpublications \stopchapter \stopbackmatter \stoptext Besides enabling numbering for the backpart you can use the appendix block which has numbering by default. %\defineconversionset[appendix:default][n] \starttext \startfrontmatter \completecontent[criterium=all] \stopfrontmatter \startbodymatter \startchapter[title=CHAP 1] TEXT \stopchapter \stopbodymatter \startappendices \startchapter[title=Literature] \placelistofpublications \stopchapter \stopappendices \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: conversion from realpage to pagenumber
Thank you Wolfgang, but my problem is getting back the page of the document starting from a "realpage" value picked from structures.registers.collected in the .tuc file. Anyway, looking at the .tuc file produced by your example, I found that structures.pages.collected has all the information I need to reconstruct the printed page number. Here's an excerpt of the .tuc file: utilitydata.structures.pages.collected={ { ["block"]="frontpart", ["number"]=1, ["numberdata"]=1, ["prefixdata"]=2, ["state"]="start", }, { ["block"]="frontpart", ["number"]=2, ["numberdata"]=1, ["prefixdata"]=2, ["state"]="start", }, ... { ["block"]="bodypart", ["number"]=1, ["numberdata"]=1, ["prefixdata"]=2, ["state"]="start", }, { ["block"]="bodypart", ["number"]=2, ["numberdata"]=1, ["prefixdata"]=2, ["state"]="start", }, ... So your answer was not the solution, but it's been the way to the solution. Thank you again, Massi Il 12/01/24 12:02, Wolfgang Schuster ha scritto: mf schrieb am 12.01.2024 um 10:18: Hello list, how do I convert the realpage number to a page number? Suppose you have a document with a frontmatter of 20 pages in roman numerals, followed by the main text starting from page 1 in arabic numerals. So the twelfth page is 'XII', while the twenty-second is '2'. How do I get 'XII' from 12 and '2' from 22? \defineconversionset [frontpart:pagenumber] [] [romannumerals] \setuppagenumber [way=byblock] % Alternative method for "way=byblock" when you have an appendix where % the pagenumber of the bodypart continues rather than being reset % % \startsectionblockenvironment[bodypart] % \resetuserpagenumber % \stopsectionblockenvironment \starttext \startfrontmatter \dorecurse{20}{\samplefile{lorem}\page} \stopfrontmatter \startbodymatter \dorecurse{20}{\samplefile{lorem}\page} \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: conversion from realpage to pagenumber
mf schrieb am 12.01.2024 um 10:18: Hello list, how do I convert the realpage number to a page number? Suppose you have a document with a frontmatter of 20 pages in roman numerals, followed by the main text starting from page 1 in arabic numerals. So the twelfth page is 'XII', while the twenty-second is '2'. How do I get 'XII' from 12 and '2' from 22? \defineconversionset [frontpart:pagenumber] [] [romannumerals] \setuppagenumber [way=byblock] % Alternative method for "way=byblock" when you have an appendix where % the pagenumber of the bodypart continues rather than being reset % % \startsectionblockenvironment[bodypart] % \resetuserpagenumber % \stopsectionblockenvironment \starttext \startfrontmatter \dorecurse{20}{\samplefile{lorem}\page} \stopfrontmatter \startbodymatter \dorecurse{20}{\samplefile{lorem}\page} \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unwanted blank page
sorry if i dont get your problem right understood, but i'm completely new to context. I use a hack not to get the number not printed in the title page (though I define sectionblocks for keeping different numbering systems for the table of contents and the document) I use \setuppagenumbering[location=] for not getting the number printed and then I reset the page numbering for the next sections. I copy my code so that you know what I do. Sorry if it doesnt help %% %%% LOS BLOQUES % %%% \definesectionblock[portada][number=no] \defineconversionset [portada:pagenumber][][characters] \defineconversionset [frontpart:pagenumber][][romannumerals] \defineconversionset [bodypart:pagenumber][][numbers] \defineconversionset [appendixpart:pagenumber][][Characters] %%% %%% NUMERACIÓN DE PÁGINAS, SETUP % %%% \setuppagenumbering[alternative=doublesided,location={footer,inmargin}] \setupuserpagenumber[way=byblock] \starttext \startsectionblock[portada] \setuppagenumbering[location=] \input{03_portadaEval.tex}%this is my title page \stopsectionblock \startfrontmatter[] \start \setuplayout[reset] \setupinterlinespace[.8ex] \completecontent \stop \stopfrontmatter \startbodymatter[] \input{50_Evaluacion.tex}%a piece of text \stopbodymatter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: out of order sectionsblocks
On 9/5/2023 4:06 AM, Rik Kabel wrote: The following example generates a log file which begins with the line structure > lists > out of order sectionsblocks, maybe use \setsectionblock My larger document has over a hundred of these at the beginning. \setupnote [endnote] [location=none] \starttext \startbodymatter \startchapter[title={Body}] \startparagraph \input knuthmath \startendnote \input knuth-gpt \stopendnote \stopparagraph \stopchapter \stopbodymatter \startbackmatter \startchapter[title={Notes}] \placenotes [endnote] \stopchapter \stopbackmatter \stoptext Can the message be suppressed? Is there a better way to set up the document to have endnotes for text in other-than-backmatter sectionblocks appear in the backmatter sectionblock? i'll bring the mewssage under tracker control and assume that you will answer all questions wrt side effects (in this case probably harmless but who knows when there is a real messed up block order cq. multiple same blocks used) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] out of order sectionsblocks
The following example generates a log file which begins with the line structure > lists > out of order sectionsblocks, maybe use \setsectionblock My larger document has over a hundred of these at the beginning. \setupnote [endnote] [location=none] \starttext \startbodymatter \startchapter[title={Body}] \startparagraph \input knuthmath \startendnote \input knuth-gpt \stopendnote \stopparagraph \stopchapter \stopbodymatter \startbackmatter \startchapter[title={Notes}] \placenotes [endnote] \stopchapter \stopbackmatter \stoptext Can the message be suppressed? Is there a better way to set up the document to have endnotes for text in other-than-backmatter sectionblocks appear in the backmatter sectionblock? -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Adjust pagenumbering while skipping first page
On 9/4/2023 6:09 PM, Jeroen wrote: The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1? \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setcounter [userpage] [0] \setuppagenumbering [location=] \startdocument \setupfooter[state=stop] \startfrontmatter frontpage \stopfrontmatter \setupfooter[state=start] \startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter \stopdocument \setupfootertexts [title] [\pagenumber\space of \lastpagenumber] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Adjust pagenumbering while skipping first page
The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1? \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setcounter [userpage] [0] \setuppagenumbering [location=] \startdocument \setupfooter[state=stop] \startfrontmatter frontpage \stopfrontmatter \setupfooter[state=start] \startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter \stopdocument ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Different Layout for First Page
Jeroen schrieb am 04.09.2023 um 14:10: I have a document with the first page in startfrontmatter and all other pages in startbodymatter. The layout setting is as following [...] What would be the easiest way to change the layout only for the first page since it has no footer. For the first page, I would like to have the text run all the way to the bottom with \vfill where normally the footer would be. You need the two settings \setupheader[state=high] \setupfooter[state=high] to get rid of the header and footer on the page where the commands take effect. The nice thing is that both values are reset on the following page and with \startsectionblockenvironment you can make this layout change in the style file of your document. \startsectionblockenvironment[frontpart] \setupheader[state=high] \setupfooter[state=high] \stopsectionblockenvironment \showframe \starttext \startfrontmatter \samplefile{lorem} \stopfrontmatter \startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Different Layout for First Page
I have a document with the first page in startfrontmatter and all other pages in startbodymatter. The layout setting is as following \setuplayout [backspace=20mm, width=175mm, topspace=15mm, header=0mm, footer=2mm, height=275mm, bottomheight=1mm, footerdistance=10mm] \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setupfooter[state=stop] \startfrontmatter \input{frontpage.tex} \stopfrontmatter \setupfooter[state=start] \startbodymatter \input{introduction.tex} \stopbodymatter What would be the easiest way to change the layout only for the first page since it has no footer. For the first page, I would like to have the text run all the way to the bottom with \vfill where normally the footer would be. Thanks Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: An error which is not in .log file
Hi, I suggest to comment out/add \stoptext until the error go,and that way narrow it down. The usual way... /Mikael Den tis 15 aug. 2023 19:50Xavier B. skrev: > I don't have line 276. This is what I have (169 lines): > > % Fitxer ConTeXt MIV > > % carregam les opcions d'entorn > \environment ng-entorn-minimal.conTeXt > \environment ng-entorn-taules.conTeXt > \environment ng-entorn-teoria.conTeXt > \environment ng-entorn-colors.conTeXt > > % bibliografia > \usebtxdataset[default][ng-bibliografia.bib] > \setupbtx[dataset=default] > \usebtxdefinitions[aps] > > % el text > > \starttext > > \startfrontmatter > \input ng-pre-portada.conTeXt > \input ng-pre-llicencia.conTeXt > \input ng-pre-informacio-document.conTeXt > \completecontent > \stopfrontmatter > > > \startbodymatter > > \startpart[title=Aritmètica] > > \input ng-aritmetica-nombres-naturals-operacions.conTeXt > \page[yes] > \input ng-aritmetica-divisibilitat.conTeXt > \page[yes] > \input ng-aritmetica-sencers-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt > \page[yes] > \input ng-aritmetica-percentatges.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-sencers.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-fraccions.conTeXt > \page[yes] > \input ng-aritmetica-arrodoniment-i-truncament.conTeXt > \page[yes] > \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt > \page[yes] > \input ng-aritmetica-sequencies.conTeXt > \page[yes] > \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt > \page[yes] > \input ng-aritmetica-propietats-de-les-potencies.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-calcul.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-problemes.conTeXt > \stoppart > > \startpart[title=Relacions entre variables] > > \input ng-relacions-variables-proporcionalitat-directa.conTeXt > \page[yes] > \input ng-relacions-variables-percentatges-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-repartiments-proporcionals.conTeXt > \page[yes] > \input ng-relacions-variables-proporcionalitat-inversa.conTeXt > \page[yes] > \input ng-relacions-variables-conversio-unitats.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-lineal-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-afi-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt > \stoppart > > \startpart[title=Àlgebra] > \input ng-algebra-equacions-primer-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt > \page[yes] > \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt > \page[yes] > \input > ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt > \stoppart > > \startpart[title=Geometria] > > \input ng-geometria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-homotecies.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt > \stoppart > > \startpart[title=Estadística] > \input ng-estadistica-tipus-de-variables.conTeXt > \page[yes] > \input ng-estadistica.conTeXt > \page[yes] > \input ng-estadistica-parametres-dispersio.conTeXt > \page[yes] > \input ng-estadistica-grafics-i-diagrames.conTeXt > \stoppart > > \startpart[title=Probabilitat] > \input ng-probabilitat-experiments-simples.conTeXt > \page[yes] > \input ng-probabilitat-experiments-compostos.conTeXt > \page[yes] > \input ng-probabilitat-probabilitat-condicionada.conTeXt > \page[yes] > \input ng-probabilitat-algebra-de-successos.conTeXt > \stoppart > > \stopbodymatter > > > \startappendices > > \startpart[title=Apunts teòrics] > \input ng-teoria-proporcionalitat-numerica.conTeXt > \page[yes] > \input ng-teoria-equacions-de-segon-grau.conTeXt > \page[yes] > \input ng-teoria-funcio-quadratica.conTeXt > \page[yes] > \input ng-teoria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-teoria-apendix-figures-usuals-arees-volums.conTeXt >
[NTG-context] Re: An error which is not in .log file
I don't have line 276. This is what I have (169 lines): % Fitxer ConTeXt MIV % carregam les opcions d'entorn \environment ng-entorn-minimal.conTeXt \environment ng-entorn-taules.conTeXt \environment ng-entorn-teoria.conTeXt \environment ng-entorn-colors.conTeXt % bibliografia \usebtxdataset[default][ng-bibliografia.bib] \setupbtx[dataset=default] \usebtxdefinitions[aps] % el text \starttext \startfrontmatter \input ng-pre-portada.conTeXt \input ng-pre-llicencia.conTeXt \input ng-pre-informacio-document.conTeXt \completecontent \stopfrontmatter \startbodymatter \startpart[title=Aritmètica] \input ng-aritmetica-nombres-naturals-operacions.conTeXt \page[yes] \input ng-aritmetica-divisibilitat.conTeXt \page[yes] \input ng-aritmetica-sencers-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt \page[yes] \input ng-aritmetica-percentatges.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-sencers.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-fraccions.conTeXt \page[yes] \input ng-aritmetica-arrodoniment-i-truncament.conTeXt \page[yes] \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt \page[yes] \input ng-aritmetica-sequencies.conTeXt \page[yes] \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt \page[yes] \input ng-aritmetica-propietats-de-les-potencies.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-calcul.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-problemes.conTeXt \stoppart \startpart[title=Relacions entre variables] \input ng-relacions-variables-proporcionalitat-directa.conTeXt \page[yes] \input ng-relacions-variables-percentatges-problemes.conTeXt \page[yes] \input ng-relacions-variables-repartiments-proporcionals.conTeXt \page[yes] \input ng-relacions-variables-proporcionalitat-inversa.conTeXt \page[yes] \input ng-relacions-variables-conversio-unitats.conTeXt \page[yes] \input ng-relacions-variables-funcio-lineal-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-afi-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt \stoppart \startpart[title=Àlgebra] \input ng-algebra-equacions-primer-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt \stoppart \startpart[title=Geometria] \input ng-geometria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-homotecies.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt \stoppart \startpart[title=Estadística] \input ng-estadistica-tipus-de-variables.conTeXt \page[yes] \input ng-estadistica.conTeXt \page[yes] \input ng-estadistica-parametres-dispersio.conTeXt \page[yes] \input ng-estadistica-grafics-i-diagrames.conTeXt \stoppart \startpart[title=Probabilitat] \input ng-probabilitat-experiments-simples.conTeXt \page[yes] \input ng-probabilitat-experiments-compostos.conTeXt \page[yes] \input ng-probabilitat-probabilitat-condicionada.conTeXt \page[yes] \input ng-probabilitat-algebra-de-successos.conTeXt \stoppart \stopbodymatter \startappendices \startpart[title=Apunts teòrics] \input ng-teoria-proporcionalitat-numerica.conTeXt \page[yes] \input ng-teoria-equacions-de-segon-grau.conTeXt \page[yes] \input ng-teoria-funcio-quadratica.conTeXt \page[yes] \input ng-teoria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-teoria-apendix-figures-usuals-arees-volums.conTeXt \page[yes] \input ng-teoria-proporcionalitat-geometrica.conTeXt \page[yes] \input ng-teoria-estadistica.conTeXt \page[yes] \input ng-teoria-probabilitat.conTeXt \stoppart \stopappendices \startbackmatter \input ng-pre-continguts-aliens.conTeXt \page[yes] % Bibliografia \startchapter[title=Referències] \placelistofpublications \stopchapter %% Índex alfabètic \completeindex \stopbackmatter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] setuphead page=right and blank even page.
Alan Braslau schrieb am 11.06.2023 um 20:12: On 10/06/23 10/06/23, 12:42, Wolfgang Schuster via ntg-context wrote: Alan Braslau via ntg-context schrieb am 10.06.2023 um 12:28: Hello, \setuphead [part,chapter,title] [page=right] will start a part, chapter, or title on an odd page (right), inserting a "blank" even page if necessary. How can I get this blank even page to be truely blank, that is with no headers nor footers? I tried several thinks and must be missing something really simple and obvious. \setuphead [...] [page={yes,header,footer,right}] Wolfgang Thank you for this hint. It works (almost) as expected: Strangely, I had to add, explicitly, \startfrontmatter \component FrontMatterStuff \page[yes,header,footer,right] \stopfrontmatter \startbodymatter ... \stopbodymatter In order to get the frontmatter end with a totally blank page before a right Chapter 1 header. Using just the setuphead resulted in headers and footers on the "blank" left page. No problems for Chapters 2, etc. Section block force by default a page break which can produce unexpected headers/footers on the first chapter etc. You can fix this by disabling the page break at the start/end of the section block with \setupsectionblock [bodypart] [page=] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] setuphead page=right and blank even page.
On 10/06/23 10/06/23, 12:42, Wolfgang Schuster via ntg-context wrote: Alan Braslau via ntg-context schrieb am 10.06.2023 um 12:28: Hello, \setuphead [part,chapter,title] [page=right] will start a part, chapter, or title on an odd page (right), inserting a "blank" even page if necessary. How can I get this blank even page to be truely blank, that is with no headers nor footers? I tried several thinks and must be missing something really simple and obvious. \setuphead [...] [page={yes,header,footer,right}] Wolfgang Thank you for this hint. It works (almost) as expected: Strangely, I had to add, explicitly, \startfrontmatter \component FrontMatterStuff \page[yes,header,footer,right] \stopfrontmatter \startbodymatter ... \stopbodymatter In order to get the frontmatter end with a totally blank page before a right Chapter 1 header. Using just the setuphead resulted in headers and footers on the "blank" left page. No problems for Chapters 2, etc. -- Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Table of contents not appearing.
It's chapter_5 that's the problem, but how do you know what's causing the table of contents not to appear ? Le ven. 21 avr. 2023 à 14:42, Fabrice Couvreur a écrit : > Hi Hans, > Alright, I'll compile by integrating one component at a time to figure out > which one is causing the problem. > Thanks. > Fabrice > > Le jeu. 20 avr. 2023 à 15:52, Hans Hagen via ntg-context < > ntg-context@ntg.nl> a écrit : > >> On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote: >> > Hi, >> > I don't see why the table of contents does not appear. On the other >> > hand, the 12 chapters are present. >> >> \startproduct[terminale-manual] >> >> \startfrontmatter >> \starttitle[title=Table des matières] >> \placelist >> [chapter,section,subsection,subsubsection] >> [criterium=all, >> interaction=all, >> alternative=c] >> \stoptitle >> \stopfrontmatter >> >> \startbodymatter >> \chapter{xxx} >> \stopbodymatter >> >> \stopproduct >> >> shows a table of contents so it must be something in your components >> >> > Fabrice >> > >> > >> > \startproduct[terminale-manual] >> > >> >\project[terminale-environment] >> >\startfrontmatter >> > >> > \setuppagenumbering >> > [location=] >> > >> > \definefont >> >[ChapterTextStyle] >> >[SansBold*default sa 2.2] >> > >> > \setuphead >> >[title] >> >[style=ChapterTextStyle, >> > align=flushright] >> > >> > \setuplist >> > [chapter] >> > [style=bold, >> > alternative=b, >> > width=1em] >> > >> > \setuplist >> > [section] >> > [margin=1em, >> > width=1.75em] >> > >> > \setuplist >> > [subsection] >> > [margin=2.75em, >> > width=2.25em, >> > distance=\spaceamount] >> > >> > >> > \starttitle[title=Table des matières] >> > >> > \placelist >> > [chapter,section,subsection,subsubsection] >> > [criterium=all, >> > interaction=all, >> > alternative=c] >> > >> >\stoptitle >> > >> > \stopfrontmatter >> > >> > \startbodymatter >> >\component[chapitre_1] >> >\component[chapitre_2] >> >\component[chapitre_3] >> >\component[chapitre_4] >> >\component[chapitre_5] >> >\component[chapitre_6] >> >\component[chapitre_7] >> >\component[chapitre_8] >> >\component[chapitre_9] >> >\component[chapitre_10] >> >\component[chapitre_11] >> >\component[chapitre_12] >> > \stopbodymatter >> > >> > \stopproduct >> > >> > >> > >> ___ >> > If your question is of interest to others as well, please add an entry >> to the Wiki! >> > >> > maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> > webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> > archive : https://bitbucket.org/phg/context-mirror/commits/ >> > wiki : https://contextgarden.net >> > >> ___ >> >> -- >> >> - >>Hans Hagen | PRAGMA ADE >>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >> - >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> >> ___ >> > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Table of contents not appearing.
Hi Hans, Alright, I'll compile by integrating one component at a time to figure out which one is causing the problem. Thanks. Fabrice Le jeu. 20 avr. 2023 à 15:52, Hans Hagen via ntg-context a écrit : > On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote: > > Hi, > > I don't see why the table of contents does not appear. On the other > > hand, the 12 chapters are present. > > \startproduct[terminale-manual] > > \startfrontmatter > \starttitle[title=Table des matières] > \placelist > [chapter,section,subsection,subsubsection] > [criterium=all, > interaction=all, > alternative=c] > \stoptitle > \stopfrontmatter > > \startbodymatter > \chapter{xxx} > \stopbodymatter > > \stopproduct > > shows a table of contents so it must be something in your components > > > Fabrice > > > > > > \startproduct[terminale-manual] > > > >\project[terminale-environment] > >\startfrontmatter > > > > \setuppagenumbering > > [location=] > > > > \definefont > >[ChapterTextStyle] > >[SansBold*default sa 2.2] > > > > \setuphead > >[title] > >[style=ChapterTextStyle, > > align=flushright] > > > > \setuplist > > [chapter] > > [style=bold, > > alternative=b, > > width=1em] > > > > \setuplist > > [section] > > [margin=1em, > > width=1.75em] > > > > \setuplist > > [subsection] > > [margin=2.75em, > > width=2.25em, > > distance=\spaceamount] > > > > > > \starttitle[title=Table des matières] > > > > \placelist > > [chapter,section,subsection,subsubsection] > > [criterium=all, > > interaction=all, > > alternative=c] > > > >\stoptitle > > > > \stopfrontmatter > > > > \startbodymatter > >\component[chapitre_1] > >\component[chapitre_2] > >\component[chapitre_3] > >\component[chapitre_4] > >\component[chapitre_5] > >\component[chapitre_6] > >\component[chapitre_7] > >\component[chapitre_8] > >\component[chapitre_9] > >\component[chapitre_10] > >\component[chapitre_11] > >\component[chapitre_12] > > \stopbodymatter > > > > \stopproduct > > > > > > > ___ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : https://contextgarden.net > > > ___ > > -- > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Table of contents not appearing.
On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote: Hi, I don't see why the table of contents does not appear. On the other hand, the 12 chapters are present. \startproduct[terminale-manual] \startfrontmatter \starttitle[title=Table des matières] \placelist [chapter,section,subsection,subsubsection] [criterium=all, interaction=all, alternative=c] \stoptitle \stopfrontmatter \startbodymatter \chapter{xxx} \stopbodymatter \stopproduct shows a table of contents so it must be something in your components Fabrice \startproduct[terminale-manual] \project[terminale-environment] \startfrontmatter \setuppagenumbering [location=] \definefont [ChapterTextStyle] [SansBold*default sa 2.2] \setuphead [title] [style=ChapterTextStyle, align=flushright] \setuplist [chapter] [style=bold, alternative=b, width=1em] \setuplist [section] [margin=1em, width=1.75em] \setuplist [subsection] [margin=2.75em, width=2.25em, distance=\spaceamount] \starttitle[title=Table des matières] \placelist [chapter,section,subsection,subsubsection] [criterium=all, interaction=all, alternative=c] \stoptitle \stopfrontmatter \startbodymatter \component[chapitre_1] \component[chapitre_2] \component[chapitre_3] \component[chapitre_4] \component[chapitre_5] \component[chapitre_6] \component[chapitre_7] \component[chapitre_8] \component[chapitre_9] \component[chapitre_10] \component[chapitre_11] \component[chapitre_12] \stopbodymatter \stopproduct ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Table of contents not appearing.
Hi, I don't see why the table of contents does not appear. On the other hand, the 12 chapters are present. Thanks Fabrice \startproduct[terminale-manual] \project[terminale-environment] \startfrontmatter \setuppagenumbering [location=] \definefont [ChapterTextStyle] [SansBold*default sa 2.2] \setuphead [title] [style=ChapterTextStyle, align=flushright] \setuplist [chapter] [style=bold, alternative=b, width=1em] \setuplist [section] [margin=1em, width=1.75em] \setuplist [subsection] [margin=2.75em, width=2.25em, distance=\spaceamount] \starttitle[title=Table des matières] \placelist [chapter,section,subsection,subsubsection] [criterium=all, interaction=all, alternative=c] \stoptitle \stopfrontmatter \startbodymatter \component[chapitre_1] \component[chapitre_2] \component[chapitre_3] \component[chapitre_4] \component[chapitre_5] \component[chapitre_6] \component[chapitre_7] \component[chapitre_8] \component[chapitre_9] \component[chapitre_10] \component[chapitre_11] \component[chapitre_12] \stopbodymatter \stopproduct ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Wrong prefix in cross references to formulas in external document
Dear Hans, Thank you for the nice and straightforward solution. I have tested it locally and it works. I hope it will be in the next release (should I do anything?). By the way, I have a couple of other small issues. I will describe them in detail in other threads of this mailing list if it is the right place to do so. Best regards, Yaroslav пн, 30 янв. 2023 г. в 12:52, Hans Hagen via ntg-context : > On 1/29/2023 5:03 PM, Yaroslav Beltukov via ntg-context wrote: > > Dear Hans and all contributors, > > > > I really appreciate ConTeXt for the right way to obtain high quality > > documents. I'm a theoretical physicist and I'm going to write a book. I > > think ConTeXt is the right choice to work with a number of formulas, > > figures and cross-references. The visual quality of formulas is better > > than in regular LaTeX. The new feature with formula autosplitting looks > > also very promising. For me it is important to obtain the high quality > > without a lot of manual tweaks of each formula for each given document > > format and figure placement. > > > > However, I have found a problem with references if I compile one > > component only. The references to formulas in other components have > > wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the right > > formula references are very important. > > > > I started looking into this issue. The references to other components > > are taken from the whole product as from an external document. It turned > > out that this is a general problem with references with prefixes to > > external documents. The prefix is stored in a tuc file as a reference to > > a section as a sequential number of the header in the document. As a > > result, the prefix from the external document is calculated using the > > structure of the current document. > > > > Here is the MWE, which consists of two files: > > foo.tex: > > > > \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] > > > > \starttext > > > > Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] > > > > Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] > > > > Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] > > > > Remarks: \in[remark1], \in[remark2] > > > > \startbodymatter > > > > \chapter[chap1]{Chapter} > > \placeformula[eq1]\startformula x = y\stopformula > > \chapter[chap2]{Chapter} > > \section[sec1]{Section} > > \section[sec2]{Section} > > \placeformula[eq1]\startformula x = y\stopformula > > \placeformula[eq2]\startformula x = y\stopformula > > > > \stopbodymatter > > > > \startappendices > > > > \chapter[chap3]{Chapter} > > \section[sec3]{Section} > > \placeformula[eq3]\startformula x = y\stopformula > > \section[sec4]{Section} > > \startremark[remark1]\stopremark > > \placeformula[eq4]\startformula x = y\stopformula > > \startremark[remark2]\stopremark > > \chapter[chap4]{Chapter} > > > > \stopappendices > > > > \stoptext > > > > > > bar.tex: > > > > \starttext > > > > Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] > > > > Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], \in[foo::sec4] > > > > Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], > \in[foo::chap4] > > > > Remarks: \in[foo::remark1], \in[foo::remark2] > > > > % any chapters and sections here > > > > \stoptext > > > > It is expected to have the same first page on these documents: > > > > Equations: 1.1, 2.2, A.1, A.2 > > Sections: 2.1, 2.2, A.1, A.2 > > Chapters: 1, 2, A, B > > Remarks: A.2.1, A.2.2 > > > > However, the bar.tex produces wrong prefixes to formulas and remarks. > > The output depends on the document structure of bar.tex, not foo.tex. > > > > I started looking into the source code. Thanks to lua, it is not a big > > deal to track the problem. The prefixdata is complemented by the > > sectiondata after the loading the tuc file. So, the question is: is it > > possible to store the full prefixdata with all necessary prefix numbers > > in the tuc file? Here is my proposal to change the source code: > > > > --- strc-lst-old.lmt2023-01-29 11:30:15.610309948 +0300 > > +++ strc-lst.lmt2023-01-29 12:10:08.864228923 +0300 > > @@ -266,6 +266,16 @@ > > if r and not r.section then > > r.section = structures.sections.currentid() > > end > > +-- store sectiondata in prefixdata (necessary for extern
Re: [NTG-context] Wrong prefix in cross references to formulas in external document
On 1/29/2023 5:03 PM, Yaroslav Beltukov via ntg-context wrote: Dear Hans and all contributors, I really appreciate ConTeXt for the right way to obtain high quality documents. I'm a theoretical physicist and I'm going to write a book. I think ConTeXt is the right choice to work with a number of formulas, figures and cross-references. The visual quality of formulas is better than in regular LaTeX. The new feature with formula autosplitting looks also very promising. For me it is important to obtain the high quality without a lot of manual tweaks of each formula for each given document format and figure placement. However, I have found a problem with references if I compile one component only. The references to formulas in other components have wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the right formula references are very important. I started looking into this issue. The references to other components are taken from the whole product as from an external document. It turned out that this is a general problem with references with prefixes to external documents. The prefix is stored in a tuc file as a reference to a section as a sequential number of the header in the document. As a result, the prefix from the external document is calculated using the structure of the current document. Here is the MWE, which consists of two files: foo.tex: \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] \starttext Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] Remarks: \in[remark1], \in[remark2] \startbodymatter \chapter[chap1]{Chapter} \placeformula[eq1]\startformula x = y\stopformula \chapter[chap2]{Chapter} \section[sec1]{Section} \section[sec2]{Section} \placeformula[eq1]\startformula x = y\stopformula \placeformula[eq2]\startformula x = y\stopformula \stopbodymatter \startappendices \chapter[chap3]{Chapter} \section[sec3]{Section} \placeformula[eq3]\startformula x = y\stopformula \section[sec4]{Section} \startremark[remark1]\stopremark \placeformula[eq4]\startformula x = y\stopformula \startremark[remark2]\stopremark \chapter[chap4]{Chapter} \stopappendices \stoptext bar.tex: \starttext Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], \in[foo::sec4] Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], \in[foo::chap4] Remarks: \in[foo::remark1], \in[foo::remark2] % any chapters and sections here \stoptext It is expected to have the same first page on these documents: Equations: 1.1, 2.2, A.1, A.2 Sections: 2.1, 2.2, A.1, A.2 Chapters: 1, 2, A, B Remarks: A.2.1, A.2.2 However, the bar.tex produces wrong prefixes to formulas and remarks. The output depends on the document structure of bar.tex, not foo.tex. I started looking into the source code. Thanks to lua, it is not a big deal to track the problem. The prefixdata is complemented by the sectiondata after the loading the tuc file. So, the question is: is it possible to store the full prefixdata with all necessary prefix numbers in the tuc file? Here is my proposal to change the source code: --- strc-lst-old.lmt 2023-01-29 11:30:15.610309948 +0300 +++ strc-lst.lmt 2023-01-29 12:10:08.864228923 +0300 @@ -266,6 +266,16 @@ if r and not r.section then r.section = structures.sections.currentid() end + -- store sectiondata in prefixdata (necessary for external files) + if t.prefixdata and r.section then + local sectiondata = structures.sections.collected[r.section] + if sectiondata then + for k, v in next, sectiondata do + t.prefixdata[k] = v + end + end + end + -- local b = r and t.block if r and not b then local s = r.section --- strc-ref-old.lmt 2023-01-29 11:30:15.823643904 +0300 +++ strc-ref.lmt 2023-01-29 12:07:45.697109862 +0300 @@ -2318,7 +2318,17 @@ if data then numberdata = lists.reordered(data) -- data.numberdata if numberdata then - helpers.prefix(data,prefixspec) + -- helpers.prefix(data,prefixspec) + -- use the actual numbers from prefixdata + local prefixdata = data.prefixdata + if prefixdata then + -- adapted from helpers.prefix (not sure) + if (prefixspec and prefixspec == no) or prefixdata.prefix == no then + prefixdata = false + end + sections.typesetnumber(prefixdata,"prefix", prefixspec or false, prefixdata) + end + -- sections.typesetnumber(numberdata,"number",numberspec,numberdata) else local useddata = data.useddata After this small change, all the references are correct. How
Re: [NTG-context] Wrong prefix in cross references to formulas in external document
I, too, am struggling with external (and internal) references. I have created (and sent to Hans) a MWE that seems to identify two bugs: 1) External references: in a single product, some of these work, and *some* do not render the numbers (using \in{} [ref], for example). They are, however, identified as known or "verified". 2) Internal references: all render but *some* get "missing link target" errors (in the PDF viewer). I have not been able to get anywhere with the (lua) code, myself. Alan On Sun, 29 Jan 2023 19:03:32 +0300 Yaroslav Beltukov via ntg-context wrote: > Dear Hans and all contributors, > > I really appreciate ConTeXt for the right way to obtain high quality > documents. I'm a theoretical physicist and I'm going to write a book. > I think ConTeXt is the right choice to work with a number of formulas, > figures and cross-references. The visual quality of formulas is > better than in regular LaTeX. The new feature with formula > autosplitting looks also very promising. For me it is important to > obtain the high quality without a lot of manual tweaks of each > formula for each given document format and figure placement. > > However, I have found a problem with references if I compile one > component only. The references to formulas in other components have > wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the > right formula references are very important. > > I started looking into this issue. The references to other components > are taken from the whole product as from an external document. It > turned out that this is a general problem with references with > prefixes to external documents. The prefix is stored in a tuc file as > a reference to a section as a sequential number of the header in the > document. As a result, the prefix from the external document is > calculated using the structure of the current document. > > Here is the MWE, which consists of two files: > foo.tex: > > \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] > > \starttext > > Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] > > Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] > > Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] > > Remarks: \in[remark1], \in[remark2] > > \startbodymatter > > \chapter[chap1]{Chapter} > \placeformula[eq1]\startformula x = y\stopformula > \chapter[chap2]{Chapter} > \section[sec1]{Section} > \section[sec2]{Section} > \placeformula[eq1]\startformula x = y\stopformula > \placeformula[eq2]\startformula x = y\stopformula > > \stopbodymatter > > \startappendices > > \chapter[chap3]{Chapter} > \section[sec3]{Section} > \placeformula[eq3]\startformula x = y\stopformula > \section[sec4]{Section} > \startremark[remark1]\stopremark > \placeformula[eq4]\startformula x = y\stopformula > \startremark[remark2]\stopremark > \chapter[chap4]{Chapter} > > \stopappendices > > \stoptext > > > bar.tex: > > \starttext > > Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] > > Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], > \in[foo::sec4] > > Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], > \in[foo::chap4] > > Remarks: \in[foo::remark1], \in[foo::remark2] > > % any chapters and sections here > > \stoptext > > It is expected to have the same first page on these documents: > > Equations: 1.1, 2.2, A.1, A.2 > Sections: 2.1, 2.2, A.1, A.2 > Chapters: 1, 2, A, B > Remarks: A.2.1, A.2.2 > > However, the bar.tex produces wrong prefixes to formulas and remarks. > The output depends on the document structure of bar.tex, not foo.tex. > > I started looking into the source code. Thanks to lua, it is not a > big deal to track the problem. The prefixdata is complemented by the > sectiondata after the loading the tuc file. So, the question is: is > it possible to store the full prefixdata with all necessary prefix > numbers in the tuc file? Here is my proposal to change the source > code: > > --- strc-lst-old.lmt2023-01-29 11:30:15.610309948 +0300 > +++ strc-lst.lmt2023-01-29 12:10:08.864228923 +0300 > @@ -266,6 +266,16 @@ > if r and not r.section then > r.section = structures.sections.currentid() > end > +-- store sectiondata in prefixdata (necessary for external files) > +if t.prefixdata and r.section then > +local sectiondata = structures.sections.collected[r.section] > +if sectiondata then > +for k, v in next, sectiondata do > +t.prefixdata[k] = v > +end > +end > +end > +-- > local b = r and t
[NTG-context] Wrong prefix in cross references to formulas in external document
Dear Hans and all contributors, I really appreciate ConTeXt for the right way to obtain high quality documents. I'm a theoretical physicist and I'm going to write a book. I think ConTeXt is the right choice to work with a number of formulas, figures and cross-references. The visual quality of formulas is better than in regular LaTeX. The new feature with formula autosplitting looks also very promising. For me it is important to obtain the high quality without a lot of manual tweaks of each formula for each given document format and figure placement. However, I have found a problem with references if I compile one component only. The references to formulas in other components have wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the right formula references are very important. I started looking into this issue. The references to other components are taken from the whole product as from an external document. It turned out that this is a general problem with references with prefixes to external documents. The prefix is stored in a tuc file as a reference to a section as a sequential number of the header in the document. As a result, the prefix from the external document is calculated using the structure of the current document. Here is the MWE, which consists of two files: foo.tex: \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] \starttext Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] Remarks: \in[remark1], \in[remark2] \startbodymatter \chapter[chap1]{Chapter} \placeformula[eq1]\startformula x = y\stopformula \chapter[chap2]{Chapter} \section[sec1]{Section} \section[sec2]{Section} \placeformula[eq1]\startformula x = y\stopformula \placeformula[eq2]\startformula x = y\stopformula \stopbodymatter \startappendices \chapter[chap3]{Chapter} \section[sec3]{Section} \placeformula[eq3]\startformula x = y\stopformula \section[sec4]{Section} \startremark[remark1]\stopremark \placeformula[eq4]\startformula x = y\stopformula \startremark[remark2]\stopremark \chapter[chap4]{Chapter} \stopappendices \stoptext bar.tex: \starttext Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], \in[foo::sec4] Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], \in[foo::chap4] Remarks: \in[foo::remark1], \in[foo::remark2] % any chapters and sections here \stoptext It is expected to have the same first page on these documents: Equations: 1.1, 2.2, A.1, A.2 Sections: 2.1, 2.2, A.1, A.2 Chapters: 1, 2, A, B Remarks: A.2.1, A.2.2 However, the bar.tex produces wrong prefixes to formulas and remarks. The output depends on the document structure of bar.tex, not foo.tex. I started looking into the source code. Thanks to lua, it is not a big deal to track the problem. The prefixdata is complemented by the sectiondata after the loading the tuc file. So, the question is: is it possible to store the full prefixdata with all necessary prefix numbers in the tuc file? Here is my proposal to change the source code: --- strc-lst-old.lmt2023-01-29 11:30:15.610309948 +0300 +++ strc-lst.lmt2023-01-29 12:10:08.864228923 +0300 @@ -266,6 +266,16 @@ if r and not r.section then r.section = structures.sections.currentid() end +-- store sectiondata in prefixdata (necessary for external files) +if t.prefixdata and r.section then +local sectiondata = structures.sections.collected[r.section] +if sectiondata then +for k, v in next, sectiondata do +t.prefixdata[k] = v +end +end +end +-- local b = r and t.block if r and not b then local s = r.section --- strc-ref-old.lmt2023-01-29 11:30:15.823643904 +0300 +++ strc-ref.lmt2023-01-29 12:07:45.697109862 +0300 @@ -2318,7 +2318,17 @@ if data then numberdata = lists.reordered(data) -- data.numberdata if numberdata then -helpers.prefix(data,prefixspec) +-- helpers.prefix(data,prefixspec) +-- use the actual numbers from prefixdata +local prefixdata = data.prefixdata +if prefixdata then +-- adapted from helpers.prefix (not sure) +if (prefixspec and prefixspec == no) or prefixdata.prefix == no then +prefixdata = false +end +sections.typesetnumber(prefixdata,"prefix", prefixspec or false, prefixdata) +end +-- sections.typesetnumber(numberdata,"number",numberspec,numberdata) else local useddata = data.useddata After this small change, all the references are correct. However, I'm quite new to ConTeXt, so maybe here are some caveats. It would be great to fix the references to formulas, especially
Re: [NTG-context] Structure: multi-volume products
Alan, I'm attaching the two master files used for the following (also ran cross refs between each vol.): Murugaiyan, Appasamy & Parlier-Renault, Édith (2021) (Eds) Whispering of Inscriptions: South Indian Epigraphy and Art History: Papers from an International Symposium in memory of Professor Noboru Karashima (Paris, 12–13 October 2017). Oxford: Indica et Buddhica. (2 vols) https://indica-et-buddhica.com/publications/murugaiyan-appasamy-parlier-renault-edith/whispering-of-inscriptions-south-indian-epigraphy-and-art-history Best, Richard -- T +6433121699 M +64210640216 rmaho...@indica-et-buddhica.org https://indica-et-buddhica.com/ Indica et Buddhica Littledene Bay Road Oxford NZ NZBN: 9429041761809 -Original Message- From: Alan Braslau via ntg-context Reply-To: mailing list for ConTeXt users To: mailing list for ConTeXt users Cc: Alan Braslau Subject: [NTG-context] Structure: multi-volume products Date: Thu, 15 Dec 2022 20:23:36 -0700 Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1) X-Spam-Score: 0.0 Hello, I have a book project that is being cut into two volumes (because it is too long and will be sold as a boxed set). Each volume is presently a separate *product* in the project structure. I presently set the counters in the second volume using: \setupheadnumber [part] [2] \setupheadnumber [chapter] [5] (I have multiple [5] parts in the project, and the first volume ends with part 2 and chapter 5.) 1) Is this the right way to be handling this? 2) Any suggestions on how I can put a Table of Contents for the first volume in the second volume? Thanks! Alan __ _ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net __ _ % master000.tex – ConTeXt MkIV Module \startproduct master000 \project iebpmonographs \environment ieb-c-layout-000 \environment monograph-local-layout \usemodule[statistical-charts] % \enabletrackers[typesetters.suspects] % \showbodyfont % \showbodyfontenvironment \useexternaldocument[m001][master001][Whispering of Inscriptions, Vol.~{\sc ii}] \startfrontmatter \component tlpg000 { \setupheadtext[content=Contents of Vol.~i.] \setupheadertexts[Contents of Vol.~i.][pagenumber][pagenumber][Contents of Vol.~i.] \noheaderandfooterlines \completecontent \PY \PB } { \setupheadtext[tables=Tables of Vol.~i.] \setupheadertexts[Tables of Vol.~i.][pagenumber][pagenumber][Tables of Vol.~i.] \noheaderandfooterlines \completelistoftables \PY \PB } { \setupheadtext[figures=Figures of Vol.~i.] \setupheadertexts[Figures of Vol.~i.][pagenumber][pagenumber][Figures of Vol.~i.] \noheaderandfooterlines \completelistoffigures \PY } \component ackn % A. Murugaiyan & E. Parlier-Renault \component pref % A. Murugaiyan & E. Parlier-Renault \component intr % Y. Subbarayalu \stopfrontmatter \startbodymatter \setcounter[userpage][1] \component chp02 % Y. Subbarayalu \component chp01 % V. Gillet \component chp03 % G. Vijayavenugopal \component chp04 % E. Francis \component chp05 % N. Athiyaman \component chp06 % V. Selvakumar \component chp07 % S. Rajavelu \component chp08 % A. Murugaiyan \component chp09 % S. Brocquet \stopbodymatter % \startbackmatter % \component indx % \stopbackmatter \stopproduct % master001.tex – ConTeXt MkIV Module \startproduct master001 \project iebpmonographs \environment ieb-c-layout-001 \environment monograph-local-layout % \enabletrackers[typesetters.suspects] % \showbodyfont % \showbodyfontenvironment \useexternaldocument[m000][master000][Whispering of Inscriptions, Vol.~{\sc i}] \startfrontmatter \component tlpg001 { \setupheadtext[content=Contents of Vol.~ii.] \setupheadertexts[Contents of Vol.~ii.][pagenumber][pagenumber][Contents of Vol.~ii.] \noheaderandfooterlines \completecontent \PY \PB } { \setupheadtext[tables=Tables of Vol.~ii.] \setupheadertexts[Tables of Vol.~ii.][pagenumber][pagenumber][Tables of Vol.~ii.] \noheaderandfooterlines \completelistoftables \PY \PB } { \setupheadtext[figures=Figures of Vol.~ii.] \setupheadertexts[Figures of Vol.~ii.][pagenumber][pagenumber][Figures of Vol.~ii.] \noheaderandfooterlines \completelistoffigures \PY } \stopfrontmatter \startbodymatter \setcounter[userpage][1] \component chp10 % P. Estienne \component chp11 % V. Renganathan \component chp12 % C. Schmid \component chp13 % K. Rajan \component chp14 % A. Davrinche \component chp15 % M. Le Sauce-Carnis \component chp16 % V. Olivier \component chp17 % K. Ladrech \component chp18 % E. Par
Re: [NTG-context] \setuplist only for bodypart
Pablo Rodriguez via ntg-context schrieb am 17.06.2022 um 16:07: On 6/16/22 22:36, Henning Hraban Ramm via ntg-context wrote: Am 16.06.22 um 21:19 schrieb Pablo Rodriguez via ntg-context: \startsectionblockenvironment[bodypart] ... \stopsectionblockenvironment This should work according to documentation. Many thanks for your reply, Hraban. Using current latest (from 2022.05.11 11:36) with current sample outputs no different setup for chapters from bodypart: \startsectionblockenvironment[bodypart] \setuplist[chapter] [alternative=d] \stopsectionblockenvironment With the above setting you change layout of the chapter entries for list which are placed in the bodymatter environment, e.g. \startbodymatter ... \placelist[chapter] ... \stopbodymatter To create separate styles for chapters within the frontmatter and bodymatter you have to create a new section command where you can apply different list settings. \starttext \completecontent You're now placing \completecontent (and the associated \title) outside of any sectionblock. 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] \setuplist only for bodypart
On 6/16/22 22:36, Henning Hraban Ramm via ntg-context wrote: > Am 16.06.22 um 21:19 schrieb Pablo Rodriguez via ntg-context: > >>\startsectionblockenvironment[bodypart] >> ... >>\stopsectionblockenvironment > > This should work according to documentation. Many thanks for your reply, Hraban. Using current latest (from 2022.05.11 11:36) with current sample outputs no different setup for chapters from bodypart: \startsectionblockenvironment[bodypart] \setuplist[chapter] [alternative=d] \stopsectionblockenvironment \starttext \completecontent \startfrontmatter \dorecurse{5} {\chapter{Chapter \recurselevel}} \stopfrontmatter \startbodymatter \dorecurse{5} {\chapter{Chapter \recurselevel}} \stopbodymatter \startbackmatter \dorecurse{5} {\chapter{Chapter \recurselevel}} \stopbackmatter \stoptext Just to contribute a sample that helps to confirm the issue. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] Table of Contents empty for unknown reason
On Sun, 12 Jun 2022, Joel via ntg-context wrote: > I need to display a table of contents, but only displaying chapters. > > Here is my minimum working example: You need to add "criterium=all" to both placelist and completecontent. See below: > \starttext > \startfrontmatter > \startchapter[title={Contents}] > \placelist[chapter][criterium=all] > \stopchapter > \completecontent[criterium=all] > \stopfrontmatter > \startbodymatter > \startchapter[title={Title 1}] > \input knuth > \stopchapter > \stopbodymatter > > \stoptext Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Table of Contents empty for unknown reason
I need to display a table of contents, but only displaying chapters. Here is my minimum working example: \starttext \startfrontmatter \startchapter[title={Contents}] \placelist[chapter] \stopchapter \completecontent \stopfrontmatter \startbodymatter \startchapter[title={Title 1}] \input knuth \stopchapter \stopbodymatter \stoptext For reasons I don't understand, both \placelist[chapter] and \completecontent display the title, but are otherwise empty of contents. I believe the code was working before an update. I used ConTeXt live though and confirmed this code even doesn't work there. Why isn't it rendering the table of contents? --Joel ___ 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] Trying to get a simple bibliography
Hi Amine, There are several ways to achieve a bibliography. The first one is your way, with a buffer, which you have to name it (see below : the buffer is named 'biblio') : you put your references to books and articles between the 2 commands \startbuffer and \stopbuffer as the model shows hereafter (with the APA style). If you want to print a general and simple bibliography, you need a double command :\usebtxdataset[/any title you choose/][biblio.buffer] and \definebtxrendering[/any title/][apa][dataset=/any title/] after \stopbuffer. At the end of the text, you need to define the place where you want to print the bibliography. For that purpose : \starttext \startbackmatter \startchapter[title={Bibliography}] \placelistofpublications[/any title/] [method=local] \stopchapter \stopbackmatter \stoptext /But, as far as I know, this method is boring/, because you need to write all you bibliographical sources in the buffer. The better is to build a separate bibtex file with such a software as JabRef (which is a kind of bibtex tool). This bibtex file is in your ConTeXt repository and you need only to call the name of your bibtex item. For instance, the book /Natural Right and History/ of Leo Strauss becomes 'Strauss,1952' (with JabRef) and if you cite this book in your text (like this : \cite[alternative=entry][/any title/::Strauss1952]}, you can find the item at the 'S' letter. Indeed, there is some work to do (feed your bitex file with items...), but when it is done once, it is forever (I guess ...). I give you a MWE as an attached file ... Hope it helps ! JP [/here is the beginning of a buffer sample /] \startbuffer[biblio] @book{Cicéron1, author = {Cicéron}, title = {Tusculanes, V, 8}, } @INCOLLECTION{Leibniz1885, author = {Leibniz, G. W.}, title = {Principes de la nature et de la grâce fondés en raison, 1714}, title:en = {Principles of Nature and Grace Founded in Reason}, booktitle = {\de Die Philosophischen Schriften von Gottfried Wilhelm Leibniz}, booktitle:en = {The Philosophical Writings of Gottfried Wilhelm Leibniz}, editor = {Gerhardt, C. G.}, publisher = {Weidmann}, year = {1885}, volume = {6}, chapter = {8}, pages = {598–606}, address = {Berlin}, language = {french}, } @book{Rousseau1755, author ={Rousseau, Jean-Jacques} title = {Discours sur l’Origine et les Fondements de l’Inégalité parmi les Hommes.}, year = {1755}, } @book{Rousseau1750, author ={Rousseau, Jean-Jacques} title = {Discours sur les Sciences et les Arts}, year = {1750}, } @book{Rousseau1762, author = {Rousseau, Jean-Jacques}, title = {Émile}, year = {1762}, } \stopbuffer Le 26/03/2022 à 13:25, A A via ntg-context a écrit : Hi All, I'm trying to get a simple bibliography to work with ConTeXt. Here's what I have so far: *test.tex* * * \usebtxdataset[bibliography.bib] \starttext \startbodymatter See \cite[proofwiki] \stopbodymatter \startbackmatter \startsection[title=Bibliography] \stopsection \stopbackmatter \stoptext * * *bibliography.bib* * * @misc{ proofwiki, title={{Definition:Collation - ProofWiki}}, author={{ProofWiki}}, howpublished={ \href{https://proofwiki.org/wiki/Definition:Collation}{link <https://proofwiki.org/wiki/Definition:Collation}{link>} }, journal={{ProofWiki}}, year={2021} } When I compile test.tex it generates a pdf, but the citation is not included in the body matter. Also the actual reference is not present in Bibliography. What am I doing wrong? Regards, Amine * * ___ 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 ___ -- Jean-Pierre Delange Ancients Professeur Agrégé de Philosophie (HC) \startbuffer[biblio] @book{Cicéron1, author = {Cicéron}, title = {Tusculanes, V, 8}, } @INCOLLECTION{Leibniz1885, author = {Leibniz, G. W.}, title = {Principes de la nature et de la grâce fondés en raison, 1714}, title:en = {Principles of Nature and Grace Founded in Reason}, booktitle = {\de Die Philosophischen Schriften von Gottfried Wilhelm Leibniz}, booktitle:en = {The Philosophical Writings of Gottfried Wilhelm Leibniz}, editor = {Gerhardt, C. G.}, publisher = {Weidmann}, year = {1885}, volume = {6}, chapter = {8}, pages = {598–606}, address = {Berlin}, language = {french}, } @book{Rousseau1755, author ={Rousseau, Jean-Jacques} title = {Discours sur l’Origine et les Fondements de l’Inégalité parmi les Hommes.}, year = {1755}, } @book{Rousseau1750, author ={Rousseau, Jean-Jacques} title = {Discours sur les Sciences et les Arts}, year = {1750}, }
Re: [NTG-context] Please could you send me the whole example
Dear Helmut, Here is a full working example: *test.tex* \usebtxdefinitions[aps] \usebtxdataset[bibliography.bib] \setupinteraction[state=start] \starttext \startbodymatter See \cite[proofwiki] \stopbodymatter \startbackmatter \startsection[title=Bibliography] \placelistofpublications \stopsection \stopbackmatter \stoptext *bibliography.bib* @misc{ proofwiki, title={{Definition:Collation - ProofWiki}}, author={{ProofWiki}}, journal={{ProofWiki}}, year={2021}, howpublished={ \goto {link} [ url( " https://proofwiki.org/wiki/Definition:Language_of_Propositional_Logic; ) ] } } Hope it helps. Thanks. Regards, Amine On Sun, 27 Mar 2022 at 12:33, Helmut Schwertner wrote: > Hello Amiene, > > I read your "question" in the NTG-Context-Groupe, I try it, but it > doesn't work for me. > > Please could you send me the complete working example? > > Thank you, > > Greetings, > > Helmut > > -- > * > Helmut Schwertner > Kirchweg 154 > 28201 Bremen > 0421 528 58 22 > helmut.schwertner[a]gmail.com > > ___ 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] Trying to get a simple bibliography
I found the problem. I was not including the following in my preamble: \usebtxdefinitions[aps] The next question I guess is whether ConTeXt support other specs like MLA or Chicago style. I tried MLA but without sucess. Is MLA possible in ConTeXt? On Sat, 26 Mar 2022 at 13:48, A A wrote: > In my previous email I forgot to include the \placelistofpublications > command. I tried that and now I'm getting a citation, but the bibliography > entry is not correctly typeset... > > On Sat, 26 Mar 2022 at 13:25, A A wrote: > >> Hi All, >> >> I'm trying to get a simple bibliography to work with ConTeXt. Here's what >> I have so far: >> >> *test.tex* >> >> \usebtxdataset[bibliography.bib] >> >> \starttext >> >> \startbodymatter >> See \cite[proofwiki] >> \stopbodymatter >> >> \startbackmatter >> \startsection[title=Bibliography] >> \stopsection >> \stopbackmatter >> \stoptext >> >> *bibliography.bib* >> >> @misc{ >> proofwiki, >> title={{Definition:Collation - ProofWiki}}, >> author={{ProofWiki}}, >> howpublished={ >> \href{https://proofwiki.org/wiki/Definition:Collation}{link} >> }, >> journal={{ProofWiki}}, >> year={2021} >> } >> >> When I compile test.tex it generates a pdf, but the citation is not >> included in the body matter. Also the actual reference is not present in >> Bibliography. >> >> What am I doing wrong? >> >> Regards, >> >> Amine >> >> ___ 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] Trying to get a simple bibliography
In my previous email I forgot to include the \placelistofpublications command. I tried that and now I'm getting a citation, but the bibliography entry is not correctly typeset... On Sat, 26 Mar 2022 at 13:25, A A wrote: > Hi All, > > I'm trying to get a simple bibliography to work with ConTeXt. Here's what > I have so far: > > *test.tex* > > \usebtxdataset[bibliography.bib] > > \starttext > > \startbodymatter > See \cite[proofwiki] > \stopbodymatter > > \startbackmatter > \startsection[title=Bibliography] > \stopsection > \stopbackmatter > \stoptext > > *bibliography.bib* > > @misc{ > proofwiki, > title={{Definition:Collation - ProofWiki}}, > author={{ProofWiki}}, > howpublished={ > \href{https://proofwiki.org/wiki/Definition:Collation}{link} > }, > journal={{ProofWiki}}, > year={2021} > } > > When I compile test.tex it generates a pdf, but the citation is not > included in the body matter. Also the actual reference is not present in > Bibliography. > > What am I doing wrong? > > Regards, > > Amine > > ___ 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] Trying to get a simple bibliography
Hi All, I'm trying to get a simple bibliography to work with ConTeXt. Here's what I have so far: *test.tex* \usebtxdataset[bibliography.bib] \starttext \startbodymatter See \cite[proofwiki] \stopbodymatter \startbackmatter \startsection[title=Bibliography] \stopsection \stopbackmatter \stoptext *bibliography.bib* @misc{ proofwiki, title={{Definition:Collation - ProofWiki}}, author={{ProofWiki}}, howpublished={ \href{https://proofwiki.org/wiki/Definition:Collation}{link} }, journal={{ProofWiki}}, year={2021} } When I compile test.tex it generates a pdf, but the citation is not included in the body matter. Also the actual reference is not present in Bibliography. What am I doing wrong? Regards, Amine ___ 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] Chapter number retrieval
Hello Adam, What I am actually using (at least basically) is the code given in the second example on the wiki. So this moving graphic is not the problem. The problem lays in the fact, that I need the chapter number for calculating the position of the graphic along the outer edge of the page. — Because the book in question is a dictionary, it is not nice to have the chapter titles numbered, because it is only the letter of the alphabet. If I turned off the numbering, I lost the possibility to retrieve the chapter number. Through the definition of a new command \ChapterTitle, ignoring the first argument (which is the number) the title gets typeset without the number, but the number is still available in the TOC or as in my case for the calculation. Thank you for your support and help! Willi > On 23 Mar 2022, at 00:41, Adam Reviczky via ntg-context > wrote: > > Hi Willi, > > You could also access the number by using the > \getmarking[chapternumber][current]. > I think you have used a similar approach in the > https://wiki.contextgarden.net/Thumb_index. > > Adam > > On Tue, Mar 22, 2022 at 11:15 PM Willi Egger via ntg-context > wrote: > Hello Adam! > > Many thanks for your solution. — It works very well in your example and also > in an extended version with \startfrontmatter..\stopfrontmatter > \startbodymatter…\stopbodymatter. — Unfortunately It does not work to my wish > in the actual setup of my book. — I am using now the solution presented by > Sreeram. > > Again thank you so much! > Kind regards > > Willi > >> On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context >> wrote: >> >> Hi, >> >> There is a good overview of accessible variables at: >> https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names >> >> Maybe you want something like this? >> >> \starttext >> \setuphead[chapter][number=no] >> \startchapter[title={My Chapter}] >> Hello world! >> \startMPcode >> label("\currentstructurelistnumber\ \currentstructuretitle", origin); >> draw fullcircle scaled 3cm; >> \stopMPcode >> \stopchapter >> \stoptext >> >> Adam >> >> On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context >> wrote: >> Willi, offlist: Have to admit I didn't actually try your own comment, >> but if it doesn't work, I'll be interested in the eventual answer. I >> recently had to do something similar for the TOC, and Hraban pointed me >> to \currentlistentrynumber. There probably has to be a command along >> those lines (which led me to your 2011 comment, sorry ) for non-list >> retrieval. \structurenumber? \currentstructurenumber? Something along >> those lines? There seem to be a number of these but as yet undocumented >> as far as I can see. >> >> Julian >> >> On 22/3/22 10:19, Willi Egger via ntg-context wrote: >>> Hi Julian, >>> >>> :-) I am confronted with my own comments :-) >>> >>> However, this is precisely what I am using in my attempt to get this hidden >>> number. But no it does not appear… >>> >>> Thank you! >>> Willi >>> >>>> On 21 Mar 2022, at 22:33, jbf via ntg-context wrote: >>>> >>>> Willi, >>>> >>>> I see a comment by yourself back in 2011 at >>>> https://wiki.contextgarden.net/Last_Head_Number >>>> >>>> I wonder if this helps? >>>> >>>> Julian >>>> >>>> On 22/3/22 07:47, Willi Egger via ntg-context wrote: >>>>> Hello everybody! >>>>> >>>>> >>>>> I would like to typeset the chapter title without number in the text. — >>>>> However I still would need to retrieve the number for a calculation in a >>>>> MetaFun graphic. I assume, that even though this number is not typeset, >>>>> it is kept in the background. How to retrieve it? >>>>> >>>>> Kind regards >>>>> >>>>> Willi >>>>> ___ >>>>> 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/ >>
Re: [NTG-context] Chapter number retrieval
Hi Willi, You could also access the number by using the \getmarking[chapternumber][current]. I think you have used a similar approach in the https://wiki.contextgarden.net/Thumb_index. Adam On Tue, Mar 22, 2022 at 11:15 PM Willi Egger via ntg-context < ntg-context@ntg.nl> wrote: > Hello Adam! > > Many thanks for your solution. — It works very well in your example and > also in an extended version with \startfrontmatter..\stopfrontmatter > \startbodymatter…\stopbodymatter. — Unfortunately It does not work to my > wish in the actual setup of my book. — I am using now the solution > presented by Sreeram. > > Again thank you so much! > Kind regards > > Willi > > > On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context < > ntg-context@ntg.nl> wrote: > > > > Hi, > > > > There is a good overview of accessible variables at: > https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names > > > > Maybe you want something like this? > > > > \starttext > > \setuphead[chapter][number=no] > > \startchapter[title={My Chapter}] > > Hello world! > > \startMPcode > > label("\currentstructurelistnumber\ \currentstructuretitle", origin); > > draw fullcircle scaled 3cm; > > \stopMPcode > > \stopchapter > > \stoptext > > > > Adam > > > > On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context > wrote: > > Willi, offlist: Have to admit I didn't actually try your own comment, > > but if it doesn't work, I'll be interested in the eventual answer. I > > recently had to do something similar for the TOC, and Hraban pointed me > > to \currentlistentrynumber. There probably has to be a command along > > those lines (which led me to your 2011 comment, sorry ) for non-list > > retrieval. \structurenumber? \currentstructurenumber? Something along > > those lines? There seem to be a number of these but as yet undocumented > > as far as I can see. > > > > Julian > > > > On 22/3/22 10:19, Willi Egger via ntg-context wrote: > > > Hi Julian, > > > > > > :-) I am confronted with my own comments :-) > > > > > > However, this is precisely what I am using in my attempt to get this > hidden number. But no it does not appear… > > > > > > Thank you! > > > Willi > > > > > >> On 21 Mar 2022, at 22:33, jbf via ntg-context > wrote: > > >> > > >> Willi, > > >> > > >> I see a comment by yourself back in 2011 at > https://wiki.contextgarden.net/Last_Head_Number > > >> > > >> I wonder if this helps? > > >> > > >> Julian > > >> > > >> On 22/3/22 07:47, Willi Egger via ntg-context wrote: > > >>> Hello everybody! > > >>> > > >>> > > >>> I would like to typeset the chapter title without number in the > text. — However I still would need to retrieve the number for a calculation > in a MetaFun graphic. I assume, that even though this number is not > typeset, it is kept in the background. How to retrieve it? > > >>> > > >>> Kind regards > > >>> > > >>> Willi > > >>> > ___ > > >>> If your question is of interest to others as well, please add an > entry to the Wiki! > > >>> > > >>> maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > > >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net > > >>> archive : https://bitbucket.org/phg/context-mirror/commits/ > > >>> wiki : http://contextgarden.net > > >>> > ___ > > >> > ___ > > >> If your question is of interest to others as well, please add an > entry to the Wiki! > > >> > > >> maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > > >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net > > >> archive : https://bitbucket.org/phg/context-mirror/commits/ > > >> wiki : http://contextgarden.net > > >> > ___ > > > > ___
Re: [NTG-context] Chapter number retrieval
Hello Adam! Many thanks for your solution. — It works very well in your example and also in an extended version with \startfrontmatter..\stopfrontmatter \startbodymatter…\stopbodymatter. — Unfortunately It does not work to my wish in the actual setup of my book. — I am using now the solution presented by Sreeram. Again thank you so much! Kind regards Willi > On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context > wrote: > > Hi, > > There is a good overview of accessible variables at: > https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names > > Maybe you want something like this? > > \starttext > \setuphead[chapter][number=no] > \startchapter[title={My Chapter}] > Hello world! > \startMPcode > label("\currentstructurelistnumber\ \currentstructuretitle", origin); > draw fullcircle scaled 3cm; > \stopMPcode > \stopchapter > \stoptext > > Adam > > On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context > wrote: > Willi, offlist: Have to admit I didn't actually try your own comment, > but if it doesn't work, I'll be interested in the eventual answer. I > recently had to do something similar for the TOC, and Hraban pointed me > to \currentlistentrynumber. There probably has to be a command along > those lines (which led me to your 2011 comment, sorry ) for non-list > retrieval. \structurenumber? \currentstructurenumber? Something along > those lines? There seem to be a number of these but as yet undocumented > as far as I can see. > > Julian > > On 22/3/22 10:19, Willi Egger via ntg-context wrote: > > Hi Julian, > > > > :-) I am confronted with my own comments :-) > > > > However, this is precisely what I am using in my attempt to get this hidden > > number. But no it does not appear… > > > > Thank you! > > Willi > > > >> On 21 Mar 2022, at 22:33, jbf via ntg-context wrote: > >> > >> Willi, > >> > >> I see a comment by yourself back in 2011 at > >> https://wiki.contextgarden.net/Last_Head_Number > >> > >> I wonder if this helps? > >> > >> Julian > >> > >> On 22/3/22 07:47, Willi Egger via ntg-context wrote: > >>> Hello everybody! > >>> > >>> > >>> I would like to typeset the chapter title without number in the text. — > >>> However I still would need to retrieve the number for a calculation in a > >>> MetaFun graphic. I assume, that even though this number is not typeset, > >>> it is kept in the background. How to retrieve it? > >>> > >>> Kind regards > >>> > >>> Willi > >>> ___ > >>> 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 > >> ___ > > ___ > > 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! > &g
Re: [NTG-context] Metafun, difficulty with graphical element in the margin
Hello Wolfgang, thank you so much for your time and investigation. — Indeed your solution works fine! I use the latest version from March 2022. I use \startbodymatter cum suis. Lieber Gruß Willi > On 20 Mar 2022, at 17:21, Wolfgang Schuster via ntg-context > wrote: > > Willi Egger via ntg-context schrieb am 20.03.2022 um 17:05: >> Hoi Wolfgang, >> >> I tested both variants (bodymatter and bodypart. The compilation runs >> through, however without the thumb-picture in the margin and the metafun >> error is in the log. > > 1. Do you use \startfrontmatter and \startbodymatter in your document to > create blocks? > > 2. Is you installation up-to-date? > > Attached is a slightly modified version of your example, the only thing which > has to be local to the bodypart is the background setting to enable the thumb > pictures. > > 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 ___
Re: [NTG-context] Metafun, difficulty with graphical element in the margin
Willi Egger via ntg-context schrieb am 20.03.2022 um 17:05: Hoi Wolfgang, I tested both variants (bodymatter and bodypart. The compilation runs through, however without the thumb-picture in the margin and the metafun error is in the log. 1. Do you use \startfrontmatter and \startbodymatter in your document to create blocks? 2. Is you installation up-to-date? Attached is a slightly modified version of your example, the only thing which has to be local to the bodypart is the background setting to enable the thumb pictures. Wolfgang \definecolor [chap_frame] [black] \definecolor [textcolor] [white] \startuseMPgraphic{chapter-thumb} path chap_frame ; pair pos,a,b ; picture Chap ; if \somenamedheadnumber{chapter}{current} > 0 : curr_chap := \somenamedheadnumber{chapter}{current} ; else : curr_chap := 1 ; fi; if \somenamedheadnumber{chapter}{last} > 0 : last_chap := \somenamedheadnumber{chapter}{last} ; else : last_chap := 1 ; fi; if \somenamedheadnumber{section}{current} > 0 : curr_sect := \somenamedheadnumber{section}{current} ; else: curr_sect := 1 ; fi; if \somenamedheadnumber{section}{last} > 0 : last_sect := \somenamedheadnumber{section}{last} ; else: last_sect := 1; fi; if curr_chap < 11 : skip := TextHeight * (curr_chap-1)/11 ; elseif curr_chap < 21 : skip := TextHeight * (curr_chap-11)/11 ; else: skip := TextHeight * (curr_chap-21)/11 ; fi; Chap := textext("\bfa\textcolor\getmarking[chapter]") ; StartPage ; chap_frame := lcircle xscaled (2*RightMarginWidth) yscaled (1.5*RightMarginWidth) ; a := ulcorner chap_frame ; b := urcorner chap_frame ; pos := urcorner Field[Text][RightMarginSeparator] - ulcorner chap_frame - (-1mm,skip) ; fill chap_frame shifted pos withcolor "chap_frame" ; draw Chap rotated 90 shifted (xpart pos-4mm,ypart pos) ; StopPage ; \stopuseMPgraphic \defineoverlay[chapter-thumb][\useMPgraphic{chapter-thumb}] \startsectionblockenvironment[bodypart] \setupbackgrounds[rightpage][background=chapter-thumb] \stopsectionblockenvironment \showframe \starttext \startfrontmatter \startchapter[title=Test A] \samplefile{ward} \stopchapter \stopfrontmatter \startbodymatter \startchapter[title=Test C] \samplefile{ward} \stopchapter \stopbodymatter \stoptext % Global settings for all chapters \setuphead[chapter][style=\ssc] % Local settings for chapter in the bodymatter block \startsectionblockenvironment[bodypart] \setuphead[chapter][color=blue] \stopsectionblockenvironment \starttext \startfrontmatter \title{Table of content} \placecontent \stopfrontmatter \startbodymatter \chapter{Knuth} \input knuth \chapter{Zapf} \input zapf \stopbodymatter \stoptext \starttext a\texttilde b\lettertilde c\textasciitilde d \stoptext \definepageinjectionalternative [chapter:image] [renderingsetup=pageinjection:chapter:image] \startsetups [pageinjection:chapter:image] \centerbox{\externalfigure[\dummyparameter{name}]} \stopsetups \definepageinjection [chapter:start] [empty] [page=left] \definepageinjection [chapter:insert] [previouspage] [alternative=chapter:image, offset=1cm, pagestate=stop] \setuphead [chapter] [beforesection={\pageinjection[chapter:start]}, insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}] \setuppagenumbering [alternative=doublesided] \setupexternalfigures [location=default] \useexternalfigure [chapter-1] [mill] [factor=max] \useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000] \useexternalfigure [chapter-3] [cow][orientation=90,height=\framedwidth] \starttext \startchapter [title={Mill}] \dorecurse{7}{\samplefile{lorem}} \stopchapter \startchapter [title={Hacker}] \dorecurse{11}{\samplefile{lorem}} \stopchapter \startchapter [title={cow}] \dorecurse{7}{\samplefile{lorem}} \stopchapter \stoptext \setupbodyfont[termes] \starttext plays \m{\frac{2}{3} A}, \m{\frac{1}{3} D}. \stoptext \definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes] \definefontfamily[story][serif][TeX Gyre Schola] \definefontfamily [story] [sans] [Latin Modern Sans] \definefontfamily [story] [mono] [Latin Modern Mono] [features=none] \definetypeface [story] [ss] [sans] [modern] [default] \definetypeface [story] [ss] [mono] [modern] [default] \definetypeface [story] [ss] [sans] [modern-designsize] [default] \definetypeface [story] [ss] [mono] [modern-designsize] [default] \definefontfamily[story][mm][TeX Gyre Pagella Math] \definetypeface [story] [mm] [math] [pagella] [default] \setupbodyfont[story,11pt] \usebodyfont[termes] \showframe \startsetups [blockquote:style] \switchtobodyfont[termes]
Re: [NTG-context] Metafun, difficulty with graphical element in the margin
Hoi Wolfgang! thank you for your suggestion. Your example indeed works. However if I apply this to my situation, which is \startsectionblockenvironment[bodymatter] \setups{Thumb-pictures} \stopsectionblockenvironment nothing happens. I.e. I get no error, but also no picture, indicating, that the \setups command is not executed.. Kind regards Willi > On 20 Mar 2022, at 11:28, Wolfgang Schuster via ntg-context > wrote: > > Willi Egger via ntg-context schrieb am 19.03.2022 um 21:42: >> Hello Otared, >> thanks so much for your testing and comments. — Tthe problem is, that this >> thumb-picture should only be placed in the \startboydmatter..\stopbodymatter >> sections. In the case of this book however there are the title pages and >> quite some text including the TOC in the >> \startfrontmatter..\stopfrontmatter. SO I end up with being forced to invoke >> the setups at the beginning of the bodymatter. > > Use sectionblockenvironment to set value which are only applied in the > frontmatter, bodymatter etc. > > begin example > % Global settings for all chapters > \setuphead[chapter][style=\ssc] > > % Local settings for chapter in the bodymatter block > \startsectionblockenvironment[bodypart] > \setuphead[chapter][color=blue] > \stopsectionblockenvironment > > \starttext > > \startfrontmatter > > \title{Table of content} > > \placecontent > > \stopfrontmatter > > \startbodymatter > > \chapter{Knuth} > > \input knuth > > \chapter{Zapf} > > \input zapf > > \stopbodymatter > > \stoptext > end example > > Wolfgang > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metafun, difficulty with graphical element in the margin
Hi Otared, thank you for your help. — I tried your approach aswel on my Mac as also on Linux. Unfortunately neither installation did give me a positive result. The error remains. Kind regards Willi > On 19 Mar 2022, at 23:39, Otared Kavian via ntg-context > wrote: > > Hi Willi, > > How about invoking the command \setups{Thumb-pictures} between a \start \stop > pair as in the following: > > \showframe > > \starttext > > \startfrontmatter > \startchapter[title=Test A] > \samplefile{knuth} > \stopchapter > > \stopfrontmatter > > %\page[yes] > > \start > \setups{Thumb-pictures} > > \startbodymatter > \startchapter[title=Test B] > \samplefile{ward} > \stopchapter > > \startchapter[title=Test C] > \samplefile{ward} > \stopchapter > > \startchapter[title=Test D] > \samplefile{ward} > \stopchapter > > > \stopbodymatter > \stop > > \startbackmatter > \dorecurse{5}{\startchapter[title=Test #1] > \samplefile{thuan} > \stopchapter} > > \stopbackmatter > > \stoptext > > >> On 19 Mar 2022, at 21:42, Willi Egger via ntg-context >> wrote: >> >> Hello Otared, >> >> thanks so much for your testing and comments. — Tthe problem is, that this >> thumb-picture should only be placed in the \startboydmatter..\stopbodymatter >> sections. In the case of this book however there are the title pages and >> quite some text including the TOC in the >> \startfrontmatter..\stopfrontmatter. SO I end up with being forced to invoke >> the setups at the beginning of the bodymatter. >> >> Thanks! >> Kind regards >> >> Willi >> >>> On 19 Mar 2022, at 16:52, Otared Kavian via ntg-context >>> wrote: >>> >>> Hi Willi, >>> >>> Your test file works fine if I place >>> \setups{Thumb-pictures} >>> before \starttext (using version 2022.03.12 17:56 LMTX). >>> However in the file you sent the choice of the command >>> \setups{Thumb-pictures} >>> is between chapter A and B, which seems starnge to me... >>> >>> Best regards: Otared K. >>> >>>> On 18 Mar 2022, at 20:29, Willi Egger via ntg-context >>>> wrote: >>>> >>>> Good evening! >>>> >>>> I have a dictionary where I would like to include thumb-pictures in the >>>> margin. — When I use the attached code with a single >>>> \startchapter...\stopchapter, it works. However if I add another >>>> \startchapter…\stopchapter before loading the setups for the thumb-picture >>>> metafun throws an error about not having complete information for >>>> performing a transformation. >>>> >>>> I am currently using the before last version of LMTX-ConTeXT (January 21st >>>> 2022). >>>> >>>> Could someone try to compile? >>>> >>>> Thanks, kind regards >>>> >>>> Willi___ >>>> 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 >>> ___ >> >> ___ >> 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://con
Re: [NTG-context] Metafun, difficulty with graphical element in the margin
Willi Egger via ntg-context schrieb am 19.03.2022 um 21:42: Hello Otared, thanks so much for your testing and comments. — Tthe problem is, that this thumb-picture should only be placed in the \startboydmatter..\stopbodymatter sections. In the case of this book however there are the title pages and quite some text including the TOC in the \startfrontmatter..\stopfrontmatter. SO I end up with being forced to invoke the setups at the beginning of the bodymatter. Use sectionblockenvironment to set value which are only applied in the frontmatter, bodymatter etc. begin example % Global settings for all chapters \setuphead[chapter][style=\ssc] % Local settings for chapter in the bodymatter block \startsectionblockenvironment[bodypart] \setuphead[chapter][color=blue] \stopsectionblockenvironment \starttext \startfrontmatter \title{Table of content} \placecontent \stopfrontmatter \startbodymatter \chapter{Knuth} \input knuth \chapter{Zapf} \input zapf \stopbodymatter \stoptext end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] Metafun, difficulty with graphical element in the margin
Hi Willi, How about invoking the command \setups{Thumb-pictures} between a \start \stop pair as in the following: \showframe \starttext \startfrontmatter \startchapter[title=Test A] \samplefile{knuth} \stopchapter \stopfrontmatter %\page[yes] \start \setups{Thumb-pictures} \startbodymatter \startchapter[title=Test B] \samplefile{ward} \stopchapter \startchapter[title=Test C] \samplefile{ward} \stopchapter \startchapter[title=Test D] \samplefile{ward} \stopchapter \stopbodymatter \stop \startbackmatter \dorecurse{5}{\startchapter[title=Test #1] \samplefile{thuan} \stopchapter} \stopbackmatter \stoptext > On 19 Mar 2022, at 21:42, Willi Egger via ntg-context > wrote: > > Hello Otared, > > thanks so much for your testing and comments. — Tthe problem is, that this > thumb-picture should only be placed in the \startboydmatter..\stopbodymatter > sections. In the case of this book however there are the title pages and > quite some text including the TOC in the \startfrontmatter..\stopfrontmatter. > SO I end up with being forced to invoke the setups at the beginning of the > bodymatter. > > Thanks! > Kind regards > > Willi > >> On 19 Mar 2022, at 16:52, Otared Kavian via ntg-context >> wrote: >> >> Hi Willi, >> >> Your test file works fine if I place >> \setups{Thumb-pictures} >> before \starttext (using version 2022.03.12 17:56 LMTX). >> However in the file you sent the choice of the command >> \setups{Thumb-pictures} >> is between chapter A and B, which seems starnge to me... >> >> Best regards: Otared K. >> >>> On 18 Mar 2022, at 20:29, Willi Egger via ntg-context >>> wrote: >>> >>> Good evening! >>> >>> I have a dictionary where I would like to include thumb-pictures in the >>> margin. — When I use the attached code with a single >>> \startchapter...\stopchapter, it works. However if I add another >>> \startchapter…\stopchapter before loading the setups for the thumb-picture >>> metafun throws an error about not having complete information for >>> performing a transformation. >>> >>> I am currently using the before last version of LMTX-ConTeXT (January 21st >>> 2022). >>> >>> Could someone try to compile? >>> >>> Thanks, kind regards >>> >>> Willi___ >>> 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 >> ___ > > ___ > 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] help with facing page image
I wonder if someone can help me untangle the current little mess I seem to be creating! Author wants an image on facing page to each of 10 chapters in the bodypart of the document. Assume that everything else is working properly for this document (double-sided etc.), but other than before chapter 1, I can't seem to get my facing page image to appear where it should! A question along these lines (but not quite the same) was asked back in 2019, so I started with what seemed to me to be the simplest response to this question. Here is what I have to get the image before Chapter 1 in bodymatter: \startbodymatter \definelayer[mylayer] % name of the layer [x=0mm, y=0mm, % from upper left corner of paper width=\paperwidth,height=\paperheight] % let the layer cover the full paper \setlayer[mylayer] [hoffset=2.5cm, voffset=3cm] {\externalfigure[Chapter1.jpg][width=.9\textwidth]} \doifoddpageelse {} {\pushbackground[page] \setupbackgrounds[page]%[background=color,backgroundcolor=red] [background=mylayer] \page[empty] \popbackground} \startchapter[title={Prelude}] etc. This correctly places the Chapter1.jpg on the facing page to Chapter 1. My problem comes with Chapter 2, since Chapter 1 finishes on an even page, and this means I would need a blank odd page to follow that so that Chapter2.jpg (a different image to the first) can be on the verso of that and the Chapter itself would then start on the odd page facing that. I think the \doiffoddpageelse command above is only meant to work when a chapter ends on an odd, not an even page, but I do not know what alternative command to give. Repeating the above set of commands prior to \startchapter for chapter 2 places the image, naturally enough, behind the last page of text for Chapter 1, which is unacceptable, so I thought I could simply add a blank page or two after the chapter and it would all fall into place. I tried various ways of doing that (e.g. \page[+2], or using makeup pages), and while I can add pages that way, I can't get the image to appear. No doubt the solution is simple enough. It might also lie in the \setuphead[chapter] arrangement too. I've tried page=yes there, but to no avail. I also tried \ startsetups[chapter:before] with the pushbackground etc command and added that in with before=\directsetup{chapter:before} as suggested in the wiki, but couldn't get that to work either. By that stage I was so tangled up in the problem I may not have been able to think straight :-). Somehow, though, I think most of the elements are there. Any help would be appreciated. Julian ___ 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] Strange behavior with \startbodymatter ... \stopbodymatter
Fabrice Couvreur via ntg-context schrieb am 28.12.2021 um 15:34: Hi, In my file cours_premiere.tex if I indicate \startbodymatter \component[probabilites.tex] \stopbodymatter I get the following error message tex error > tex error on line 49 in file ./cours_premiere.tex: Undefined control sequence \pgfmath@settrigformat \pgfmath@settrigformat \pgfmath@settrigformat \pgfmath@settrigformat \stopbodymatter 39 [criterium=all, 40 interaction=all, 41 alternative=c] 42 43 \stoptitle 44 45 \stopfrontmatter 46 47 \startbodymatter 48 \component[probabilites.tex] 49 >> \stopbodymatter 50 51 52 \stopproduct The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 1 TeX Output exited abnormally with code 1 at Tue Dec 28 15:31:31 On the other hand, if I indicate \component[probabilites.tex] the file compiles without error. The error is about tikz/pgf and the mentioned command comes from pgfplots. To investigate further you have to create a minimal (non) working example. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Strange behavior with \startbodymatter ... \stopbodymatter
Hi, In my file cours_premiere.tex if I indicate \startbodymatter \component[probabilites.tex] \stopbodymatter I get the following error message tex error > tex error on line 49 in file ./cours_premiere.tex: Undefined control sequence \pgfmath@settrigformat \pgfmath@settrigformat \pgfmath@settrigformat \pgfmath@settrigformat \stopbodymatter 39[criterium=all, 40interaction=all, 41 alternative=c] 42 43 \stoptitle 44 45 \stopfrontmatter 46 47 \startbodymatter 48 \component[probabilites.tex] 49 >> \stopbodymatter 50 51 52 \stopproduct The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 1 TeX Output exited abnormally with code 1 at Tue Dec 28 15:31:31 On the other hand, if I indicate \component[probabilites.tex] the file compiles without error. Thanks Fabrice ___ 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] Confusing interaction between \writetolist and bookmarks (bug?)
I am relatively new to ConTeXt and have encountered something that does not work as I expected it to based on various documentation and examples. My book design requires the front matter to contain an abridged table of contents just for chapters, and a detailed table of contents in the back matter. Everything worked fine -- including the PDF bookmarks and table of contents -- until I started using \writetolist to manually inject additional sections and subsections into their respective lists. The manually injected entries do show up (as I expected), but their corresponding PDF bookmarks get repeated (not what I expected). Here is a M(not)WD: ###begin \setupinteraction[state=start] \placebookmarks[chapter, section][chapter, section] \setupinteractionscreen[option=bookmark] \starttext \startfrontmatter \title{Contents} \placelist[chapter] \stopfrontmatter \startbodymatter \chapter{Chapter ONE} \section{Section ONE} \writetolist[section]{}{Section via writetolist ONE} \chapter{Chapter TWO} \stopbodymatter \startbackmatter \chapter{Detailed Table of Contents} \placecontent[criterium=all] \stopbackmatter \stoptext ###end The repetitions go away when any one of the following is done: -- commenting out the front/body/back commands -- commenting out both contents at front and back -- commenting out just back contents -- commenting out the \writetolist Have I misunderstood something? Many thanks, Musa ___ 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] \startbodymatter forcing new page in document
Taco Hoekwater via ntg-context schrieb am 15.11.2021 um 15:28: On 15 Nov 2021, at 15:07, A A via ntg-context wrote: Dear All, The following code generates a title and some fake text: \setuppagenumbering[location=right] \usemodule[visual] \usebtxdataset[bibliography.bib] \starttext \title{test} \fakewords{1000}{1200} \stoptext The following code does the same, but wraps the fakewords in a bodymatter environment: \setuppagenumbering[location=right] \usemodule[visual] \usebtxdataset[bibliography.bib] \starttext \title{test} \startbodymatter \fakewords{1000}{1200} \stopbodymatter \stoptext In the first case, the title remains on the same page as the fake text. In the second case, a new page is forced after the title. Why does this occur? \startbodymatter starts a sectionblock (the “bodypart” block, to be exact) and by default these blocks all switch to a ‘right’ page. Add this in your preamble to get rid of the page switch: \setupsectionblock[bodypart][page=no] The better solution in my opinion is to put the title *in* the sectionblock. 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] \startbodymatter forcing new page in document
> On 15 Nov 2021, at 15:07, A A via ntg-context wrote: > > Dear All, > > The following code generates a title and some fake text: > > \setuppagenumbering[location=right] > > \usemodule[visual] > > \usebtxdataset[bibliography.bib] > \starttext > \title{test} > \fakewords{1000}{1200} > > \stoptext > > The following code does the same, but wraps the fakewords in a bodymatter > environment: > > \setuppagenumbering[location=right] > > \usemodule[visual] > > \usebtxdataset[bibliography.bib] > \starttext > \title{test} > \startbodymatter > \fakewords{1000}{1200} > \stopbodymatter > > \stoptext > > > In the first case, the title remains on the same page as the fake text. In > the second case, a new page is forced after the title. Why does this occur? \startbodymatter starts a sectionblock (the “bodypart” block, to be exact) and by default these blocks all switch to a ‘right’ page. Add this in your preamble to get rid of the page switch: \setupsectionblock[bodypart][page=no] > > Regards, > > Amine > > ___ > 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 > ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] \startbodymatter forcing new page in document
Dear All, The following code generates a title and some fake text: *\setuppagenumbering[location=right]\usemodule[visual]\usebtxdataset[bibliography.bib]\starttext\title{test}\fakewords{1000}{1200}\stoptext* The following code does the same, but wraps the fakewords in a *bodymatter * environment: *\setuppagenumbering[location=right]\usemodule[visual]\usebtxdataset[bibliography.bib]\starttext\title{test}* *\startbodymatter\fakewords{1000}{1200}\stopbodymatter* *\stoptext* In the first case, the title remains on the same page as the fake text. In the second case, a new page is forced after the title. Why does this occur? Regards, Amine ___ 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] repeat layer recto pages
Muchas gracias Pablo, that was most helpful, and of course it works. The particular part that I was missing (there was already alternative=doublesided in the preamble) of course was the \startsectionblockenvironment[bodypart], so thanks for highlighting that. I was also a bit confused about the difference between state=repeat and repeat=yes, and I can see that both do work in the snippet you gave me, so perhaps there is no difference between these? Julian On 10/11/21 2:05 am, Pablo Rodriguez via ntg-context wrote: On 11/9/21 4:18 AM, jbf via ntg-context wrote: I want a particular layer to repeat on recto pages only, but I don't want this to happen in frontmatter, only in bodymatter. This is what I have done, just before the first chapter after \startbodymatter (but unsuccessfully; the layer repeats for every page at the moment. I must have omitted something). Hi Julian, this is what you want: \startsectionblockenvironment[bodypart] \setupbackgrounds [rightpage] [background=butterfly] \stopsectionblockenvironment \startbodymatter \setupbackgrounds [rightpage] [background=butterfly] \startchapter[title={Chapter title}] \definelayer[butterfly] [x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight] \setlayer[butterfly] [hoffset=.99\textwidth, voffset=1cm] {\externalfigure[bfly.jpg][width=1.5cm]} \setupbackgrounds[page][background=butterfly] The last line adds backgrounds to every page. And without doublesided, there are not right and left pages. And you don’t need the \define and \setlayer after \startchapter. A complete sample would read: \setuppagenumbering[alternative=doublesided] \definelayer[butterfly][state=repeat] \setlayer[butterfly] [hoffset=.99\textwidth, voffset=1cm] {butterfly} \startsectionblockenvironment[bodypart] \setupbackgrounds [rightpage] [background=butterfly] \stopsectionblockenvironment \def\rubbish% {\dorecurse{2} {\chapter{Chapter} \dorecurse{25}{\input knuth}}} \starttext \startfrontmatter \rubbish \stopfrontmatter \startbodymatter \rubbish \stopbodymatter \startappendices \rubbish \stopappendices \startbackmatter \rubbish \stopbackmatter \stoptext I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] repeat layer recto pages
On 11/9/21 4:18 AM, jbf via ntg-context wrote: > I want a particular layer to repeat on recto pages only, but I don't > want this to happen in frontmatter, only in bodymatter. > > This is what I have done, just before the first chapter after > \startbodymatter (but unsuccessfully; the layer repeats for every page > at the moment. I must have omitted something). Hi Julian, this is what you want: \startsectionblockenvironment[bodypart] \setupbackgrounds [rightpage] [background=butterfly] \stopsectionblockenvironment > \startbodymatter > > \setupbackgrounds > [rightpage] > [background=butterfly] > > \startchapter[title={Chapter title}] > \definelayer[butterfly] > [x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight] > \setlayer[butterfly] > [hoffset=.99\textwidth, voffset=1cm] > {\externalfigure[bfly.jpg][width=1.5cm]} > \setupbackgrounds[page][background=butterfly] The last line adds backgrounds to every page. And without doublesided, there are not right and left pages. And you don’t need the \define and \setlayer after \startchapter. A complete sample would read: \setuppagenumbering[alternative=doublesided] \definelayer[butterfly][state=repeat] \setlayer[butterfly] [hoffset=.99\textwidth, voffset=1cm] {butterfly} \startsectionblockenvironment[bodypart] \setupbackgrounds [rightpage] [background=butterfly] \stopsectionblockenvironment \def\rubbish% {\dorecurse{2} {\chapter{Chapter} \dorecurse{25}{\input knuth}}} \starttext \startfrontmatter \rubbish \stopfrontmatter \startbodymatter \rubbish \stopbodymatter \startappendices \rubbish \stopappendices \startbackmatter \rubbish \stopbackmatter \stoptext I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] repeat layer recto pages
I want a particular layer to repeat on recto pages only, but I don't want this to happen in frontmatter, only in bodymatter. This is what I have done, just before the first chapter after \startbodymatter (but unsuccessfully; the layer repeats for every page at the moment. I must have omitted something). \startbodymatter \setupbackgrounds [rightpage] [background=butterfly] \startchapter[title={Chapter title}] \definelayer[butterfly] [x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight] \setlayer[butterfly] [hoffset=.99\textwidth, voffset=1cm] {\externalfigure[bfly.jpg][width=1.5cm]} \setupbackgrounds[page][background=butterfly] etc. Any thoughts? Julian ___ 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] Solved: Book setup with LHS-side quotes before chapters/parts, header/footer issues, TOC, etc.
Thanks to Wolfgang Schuster and Bruce Horrocks I have now a working solution. I ended up following Bruce’s suggestion of doing a left hand side (LHS) page opposite the first (RHS) chapter or part page differently than using after/before modifications of the \chapter and \part setups as I had been doing years ago (but that book did not have parts and was done in mkii) The modification of \chapter and \part setups with before= and after= never worked in the \component setup in LMTX. Creating a separate command to run immediately before a \chapter or \part, as suggested by Bruce, was simpler and and turned out to be more robust. So, this single file example also works when \components are used. The only issues I have now left are very minimal. In the table of contents, the abstract for a part has some extra whitespace above, which the chapter abstracts don’t have. But that is not really a problem. And getting the part title somewhere more centred on its page is also left as an issue for later. Example file. In a project/component setup: everything before the \starttext goes into the environment file, the rest in the product file. %%% %%% Sections that have a LHS preface with a quote %%% \startsetups SectionLHSPageSetup \page[left] \setupheader[state=empty] \start \startalignment[left,nothyphenated] \startnarrower[4*left] \tf\it \stopsetups \definestartstop [SectionLHSPage] [ before={\setups{SectionLHSPageSetup}}, after={\stopnarrower \stopalignment\stop}] \define[1]\SectionPrequote{\startSectionLHSPage #1\stopSectionLHSPage} %%% %%% part is managed here %%% \defineconversionset [part] [Romannumerals] [numbers] \setuplabeltext[en][partlabel=Part~] \setuphead [part] [sectionsegments=part, bodypartlabel=partlabel, appendixlabel=, sectionconversionset=part, page=yes, header=empty, footer=empty, placehead=yes] \definelist[parttext] \setuplist[parttext][margin=1.3em,pagecommand=\gobbleoneargument] \define[1]\PartAbstract{\writetolist[parttext]{}{\start\itx#1\stop}} %%% %%% chapter is managed here %%% \definetext [chapterfooter] % name [footer]% vertical location [pagenumber]% content \setuplabeltext[en][appendixchapterlabel=Appendix~] \setuphead [chapter] [page=yes, header=empty, bodypartlabel=, appendixlabel=appendixchapterlabel, footer=chapterfooter, sectionsegments=chapter, before={\blank[force,2*big]}, after={\blank[3*big]}] \definelist[chaptertext] \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument] \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}} \defineresetset [default] [0,0] [1] \setupcombinedlist [content] [list={part,parttext,chapter,chaptertext}] \starttext \startfrontmatter \completecontent \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \startchapter[title={One}] \dorecurse{7}{\input tufte \par \input knuth} \stopchapter \stopfrontmatter \startbodymatter \dorecurse{3}{ \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben Wierda}} \part{Title title title} \PartAbstract{This is a part abstract.} \dorecurse{2}{ \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \startchapter[title={Two}] \ChapterAbstract{This is a chapter abstract.} \dorecurse{5}{\input tufte \par \input knuth} \stopchapter } } \stopbodymatter \startappendices \defineresetset[default][0,1][1] %% reset , chapter, but not part \setuphead[part][number=no] \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben Wierda}} \part{Title title title} \PartAbstract{This is a part abstract.} \dorecurse{2}{ \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \startchapter[title={Two}] \ChapterAbstract{This is a chapter abstract.} \dorecurse{5}{\input tufte \par \input knuth} \stopchapter } \stopappendices \stoptext In a component setup, a part component may look like this: \startcomponent p_partone \product prd_book \project project_book \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben Wierda}} \part{Title title title} \PartAbstract{This is a part abstract for a normal part.} \component c_chapter \component c_chapter \stopcomponent and a chapter component like this: \startcomponent c_chapter \product prd_book \project project_book \starttext \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \chapter{An Inconvenient Truth} \ChapterAbstract{This is a chapter abstract.} \setupindenting[next] \placeinitial I{\kap{\bf n the half}} century or so that human kind has had IT, the IT sector has increasingly wrestled with the fact that IT projects often fail in one
Re: [NTG-context] Compilation error with the new version of lmtx
On 10/16/2021 7:34 PM, Fabrice Couvreur via ntg-context wrote: Hi, The latest version of lmtx does not allow me to compile the following file although there was no problem before. Thank you Fabrice \startproduct[expertes-manual] \startfrontmatter \setuppagenumbering [location=] \definefont [ChapterTextStyle] [SansBold*default sa 2.2] \setuphead [title] [style=ChapterTextStyle, align=flushright] \setuplist [chapter] [style=bold, alternative=b, width=1em] \setuplist [section] [margin=1em, width=1.75em] \setuplist [subsection] [margin=2.75em, width=2em, distance=\spaceamount] \starttitle[title=Table des matières] \placelist [chapter,section,subsection] [criterium=all, interaction=all, alternative=c] \stoptitle \stopfrontmatter \startbodymatter \component[chapter_1] \component[chapter_2] \stopbodymatter \stopproduct ## tex error > tex error on line 1 in file ./expertes.tex: Undefined control sequence \undefined i need a better example - 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] Compilation error with the new version of lmtx
Hi, The latest version of lmtx does not allow me to compile the following file although there was no problem before. Thank you Fabrice \startproduct[expertes-manual] \startfrontmatter \setuppagenumbering [location=] \definefont [ChapterTextStyle] [SansBold*default sa 2.2] \setuphead [title] [style=ChapterTextStyle, align=flushright] \setuplist [chapter] [style=bold, alternative=b, width=1em] \setuplist [section] [margin=1em, width=1.75em] \setuplist [subsection] [margin=2.75em, width=2em, distance=\spaceamount] \starttitle[title=Table des matières] \placelist [chapter,section,subsection] [criterium=all, interaction=all, alternative=c] \stoptitle \stopfrontmatter \startbodymatter \component[chapter_1] \component[chapter_2] \stopbodymatter \stopproduct ## tex error > tex error on line 1 in file ./expertes.tex: Undefined control sequence \undefined \relax \p_maxwidth \dostarttagged \t!listcontent \empty \clf_listtitle {\currentlist }\currentlistindex \relax \dostoptagged \strc_lists_limitated_text #1->\edef \p_maxwidth {\listparameter \c!maxwidth }\ifempty \p_maxwidth \listparameter \c!textcommand {#1} \else \listparameter \c!textcommand {\limitatetext {#1}\p_maxwidth {\splitsymbol {\listparameter \c!limittext }}}\fi \22>:140>:abc ...rence_attribute \v!text \strc_lists_set_style_color \c!textstyle \c!textcolor \v!text \the \t_lists_every_renderingtext \the \t_lists_every_renderingsynchronize \setstrut \begstrut \strc_lists_limitated_text \currentlistentrytitle \endstrut \en ... \currentlistextra ...\begingroup \ifempty \m_strc_list_alternative \edef \currentlistalternative {\listparameter \c!alternative }\else \let \currentlistalternative \m_strc_list_alternative \fi \directsetup {\listalternativeparameter \c!renderingsetup } \relax \endgr ... ... alternative=c] 1 >> \startproduct[expertes-manual] 2 3 \startfrontmatter 4 5 \setuppagenumbering 6[location=] 7 8 \definefont 9 [ChapterTextStyle] 10 [SansBold*default sa 2.2] 11 The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 256 TeX Output exited abnormally with code 1 at Sat Oct 16 19:28:21 ___ 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] Generating HTML
I would want to generate HTML, but in the example below, "html-test.tex", the index does not show in the file "html-test-export/html-test-div.html", and the source file \index{…}, gets in the HTML a black triangle. The index and links work fine in "html-test.pdf", though. — html-test.tex — \definefontfamily [mainface][math][stix] \setupbodyfont[mainface,10pt] \setupinteraction[state=start, click=yes, focus=standard, color=darkblue] \setupbackend[export=yes] % Exporting HTML/XML \defineregister [index] \setupregister [index] [indicator=no] \startchapter[title={Introduction}] Foobar\index{foobar} out of working order. \startbodymatter Foo\index{foo} or bar\index{bar}. \startbackmatter \completeindex \stopbackmatter \stoptext — ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] Roman PDF labels
On 9/14/21 1:58 PM, Sylvain Hubert via ntg-context wrote: > Dear List, > > Do we have something like "\pagenumbering{roman}" in latex, which sets > the pdf labels (page numbers for pdf viewers, not the ones rendered in > the footer) to roman numbers? Hi Sylvain, copied from https://wiki.contextgarden.net/Table_of_Contents#Page_numbering_in_ToC: \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \setuplist[chapter][pageconversionset=pagenumber] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] \stopsectionblockenvironment \starttext \startfrontmatter \dorecurse{25}{\null\page} \stopfrontmatter \startbodymatter \dorecurse{25}{\null\page} \stopbodymatter \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] TOC labeltext and no partlabel
Thank you very much Wolfgang for the explanation, Both solutions make sense now and work great. Regards, Adam On Wed, Aug 25, 2021 at 11:46 AM Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02: > > Hi, > > > > I have asked this question before, but now I cannot get it working again. > > > https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc > > > > I want to set partlabels in my TOC but not in the document itself. > > > > The desired output would be: > > --- > > Contents > > Chapter 1 Bodypart > > Appendix A Appendix > > > > 1 Bodypart > > A Appendix > > --- > > > > [...] > > > > But that does not show the labels in the TOC (trying it with LMTX and > MKIV). > > The easy way is to create a new heading for the appendices (e.g. > \extrachapter) and set the label you want to use in the list. > > \setuplist [chapter] [label=chapter] > \setuplist [extrachapter] [label=appendix] > > > A complexer solution where you can keep \chapter in the appendices can > be achieved with a customized number type and the use of the processor > mechanism to set the labels in the list entries. > > \setuplist >[chapter] >[width=fit, > distance=\spaceamount] > > \defineconversionset [bodypart:chapternumber] [] [bodypartnumber->n] > \defineconversionset [appendix:chapternumber] [] [appendixnumber->A] > > \setuphead >[chapter] >[sectionconversionset=chapternumber] > > \startsectionblockenvironment [frontpart] > > \defineprocessor [bodypartnumber] [left=Chapter~] > \defineprocessor [appendixnumber] [left=Appendix~] > > \stopsectionblockenvironment > > \starttext > > \startfrontmatter > \completecontent > \stopfrontmatter > > \startbodymatter > \chapter{Bodypart} > \stopbodymatter > > \startappendices > \chapter{Appendix} > \stopappendices > > \stoptext > > Wolfgang > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] TOC labeltext and no partlabel
Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02: Hi, I have asked this question before, but now I cannot get it working again. https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc I want to set partlabels in my TOC but not in the document itself. The desired output would be: --- Contents Chapter 1 Bodypart Appendix A Appendix 1 Bodypart A Appendix --- [...] But that does not show the labels in the TOC (trying it with LMTX and MKIV). The easy way is to create a new heading for the appendices (e.g. \extrachapter) and set the label you want to use in the list. \setuplist [chapter] [label=chapter] \setuplist [extrachapter] [label=appendix] A complexer solution where you can keep \chapter in the appendices can be achieved with a customized number type and the use of the processor mechanism to set the labels in the list entries. \setuplist [chapter] [width=fit, distance=\spaceamount] \defineconversionset [bodypart:chapternumber] [] [bodypartnumber->n] \defineconversionset [appendix:chapternumber] [] [appendixnumber->A] \setuphead [chapter] [sectionconversionset=chapternumber] \startsectionblockenvironment [frontpart] \defineprocessor [bodypartnumber] [left=Chapter~] \defineprocessor [appendixnumber] [left=Appendix~] \stopsectionblockenvironment \starttext \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \chapter{Bodypart} \stopbodymatter \startappendices \chapter{Appendix} \stopappendices \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] TOC labeltext and no partlabel
Hi, I have asked this question before, but now I cannot get it working again. https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc I want to set partlabels in my TOC but not in the document itself. The desired output would be: --- Contents Chapter 1 Bodypart Appendix A Appendix 1 Bodypart A Appendix --- Based on Wolfgang's example, I am trying this MWE: \setuplabeltext[en][chapter=Chapter~] \setuplabeltext[en][appendix=Appendix~] \setuplist[chapter][label=yes,width=fit,stopper=~] \setuphead[chapter][bodypartlabel=,appendixlabel=] \starttext \startfrontmatter \completecontent[label=section] \stopfrontmatter \startbodymatter \chapter{Bodypart} \stopbodymatter \startappendices \chapter{Appendix} \stopappendices \stoptext But that does not show the labels in the TOC (trying it with LMTX and MKIV). I must be doing something wrong. Any hints? Thanks, Adam ___ 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 not to display the header of the chapter page on the page with the table of contents ?
Hi Wolfgang, Pablo's solution works, but I tried yours without success. Here are the main lines of my project begin product \startproduct[terminale-manual] \project[terminale-environment] \startdocument \startfrontmatter ... \stopfrontmatter \startbodymatter \component[terminale_recurrence] ... \stopbodymatter \stopdocument \stopproduct end product begin project \startproject[terminale-environment] \environment[terminale-style] ... \stopproject end project begin component \project[terminale-environment] \startcomponent[terminale_recurrence] ... \endcomponent end component begin environment \startenvironment[terminale-style] ... \startsetups [section:chapter] \setuphead [chapter] [align=flushright, textcommand=\groupedcommand{\blank[medium]}{}, numbercolor=darkgray, textstyle=ChapterTextStyle, numberstyle=ChapterNumberStyle, before=\startChapterFrame, after=\stopChapterFrame, header=high] \stopsetups \startsectionblockenvironment [bodypart] \directsetup{section:chapter} \stopsectionblockenvironment \doifmode{*component}{\directsetup{section:chapter}} ... \endenvironment end environment Le dim. 15 août 2021 à 19:03, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Pablo Rodriguez via ntg-context schrieb am 15.08.2021 um 18:33: > > On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote: > >> A small note : this method works if I compile the project but if I > >> compile only one chapter, the header no longer appears. > > Hi Fabrice, > > > > I have never used projects and chapters (or whatever the right name is). > > > > I’m not sure I get what you’re experiencing: with a single chapter, do > > you have the fancy layout or not? > > > > It would make sense that the fancy chapter doesn’t appear only compiling > > a chapter. I guess there is no \startbodymatter...\stopbodymatter > > wrapping it. > > > > Another approach would be: > > > > [...] > > Setting values for \title is a way to avoid the chapter setup for the > table of contents etc. > but there is a way to set values which are used only when you process a > component file. > > To make it work one has to load the environment file after > \startcomponent because you > can use the *component mode to check whether the parent file is a > product or a component. > > begin product > \startproduct [*] > > \environment [...] > > \startfrontmatter > ... > \stopfrontmatter > > \startbodymatter > \component [...] > \stopbodymatter > > \stopproduct > end product > > begin component > \startcomponent [*] > > \environment [...] > > ... > > \stopcomponent > end component > > begin environment > \startenvironment [*] > > \startsetups [section:chapter] > > \setuphead > [chapter] > [...] > > \stopsetups > > \startsectionblockenvironment [bodypart] > \directsetup{section:chapter} > \stopsectionblockenvironment > > \doifmode{*component}{\directsetup{section:chapter}} > > \stopenvironment > end environment > > 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 ___
Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?
Pablo Rodriguez via ntg-context schrieb am 15.08.2021 um 18:33: On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote: A small note : this method works if I compile the project but if I compile only one chapter, the header no longer appears. Hi Fabrice, I have never used projects and chapters (or whatever the right name is). I’m not sure I get what you’re experiencing: with a single chapter, do you have the fancy layout or not? It would make sense that the fancy chapter doesn’t appear only compiling a chapter. I guess there is no \startbodymatter...\stopbodymatter wrapping it. Another approach would be: [...] Setting values for \title is a way to avoid the chapter setup for the table of contents etc. but there is a way to set values which are used only when you process a component file. To make it work one has to load the environment file after \startcomponent because you can use the *component mode to check whether the parent file is a product or a component. begin product \startproduct [*] \environment [...] \startfrontmatter ... \stopfrontmatter \startbodymatter \component [...] \stopbodymatter \stopproduct end product begin component \startcomponent [*] \environment [...] ... \stopcomponent end component begin environment \startenvironment [*] \startsetups [section:chapter] \setuphead [chapter] [...] \stopsetups \startsectionblockenvironment [bodypart] \directsetup{section:chapter} \stopsectionblockenvironment \doifmode{*component}{\directsetup{section:chapter}} \stopenvironment end environment 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] How not to display the header of the chapter page on the page with the table of contents ?
Hi Pablo, The second solution works as I want it to Thanks Fabrice Le dim. 15 août 2021 à 18:33, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> a écrit : > On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote: > > A small note : this method works if I compile the project but if I > > compile only one chapter, the header no longer appears. > > Hi Fabrice, > > I have never used projects and chapters (or whatever the right name is). > > I’m not sure I get what you’re experiencing: with a single chapter, do > you have the fancy layout or not? > > It would make sense that the fancy chapter doesn’t appear only compiling > a chapter. I guess there is no \startbodymatter...\stopbodymatter > wrapping it. > > Another approach would be: > > \setuphead >[chapter] >[align=flushright, > textcommand=\groupedcommand{\blank[medium]}{}, > numbercolor=darkgray, > textstyle=ChapterTextStyle, > numberstyle=ChapterNumberStyle, > before=\startChapterFrame, > after=\stopChapterFrame, > header=high] > > \setuphead > [title] > [header=empty, >align=, >textcommand=, >textstyle=, >style=\tfc, >before={\blank[2*big]}, >after={\blank[2*big]}] > > 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 > > ___ > ___ 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 not to display the header of the chapter page on the page with the table of contents ?
On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote: > A small note : this method works if I compile the project but if I > compile only one chapter, the header no longer appears. Hi Fabrice, I have never used projects and chapters (or whatever the right name is). I’m not sure I get what you’re experiencing: with a single chapter, do you have the fancy layout or not? It would make sense that the fancy chapter doesn’t appear only compiling a chapter. I guess there is no \startbodymatter...\stopbodymatter wrapping it. Another approach would be: \setuphead [chapter] [align=flushright, textcommand=\groupedcommand{\blank[medium]}{}, numbercolor=darkgray, textstyle=ChapterTextStyle, numberstyle=ChapterNumberStyle, before=\startChapterFrame, after=\stopChapterFrame, header=high] \setuphead [title] [header=empty, align=, textcommand=, textstyle=, style=\tfc, before={\blank[2*big]}, after={\blank[2*big]}] 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] Conditional formatting with *frontpart, *bodypart, *backpart modes
On 8/13/21 5:34 AM, Joey McCollum via ntg-context wrote: > Hi, > > I was curious about the possibility of handling general formatting > settings (e.g., page layout, headers and footers, page numbering, > alignment, default body font assignment, etc.) conditionally for front, > body, and back matter using modes. > [...] Hi Joey, the command is just different: \startsectionblockenvironment[frontpart] \setupbodyfont[modern] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupbodyfont[pagella] \stopsectionblockenvironment \startsectionblockenvironment[backpart] \setupbodyfont[termes] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setupbodyfont[helvetica] \stopsectionblockenvironment \starttext \startfrontmatter \input knuth\par \stopfrontmatter \startbodymatter \input knuth\par \stopbodymatter \startbackmatter \input knuth\par \stopbackmatter \startappendices \input knuth\par \stopappendices \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 ___
[NTG-context] Conditional formatting with *frontpart, *bodypart, *backpart modes
Hi, I was curious about the possibility of handling general formatting settings (e.g., page layout, headers and footers, page numbering, alignment, default body font assignment, etc.) conditionally for front, body, and back matter using modes. According to the wiki page at https://wiki.contextgarden.net/Modes, this should be doable with blocks like \startmode[*frontpart] ... \stopmode, but even in the following minimal example, the conditional formatting isn't getting applied: ``` \startmode[*frontpart] \setupbodyfont[modern, 12pt] \stopmode \startmode[*bodypart] \setupbodyfont[pagella, 12pt] \stopmode \startmode[*backpart] \setupbodyfont[termes, 12pt] \stopmode \starttext \startfrontmatter \input knuth\par \stopfrontmatter \startbodymatter \input knuth\par \stopbodymatter \startbackmatter \input knuth\par \stopbackmatter \stoptext ``` Is there something obvious that I'm missing? Or is there a different recommended approach to conditional formatting by front/body/back matter division? Thank you! Joey ___ 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] Rotating pages
For the following document, the last 3 pages are landscape, but I would like to have the pdf-ed rotated so they are in the pdf document portrait, ie rotated 90 degree to the left but leave the page as how they are now. Is there an easy way to achieve this? \startbuffer[apx] \setuppapersize[ A4,landscape] \setuppagenumbering[ location={footer,center}] \setbreakpoints[compound] \starttext \startsection[title={MyTitle},ref={apx}] \dorecurse{10}{\input zapf\par} \stopsection \stoptext \stopbuffer \savebuffer[list=apx, file=apx.tex] \starttext \startbodymatter \dorecurse{10}{\input zapf\par} \typesetfile[\jobname-apx.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname-apx.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname-apx.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \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] Code document and simpleslides and create in one go the document with simpleslides added
> > > One final question on this one. As per latest comments this works great, > but is there a way so the presentation pages in the appendix are made-up > landscape as they are now, but are rotated 90 degrees so they are created > in the pdf document as the first two pages. \startbuffer[slides] \setuptolerance[ horizontal, tolerant, stretch] \setuppapersize[ A4,landscape] \setuplayout[ width=middle, backspace=35mm, cutspace=35mm, height=middle, topspace=5mm, bottomspace=20mm] \setuppagenumbering[ location={footer,center}] \setuphead [section] [page={yes}] \usetypescript[pagella] \setupbodyfont[pagella,18pt] \setupbodyfontenvironment[ 28pt][ % For body d=36pt, % For title a=12pt, % For author & date ] \setuptype[style=medium] \setuptyping[typing][bodyfont=16pt] \setupwhitespace[medium] \setbreakpoints[compound] \setuphead[chapter][style=\bfd] \setuphead[section][style=\bfc] \setuphead[subsection][style=\bfb] \setuphead[subsubsection][style=\bf] \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] \starttext \startsection[title={MySlideTitle},ref={myref1}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \startsection[title={MySlideTitle},ref={myref2}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \stoptext\starttext text \stoptext \stopbuffer \savebuffer[list=slides, file=slides.tex] \starttext \startbodymatter \dorecurse{10}{\input zapf\par} \typesetfile[\jobname-slides.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname-slides.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname-slides.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \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] Code document and simpleslides and create in one go the document with simpleslides added
I worked around it, instead of simpleslides just use larger fonts to with regular pages \startbuffer[slides] \setuptolerance[ horizontal, tolerant, stretch] \setuppapersize[ A4,landscape] \setuplayout[ width=middle, backspace=35mm, cutspace=35mm, height=middle, topspace=5mm, bottomspace=20mm] \setuppagenumbering[ location={footer,center}] \setuphead [section] [page={yes}] \usetypescript[pagella] \setupbodyfont[pagella,18pt] \setupbodyfontenvironment[ 28pt][ % For body d=36pt, % For title a=12pt, % For author & date ] \setuptype[style=medium] \setuptyping[typing][bodyfont=16pt] \setupwhitespace[medium] \setbreakpoints[compound] \setuphead[chapter][style=\bfd] \setuphead[section][style=\bfc] \setuphead[subsection][style=\bfb] \setuphead[subsubsection][style=\bf] \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] \starttext \startsection[title={MySlideTitle},ref={myref1}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \startsection[title={MySlideTitle},ref={myref2}] Body text \stopsection \stoptext\starttext text \stoptext \stopbuffer \savebuffer[list=slides, file=\jobname_slides.tex, prefix=no] \starttext \startbodymatter \dorecurse{25}{\input zapf\par} \typesetfile[\jobname_slides.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname_slides.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname_slides.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \stoptext Op za 31 jul. 2021 om 16:22 schreef Thomas A. Schmitz via ntg-context < ntg-context@ntg.nl>: > > On 7/31/21 4:06 PM, Pablo Rodriguez via ntg-context wrote: > > BTW, I cannot get simpleslides working with LMTX. > > > I had to make some slight adjustments but have been to lazy to upload a > new and improved version. One reason being that I can't remember my > username and password for the modules section of the garden... I'll have > to ask Taco to reset it for me. > > Thomas > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Code document and simpleslides and create in one go the document with simpleslides added
On 7/31/21 3:27 PM, Jeroen via ntg-context wrote: > Is there an easy way to write a Context document and also code > simpleslides in the same document so that the simpleslides are > automatically added to the document as for example an appendix? Ie > one tex document with Context code, perhaps with some \input and > something like a two-pass job. Hi Jeroen, not sure this might help you (I’m not sure you intend a single source file, in addition to a single PDF document), but here you have: \startbuffer[slides] \setuppapersize[CD] \setupbodyfont[60pt] \starttext \dorecurse{25} {\startmakeup[standard][pagestate=start, style={\ss\bf}, align=center] Slide \pagenumber \stopmakeup} \stoptext \stopbuffer \savebuffer[list=slides, file=\jobname_slides.tex, prefix=no] \starttext \startbodymatter \dorecurse{25}{\input zapf\par} \typesetfile[\jobname_slides.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname_slides.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname_slides.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \stoptext BTW, I cannot get simpleslides working with LMTX. > I was thinking if the simpleslides could be saved as a number of png > images and then with the recurse add them to the document with > placefigure. \externalfigure is your friend here and there is no need to convert the slides to PNG (see above). Just in case it may 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] Moving the old book-structure to a recent ConTeXt
Gerben Wierda schrieb am 16.07.2021 um 15:51: Is there a new template I can download somewhere to start from scratch? There is no template but show below a example for a document which uses the project structure. The examples are just my own preference and there are many ways to change them to fit your own style. 1. File names In the example all sub files (style + chapters) start with the name of the main file and append a sub name. Another popular naming scheme is to prefix the files with c_ (component), p_ (product) or s_ (style/environment). To avoid problems should also try to use only ASCII characters for the file names and avoid anything which is special in TeX, using spaces or extra periods should be avoided as well. 2. Arguments for \component etc. In my example I passed the argument to \component, \startproduct etc. in square brackets but this is only a alternative form to older way, where you passed it without the brackets. Both \component document-xxx and \component [document-xxx] are valid and you can use whatever you prefer. 3. Position of \environment In my example I load the environment-file after \startproduct and \startcomponent but it's also possible to load it before them. There are reasons for both positions and when you choose one you should keep it for all files. 4. \startdocument In my product file I added a document-environment, while it isn't necessary in this case it provides a nice hook to insert a title page for your document. begin document.tex \startproduct [*] \environment [document-environment] \startdocument % \startfrontmatter % % load components with table of contents, introduction etc. % % \stopfrontmatter \startbodymatter \component [document-xxx] \stopbodymatter \stopdocument \stopproduct end document.tex begin document-environment.tex \startenvironment [*] % sub directory for images % % \setupexternalfigures % [directory=...] % % sub directories for components % % \usepath % [...] % put you setups here \stopenvironment end document-environment.tex begin document-xxx.tex \startcomponent [*] \environment [document-environment] % put your content here \stopcomponent end document-xxx.tex Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fwd: Re: LMTX 2021.03.02 | cross reference to an external file | \pagereference
Wolfgang [and Hans ], I'm attaching a minimal(ish) example of a project structure with a call to \pagereference. One can see from the output of master000.tex that the cross references to an external file all work, *apart* from the call to \pagereference. (This is the same issue that I am having with my two volume proceedings.) I'd be grateful for suggestions. Best, Richard % testproject.tex -- LMTX 2021.03.02 \startproject testproject \product testproduct000 \product testproduct001 \stopproject % master000.tex -- LMTX 2021.03.02 \startproduct testproduct000 \project testproject \startbodymatter \component boo.tex \stopbodymatter \stopproduct % master001.tex -- LMTX 2021.03.02 \startproduct testproduct001 \project testproject \startbodymatter \component foo.tex \stopbodymatter \stopproduct % boo.tex -- LMTX 2021.03.02 \startcomponent boo \project testproject \product testproduct000 \useexternaldocument[m001][master001][Test Product, Vol.~{\sc ii}] \chapter[oeps]{oeps} test \from[m001], \in{Ch.~}[m001::one], \at{page}[m001::one] {[}test page one{]} test \from[m001], \in{Ch.~}[m001::one], \at{page}[m001::page- reference] {[}test {\bf pagereference}{]} test \from[m001], \in{Ch.~}[m001::two], \at{page}[m001::two] {[}test page two{]} \stopcomponent % foo.tex -- LMTX 2021.03.02 \startcomponent foo \project testproject \product testproduct001 \chapter[one]{one} \pagereference[page-reference]foo \chapter[two]{two} foo \stopcomponent Forwarded Message From: Richard Mahoney Reply-To: Richard Mahoney , mailing list for ConTeXt users To: ntg-context@ntg.nl Subject: Re: [NTG-context] LMTX 2021.03.02 | cross reference to an external file | \pagereference Date: Fri, 05 Mar 2021 12:02:54 +1300 Mailer: Evolution 3.36.5 Organization: Indica et Buddhica X-Spam-Score: 0.0 Thanks Wolfgang, Hans kindly sent me a simple minimal. I've adjusted it to include a call to \pagereference and it works. I'm currently trying to test my project to see why my own calls to \pagereference do not result in any output, despite the fact that all the calls to the reference ids in chapters work as expected. I'm imagining at this point that it has something to do with using two master files --one for each volume-- with multiple includes (\components) for each chapter -- the \pagereference code appears in a number of the components. I'll try to set up a simple example replicating the file structure I'm using and then send it through. Best, Richard -- T +6433121699 M +64210640216 E rmaho...@indica-et-buddhica.org IM https://t.me/rmahoney W https://indica-et-buddhica.org/ Indica et Buddhica Littledene Bay Road Oxford NZ -Original Message- From: Wolfgang Schuster Reply-To: mailing list for ConTeXt users To: mailing list for ConTeXt users Subject: Re: [NTG-context] LMTX 2021.03.02 | cross reference to an external file | \pagereference Date: Thu, 4 Mar 2021 22:35:46 +0100 Mailer: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.47 X-Spam-Score: 0.0 Richard Mahoney schrieb am 04.03.2021 um 09:04: > > Readers, > > > I'm working on a couple of volumes of papers set up and generated > separately (though within the same project). Some of the papers > in > the second volume make cross references to papers in the first. > Now this is working well so long as the reference is to the > details > associated with, say, a chapter, using \about, \in, and \at. Its > doesn't > seem to work though with \pagereference: no page number appears > in the PDF whatsoever. I have been following the material here: > > > > https://wiki.contextgarden.net/References#References_to_an_external_file > > > I'm wondering then ... do cross references to an external file > work > with \pagereference? > > Hi Richard, I just tested \pagereference in a simple example and had no problem to get the page numbers from the other document. Without a minimal example there is no way to tell what's missing in your document. 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 a
Re: [NTG-context] Help figuring why long document stops short in xml export
On Wed, 2021-02-24 at 15:49 +0100, Taco Hoekwater wrote: > > On 24 Feb 2021, at 10:42, Christoph Hintermüller < > > christ...@out-world.com> wrote: > > > > Hi > > What command line parameters, trackers etc I should activate when i > > There is > > \enabletrackers[export.*] > Thanks. Not sure if related at all but if i add that to the document i do get the following error. It hicksup at \stopstandardmakeup if i remove the stanard makeup it hicksup at frontmatter etc. I think that has something to do with tracker and not the document itself.If i remove everything up to \stopfrontmatter than it runs until the first custom defined float and again yields the same error. If i explicitly not select export.trace.details no hickup. -registered function call [188]: ...cal/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:3052: attempt to index a nil value (field '?') stack traceback: ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3052: in upvalue 'showdetail' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3067: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ... (skipping 5 levels) ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3330: in upvalue 'collectresults' ...cal/tex/texmf-context/tex/context/base/mkiv/back- exp.lua:3423: in upvalue 'nodes_handlers_export' [string "local tonut = nodes.tonut..."]:30: in function <[string "local tonut = nodes.tonut..."]:13> (...tail calls...) [string "/usr/local/tex/texmf-context/tex/context/base..."]:34: in function <[string "/usr/local/tex/texmf- context/tex/context/base..."]:33> (...tail calls...) 58 \definemathcommand[ld][nolop]{\mfunction{ld}} 59 \setupcaption[lefthangingfigure][width=\textwidth,align=figure] 60 \setupheadtext[content=Inhalt] 61 %\traceexternalfilters 62 \enabletrackers[export.*] 63 64 \starttext 65 \startstandardmakeup 66 \title{Programmiertechnik 2} 67 \subsubject{Dr. Christoph Hintermüller} 68 >> \stopstandardmakeup 69 \startfrontmatter 70 \completecontent 71 %\placecombinedlist[content] 72 \stopfrontmatter 73 \startbodymatter 74 75 %\showlayout 76 \input ObjektorientierteProgrammierung 77 \placefloats 78 \input DatenStrukturen- Best Xristoph ___ 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] LMTX problem with XML
Hans, the following sample breaks compilation with latest after release from 2021.02.05 17:45: \startbuffer[demo] http://www.w3.org/1999/xhtml;> In Body \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1} {html|body|div|h1} {xml:*} \xmlsetsetup{#1} {[contains(@class,'frontmatter')]} {xml:frontmatter} \xmlsetsetup{#1} {[contains(@class,'bodymatter')]} {xml:bodymatter} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:frontmatter \startfrontmatter \xmlflush{#1} \stopfrontmatter \stopxmlsetups \startxmlsetups xml:bodymatter \startbodymatter \xmlflush{#1} \stopbodymatter \stopxmlsetups \startxmlsetups xml:h1 \xmlflush{#1} \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext Current latest from 2021.02.13 00:28 complains about argument of \xmlw having an extra }. I think this may be a bug 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] repeated chapter in LMTX Reference Manual?
On 12/4/2020 9:06 PM, Pablo Rodriguez wrote: Hi Hans, many thanks for your new upload that fixes the issue with scaled external figures. I have just accidentally realized: \startbodymatter \component luametatex-preamble \component luametatex-differences [...] \stopbodymatter \startbackmatter [...] \component luametatex-differences \component luametatex-statistics \stopbackmatter I mean, “Differences with LuaTeX” is the second chapter and the second appendix (sort of) in the “LuaMetaTEX Reference Manual”. I wonder whether this is intended. no, it used to be an appendic (list only) - 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] repeated chapter in LMTX Reference Manual?
Hi Hans, many thanks for your new upload that fixes the issue with scaled external figures. I have just accidentally realized: \startbodymatter \component luametatex-preamble \component luametatex-differences [...] \stopbodymatter \startbackmatter [...] \component luametatex-differences \component luametatex-statistics \stopbackmatter I mean, “Differences with LuaTeX” is the second chapter and the second appendix (sort of) in the “LuaMetaTEX Reference Manual”. I wonder whether this is intended. Just in case it might 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] Fwd: Re: styling individual parts of ToC entry
After making silly mistakes, for which I apologize, I finally got the ToC to work for frontmatter and chapters, creating new \defineheads as required, and including the earlier \ChapterListCommand, with the results correctly showing. To add some named sections with authors, I did the following, using an idea Hraban had floated: \setupsectionblock [bodypart] [number=no] \define[1]\SectionTocEntry{% #1\crlf% title \structurelistuservariable{author}% } \setuplist[section][ textcommand=\SectionTocEntry, ] I need to adjust the \setuplist[section] so these section entries move across under the Chapter titles (not be left-aligned as they are now under Chapter number. The earlier \ChapterListCommand has titles and authors moved across 3cm. I have tried: \setuplist[section][width=3cm, textcommand=\SectionTocEntry, ] The width=3cm is not doing anything, so I've got that wrong. How do I move sections across by a specific amount in the TOC? Julian On 9/9/20 5:10 pm, Wolfgang Schuster wrote: jbf schrieb am 09.09.2020 um 08:04: Have to confess I am still not getting far with the final problem in a book that is now fully laid out: frontmatter through to appendices is all correct and working, but the Table of Contents not the way I need it (as explained earlier and listed in a previous email). My latest effort focuses on just one item, the Foreword, since if I get that right, I can apply the same logic to sections. Chapters are already working correctly, thanks to Wolfgang's ChapterListCommand and I am assuming I need that for the several frontmatter 'chapters'. I was earlier using \title for foreword, preface and notes to contributors, but have abandoned that as complicating things, and am now using \chapter, since it does not produce a numbered item - however, it is producing the label 'Chapter' which I don't want for these item. You can see below how I tried to avoid that, but it failed. My MWE addition to what Wolfgang provided is: \definehead [foreword] [chapter] \setuphead [foreword] \setuplist [foreword] [label=foreword, alternative=command, command=\ChapterListCommand]% definition not included here. It was given in an earlier response from Wolfgang. And in the frontmatter itself: \startchapter[foreword][title={\ss Foreword}][author={A. Uthor}] .. You can set the forword string as labeltext and ignore the title (but use a empty argument when set userdata like the author). \definehead [forword] [chapter] \setuplabeltext [en] [forword=Forword, chapter=Chapter ] \setuphead [forword] [frontpartlabel=forword, conversion=empty] \setupsectionblock [frontpart] [number=yes] \setuplist [forword] [label=forword, width=2cm] \setuplist [chapter] [label=chapter, width=2cm] \starttext \startfrontmatter \placelist [chapter,forword] \startforword [] [author={A. u. thor}] \stopforword \stopfrontmatter \startbodymatter \startchapter [title=Chapter 1] [author={A. u. thor}] \stopchapter \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] styling individual parts of ToC entry
Thanks. Just two clarifications (also noting that I altered 'forword' in yours to 'foreword' in mine in every instance, just to get the spelling right): 1. Compiling your example just as it is below produces a result like: [foreword: – – 2]Chapter 1 Chapter 1 A. u. thor 3 We obviously should not be getting [foreword: --2] in our result, nor a doubling up of Chapter 1 2. Where do I stand now with the earlier definition (I mean the \define[3]\ChapterListCommand. Is that still used? Including its \setuplist part? What you have just given me now makes no reference to \ChapterListCommand, so perhaps it is no longer relevant? Julian On 9/9/20 5:10 pm, Wolfgang Schuster wrote: jbf schrieb am 09.09.2020 um 08:04: Have to confess I am still not getting far with the final problem in a book that is now fully laid out: frontmatter through to appendices is all correct and working, but the Table of Contents not the way I need it (as explained earlier and listed in a previous email). My latest effort focuses on just one item, the Foreword, since if I get that right, I can apply the same logic to sections. Chapters are already working correctly, thanks to Wolfgang's ChapterListCommand and I am assuming I need that for the several frontmatter 'chapters'. I was earlier using \title for foreword, preface and notes to contributors, but have abandoned that as complicating things, and am now using \chapter, since it does not produce a numbered item - however, it is producing the label 'Chapter' which I don't want for these item. You can see below how I tried to avoid that, but it failed. My MWE addition to what Wolfgang provided is: \definehead [foreword] [chapter] \setuphead [foreword] \setuplist [foreword] [label=foreword, alternative=command, command=\ChapterListCommand]% definition not included here. It was given in an earlier response from Wolfgang. And in the frontmatter itself: \startchapter[foreword][title={\ss Foreword}][author={A. Uthor}] .. You can set the forword string as labeltext and ignore the title (but use a empty argument when set userdata like the author). \definehead [forword] [chapter] \setuplabeltext [en] [forword=Forword, chapter=Chapter ] \setuphead [forword] [frontpartlabel=forword, conversion=empty] \setupsectionblock [frontpart] [number=yes] \setuplist [forword] [label=forword, width=2cm] \setuplist [chapter] [label=chapter, width=2cm] \starttext \startfrontmatter \placelist [chapter,forword] \startforword [] [author={A. u. thor}] \stopforword \stopfrontmatter \startbodymatter \startchapter [title=Chapter 1] [author={A. u. thor}] \stopchapter \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] styling individual parts of ToC entry
jbf schrieb am 09.09.2020 um 08:04: Have to confess I am still not getting far with the final problem in a book that is now fully laid out: frontmatter through to appendices is all correct and working, but the Table of Contents not the way I need it (as explained earlier and listed in a previous email). My latest effort focuses on just one item, the Foreword, since if I get that right, I can apply the same logic to sections. Chapters are already working correctly, thanks to Wolfgang's ChapterListCommand and I am assuming I need that for the several frontmatter 'chapters'. I was earlier using \title for foreword, preface and notes to contributors, but have abandoned that as complicating things, and am now using \chapter, since it does not produce a numbered item - however, it is producing the label 'Chapter' which I don't want for these item. You can see below how I tried to avoid that, but it failed. My MWE addition to what Wolfgang provided is: \definehead [foreword] [chapter] \setuphead [foreword] \setuplist [foreword] [label=foreword, alternative=command, command=\ChapterListCommand]% definition not included here. It was given in an earlier response from Wolfgang. And in the frontmatter itself: \startchapter[foreword][title={\ss Foreword}][author={A. Uthor}] .. You can set the forword string as labeltext and ignore the title (but use a empty argument when set userdata like the author). \definehead [forword] [chapter] \setuplabeltext [en] [forword=Forword, chapter=Chapter ] \setuphead [forword] [frontpartlabel=forword, conversion=empty] \setupsectionblock [frontpart] [number=yes] \setuplist [forword] [label=forword, width=2cm] \setuplist [chapter] [label=chapter, width=2cm] \starttext \startfrontmatter \placelist [chapter,forword] \startforword [] [author={A. u. thor}] \stopforword \stopfrontmatter \startbodymatter \startchapter [title=Chapter 1] [author={A. u. thor}] \stopchapter \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Appendix question
jbf schrieb am 08.09.2020 um 12:40: A (hopefully) simple question this time: Why would my appendices be labelled as Appendix One, Appendix Two etc., instead of Appendix A, Appendix B? I thought Appendices would normally be labelled alphabetically, not numerically. So I get APPENDIX as the label, I have: \setuplabeltext [en] [chapter={\bf Chapter }, appendix=APPENDIX ] But elsewhere I have: \setupheads[chapter][indentnext=no,conversion=Words,distance=.25em] So is that what is affecting my appendices, and if so how do I do it so that Chapters get words (One, Two, etc) and Appendices get letters (A,B, etc)? Use sectionconversionset to set the number conversion for all section levels and ignore the conversion key. \defineconversionset [bodypart:section] [n,Word] [n] \defineconversionset [appendix:section] [n,A] [n] \setupheads [sectionconversionset=section] \setuplabeltext [en] [chapter=Chapter , appendix=Appendix ] \starttext \startbodymatter \stopbodymatter \dorecurse{5}{\chapter{Chapter #1}} \startappendices \dorecurse{5}{\chapter{Chapter #1}} \stopappendices \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] \setupuserpagenumber not working as expected
Dear Wolfgang, Thank you for taking the time to go through the example and indicating these improvements. I will definitely evaluate and start applying this to my own code. Kind regards,Jan WillemFrom: Wolfgang SchusterSent: Friday, 4 September 2020 10:47To: mailing list for ConTeXt users; Jan Willem FlammaSubject: Re: [NTG-context] \setupuserpagenumber not working as expected Jan Willem Flamma schrieb am 03.09.2020 um 10:29:> Dear Julian,> > I use something similar using a main product file, an environment file > that contain the styling and several components that build up the > frontmatter, the manual and the appendices.> > Below my setup where I start the roman numbering on the table of > contents page (page 5 or v in roman)> > Once the bodymatter starts the pagenumber is set to the arabic 1 (see > below in the main product file)> > You should be able to copy and adapt to your needs. There are lot of things which can be improved in your example. 1. Pass the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct 2. Use \setvariables or \setupdocument to set the document title, revision etc. 3. Use \startsectionblockenvironment to move setups from the document content into the environment file. 4. Use pagestate=start to increase the page counter with \startstandardmakeup. 5. Set search path for figures (\copypages use the figure mechanism) with \setupexternalfigure[location=...]. Below is a modified (but untested) version of your sample document. Wolfgang begin product\startproduct product \environment env-WA % \setvariables% [document]% [ manual={Course Manual},% title={Title},% subtitleone={Subtitle 1},% subtitletwo={Subtitle 2},% revnumber={Revision number}] \setupdocument [ manual={Course Manual}, title={Title}, subtitleone={Subtitle 1}, subtitletwo={Subtitle 2}, revnumber={Revision number}] \startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents \stopfrontmatter \startbodymatter \component co-01 \component co-02 \stopbodymatter \startappendices \component co-ap-01 \component co-ap-02 \stopappendices \startbackmatter \copypages[app1.pdf][n=4] \stopbackmatter \stopproduct end product begin environment\startenvironment env-WA \setuppagenumbering [alternative=doublesided, location=right] \defineconversionset [frontpart:pagenumber] [] [romannumerals] \setupexternalfigures [directory={External PDF}] \startsectionblockenvironment [frontpart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [bodypart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \setuppagenumber [number=1] \stopsectionblockenvironment \startsectionblockenvironment [appendix] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [backpart] \setuppagenumber[state=stop] \stopsectionblockenvironment \stopenvironment end environment begin component\startcomponent fm-frontpage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] % \dontleavehmode\externalfigure[frontpage-logo.png][width=12cm] \framed [height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} \blank[6*big] {\bfc \documentvariable{manual}} \blank[4*big] {\tfc \documentvariable{title}} \blank[2*big] {\tfc \documentvariable{subtitleone}} \blank[2*big] {\tfc \documentvariable{subtitletwo}} \stopstandardmakeup \stopcomponent end component begin component\startcomponent fm-titlepage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] {\tfb \documentvariable{manual}} \blank[2*big] {\tfb \documentvariable{title}} \blank[2*big] {\tfb \documentvariable{subtitleone}} \blank[2*big] {\tfb \documentvariable{subtitletwo}} \blank[10*big] {\tfb \documentvariable{revnumber}} \blank {\tfb \currentdate[month,year]} \blank[10*big] {\tfb Written by:} \blank {\tfb Company name} \blank {\tfb City, Country} \stopstandardmakeup \stopcomponent end component begin component\startcomponent fm-tableofcontents \product product \starttitle [title=Table of Contents] \placecontent \stoptitle \stopcomponent end component ___ 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 / htt
Re: [NTG-context] \setupuserpagenumber not working as expected
Jan Willem Flamma schrieb am 03.09.2020 um 10:29: Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. There are lot of things which can be improved in your example. 1. Pass the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct 2. Use \setvariables or \setupdocument to set the document title, revision etc. 3. Use \startsectionblockenvironment to move setups from the document content into the environment file. 4. Use pagestate=start to increase the page counter with \startstandardmakeup. 5. Set search path for figures (\copypages use the figure mechanism) with \setupexternalfigure[location=...]. Below is a modified (but untested) version of your sample document. Wolfgang begin product \startproduct product \environment env-WA % \setvariables % [document] % [ manual={Course Manual}, % title={Title}, %subtitleone={Subtitle 1}, %subtitletwo={Subtitle 2}, % revnumber={Revision number}] \setupdocument [ manual={Course Manual}, title={Title}, subtitleone={Subtitle 1}, subtitletwo={Subtitle 2}, revnumber={Revision number}] \startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents \stopfrontmatter \startbodymatter \component co-01 \component co-02 \stopbodymatter \startappendices \component co-ap-01 \component co-ap-02 \stopappendices \startbackmatter \copypages[app1.pdf][n=4] \stopbackmatter \stopproduct end product begin environment \startenvironment env-WA \setuppagenumbering [alternative=doublesided, location=right] \defineconversionset [frontpart:pagenumber] [] [romannumerals] \setupexternalfigures [directory={External PDF}] \startsectionblockenvironment [frontpart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [bodypart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \setuppagenumber [number=1] \stopsectionblockenvironment \startsectionblockenvironment [appendix] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [backpart] \setuppagenumber[state=stop] \stopsectionblockenvironment \stopenvironment end environment begin component \startcomponent fm-frontpage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] % \dontleavehmode\externalfigure[frontpage-logo.png][width=12cm] \framed [height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} \blank[6*big] {\bfc \documentvariable{manual}} \blank[4*big] {\tfc \documentvariable{title}} \blank[2*big] {\tfc \documentvariable{subtitleone}} \blank[2*big] {\tfc \documentvariable{subtitletwo}} \stopstandardmakeup \stopcomponent end component begin component \startcomponent fm-titlepage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] {\tfb \documentvariable{manual}} \blank[2*big] {\tfb \documentvariable{title}} \blank[2*big] {\tfb \documentvariable{subtitleone}} \blank[2*big] {\tfb \documentvariable{subtitletwo}} \blank[10*big] {\tfb \documentvariable{revnumber}} \blank {\tfb \currentdate[month,year]} \blank[10*big] {\tfb Written by:} \blank {\tfb Company name} \blank {\tfb City, Country} \stopstandardmakeup \stopcomponent end component begin component \startcomponent fm-tableofcontents \product product \starttitle [title=Table of Contents] \placecontent \stoptitle \stopcomponent end component ___ 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] \setupuserpagenumber not working as expected
Credits to Pragma who helped me to set this up a few years ago. From: jbfSent: Friday, 4 September 2020 00:20To: Jan Willem FlammaCc: ntg >> mailing list for ConTeXt usersSubject: Re: [NTG-context] \setupuserpagenumber not working as expected Thanks Jan, that is an extensive bit of work below! Might take me a while to digest, but I'll explore it carefully.JulianOn 3/9/20 6:29 pm, Jan Willem Flamma wrote:Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards,Jan Willem Flamma The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define\MyManual{Course Manual}\define\MyTitle{Title}\define\MySubtitleOne{Subtitle 1}\define\MySubtitleTwo{Subtitle 2}\define\MyRevnumber{Revision number} % Load frontmatter files\startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents\stopfrontmatter % Load bodymatter file\startbodymatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\setuppagenumber[number=1] \component co-01 \component co-02\stopbodymatter % Load backmatter files\startbackmatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\startappendices \component co-ap-01 \component co-ap-02\stopappendices\stopbackmatter % Load external PDF documents\setuppagenumber[state=stop]\copypages[External PDF/app1.pdf][n=4] \stopproduct= The env-WA.tex file (below is about pagenumbering only)=% Start chapter on right (odd) page, pagenumber = bottom right\setuppagenumbering [alternative=doublesided, location=right] % Pagenumbering style\definestructureconversionset [frontpart:pagenumber][][romannumerals]\definestructureconversionset [bodypart:pagenumber] [][numbers]\definestructureconversionset [appendix:pagenumber] [][numbers]= The fm-frontpage.tex file\startcomponent currentcomponent \product product % Front page layout\startstandardmakeup % Place logo centered on page\framed[height=5cm,width=broad,frame=off]{\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles\blank[6*big]\color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big]\color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent The fm-titlepage.tex file\startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}} \blank \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}} \blank \midaligned{\color[Modu_Blue]{\tfb Company name}} \blank \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent The fm-tableofcontents.tex file\startcomponent currentcomponent \product product \setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right] % This is where I want the roman numbering to start\setuppagenumber[number=5] \starttitle[title=Table of Contents]\placecontent\stoptitle \stopcomponent From: jbfSent: Thursday, 3 September 2020 06:05To: mailing list for ConTeXt usersSubject: [NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!):\definestructureconversionset[frontpart:pagenumber][][romannumerals]\definestructureconversionset[bodypart:pagenumber] [][numbers]\startsectionblockenvironment[frontpart]\setupuserpagenumber[numberconv
Re: [NTG-context] \setupuserpagenumber not working as expected
Thanks Jan, that is an extensive bit of work below! Might take me a while to digest, but I'll explore it carefully. Julian On 3/9/20 6:29 pm, Jan Willem Flamma wrote: Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards, Jan Willem Flamma *The main product file* == \environment env-WA \startproduct currentproduct % Document definitions \define\MyManual{Course Manual} \define\MyTitle{Title} \define\MySubtitleOne{Subtitle 1} \define\MySubtitleTwo{Subtitle 2} \define\MyRevnumber{Revision number} % Load frontmatter files \startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents \stopfrontmatter % Load bodymatter file \startbodymatter \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \setuppagenumber[number=1] \component co-01 \component co-02 \stopbodymatter % Load backmatter files \startbackmatter \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \startappendices \component co-ap-01 \component co-ap-02 \stopappendices \stopbackmatter % Load external PDF documents \setuppagenumber[state=stop] \copypages[External PDF/app1.pdf][n=4] \stopproduct = *The env-WA.tex file (below is about pagenumbering only)* = % Start chapter on right (odd) page, pagenumber = bottom right \setuppagenumbering [alternative=doublesided, location=right] % Pagenumbering style \definestructureconversionset [frontpart:pagenumber][][romannumerals] \definestructureconversionset [bodypart:pagenumber] [][numbers] \definestructureconversionset [appendix:pagenumber] [][numbers] = *The fm-frontpage.tex file* \startcomponent currentcomponent \product product % Front page layout \startstandardmakeup % Place logo centered on page \framed[height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles \blank[6*big] \color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big] \color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent *The fm-titlepage.tex file* \startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}} \blank \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}} \blank \midaligned{\color[Modu_Blue]{\tfb Company name}} \blank \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent *The fm-tableofcontents.tex file* \startcomponent currentcomponent \product product \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] % This is where I want the roman numbering to start \setuppagenumber[number=5] \starttitle[title=Table of Contents] \placecontent \stoptitle \stopcomponent *From: *jbf <mailto:roma83...@gmail.com> *Sent: *Thursday, 3 September 2020 06:05 *To: *mailing list for ConTeXt users <mailto:ntg-context@ntg.nl> *Subject: *[NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!): \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuplist[chapter][pageconversionset=pagenumber] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] \stopsectionblockenvironment The frontma
Re: [NTG-context] \setupuserpagenumber not working as expected
Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards,Jan Willem Flamma The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define\MyManual{Course Manual}\define\MyTitle{Title}\define\MySubtitleOne{Subtitle 1}\define\MySubtitleTwo{Subtitle 2}\define\MyRevnumber{Revision number} % Load frontmatter files\startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents\stopfrontmatter % Load bodymatter file\startbodymatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\setuppagenumber[number=1] \component co-01 \component co-02\stopbodymatter % Load backmatter files\startbackmatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\startappendices \component co-ap-01 \component co-ap-02\stopappendices\stopbackmatter % Load external PDF documents\setuppagenumber[state=stop]\copypages[External PDF/app1.pdf][n=4] \stopproduct= The env-WA.tex file (below is about pagenumbering only)=% Start chapter on right (odd) page, pagenumber = bottom right\setuppagenumbering [alternative=doublesided, location=right] % Pagenumbering style\definestructureconversionset [frontpart:pagenumber][][romannumerals]\definestructureconversionset [bodypart:pagenumber] [][numbers]\definestructureconversionset [appendix:pagenumber] [][numbers]= The fm-frontpage.tex file\startcomponent currentcomponent \product product % Front page layout\startstandardmakeup % Place logo centered on page \framed[height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles\blank[6*big]\color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big]\color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent The fm-titlepage.tex file\startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}} \blank \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}} \blank \midaligned{\color[Modu_Blue]{\tfb Company name}} \blank \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent The fm-tableofcontents.tex file\startcomponent currentcomponent \product product \setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right] % This is where I want the roman numbering to start\setuppagenumber[number=5] \starttitle[title=Table of Contents]\placecontent\stoptitle \stopcomponent From: jbfSent: Thursday, 3 September 2020 06:05To: mailing list for ConTeXt usersSubject: [NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!):\definestructureconversionset[frontpart:pagenumber][][romannumerals]\definestructureconversionset[bodypart:pagenumber] [][numbers]\startsectionblockenvironment[frontpart]\setupuserpagenumber[numberconversion=romannumerals]\setuplist[chapter][pageconversionset=pagenumber]\setuppagenumber[number=1]\stopsectionblockenvironment\startsectionblockenvironment[bodypart]\setuppagenumber[number=1]\stopsectionblockenvironmentThe frontmatter is some 16 pages worth (ends on a verso page but that verso carries the arabic number 1 instead of page xvi which it should be, since the final paragraph on that page ends
Re: [NTG-context] \setupuserpagenumber not working as expected
jbf schrieb am 03.09.2020 um 06:04: Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!): \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuplist[chapter][pageconversionset=pagenumber] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] \stopsectionblockenvironment The frontmatter is some 16 pages worth (ends on a verso page but that verso carries the arabic number 1 instead of page xvi which it should be, since the final paragraph on that page ends with \stopfrontmatter. That means Chapter 1 (immediately after \startbodymatter) is now page 2 instead of page 1! I tried a slightly simpler version of the above which I found on Stackexchange: |\definestructureconversionset[frontpart:pagenumber][][romannumerals]|| | |\startsectionblockenvironment[bodypart]| |\setcounter[userpage][1]\stopsectionblockenvironment| but it gave me the same result. Any idea how I can get the correct result? Do you have these settings in your document? \setupsectionblock [frontpart] [page=] \setupsectionblock [bodypart] [page=] When this is the case change them to \setupsectionblock [frontpart] [page=yes] \setupsectionblock [bodypart] [page=yes] or add \page before \stopfrontmatter. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] \setupuserpagenumber not working as expected
Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!): \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuplist[chapter][pageconversionset=pagenumber] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] \stopsectionblockenvironment The frontmatter is some 16 pages worth (ends on a verso page but that verso carries the arabic number 1 instead of page xvi which it should be, since the final paragraph on that page ends with \stopfrontmatter. That means Chapter 1 (immediately after \startbodymatter) is now page 2 instead of page 1! I tried a slightly simpler version of the above which I found on Stackexchange: |\definestructureconversionset[frontpart:pagenumber][][romannumerals]|| | |\startsectionblockenvironment[bodypart]| |\setcounter[userpage][1]\stopsectionblockenvironment| but it gave me the same result. Any idea how I can get the correct result? Julian ___ 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] Label to delete in the table of contents
Hi Wolfgang, Thank you for your reply. Probably my fault but now I get the number 0 on the word "Summary". Fabrice [image: contents.png] Le lun. 24 août 2020 à 15:12, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Fabrice Couvreur schrieb am 23.08.2020 um 16:02: > > Hello, > For the title of the chapters I use the following command. > > \unexpanded\def\HeadTitle#1#2% >{\framed > [frame=off, >width=fit, >align=flushleft] >{\color[darkgray]{\tfxx\cap\bf\labeltext{chapter}} > \blank#1\blank#2} > > When I compile my project, I have the label "Chapitre" above the word > "Sommaire" in the table of contents : how to delete it ? > > > 1. Don't apply the command to \title > > \setuphead[title][command=] > > > 2. Make the command local to bodypart of your document, this works only > when you use section blocks (e.g. \startbodymatter) > > \startsectionblockenvironment[bodypart] > \setuphead[chapter][command=\HeadTitle] > \stopsectionblockenvironment > > > 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 ___
Re: [NTG-context] Label to delete in the table of contents
Fabrice Couvreur schrieb am 23.08.2020 um 16:02: Hello, For the title of the chapters I use the following command. \unexpanded\def\HeadTitle#1#2% {\framed [frame=off, width=fit, align=flushleft] {\color[darkgray]{\tfxx\cap\bf\labeltext{chapter}} \blank#1\blank#2} When I compile my project, I have the label "Chapitre" above the word "Sommaire" in the table of contents : how to delete it ? 1. Don't apply the command to \title \setuphead[title][command=] 2. Make the command local to bodypart of your document, this works only when you use section blocks (e.g. \startbodymatter) \startsectionblockenvironment[bodypart] \setuphead[chapter][command=\HeadTitle] \stopsectionblockenvironment 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] Help on tweaking alignment, page numbers and ToC
Nicola schrieb am 13.08.2020 um 18:06: 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: Can you start a new thread when you have a new question. When other people have the same problem they can see on the subject if this is the right thread to find a solution for it. \setuppagenumbering[alternative=doublesided,page=no] The page key in \setuppagenumbering is used to add the final page in a doublesided document to have a even number of pages. \definemakeup[ToC][align=middle,pagestate=start,doublesided=no] \starttext \startfrontmatter \startmakeup[ToC] \placecontent \stopmakeup \chapter{Preface} \stopfrontmatter \startbodymatter \dorecurse{10}{\chapter{Foo}} \stopbodymatter \stoptext I have no idea how to allow chapters to start at arbitrary pages when alternative=doublesided. \setuphead[chapter][page=yes] 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] Help on tweaking alignment, page numbers and ToC
On 2020-08-13, Pablo Rodriguez wrote: > 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. 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: \setuppagenumbering[alternative=doublesided,page=no] \definemakeup[ToC][align=middle,pagestate=start,doublesided=no] \starttext \startfrontmatter \startmakeup[ToC] \placecontent \stopmakeup \chapter{Preface} \stopfrontmatter \startbodymatter \dorecurse{10}{\chapter{Foo}} \stopbodymatter \stoptext I have no idea how to allow chapters to start at arbitrary pages when alternative=doublesided. Nicola ___ 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
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: \setuppagenumbering[alternative=doublesided] \definemakeup[ToC][align=middle,pagestate=start] \starttext \startfrontmatter \startmakeup[ToC] \placecontent \stopmakeup \input{knuth} \stopfrontmatter \startbodymatter \dorecurse{10}{\chapter{Foo}} \stopbodymatter \stoptext How do I suppress the blank page after the ToC? Nicola ___ 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 ___