[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: last page number for a list
Alan Bowen schrieb am 30.03.2024 um 20:59: How can I get the last page number of a chapter for a list (ToC)? Outside of a list, I use \lastpagenumber. But that does not work in a list such as the ToC. Any tips or pointers will be gladly received. You can try this: \definepagestate[alanpage] \definecounter [alanindex] \setuphead [chapter] [insidesection={\setpagestate[alanpage]}, aftersection={\setpagestate[alanpage]}] \setuphead [title] [insidesection=, aftersection=] \define[1]\ChapterListPage {\pagestaterealpage{alanpage}{\number\numexpr\incrementedcounter[alanindex]\relax}% \thinspace --\thinspace \pagestaterealpage{alanpage}{\number\numexpr\incrementedcounter[alanindex]\relax}} \setuplist[chapter][pagecommand=\ChapterListPage] \setuplist[chapter][pagecommand=\ChapterListPage] \showgrid \starttext \completecontent \startchapter [title=Knuth] \dorecurse{12}{\samplefile{knuth}} \stopchapter \startchapter [title=Zapf] \dorecurse{12}{\samplefile{zapf}} \stopchapter \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: last page number for a list
Hi, Bruce— This does not quite work—the page numbers are those of the first page of the chapter, not the last. But thanks for the tip about \writetolist. Perhaps I can get that to work. What I need are ToC entries like AuthorName ShortTitle 1–6 I need this pagination because one of the requirements of continuous publication on the OJS is that once an item is published changes are not permitted. So I cannot go with normal continuous publication since, for us anyway, items are not processed in strict sequential order (e,g., we may have, paper+paper+ review+paper...) If it helps: I currently have \startFMTitle[reference=\Reference, title={}][itemAuthor=AuthorName, itemTitle=ShortTitle,...] \setuplist[FMTitle][state=start, alternative=startendfmpages, criterium=all,] (\Reference is defined at the in the preamble to input of the file/component.) \definelistalternative[startendfmpages][renderingsetup=list:startendfmpages] \startsetups[list:startendfmpages] \structurelistuservariable{itemAuthor}\crlf \structurelistuservariable{itemTitle}\hfill% \at[\currentlistentrypagenumber]–\at[\lastpagenumber] \vglue1pc \stopsetups where I have \reference[\lastpagenumber]{} at the end of the file. But this gives me ??–viii (the viii is correct and interactive) for the FMTitle. Sadly the entries for all my other Titles (SourceTitle, StudyTitle...) is ??–viii. (Each title is a modified chapter.) Curiously, \at[\Reference]–\convertnumber{r}{\lastpagenumber} and \at[\Reference]–\at[\lastpagenumber] work properly in the body text. The overall structure is project-product sort with many components in the product. This is probably TMI. The bottom line is that I am truly stumped. All best, Alan On Wed, Apr 3, 2024 at 6:56 AM Bruce Horrocks wrote: > > > > On 30 Mar 2024, at 19:59, Alan Bowen wrote: > > > > How can I get the last page number of a chapter for a list (ToC)? > > > > Outside of a list, I use \lastpagenumber. > > But that does not work in a list such as the ToC. > > > > Any tips or pointers will be gladly received. > > > I'm not quite sure what you want to do with these numbers: something like > printing out a contents page but instead of the start page of a chapter it > shows the last page of the chapter? > > If so then try creating a custom list and use \writetolist immediately > before each \stopchapter command? > > \definelist[LastPages][criterium=all] > \starttext > \completecontent > \page > \completelist[LastPages] > \page > \dorecurse{10}{ > \startchapter[title={This is my chapter}] > This is a chapter\par \dorecurse{6}{\input knuth } \input > math-kontinuitet-sv > > \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}} > \stopchapter > } > \stoptext > > But I can't get the number option of \writetolist to work - the "3." above > is ignored. :-( > > — > Bruce Horrocks > Hampshire, UK > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ 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: last page number for a list
> On 30 Mar 2024, at 19:59, Alan Bowen wrote: > > How can I get the last page number of a chapter for a list (ToC)? > > Outside of a list, I use \lastpagenumber. > But that does not work in a list such as the ToC. > > Any tips or pointers will be gladly received. I'm not quite sure what you want to do with these numbers: something like printing out a contents page but instead of the start page of a chapter it shows the last page of the chapter? If so then try creating a custom list and use \writetolist immediately before each \stopchapter command? \definelist[LastPages][criterium=all] \starttext \completecontent \page \completelist[LastPages] \page \dorecurse{10}{ \startchapter[title={This is my chapter}] This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}} \stopchapter } \stoptext But I can't get the number option of \writetolist to work - the "3." above is ignored. :-( — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: 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: Section numbering does not work
Many thanks Taco, that works indeed;-) > Am 13.02.2024 um 09:29 schrieb Taco Hoekwater : > > > >> On 13 Feb 2024, at 00:17, Oliver Marugg wrote: >> >> 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? > > IIRC : > > \setupsectionblock[backpart][number=yes] > > Best wishes, > Taco > >> 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 >> ___ >> 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 > ___ ___ 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
> On 13 Feb 2024, at 00:17, Oliver Marugg wrote: > > 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? IIRC : \setupsectionblock[backpart][number=yes] Best wishes, Taco > 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 > ___ > 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] Section numbering does not work
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 ___ 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: (again) wrong destination types?
> On 3 Dec 2023, at 15:26, Pablo Rodriguez via ntg-context > wrote: > > On 11/22/23 00:06, Bruce Horrocks wrote: >> [...] >> I changed your example to the following: >> \setupinteraction[state=start, page=name, focus=standard] >> \starttext >> \input knuth \par >> a\footnote{b} \par >> \dorecurse{7}{\input knuth \par} >> \stoptext > > Many thanks for your fast reply, Bruce. > > I wanted to reply much sooner, but it was really impossible for me. > >> From your explanation, the first link (body to footnote, your point b) > has destination to fit the whole page inside the viewer. > > The second link (footnote to body, your point c) has the destination to > reach a position inside the page (where the destination lies). This is > what "focus=standard" should achieve. > > In PDF terms (simplified), fit to page destinations are /Fit > destinations and placed destinations are /XYZ destinations. > > This sample shows what might be the root issue here: > > \setupinteraction[state=start, page=name, focus=standard] > \starttext > \completecontent > \chapter{Chapter} > a\footnote{b} > \stoptext > > ConTeXt handles internally links in categories. For some reason unknown > to me, "page=name" triggers that special operation links contain /Fit > instead /XYZ destinations. > > This is similar to the wrong link destinations (fit instead of standard) > from TOC (but not in footnotes [which are right]) when compiled with MkIV: > > \setupinteraction[state=start, focus=standard] > \starttext > \completecontent > \chapter{Chapter} > a\footnote{b} > \stoptext > > I hope it is clearer now. Let me know if it is not. > > My issue is that I cannot avoid having "page=name" for links to external > documents, but this breaks footnotes and other special operation links. What are you using for links to external documents? If just a single command such as \goto then you might be able to get away with defining a wrapper (e.g. \myGoto) that does \setupinteraction[state=start,page=name,focus=standard] then the \goto command then \setupinteraction[state=start,page=fit,focus=standard] afterwards. (Assuming calling \setupinteraction that many times does not cause problems in itself.) — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: (again) wrong destination types?
On 11/22/23 00:06, Bruce Horrocks wrote: > [...] > I changed your example to the following: > \setupinteraction[state=start, page=name, focus=standard] > \starttext > \input knuth \par > a\footnote{b} \par > \dorecurse{7}{\input knuth \par} > \stoptext Many thanks for your fast reply, Bruce. I wanted to reply much sooner, but it was really impossible for me. >From your explanation, the first link (body to footnote, your point b) has destination to fit the whole page inside the viewer. The second link (footnote to body, your point c) has the destination to reach a position inside the page (where the destination lies). This is what "focus=standard" should achieve. In PDF terms (simplified), fit to page destinations are /Fit destinations and placed destinations are /XYZ destinations. This sample shows what might be the root issue here: \setupinteraction[state=start, page=name, focus=standard] \starttext \completecontent \chapter{Chapter} a\footnote{b} \stoptext ConTeXt handles internally links in categories. For some reason unknown to me, "page=name" triggers that special operation links contain /Fit instead /XYZ destinations. This is similar to the wrong link destinations (fit instead of standard) from TOC (but not in footnotes [which are right]) when compiled with MkIV: \setupinteraction[state=start, focus=standard] \starttext \completecontent \chapter{Chapter} a\footnote{b} \stoptext I hope it is clearer now. Let me know if it is not. My issue is that I cannot avoid having "page=name" for links to external documents, but this breaks footnotes and other special operation links. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: 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: Table of contents of unnumbered titles
Hi Lutz, thanks very much for that example, it does show me a way to answer my question. Although the messages from Wolfgang had already solved my problem, your solution in instructional in a different way, and so quite helpful. Cheers. Jim On Sat, Sep 9, 2023 at 21:38 (+0200), Lutz Haseloff wrote: > Hi Jim, > perhaps does this work for you? > > \setuplist[chapter][headnumber=no] > \setuphead[chapter][number=no] > \starttext > \completecontent > \page > \chapter{Chapter one} > \input knuth > \chapter{Chapter two} > \input ward > \stoptext > > Greetings Lutz > Am 9. September 2023 20:11:55 MESZ schrieb Jim : >>Hi, >>I am creating a document which is divided with the unnumbered levels >>(\title, \subject, ...). >>I would like a table of contents showing the names and page numbers, >>something like >>Blah blah blah2 >>Blah blah 4 >>... >>However, notwithstanding what I see in >>https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents >>I can't get this to happen with unnumbered divisions. >>The above wiki reference says "the following might do that trick" but I >>think "might" is the keyword, since even the wiki doesn't show the "No >>number" entry in the \completecontent. >>I find it hard to imagine that I am the only Context user who wants to do >>this. Can anyone point me in the direction of a working example? >>And am I misinterpreting the wiki, or is the wiki page broken? >>Thanks. >> Jim >>___ >>If your question is of interest to others as well, please add an entry to the >>Wiki! >>maillist : ntg-context@ntg.nl / >>https://www.ntg.nl/mailman/listinfo/ntg-context >>webpage : https://www.pragma-ade.nl / http://context.aanhet.net >>archive : https://bitbucket.org/phg/context-mirror/commits/ >>wiki : https://contextgarden.net >>___ > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Wolfgang, thanks very much for your help. As a long-time plain TeX user, but a ConTeXt n00b, that would have taken me a long time to figure out. Having said that (and not to be ungrateful), for both of your examples below, in my tests only the subsubject shows up in the contents. I tried this both with the context distribution (updated a few minutes ago) and with the version that is in texlive (also updated a few minutes ago). Do all three items show up in your contents listing? Thanks. Jim On Sat, Sep 9, 2023 at 21:17 (+0200), Wolfgang Schuster wrote: > Jim schrieb am 09.09.2023 um 20:11: >> Hi, >> I am creating a document which is divided with the unnumbered levels >> (\title, \subject, ...). >> I would like a table of contents showing the names and page numbers, >> something like >> Blah blah blah2 >> Blah blah 4 >> ... >> However, notwithstanding what I see in >> https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents >> I can't get this to happen with unnumbered divisions. >> The above wiki reference says "the following might do that trick" but I >> think "might" is the keyword, since even the wiki doesn't show the "No >> number" entry in the \completecontent. >> I find it hard to imagine that I am the only Context user who wants to do >> this. Can anyone point me in the direction of a working example? >> And am I misinterpreting the wiki, or is the wiki page broken? > 1. You have to change the value of the incrementnumber key for title, > subject etc. > 2. You have to specify which sections are shown in the table of content > because by default only the numbered sections are listed. > begin example 1 > \setuphead [title] [incrementnumber=list] > \setuphead [subject] [incrementnumber=list] > \setuphead [subsubject] [incrementnumber=list] > \definehead [contentstitle] [title] > \setupcombinedlist [content] > [list={chapter,title,section,subject,subsection,subsubject}] > \starttext > \completecontent > \title{Title} > \subject{Subject} > \subsubject{Subsubject} > \stoptext > end example 1 > begin example 2 > \setuphead [title] [incrementnumber=list] > \setuphead [subject] [incrementnumber=list] > \setuphead [subsubject] [incrementnumber=list] > \definehead [contentstitle] [title] > \starttext > \contentstitle{Contents} > \placelist[chapter,title,section,subject,subsection,subsubject] > \title{Title} > \subject{Subject} > \subsubject{Subsubject} > \stoptext > end example 2 > Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Hi Jim, perhaps does this work for you? \setuplist[chapter][headnumber=no] \setuphead[chapter][number=no] \starttext \completecontent \page \chapter{Chapter one} \input knuth \chapter{Chapter two} \input ward \stoptext Greetings Lutz Am 9. September 2023 20:11:55 MESZ schrieb Jim : >Hi, > >I am creating a document which is divided with the unnumbered levels >(\title, \subject, ...). > >I would like a table of contents showing the names and page numbers, >something like > >Blah blah blah2 >Blah blah 4 >... > >However, notwithstanding what I see in >https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents >I can't get this to happen with unnumbered divisions. > >The above wiki reference says "the following might do that trick" but I >think "might" is the keyword, since even the wiki doesn't show the "No >number" entry in the \completecontent. > >I find it hard to imagine that I am the only Context user who wants to do >this. Can anyone point me in the direction of a working example? > >And am I misinterpreting the wiki, or is the wiki page broken? > >Thanks. > > Jim >___ >If your question is of interest to others as well, please add an entry to the >Wiki! > >maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context >webpage : https://www.pragma-ade.nl / http://context.aanhet.net >archive : https://bitbucket.org/phg/context-mirror/commits/ >wiki : https://contextgarden.net >___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Table of contents of unnumbered titles
Jim schrieb am 09.09.2023 um 20:11: Hi, I am creating a document which is divided with the unnumbered levels (\title, \subject, ...). I would like a table of contents showing the names and page numbers, something like Blah blah blah2 Blah blah 4 ... However, notwithstanding what I see in https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents I can't get this to happen with unnumbered divisions. The above wiki reference says "the following might do that trick" but I think "might" is the keyword, since even the wiki doesn't show the "No number" entry in the \completecontent. I find it hard to imagine that I am the only Context user who wants to do this. Can anyone point me in the direction of a working example? And am I misinterpreting the wiki, or is the wiki page broken? 1. You have to change the value of the incrementnumber key for title, subject etc. 2. You have to specify which sections are shown in the table of content because by default only the numbered sections are listed. begin example 1 \setuphead [title] [incrementnumber=list] \setuphead [subject] [incrementnumber=list] \setuphead [subsubject] [incrementnumber=list] \definehead [contentstitle] [title] \setupcombinedlist [content] [list={chapter,title,section,subject,subsection,subsubject}] \starttext \completecontent \title{Title} \subject{Subject} \subsubject{Subsubject} \stoptext end example 1 begin example 2 \setuphead [title] [incrementnumber=list] \setuphead [subject] [incrementnumber=list] \setuphead [subsubject] [incrementnumber=list] \definehead [contentstitle] [title] \starttext \contentstitle{Contents} \placelist[chapter,title,section,subject,subsection,subsubject] \title{Title} \subject{Subject} \subsubject{Subsubject} \stoptext end example 2 Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Table of contents of unnumbered titles
Hi, I am creating a document which is divided with the unnumbered levels (\title, \subject, ...). I would like a table of contents showing the names and page numbers, something like Blah blah blah2 Blah blah 4 ... However, notwithstanding what I see in https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents I can't get this to happen with unnumbered divisions. The above wiki reference says "the following might do that trick" but I think "might" is the keyword, since even the wiki doesn't show the "No number" entry in the \completecontent. I find it hard to imagine that I am the only Context user who wants to do this. Can anyone point me in the direction of a working example? And am I misinterpreting the wiki, or is the wiki page broken? Thanks. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: TOC with sections titles and page numbers like a paragraph beneath chapter
jbf schrieb am 04.09.2023 um 08:34: I am attempting to get a TOC that looks like the following (in other words with section titles and their relative page numbers in a block below the chapter): Chapter 1 ...5 Section 1 5, Section 2 6, Section 3 7, Section 4 8, Section 5 9 etc Chapter 2 10 Section 1 10, Section 2 11, Section 3 12, Section 4 13, Section 5 14 etc As I really had no idea how to do this, I found https://wiki.contextgarden.net/Horizontal_Table_of_Contents thinking it might help, but none of it compiles (for me) in LMTX. So I tried something different, e.g. [...] While that produces a result, it is nothing like what I want above. Has anyone put together a TOC of this kind and might be able to give me a hint to follow? Please send *working* (which include some dummy content) examples. The example below results in section entries which are listed as a paragraph, what output do you expect here. \setuplist[chapter][alternative=c] \setuplist[section][alternative=d] \starttext \completecontent \dorecurse{2} {\chapter{Chapter #1} \dorecurse{10}{\section{Section ##1}}} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: An error which is not in .log file
Hi, I suggest to comment out/add \stoptext until the error go,and that way narrow it down. The usual way... /Mikael Den tis 15 aug. 2023 19:50Xavier B. skrev: > I don't have line 276. This is what I have (169 lines): > > % Fitxer ConTeXt MIV > > % carregam les opcions d'entorn > \environment ng-entorn-minimal.conTeXt > \environment ng-entorn-taules.conTeXt > \environment ng-entorn-teoria.conTeXt > \environment ng-entorn-colors.conTeXt > > % bibliografia > \usebtxdataset[default][ng-bibliografia.bib] > \setupbtx[dataset=default] > \usebtxdefinitions[aps] > > % el text > > \starttext > > \startfrontmatter > \input ng-pre-portada.conTeXt > \input ng-pre-llicencia.conTeXt > \input ng-pre-informacio-document.conTeXt > \completecontent > \stopfrontmatter > > > \startbodymatter > > \startpart[title=Aritmètica] > > \input ng-aritmetica-nombres-naturals-operacions.conTeXt > \page[yes] > \input ng-aritmetica-divisibilitat.conTeXt > \page[yes] > \input ng-aritmetica-sencers-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt > \page[yes] > \input ng-aritmetica-percentatges.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-sencers.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-fraccions.conTeXt > \page[yes] > \input ng-aritmetica-arrodoniment-i-truncament.conTeXt > \page[yes] > \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt > \page[yes] > \input ng-aritmetica-sequencies.conTeXt > \page[yes] > \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt > \page[yes] > \input ng-aritmetica-propietats-de-les-potencies.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-calcul.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-problemes.conTeXt > \stoppart > > \startpart[title=Relacions entre variables] > > \input ng-relacions-variables-proporcionalitat-directa.conTeXt > \page[yes] > \input ng-relacions-variables-percentatges-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-repartiments-proporcionals.conTeXt > \page[yes] > \input ng-relacions-variables-proporcionalitat-inversa.conTeXt > \page[yes] > \input ng-relacions-variables-conversio-unitats.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-lineal-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-afi-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt > \stoppart > > \startpart[title=Àlgebra] > \input ng-algebra-equacions-primer-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt > \page[yes] > \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt > \page[yes] > \input > ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt > \stoppart > > \startpart[title=Geometria] > > \input ng-geometria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-homotecies.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt > \stoppart > > \startpart[title=Estadística] > \input ng-estadistica-tipus-de-variables.conTeXt > \page[yes] > \input ng-estadistica.conTeXt > \page[yes] > \input ng-estadistica-parametres-dispersio.conTeXt > \page[yes] > \input ng-estadistica-grafics-i-diagrames.conTeXt > \stoppart > > \startpart[title=Probabilitat] > \input ng-probabilitat-experiments-simples.conTeXt > \page[yes] > \input ng-probabilitat-experiments-compostos.conTeXt > \page[yes] > \input ng-probabilitat-probabilitat-condicionada.conTeXt > \page[yes] > \input ng-probabilitat-algebra-de-successos.conTeXt > \stoppart > > \stopbodymatter > > > \startappendices > > \startpart[title=Apunts teòrics] > \input ng-teoria-proporcionalitat-numerica.conTeXt > \page[yes] > \input ng-teoria-equacions-de-segon-grau.conTeXt > \page[yes] > \input ng-teoria-funcio-quadratica.conTeXt > \page[yes] > \input ng-teoria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-teoria-apendix-figures-usuals-arees-volums.co
[NTG-context] Re: An error which is not in .log file
I don't have line 276. This is what I have (169 lines): % Fitxer ConTeXt MIV % carregam les opcions d'entorn \environment ng-entorn-minimal.conTeXt \environment ng-entorn-taules.conTeXt \environment ng-entorn-teoria.conTeXt \environment ng-entorn-colors.conTeXt % bibliografia \usebtxdataset[default][ng-bibliografia.bib] \setupbtx[dataset=default] \usebtxdefinitions[aps] % el text \starttext \startfrontmatter \input ng-pre-portada.conTeXt \input ng-pre-llicencia.conTeXt \input ng-pre-informacio-document.conTeXt \completecontent \stopfrontmatter \startbodymatter \startpart[title=Aritmètica] \input ng-aritmetica-nombres-naturals-operacions.conTeXt \page[yes] \input ng-aritmetica-divisibilitat.conTeXt \page[yes] \input ng-aritmetica-sencers-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt \page[yes] \input ng-aritmetica-percentatges.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-sencers.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-fraccions.conTeXt \page[yes] \input ng-aritmetica-arrodoniment-i-truncament.conTeXt \page[yes] \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt \page[yes] \input ng-aritmetica-sequencies.conTeXt \page[yes] \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt \page[yes] \input ng-aritmetica-propietats-de-les-potencies.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-calcul.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-problemes.conTeXt \stoppart \startpart[title=Relacions entre variables] \input ng-relacions-variables-proporcionalitat-directa.conTeXt \page[yes] \input ng-relacions-variables-percentatges-problemes.conTeXt \page[yes] \input ng-relacions-variables-repartiments-proporcionals.conTeXt \page[yes] \input ng-relacions-variables-proporcionalitat-inversa.conTeXt \page[yes] \input ng-relacions-variables-conversio-unitats.conTeXt \page[yes] \input ng-relacions-variables-funcio-lineal-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-afi-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt \stoppart \startpart[title=Àlgebra] \input ng-algebra-equacions-primer-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt \stoppart \startpart[title=Geometria] \input ng-geometria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-homotecies.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt \stoppart \startpart[title=Estadística] \input ng-estadistica-tipus-de-variables.conTeXt \page[yes] \input ng-estadistica.conTeXt \page[yes] \input ng-estadistica-parametres-dispersio.conTeXt \page[yes] \input ng-estadistica-grafics-i-diagrames.conTeXt \stoppart \startpart[title=Probabilitat] \input ng-probabilitat-experiments-simples.conTeXt \page[yes] \input ng-probabilitat-experiments-compostos.conTeXt \page[yes] \input ng-probabilitat-probabilitat-condicionada.conTeXt \page[yes] \input ng-probabilitat-algebra-de-successos.conTeXt \stoppart \stopbodymatter \startappendices \startpart[title=Apunts teòrics] \input ng-teoria-proporcionalitat-numerica.conTeXt \page[yes] \input ng-teoria-equacions-de-segon-grau.conTeXt \page[yes] \input ng-teoria-funcio-quadratica.conTeXt \page[yes] \input ng-teoria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-teoria-apendix-figures-usuals-arees-volums.conTeXt \page[yes] \input ng-teoria-proporcionalitat-geometrica.conTeXt \page[yes] \input ng-teoria-estadistica.conTeXt \page[yes] \input ng-teoria-probabilitat.conTeXt \stoppart \stopappendices \startbackmatter \input ng-pre-continguts-aliens.conTeXt \page[yes] % Bibliografia \startchapter[title=Referències] \placelistofpublications \stopchapter %% Índex alfabètic \completeindex \stopbackmatter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] hyperlinks not working with current latest
On 5/28/2023 8:57 PM, Pablo Rodriguez via ntg-context wrote: Dear list, in the following sample, hyperlinks for footnotest don’t work with current latest (2023.05.28 18:57) with current LMTX (20230528): \setupinteraction [state=start, focus=standard] \starttext \completecontent \dorecurse{5} {a\footnote{}} \stoptext LuaTeX generates fine hyperlinks for footnotes. My guess is that the issue is in the LuaMetaTeX binary. Could anyone confirm this issue? i'll upload a fix later today (some sensitivity to an extra return value of a helper) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] hyperlinks not working with current latest
On 5/28/2023 8:57 PM, Pablo Rodriguez via ntg-context wrote: Dear list, in the following sample, hyperlinks for footnotest don’t work with current latest (2023.05.28 18:57) with current LMTX (20230528): \setupinteraction [state=start, focus=standard] \starttext \completecontent \dorecurse{5} {a\footnote{}} \stoptext LuaTeX generates fine hyperlinks for footnotes. My guess is that the issue is in the LuaMetaTeX binary. Could anyone confirm this issue? i'll check it but (maybe side effect of some ref things Alan and I are working on). The engine has nothing to do with it as it doesn't play a role in these matters. 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] hyperlinks not working with current latest
Dear list, in the following sample, hyperlinks for footnotest don’t work with current latest (2023.05.28 18:57) with current LMTX (20230528): \setupinteraction [state=start, focus=standard] \starttext \completecontent \dorecurse{5} {a\footnote{}} \stoptext LuaTeX generates fine hyperlinks for footnotes. My guess is that the issue is in the LuaMetaTeX binary. Could anyone confirm this 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 / 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 in the middle of a document
Try: \completecontent [criterium=all] Alan On Tue, 18 Apr 2023 01:06:02 +0200 Kalouguine Andre via ntg-context wrote: > Hi, > > I was trying to have my "Acknowledgements" section/chapter before the > table of contents but be contained within it. > > Is it normal that the table of contents is empty if there is a chapter > that begins before it? > > ``` > > \starttext > \chapter{Acknowledgements} > Thank you > > \completecontent > > \chapter{Intro} > > \chapter{Problem} > > \chapter{Solution} > \stoptext > > ``` > > I'm mostly looking for an explanation rather than a direct solution, > I'd like to understand why it's empty. It works when using sections > instead of chapters. > > Best regards, ___ 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 in the middle of a document
Hi, I was trying to have my "Acknowledgements" section/chapter before the table of contents but be contained within it. Is it normal that the table of contents is empty if there is a chapter that begins before it? ``` \starttext \chapter{Acknowledgements} Thank you \completecontent \chapter{Intro} \chapter{Problem} \chapter{Solution} \stoptext ``` I'm mostly looking for an explanation rather than a direct solution, I'd like to understand why it's empty. It works when using sections instead of chapters. Best regards, -- Kalouguine Andre___ 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] [ TEXpage empty lines ]
Pablo Rodriguez via ntg-context schrieb am 08.03.2023 um 20:01: On 3/8/23 17:37, Hans Hagen via ntg-context wrote: On 3/8/2023 5:29 PM, Pablo Rodriguez via ntg-context wrote: \null\\ I prefer \crlf because \null is well, can you guess? Good to know, but I thought that \\ was exactly \crlf. I would even say that I read it somewhere in ConTeXt’s source. The result of \\ depends on the environment/command. \starttext \completecontent \chapter{space or\\newline?} \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] list not following "focus=standard"?
Dear list, I have the following sample: \setupinteraction[state=start, focus=standard] \starttext \completecontent \dorecurse{25} {\section{Section} a\footnote{b}} \stoptext Using current latest (from 2023.01.26 18:34), destinations for TOC are pages (/D [ 7 0 R /Fit ]) and destinations for footnotes are named destinations (/D [ 1 0 R /XYZ 61.900625 141.0443 null ]). Compare https://pdf.ousia.tk/lst-fnt.pdf#_3 with any link from the TOC. I‘m afraid this might be a regression from a recently fixed issue. Could anyone confirm this 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 / 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] 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
Re: [NTG-context] list not following "focus=standard"
On 10/14/22 23:24, Pablo Rodriguez via ntg-context wrote: > Hi Hans, > > I have the following sample: > > \setupinteraction[state=start, > focus=standard] > \starttext > \completecontent > \section{section} > a\footnote{\contextversion} > \stoptext Hans, I have found the cause of the misbehavior in strc-lst.lua, lines 898-903: if cheat and references then -- this permits runs=2 with interactivity local internal = references.internal usedinternals[internal] = true usedviews[internal] = references.view end So, line 40 of that file ("local cheat = true") needs a conditional that I’m not able to provide (I have no idea how it would read). Basically, if \setupinteraction[focus=standard], please don’t cheat 😅. Sorry, but I don’t even know which file (strc-lst.lua or lpdf-ano) has to be modified. I hope the issue is clearer now. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] list not following "focus=standard"
Hi Hans, I have the following sample: \setupinteraction[state=start, focus=standard] \starttext \completecontent \section{section} a\footnote{\contextversion} \stoptext With version from 2022.09.11 20:44, the link from the TOC reads in the PDF file: 4 0 obj << /D [ 1 0 R /Fit ] /S /GoTo >> endobj Instead of being a named destination, such as in: 5 0 obj << /D (#3) /S /GoTo >> endobj 11 0 obj << /D [ 1 0 R /XYZ 61.65861 129.0214 null ] >> endobj 40 0 obj << /Limits [ (#3) (content) ] /Names [ (#3) 11 0 R (*3) 10 0 R (content) 7 0 R ] >> endobj This is the problem originally reported by Sylvain (https://mailman.ntg.nl/pipermail/ntg-context/2022/106836.html). I apologize, but I’m afraid I cannot provide a patch. Could you take a look at it? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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] ToC filler dots not aligned
Hi, If I typeset a table of contents with the latest version of ConTeXt on my computer (2022.09.11 20:44 LMTX), the filler dots used in list alternative C aren’t aligned (i.e., they don’t end flush next to the page number). Typesetting the same file with the online version on ConTeXt Garden (2021.10.28 10:19 LMTX) results in the filler dots being right-aligned with the page numbers (as they should). I had a similar issue back in April 2021 which got resolved by an update. Since I haven’t updated in a while, I can’t say in which version the behaviour changed back, unfortunately. Here’s a working example of my code: \setupcombinedlist[content][alternative=c] \starttext \completecontent \chapter[title={First chapter}] \chapter[title={Second, longer chapter}] \chapter[title={Third chapter}] \stoptext Any help is greatly appreciated. Thanks and best wishes, Roman ___ 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] issues with current latest
Hi! Le 14/10/2022 à 16:24, Pablo Rodriguez via ntg-context a écrit : Dear list, I have the following sample: \setuppapersize[A7] \setupinteraction[state=start, color=darkred, contrastcolor=darkred, focus=standard] \starttext \completecontent \startsection[title={sec}, list=(before \&\ now), reference=a] \page \in[a] (after 2022.10.14 10:16) \stopsection \stoptext For me it works! And [...] It is also caused by the minimal: \starttext \null \stoptext also for this! Alain ___ 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] issues with current latest
Dear list, I have the following sample: \setuppapersize[A7] \setupinteraction[state=start, color=darkred, contrastcolor=darkred, focus=standard] \starttext \completecontent \startsection[title={sec}, list=(before \&\ now), reference=a] \page \in[a] (after 2022.10.14 10:16) \stopsection \stoptext If I try to compile with LuaTeX (after deleting the cache), I get the following error: lua error > lua error on line 1 in file a.tex: ...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: attempt to index a nil value (field 'subsets') stack traceback: ...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: in field 'moveitalics' .../context/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg:103: in main chunk [C]: in function 'dofile' ...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:78: in function <...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:68> (...tail calls...) It is also caused by the minimal: \starttext \null \stoptext And with the first source, \in hyperlink doesn’t work at all. Sylvain reported an issue with the \completecontent list (not honoring "focus=standard"), but with current latest the \in hyperlink doesn’t work at all. Could anyone confirm the issues? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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] TOC colors and in-page anchors
(heartbeat packet) I think some kind of modern issue tracker on e.g. https://github.com/contextgarden/context-mirror would be generally helpful. On Wed, 28 Sept 2022 at 23:31, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> wrote: > On 9/28/22 12:20, Sylvain Hubert via ntg-context wrote: > > Thanks for the pointers, but unfortunately I cannot reproduce the second > > fix with either the system pdf viewer or the browser one. > > Hi Sylvain, > > it seems that ConTeXt is basically ignoring "focus=standard" in lists. > > Compare both links here: > > \setupinteraction[state=start, > color=darkred, > contrastcolor=darkred, > focus=standard] > \starttext > \completecontent > \section[a]{b} > \about[a] > \stoptext > > And this is a regression. I think it was introduced in latest from > 2022.07.06 21:42, since latest from 2022.05.11 11:36 has no issue with > this. > > Hans, could you see what preventing this from working as expected? > > Many thanks for your help, > > Pablo > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://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] TOC colors and in-page anchors
On 9/28/22 12:20, Sylvain Hubert via ntg-context wrote: > Thanks for the pointers, but unfortunately I cannot reproduce the second > fix with either the system pdf viewer or the browser one. Hi Sylvain, it seems that ConTeXt is basically ignoring "focus=standard" in lists. Compare both links here: \setupinteraction[state=start, color=darkred, contrastcolor=darkred, focus=standard] \starttext \completecontent \section[a]{b} \about[a] \stoptext And this is a regression. I think it was introduced in latest from 2022.07.06 21:42, since latest from 2022.05.11 11:36 has no issue with this. Hans, could you see what preventing this from working as expected? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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] TOC colors and in-page anchors
Thanks for the pointers, but unfortunately I cannot reproduce the second fix with either the system pdf viewer or the browser one. \usemodule[ipsum] \setupinteraction[state=start,focus=standard] \starttext \completecontent \section{s1}\ipsum \section{s2}\ipsum \section{s3}\ipsum \section{s4}\ipsum \section{s5}\ipsum \section{s6}\ipsum \stoptext context version: 2022.09.11 20:44 The viewer is on 'Continuous Scoll' mode both before and after the click, but clicking s4 still jumps to the beginning of page 2. On Wed, 28 Sept 2022 at 16:43, Bruce Horrocks wrote: > > > > On 28 Sep 2022, at 09:18, Sylvain Hubert via ntg-context < > ntg-context@ntg.nl> wrote: > > > > Dear list, > > > > \usemodule[ipsum] > > \setupinteraction[state=start] > > > > \starttext > > \completecontent > > \section{s1}\ipsum > > \section{s2}\ipsum > > \section{s3}\ipsum > > \section{s4}\ipsum > > \section{s5}\ipsum > > \section{s6}\ipsum > > \stoptext > > > > In the table of contents, s1 and s2 (at page 1) are rendered in red, > while others in green. > > > > Moreover, when I click s4, it jumps to page 2 without locating the > section precisely within the page. > > This is not the case when using the latex hyperref package. > > > > Does anyone know how to make the colors uniform and the links precise? > > > > Any help is appreciated. > > The colour change is because those links are on the same page that you are > jumping to. When you have more text in your document they will be > consistent. You can override the colors with > \setupinteraction[state=start,color=black] for example if you wish. > > You need focus=standard to jump direct but only when the viewer is in > scrolling mode. It's explained on the Wiki. > <https://wiki.contextgarden.net/Command/setupinteraction> > > — > Bruce Horrocks > Hampshire, UK > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TOC colors and in-page anchors
> On 28 Sep 2022, at 09:18, Sylvain Hubert via ntg-context > wrote: > > Dear list, > > \usemodule[ipsum] > \setupinteraction[state=start] > > \starttext > \completecontent > \section{s1}\ipsum > \section{s2}\ipsum > \section{s3}\ipsum > \section{s4}\ipsum > \section{s5}\ipsum > \section{s6}\ipsum > \stoptext > > In the table of contents, s1 and s2 (at page 1) are rendered in red, while > others in green. > > Moreover, when I click s4, it jumps to page 2 without locating the section > precisely within the page. > This is not the case when using the latex hyperref package. > > Does anyone know how to make the colors uniform and the links precise? > > Any help is appreciated. The colour change is because those links are on the same page that you are jumping to. When you have more text in your document they will be consistent. You can override the colors with \setupinteraction[state=start,color=black] for example if you wish. You need focus=standard to jump direct but only when the viewer is in scrolling mode. It's explained on the Wiki. <https://wiki.contextgarden.net/Command/setupinteraction> — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] TOC colors and in-page anchors
Dear list, \usemodule[ipsum] \setupinteraction[state=start] \starttext \completecontent \section{s1}\ipsum \section{s2}\ipsum \section{s3}\ipsum \section{s4}\ipsum \section{s5}\ipsum \section{s6}\ipsum \stoptext In the table of contents, s1 and s2 (at page 1) are rendered in red, while others in green. Moreover, when I click s4, it jumps to page 2 without locating the section precisely within the page. This is not the case when using the latex hyperref package. Does anyone know how to make the colors uniform and the links precise? Any help is appreciated. Sylvain ___ 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] \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] How to place "Content" and other chapter-level titles the same vertical distance from the top?
Hi Joel, I think you can achieve what you want by using \placelist[chapter,section] instead of \completecontent. Then you can start the TOC by \startchapter[Content] \placelist…. \stopchapter. The same approach can be used for other lists/indexes. Kind regards Willli > On 8 May 2022, at 04:49, Joel via ntg-context wrote: > > I created a chapter title style with a large number telling the chapter > number, and below it the title of the chapter. > > It looks like this: > > - >1 <--really big chapter number > === <-- there is a border created by a background image between these >How to keep <--chapter title >fish > > This is the article <-- the article begins > about how to keep > fish > - > > \definefontsize[a]% > \definefontsize[b]% > \definefontsize[c]% > \definefontsize[l]% > \setupbodyfontenvironment[default]% >[% >a=1.200, >b=1.440, >c=1.728, >l=8.916 >]% > % > > \setuplabeltext[chapter=\strut] > \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes, > numbercommand=\groupedcommand{}{\blank[1cm]}, > alternative=middle, > numberstyle=ssl, > numbercolor=green, > strut=yes] > > \starttext > >\completecontent > >\chapter{Test} >\input knuth > >\chapter{Test} >\input knuth > > \stoptext > > The problem I'm facing, is anytime a chapter title is called, such as > "Content" in complete content, or something in the appendix, such as one of > the indexes, no number is printed above, so the vertical distance from the > top of the page to the top of the chapter title changes. I need these to be > consistent, as there is a background image, with vertical lines. > > Basically, if I call \chapter{}, it appears perfectly aligned vertically on > the page, with no other settings. But when calling \completecontent or a > similar title that won't get a number, because the number isn't placed, it is > vertically higher on the page, but I need it to be printed the same height, > as it it had an invisible number. > > I've tried adding strut (the code has it in two places), but don't know if > I've used it appropriately, and it didn't solve the problem. > > --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 > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?
> On 9 May 2022, at 09:45, Denis Maier via ntg-context > wrote: > > This example from the wiki does not run anymore with LMTX: Still worked ok in: ConTeXt ver: 2022.04.19 19:53 LMTX > You get the error message: > I've run across a '}' that doesn't seem to match anything. For example, > '\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just > inserted will cause me to report a runaway argument that might be the root of > the > problem. > > Maybe some expansion thing. Don't know, but consider this : > > % > \setuppapersize[A6][A6] > \setupbodyfont[8pt] > \define[2]\MyChapterCommand{#1 #2} % does work > %\def\MyChapterCommand#1#2{#1 #2} % does not work > \setuphead[chapter][ >command=\MyChapterCommand, >] > \starttext > \startchapter{test} > \input tufte > \stopchapter > \stoptext > % > > So, this here should get you started: > > % > > \showframe > \setuppapersize[A6][A6] > \setupbodyfont[8pt] > \define[2]\MyChapterCommand% > {\vbox to 15mm\bgroup >\vss >{#1\blank #2} >\egroup} > \define[1]\MyTitleCommand% > {\vbox to 15mm\bgroup >\vss >{#1} >\egroup} > > \setuphead[chapter][command=\MyChapterCommand] > \setuphead[title][command=\MyTitleCommand] > \starttext > \chapter{test} \input tufte > \title{test} \input tufte > \stoptext > % > > I bet there are easier solutions, maybe use framed instead of vbox. > > Denis > > >> >> >> Von: Maier, Denis Christian (UB) >> Gesendet: Sonntag, 8. Mai 2022 09:24:51 >> An: mailing list for ConTeXt users >> Cc: Joel >> Betreff: AW: [NTG-context] How to place "Content" and other chapter-level >> titles the same vertical distance from the top? >> >> Maybe define your own chapter command and use a vbox. >> Look at this example from the wiki: >> >> \setuppapersize[A6][A6] >> \setupbodyfont[8pt] >> \def\MyChapterCommand#1#2% >> {\vbox to 4cm\bgroup >> {#1\hskip.75em #2} >> \vss >> \egroup} >> \setuphead[chapter][header=nomarking, command=\MyChapterCommand] >> \starttext \chapter{test} \input tufte \stoptext >> >> That's not exactly what you want, but you can adapt it. >> >> Denis >> >> Von: ntg-context im Auftrag von Joel via ntg- >> context >> Gesendet: Sonntag, 8. Mai 2022 04:49:32 >> An: ntg-context@ntg.nl >> Cc: Joel >> Betreff: [NTG-context] How to place "Content" and other chapter-level titles >> the same vertical distance from the top? >> >> I created a chapter title style with a large number telling the chapter >> number, >> and below it the title of the chapter. >> >> It looks like this: >> >> - >>1 <--really big chapter number >> === <-- there is a border created by a background image between >> these >>How to keep <--chapter title >>fish >> >> This is the article <-- the article begins about how to keep fish >> - >> >> \definefontsize[a]% >> \definefontsize[b]% >> \definefontsize[c]% >> \definefontsize[l]% >> \setupbodyfontenvironment[default]% >>[% >>a=1.200, >>b=1.440, >>c=1.728, >>l=8.916 >>]% >> % >> >> \setuplabeltext[chapter=\strut] >> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes, >> numbercommand=\groupedcommand{}{\blank[1cm]}, >> alternative=middle, >> numberstyle=ssl, >> numbercolor=green, >> strut=yes] >> >> \starttext >> >>\completecontent >> >>\chapter{Test} >>\input knuth >> >>\chapter{Test} >>\input knuth >> >> \stoptext >> >> The problem I'm facing, is anytime a chapter title is called, such as >> "Content" >> in complete content, or something in the appendix, such as one of the >> indexes, no number is printed above, so the vertical distance from the top of >> the page to the top of the chapter title changes. I need these to be >> consistent, as there is a background image, with vertical lines. >> >> Basically, if I call \chapter{}, it appears perfectly
Re: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?
This example from the wiki does not run anymore with LMTX: You get the error message: I've run across a '}' that doesn't seem to match anything. For example, '\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. Maybe some expansion thing. Don't know, but consider this : % \setuppapersize[A6][A6] \setupbodyfont[8pt] \define[2]\MyChapterCommand{#1 #2} % does work %\def\MyChapterCommand#1#2{#1 #2} % does not work \setuphead[chapter][ command=\MyChapterCommand, ] \starttext \startchapter{test} \input tufte \stopchapter \stoptext % So, this here should get you started: % \showframe \setuppapersize[A6][A6] \setupbodyfont[8pt] \define[2]\MyChapterCommand% {\vbox to 15mm\bgroup \vss {#1\blank #2} \egroup} \define[1]\MyTitleCommand% {\vbox to 15mm\bgroup \vss {#1} \egroup} \setuphead[chapter][command=\MyChapterCommand] \setuphead[title][command=\MyTitleCommand] \starttext \chapter{test} \input tufte \title{test} \input tufte \stoptext % I bet there are easier solutions, maybe use framed instead of vbox. Denis > > > Von: Maier, Denis Christian (UB) > Gesendet: Sonntag, 8. Mai 2022 09:24:51 > An: mailing list for ConTeXt users > Cc: Joel > Betreff: AW: [NTG-context] How to place "Content" and other chapter-level > titles the same vertical distance from the top? > > Maybe define your own chapter command and use a vbox. > Look at this example from the wiki: > > \setuppapersize[A6][A6] > \setupbodyfont[8pt] > \def\MyChapterCommand#1#2% > {\vbox to 4cm\bgroup > {#1\hskip.75em #2} > \vss > \egroup} > \setuphead[chapter][header=nomarking, command=\MyChapterCommand] > \starttext \chapter{test} \input tufte \stoptext > > That's not exactly what you want, but you can adapt it. > > Denis > > Von: ntg-context im Auftrag von Joel via ntg- > context > Gesendet: Sonntag, 8. Mai 2022 04:49:32 > An: ntg-context@ntg.nl > Cc: Joel > Betreff: [NTG-context] How to place "Content" and other chapter-level titles > the same vertical distance from the top? > > I created a chapter title style with a large number telling the chapter > number, > and below it the title of the chapter. > > It looks like this: > > - > 1 <--really big chapter number > === <-- there is a border created by a background image between > these > How to keep <--chapter title > fish > > This is the article <-- the article begins about how to keep fish > - > > \definefontsize[a]% > \definefontsize[b]% > \definefontsize[c]% > \definefontsize[l]% > \setupbodyfontenvironment[default]% > [% > a=1.200, > b=1.440, > c=1.728, > l=8.916 > ]% > % > > \setuplabeltext[chapter=\strut] > \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes, > numbercommand=\groupedcommand{}{\blank[1cm]}, > alternative=middle, > numberstyle=ssl, > numbercolor=green, > strut=yes] > > \starttext > > \completecontent > > \chapter{Test} > \input knuth > > \chapter{Test} > \input knuth > > \stoptext > > The problem I'm facing, is anytime a chapter title is called, such as > "Content" > in complete content, or something in the appendix, such as one of the > indexes, no number is printed above, so the vertical distance from the top of > the page to the top of the chapter title changes. I need these to be > consistent, as there is a background image, with vertical lines. > > Basically, if I call \chapter{}, it appears perfectly aligned vertically on > the > page, with no other settings. But when calling \completecontent or a similar > title that won't get a number, because the number isn't placed, it is > vertically > higher on the page, but I need it to be printed the same height, as it it had > an > invisible number. > > I've tried adding strut (the code has it in two places), but don't know if > I've > used it appropriately, and it didn't solve the problem. > > --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] How to place "Content" and other chapter-level titles the same vertical distance from the top?
Or change the setup of unnumbered chapter titles... Add a forced blank before there. Denis Von: Maier, Denis Christian (UB) Gesendet: Sonntag, 8. Mai 2022 09:24:51 An: mailing list for ConTeXt users Cc: Joel Betreff: AW: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top? Maybe define your own chapter command and use a vbox. Look at this example from the wiki: \setuppapersize[A6][A6] \setupbodyfont[8pt] \def\MyChapterCommand#1#2% {\vbox to 4cm\bgroup {#1\hskip.75em #2} \vss \egroup} \setuphead[chapter][header=nomarking, command=\MyChapterCommand] \starttext \chapter{test} \input tufte \stoptext That's not exactly what you want, but you can adapt it. Denis Von: ntg-context im Auftrag von Joel via ntg-context Gesendet: Sonntag, 8. Mai 2022 04:49:32 An: ntg-context@ntg.nl Cc: Joel Betreff: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top? I created a chapter title style with a large number telling the chapter number, and below it the title of the chapter. It looks like this: - 1 <--really big chapter number === <-- there is a border created by a background image between these How to keep <--chapter title fish This is the article <-- the article begins about how to keep fish - \definefontsize[a]% \definefontsize[b]% \definefontsize[c]% \definefontsize[l]% \setupbodyfontenvironment[default]% [% a=1.200, b=1.440, c=1.728, l=8.916 ]% % \setuplabeltext[chapter=\strut] \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes, numbercommand=\groupedcommand{}{\blank[1cm]}, alternative=middle, numberstyle=ssl, numbercolor=green, strut=yes] \starttext \completecontent \chapter{Test} \input knuth \chapter{Test} \input knuth \stoptext The problem I'm facing, is anytime a chapter title is called, such as "Content" in complete content, or something in the appendix, such as one of the indexes, no number is printed above, so the vertical distance from the top of the page to the top of the chapter title changes. I need these to be consistent, as there is a background image, with vertical lines. Basically, if I call \chapter{}, it appears perfectly aligned vertically on the page, with no other settings. But when calling \completecontent or a similar title that won't get a number, because the number isn't placed, it is vertically higher on the page, but I need it to be printed the same height, as it it had an invisible number. I've tried adding strut (the code has it in two places), but don't know if I've used it appropriately, and it didn't solve the problem. --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] How to place "Content" and other chapter-level titles the same vertical distance from the top?
Maybe define your own chapter command and use a vbox. Look at this example from the wiki: \setuppapersize[A6][A6] \setupbodyfont[8pt] \def\MyChapterCommand#1#2% {\vbox to 4cm\bgroup {#1\hskip.75em #2} \vss \egroup} \setuphead[chapter][header=nomarking, command=\MyChapterCommand] \starttext \chapter{test} \input tufte \stoptext That's not exactly what you want, but you can adapt it. Denis Von: ntg-context im Auftrag von Joel via ntg-context Gesendet: Sonntag, 8. Mai 2022 04:49:32 An: ntg-context@ntg.nl Cc: Joel Betreff: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top? I created a chapter title style with a large number telling the chapter number, and below it the title of the chapter. It looks like this: - 1 <--really big chapter number === <-- there is a border created by a background image between these How to keep <--chapter title fish This is the article <-- the article begins about how to keep fish - \definefontsize[a]% \definefontsize[b]% \definefontsize[c]% \definefontsize[l]% \setupbodyfontenvironment[default]% [% a=1.200, b=1.440, c=1.728, l=8.916 ]% % \setuplabeltext[chapter=\strut] \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes, numbercommand=\groupedcommand{}{\blank[1cm]}, alternative=middle, numberstyle=ssl, numbercolor=green, strut=yes] \starttext \completecontent \chapter{Test} \input knuth \chapter{Test} \input knuth \stoptext The problem I'm facing, is anytime a chapter title is called, such as "Content" in complete content, or something in the appendix, such as one of the indexes, no number is printed above, so the vertical distance from the top of the page to the top of the chapter title changes. I need these to be consistent, as there is a background image, with vertical lines. Basically, if I call \chapter{}, it appears perfectly aligned vertically on the page, with no other settings. But when calling \completecontent or a similar title that won't get a number, because the number isn't placed, it is vertically higher on the page, but I need it to be printed the same height, as it it had an invisible number. I've tried adding strut (the code has it in two places), but don't know if I've used it appropriately, and it didn't solve the problem. --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 ___
[NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?
I created a chapter title style with a large number telling the chapter number, and below it the title of the chapter. It looks like this: - 1 <--really big chapter number=== <-- there is a border created by a background image between these How to keep <--chapter title fish This is the article <-- the article begins about how to keepfish - \definefontsize[a]% \definefontsize[b]% \definefontsize[c]% \definefontsize[l]% \setupbodyfontenvironment[default]% [% a=1.200, b=1.440, c=1.728, l=8.916 ]% % \setuplabeltext[chapter=\strut] \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes, numbercommand=\groupedcommand{}{\blank[1cm]}, alternative=middle, numberstyle=ssl, numbercolor=green, strut=yes] \starttext \completecontent \chapter{Test} \input knuth \chapter{Test} \input knuth \stoptext The problem I'm facing, is anytime a chapter title is called, such as "Content" in complete content, or something in the appendix, such as one of the indexes, no number is printed above, so the vertical distance from the top of the page to the top of the chapter title changes. I need these to be consistent, as there is a background image, with vertical lines. Basically, if I call \chapter{}, it appears perfectly aligned vertically on the page, with no other settings. But when calling \completecontent or a similar title that won't get a number, because the number isn't placed, it is vertically higher on the page, but I need it to be printed the same height, as it it had an invisible number. I've tried adding strut (the code has it in two places), but don't know if I've used it appropriately, and it didn't solve the problem. --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 ___
[NTG-context] Custom Table of Contents
Hi! I’m new to ConTeXt. I need to make a custom table of contents that looks like this: https://imgur.com/a/Ca3By6X Each row in the table corresponds to an item that has following data to print in the table of contents: page, total number of pages which the item spans, name of the item and a custom text metadata field which is defined by the item. Each item will have its own regular table of content and own structure. So we can think of this TOC as kind of a mega table of content one level above. It needs to be fully automatic. The actual table is going to be an xtable (which I was blown away by after using LaTeX godawful tables for years, it’s soo good). After digging into the documentation (again, wow, it’s soo detailed and approachable after LaTeX😂), I found out that \completecontent doesn't provide such extreme level of customization. Therefore I need reimplement at least some parts of the default content forming mechanism. After digging in the source a bit, I found something relevant: https://source.contextgarden.net/tex/context/base/mkxl/strc-lst.mklx <https://source.contextgarden.net/tex/context/base/mkxl/strc-lst.mklx>. What I need is some guidance on what would be the best course of action, in particular, which API should I use and roughly how should I approach it🙏 Should I create my own counters for each item and somehow reference those manually in the TOC? How would I save additional text metadata field and the item name to show it in the TOC? The source code mentions a concept of list renderers. This sounds like the correct API to plug in, but it’s hard for me to grasp how exactly it works. Any help will be appreciated! Thank you in advance! Stay safe, Andrei Borisov.___ 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] My setup almost works
On 10/23/21 6:09 PM, Gerben Wierda wrote: > [...] Replying a private to the list, since it could be useful for (future?) reference. > This works, except: > - Parts are not mentioned in the table of contents. If I use > \completecontent, I do not get the abstracts Well, don’t use \completecontent and replace \placelist[chapter,chaptertext] with something similar to \placelist[part, chapter,chaptertext] > - In the backmatter, the chapters should be numbered with letters > (appendix A, B, etc.) and chapters start again from 1 (A) Add to the numbering command \definestructureconversionset[sectionnumbers][R,n][n] the following definition \definestructureconversionset[appendix:sectionnumbers][R,Character][n] > I haven’t looked at getting the part title somewhere at 1/3 of the page > and horizontally centered yet. And the part title page should have no > page number. align is a fairly common option and you can add a \vskip with the .3\textheight (or even \paperheight) \setuphead[part] [placehead=yes, align=center, before={\null\vskip.3\textheight}] \blank would be another option, but I cannot make it work here with \textheight. No page number is done by surpressing headers with: \setuphead[part][placehead=yes, header=empty]% or none 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] A book with sections
On 10/23/21 3:51 PM, Gerben Wierda via ntg-context wrote: >> On 23 Oct 2021, at 15:34, Wolfgang Schuster wrote: >> [...] >> You can use \part. > > Yes. Thanks. But that leads to additional questions: > - how do I get the parts to show up in the table of contents? Because > I tried \part but it did not show up > - how do I let chapters number on (not restart in each part, and not > a x.y number but simply ‘2. Chapter’ > - what is a good way to create actual RHS ‘title’ pages for each > chapter? > - how do I get parts to number with Roman numerals? Hi Gerben, I don’t know what actual RHS title pages are: \definestructureresetset[default][0,1,1][1] \definestructureconversionset[sectionnumbers][R,n][n] \setupheads[sectionconversionset=sectionnumbers, sectionresetset=default] \setuphead[part][placehead=yes] \setuphead[chapter][sectionsegments=chapter] \setuphead[section][sectionsegments=chapter:section] \starttext \completecontent \dorecurse{25}{\part{Part} \chapter{Chapter} \section{Section} \section{Section}} \stoptext 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] A book with sections
Gerben Wierda schrieb am 23.10.2021 um 15:51: On 23 Oct 2021, at 15:34, Wolfgang Schuster wrote: Gerben Wierda via ntg-context schrieb am 23.10.2021 um 15:20: I’d like a book with chapters to have sections/parts, e.g. something that groups a few \chapter elements together. Is there support for this in LMTX? I.e. in such a way that it also shows up in the table of contents? You can use \part. Yes. Thanks. But that leads to additional questions: - how do I get the parts to show up in the table of contents? Because I tried \part but it did not show up I can't reproduce the problem, do you have a example. - how do I let chapters number on (not restart in each part, and not a x.y number but simply ‘2. Chapter’ Use \defineresetset as shown below. - what is a good way to create actual RHS ‘title’ pages for each chapter? Use a doublesided layout. - how do I get parts to number with Roman numerals? See below. % Change the number conversion for section titles \defineconversionset [section] [Romannumerals] [numbers] \setuphead [sectionconversionset=section] % Show only the chapter value for chapter \setuphead [chapter] [sectionsegments=chapter] % Don't reset the counter for parts and chapters \defineresetset [default] [0,0] [1] \starttext \completecontent \dorecurse{4} {\expanded{\part{Part \recurselevel}} \dorecurse{5}{\expanded{\chapter{Chapter \recurselevel \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] Setting up the double pages of part beginnings
Dear List, I am trying to set up double pages at the beginning of a new part in such a way that: - on an odd/right-hand page there will be number and the title typeset in some fashion, and - on the even/left-hand page there should be a full (printpaper)size image. If the part title ends up on an even page then there is no additional page break (but then image and title are not on the same double-page obviously). But there is a page break (and an empty left page) when the part title ends up on an odd page (when you put page=right e.g.) as in the following example: % % How to get rid of the empty page preceding a part title? % \setuppagenumbering [alternative=doublesided] \setupexternalfigures[location=default] % cow % startTEXpage does not increase page number => incrementpagenumber % trimming in the print shop => printpaperwidth/height \define[1]\FullScreen{\startTEXpage\externalfigure[#1][width=\printpaperwidth,height=\printpaperheight]\stopTEXpage\incrementpagenumber} % tried page=yes/no/right/odd \setuphead [part] [placehead=yes, page=right, before={\nowhitespace}, % ??? ] \starttext \completecontent \FullScreen{cow} \startpart[title={A nice part}] Some text ... \stoppart \FullScreen{cow} \startpart[title={A nice part}] Some text ... \stoppart \stoptext On an additional note: I would love to utilise the XML capabilities of context, so ... is the usage of \startTEpage XML-export-friendly? Anyway, best regards, thank you for your patience in advance and a happy weekend for everybody! Cheers Christian ___ 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] Control of Titles appearing in \completelistoftables and \completelistoffigures
Brilliant, just what was needed. Thank you. 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: Taco Hoekwater To: Richard Mahoney , mailing list for ConTeXt users Subject: Re: [NTG-context] Control of Titles appearing in \completelistoftables and \completelistoffigures Date: Wed, 25 Aug 2021 08:48:24 +0200 Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: 0.0 Hi, There is \startplacefigure / \startplacetable , which has a ‘list’ key https://wiki.contextgarden.net/Command/_startplacefloat Best wishes, Taco > On 25 Aug 2021, at 05:20, Richard Mahoney via ntg-context > wrote: > > List, > > I've been wondering if there is some syntax that one can use in: > > \placetable or \placefigure > > to control the Table of Figure Title appearing in: > > \completelistoftables and \completelistoffigures > > > At the moment one can do this for the output of: > > \completecontent > > with something such as the following: > > \startsection[title={Title in body},list={Title in contents}] > > > Such a thing would be *extremely* useful for a current > publication. :) > > > 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 > > ___ > 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 Elvenkind BV ___ 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 ___
Re: [NTG-context] Control of Titles appearing in \completelistoftables and \completelistoffigures
Hi, There is \startplacefigure / \startplacetable , which has a ‘list’ key https://wiki.contextgarden.net/Command/_startplacefloat Best wishes, Taco > On 25 Aug 2021, at 05:20, Richard Mahoney via ntg-context > wrote: > > List, > > I've been wondering if there is some syntax that one can use in: > > \placetable or \placefigure > > to control the Table of Figure Title appearing in: > > \completelistoftables and \completelistoffigures > > > At the moment one can do this for the output of: > > \completecontent > > with something such as the following: > > \startsection[title={Title in body},list={Title in contents}] > > > Such a thing would be *extremely* useful for a current > publication. :) > > > 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 > ___ > 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 Elvenkind BV — 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] Control of Titles appearing in \completelistoftables and \completelistoffigures
List, I've been wondering if there is some syntax that one can use in: \placetable or \placefigure to control the Table of Figure Title appearing in: \completelistoftables and \completelistoffigures At the moment one can do this for the output of: \completecontent with something such as the following: \startsection[title={Title in body},list={Title in contents}] Such a thing would be *extremely* useful for a current publication. :) 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 ___ 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] Using Lua to format lecture titles
noib3 via ntg-context schrieb am 17.08.2021 um 16:43: I'm trying to create a new lecture environment starting from the base section. I'd like its title to be `Lecture : ` if a title is provided, and `Lecture ` if it isn't. This title should also be reported in the left footer and in the table of contents. This is the code I have so far: [...] Unfortunately none of them are reported correctly. The title in the body is formatted simply as `Lecture`, the one in the left footer is formatted as `Lecture`, and the one in the table of contents isn't affected at all. Why do you need Lua to format the list entries and section titles? \definehead [lecture] [section] \define[1]\LectureTextCommand {\doiftext{#1}{: #1}} \setuphead [lecture] [bodypartlabel=lecture, distance=0pt, textcommand=\LectureTextCommand, style=\bfc] \setuplabeltext [en] [lecture={Lecture }] \setupcombinedlist [content] [list={lecture}] \define[3]\LectureListCommand {\labeltext{lecture}#1\doiftext{#2}{: #2}\filler[dotfill]#3\par} \setuplist [lecture] [alternative=command, command=\LectureListCommand] \startsetups [footer:left] \labeltext{lecture} \getmarking[lecturenumber] \doiftext{\getmarking[lecture]}{: \getmarking[lecture]} \stopsetups \setupfootertexts [\directsetup{footer:left}] [] \starttext \completecontent \startlecture [title={Foo}] Foo bar baz \stoplecture \page \startlecture Foo bar baz \stoplecture \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] Using Lua to format lecture titles
I'm trying to create a new lecture environment starting from the base section. I'd like its title to be `Lecture : ` if a title is provided, and `Lecture ` if it isn't. This title should also be reported in the left footer and in the table of contents. This is the code I have so far: ``` \definehead [lecture] [section] \setuphead [lecture] [ command=\Lecture, style=\bfc, ] \setuplabeltext [lecture={Lecture}] \define[2]\Lecture{\ctxlua{ userdata.format_lecture_title({ label = context.labeltext('lecture'), number = [==[#1]==], title = [==[#2]==], }) }} \setupfootertexts [\ctxlua{ userdata.format_lecture_title({ label = context.labeltext('lecture'), number = context.getmarking({'lecturenumber'}), title = context.getmarking({'lecture'}), }) }] [pagenumber] \startluacode userdata = userdata or {} function userdata.format_lecture_title(args) if args.title and args.title ~= '' then context('%s %s: %s', args.label, args.number, args.title) else context('%s %s', args.label, args.number) end end \stopluacode \setupcombinedlist [content] [list={lecture}] \setuplist [lecture] [ alternative=c, command=\Lecture, % this seems to have no effect? ] \starttext \completecontent % Both title and left footer should be 'Lecture 1: Foo' \startlecture [title={Foo}] Foo bar baz \stoplecture \page % Both title and left footer should be 'Lecture 2' \startlecture [] Foo bar baz \stoplecture \stoptext ``` Unfortunately none of them are reported correctly. The title in the body is formatted simply as `Lecture`, the one in the left footer is formatted as `Lecture`, and the one in the table of contents isn't affected at all. What am I doing wrong? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with footnote in TOC
On 8/5/21 11:58 PM, Hans Hagen via ntg-context wrote: > On 8/5/2021 4:34 PM, Pablo Rodriguez via ntg-context wrote: >> \starttext >>\completecontent >>\chapter{Chapter Title\footnote{With footnote}} >>\stoptext > > fixed in next beta (different escaping) Many thanks for the fast fix and the new latest. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with footnote in TOC
On 8/5/2021 4:34 PM, Pablo Rodriguez via ntg-context wrote: \starttext \completecontent \chapter{Chapter Title\footnote{With footnote}} \stoptext fixed in next beta (different escaping) -- - 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] issue with footnote in TOC
Dear list, compiling the following sample with current latest (2021.08.04 17:51): \starttext \completecontent \chapter{Chapter Title\footnote{With footnote}} \stoptext The entry in the TOC for the chapter seems to have problems with the footnote command (backslash seems to be unrecognized). Would anyone be so kind to confirm the issue? I’m afraid it might be a bug in current latest. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes
Thanks for this. I'll look into it. > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Rik Kabel > Gesendet: Mittwoch, 30. Juni 2021 21:40 > An: ntg-context@ntg.nl > Betreff: Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes > > For what its worth, I offer my endnote apparatus with updates for parts. > It uses the standard note/notation mechanism, not a list, for endnotes. > Perhaps it can be further adapted to the needs of this thread. > > There is at least one small issue with it: I have to use \stopendnote even > though > I define \startEndnote. This causes issues with the linter (mtxrun --script > check > ) but seems otherwise harmless. > > I am sure that others more versed in ConTeXt can find some ways to fix this > and > improve the overall approach. I welcome suggestions. > > %--% > % Endnote apparatus adapted for parts > % > \mainlanguage [en] > \language [en] > \setupinteraction [state=start] > \setuppagenumbering[alternative=doublesided] > > \setupheadertexts [{\it\getmarking[part]}][{\it\getmarking[section]}] > [{\it\getmarking[chapter]}][{\it\getmarking[part]}] > \setupheads [number=no] > \setuphead [part] > [placehead=yes, > header=empty] > > %- footnote setup -% % > footnotes uses > asterisk, dagger, ddagger... so that endnotes % and pagenotes have separate > sequences. Change way= to suit % your footnote frequency > > \setupnotation [footnote] > [numberconversion=set 2, > way=chapter] > > %- endnote setup --% % > endnotes use > numeric indices, reset by part > > \setupnote [endnote][ > textseparator={,}, > textstyle=\high{\small\hairspace}, > location=none, > bodyfont=] > > \setupnotation [endnote] > [headstyle=\small, > way=bypart, > numbercommand=, > after={\blank[halfline]}] > > %- endnote pages setup % > > \definemarking [notePage] > > \startsetups [noteHeadingsText] > {\em Notes for page > \doifelse{\fetchmark[notePage][top]}{\fetchmark[notePage][bottom]} > { \getmarking[notePage][top]} > {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}} > \stopsetups > > \starttexdefinition unexpanded startEndnote > \dosingleempty\doStartEndnote > \stoptexdefinition > > \starttexdefinition doStartEndnote [#1] > \expanded{\dodoStartEndnote[#1][{\rawcountervalue[userpage]}]} > \stoptexdefinition > > \starttexdefinition dodoStartEndnote [#1][#2] > \startendnote[#1] > \marking[notePage]{#2}\removeunwantedspaces > \stoptexdefinition > > \starttexdefinition endnoteChapter > \startchapter [title=Notes] > \setupheadertexts[{\it\getmarking[part]}][\setups{noteHeadingsText}] > [\setups{noteHeadingsText}][{\it\getmarking[part]}] > \placenotes [endnote] > \page > \setupheadertexts[{\it\getmarking[part]}][{\it\getmarking[section]}] > [{\it\getmarking[chapter]}][part] > \stopchapter > \stoptexdefinition > > %--% > > \starttext > > \completecontent > > \startpart[title=Part 1] > \dorecurse{3}{ > \startchapter[title=Chapter #1] > If a man wants to read good books, he must make a point of > avoiding bad ones; for life is short, and time and energy > limited. > \startfootnote > T.\,Baily Saunders’ translation, in his 1891 {\em > The Art of Literature}, of part of one of Arthur > Schopenhauer’s essays. > \stopfootnote > \startEndnote > {\language[deo]% > Um das Gute zu lesen, ist eine Bedingung, dass man das > Schlechte nicht lese: denn das Leben ist kurz, Zeit und > Kräfte beschränkt.} > \stopendnote > > \dorecurse{6}{ > \startsection[title=Section ##1] > This followed by: > > {\it Repetitio est mater studiorum}. Any book that is at > all important ought to be at once read through twice; > partly because, on a second reading, the connection of the > different portions of the book will be better understood, > and the beginning comprehended only when the end is kn
Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes
For what its worth, I offer my endnote apparatus with updates for parts. It uses the standard note/notation mechanism, not a list, for endnotes. Perhaps it can be further adapted to the needs of this thread. There is at least one small issue with it: I have to use \stopendnote even though I define \startEndnote. This causes issues with the linter (mtxrun --script check ) but seems otherwise harmless. I am sure that others more versed in ConTeXt can find some ways to fix this and improve the overall approach. I welcome suggestions. %--% % Endnote apparatus adapted for parts % \mainlanguage [en] \language [en] \setupinteraction [state=start] \setuppagenumbering[alternative=doublesided] \setupheadertexts [{\it\getmarking[part]}][{\it\getmarking[section]}] [{\it\getmarking[chapter]}][{\it\getmarking[part]}] \setupheads [number=no] \setuphead [part] [placehead=yes, header=empty] %- footnote setup -% % footnotes uses asterisk, dagger, ddagger... so that endnotes % and pagenotes have separate sequences. Change way= to suit % your footnote frequency \setupnotation [footnote] [numberconversion=set 2, way=chapter] %- endnote setup --% % endnotes use numeric indices, reset by part \setupnote [endnote][ textseparator={,}, textstyle=\high{\small\hairspace}, location=none, bodyfont=] \setupnotation [endnote] [headstyle=\small, way=bypart, numbercommand=, after={\blank[halfline]}] %- endnote pages setup % \definemarking [notePage] \startsetups [noteHeadingsText] {\em Notes for page \doifelse{\fetchmark[notePage][top]}{\fetchmark[notePage][bottom]} { \getmarking[notePage][top]} {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}} \stopsetups \starttexdefinition unexpanded startEndnote \dosingleempty\doStartEndnote \stoptexdefinition \starttexdefinition doStartEndnote [#1] \expanded{\dodoStartEndnote[#1][{\rawcountervalue[userpage]}]} \stoptexdefinition \starttexdefinition dodoStartEndnote [#1][#2] \startendnote[#1] \marking[notePage]{#2}\removeunwantedspaces \stoptexdefinition \starttexdefinition endnoteChapter \startchapter [title=Notes] \setupheadertexts[{\it\getmarking[part]}][\setups{noteHeadingsText}] [\setups{noteHeadingsText}][{\it\getmarking[part]}] \placenotes [endnote] \page \setupheadertexts[{\it\getmarking[part]}][{\it\getmarking[section]}] [{\it\getmarking[chapter]}][part] \stopchapter \stoptexdefinition %--% \starttext \completecontent \startpart[title=Part 1] \dorecurse{3}{ \startchapter[title=Chapter #1] If a man wants to read good books, he must make a point of avoiding bad ones; for life is short, and time and energy limited. \startfootnote T.\,Baily Saunders’ translation, in his 1891 {\em The Art of Literature}, of part of one of Arthur Schopenhauer’s essays. \stopfootnote \startEndnote {\language[deo]% Um das Gute zu lesen, ist eine Bedingung, dass man das Schlechte nicht lese: denn das Leben ist kurz, Zeit und Kräfte beschränkt.} \stopendnote \dorecurse{6}{ \startsection[title=Section ##1] This followed by: {\it Repetitio est mater studiorum}. Any book that is at all important ought to be at once read through twice; partly because, on a second reading, the connection of the different portions of the book will be better understood, and the beginning comprehended only when the end is known; and partly because we are not in the same temper and disposition on both readings. On the second perusal we get a new view of every passage and a different impression of the whole book, which then appears in another light. \startEndnote {\language[deo]% Repetitio est mater studiorum. Jedes irgend wichtige Buch soll man sogleich zwei Mal lesen, theils weil man die Sachen das zweite Mal in ihrem Zusammenhange besser begreift und den Anfang erst recht versteht, wenn man das Ende kennt; theils weil man zu jeder Stelle das zweite Mal eine andere Stimmung mit bringt, als beim ersten, wodurch der Eindruct verschieden ausfällt und es ist, wie wenn man einen Gegenstand in anderer Beleuchtung sieht.} \stopendnote \stopsection } \stopchapter } \endnoteChapter
Re: [NTG-context] Trying to make all links in my document blue instead of red or green
Hi Kurt, It is because of the spaces after the last line in contrastcolor. Use any of the following instead: \setupinteraction [state=start, color=blue, contrastcolor=blue, ] \setupinteraction [state=start, color=blue, contrastcolor=blue% ] \setupinteraction [state=start, color=blue, contrastcolor=blue] Adam On Mon, Jun 21, 2021 at 4:10 PM T. Kurt Bond wrote: > I'm trying to make all the hyperlinks in my document blue. Here's my > example: > > \setupinteraction > [state=start, > color=blue, > contrastcolor=blue > ] > > > \starttext > \completecontent > \section{Section A} > \subsection{SubSection A.A} > \pagebreak[yes] > \section {Section B — on another page} > \subsection {SubSection B.A — on another page} > \stoptext > > When I format it with ConTeXt (ConTeXt ver: 2021.06.18 23:37 LMTX fmt: > 2021.6.19 int: english/english) links to destinations on the same page > come out black while links to destinations on another page come out blue, > as I'd intended. Here is a screen shot: > [image: image.png] > Notice that the Contents lines with Section A and SubSection A.A are > black? I'd expected them to be blue. > -- > T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io > > ___ > 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] Trying to make all links in my document blue instead of red or green
I'm trying to make all the hyperlinks in my document blue. Here's my example: \setupinteraction [state=start, color=blue, contrastcolor=blue ] \starttext \completecontent \section{Section A} \subsection{SubSection A.A} \pagebreak[yes] \section {Section B — on another page} \subsection {SubSection B.A — on another page} \stoptext When I format it with ConTeXt (ConTeXt ver: 2021.06.18 23:37 LMTX fmt: 2021.6.19 int: english/english) links to destinations on the same page come out black while links to destinations on another page come out blue, as I'd intended. Here is a screen shot: [image: image.png] Notice that the Contents lines with Section A and SubSection A.A are black? I'd expected them to be blue. -- T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io ___ 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 filler dots/leaders not aligned in LMTX
On 4/23/2021 12:24 PM, Schister, Roman wrote: Hello everyone I’m trying to typeset a table of contents with filler dots (list alternative C) in LMTX. Unfortunately, the dots are not vertically aligned and do not end flush on the right-hand side. If I try to use leaders in a paragraph, I get the same behaviour: the leading dots are not aligned. Compiling the same document with MkIV leads to correct alignment of the filler dots in both instances. Here is an MWE: \setuplistalternative[c][width=2em] \starttext \completecontent[alternative=c] \chapter{Short title} Lorem ipsum \hskip.5em\gleaders\hbox to .5\emwidth{\hss.\hss}\hfill\hskip.5em\relax dolor sit amet. \par Lorem \hskip.5em\gleaders\hbox to .5\emwidth{\hss.\hss}\hfill\hskip.5em\relax ipsum dolor sit amet. \chapter{Slighlty longer title} \chapter{Not so long title} \stoptext Are there any changes in LMTX that I need to take into account when typesetting a ToC/leaders? Any help is much appreciated. Thank you! fixed in next upload - 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] ToC filler dots/leaders not aligned in LMTX
Hello everyone I’m trying to typeset a table of contents with filler dots (list alternative C) in LMTX. Unfortunately, the dots are not vertically aligned and do not end flush on the right-hand side. If I try to use leaders in a paragraph, I get the same behaviour: the leading dots are not aligned. Compiling the same document with MkIV leads to correct alignment of the filler dots in both instances. Here is an MWE: \setuplistalternative[c][width=2em] \starttext \completecontent[alternative=c] \chapter{Short title} Lorem ipsum \hskip.5em\gleaders\hbox to .5\emwidth{\hss.\hss}\hfill\hskip.5em\relax dolor sit amet. \par Lorem \hskip.5em\gleaders\hbox to .5\emwidth{\hss.\hss}\hfill\hskip.5em\relax ipsum dolor sit amet. \chapter{Slighlty longer title} \chapter{Not so long title} \stoptext Are there any changes in LMTX that I need to take into account when typesetting a ToC/leaders? Any help is much appreciated. Thank you! Roman ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] margin in TocEntry definition
It works, though I'm happy also to have Wolfgang's very simple version! I'm learning a lot! I'm a great believer in Occam's Razor - the law of parsimony, so the simpler version is the way to go, and my earlier use of a TeX hack (\-\) can be put to rest! Thanks Bruce and thanks Wolfgang. Julian On 12/3/21 11:51 am, Bruce Horrocks wrote: On 11 Mar 2021, at 22:22, jbf wrote: Thanks for trying, Bruce. That earlier question you refer to was for a similar situation and the answer resolved that one at the time (it was my question even then!) but not the precise one I am facing now. The problem, you see, is that \startalignment only offers a few key words like flushleft, middle etc. and not what I need this time, which is a precise indentation feature like .5cm. I suppose my real problem is not being sufficiently au fait with how definitions work. I just can't seem to get a definition that gives me a result like Chapter title author . page number the \startalignment approach with flushleft would not give me the indentation obviously, and middle does not work for what I need, and either of them also pushes the page number line down onto the next line, which I don't want. I tried \skip .5cm, so: \define[1]\SectionTocEntry{% #1\crlf% title \hskip .5cm\doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}% } But the \hskip is ignored at the beginning of a line. I wonder if there is something else I can substitute it for? D'oh! Sorry - completely forgot about the indent. Best I can come up with at the moment is this - but I'm not sure how to get leading dots. \starttext \define[3]\SectionToCEntry{ #2\crlf \leftaligned \bgroup \hskip 0.5cm \structurelistuservariable{author} \rightaligned \bgroup #3 \egroup \egroup } \setuplist [chapter] [alternative=command, command=\SectionToCEntry, after=\endgraf] \completecontent \startchapter [title={This is my chapter title}] [author={Dummy Name}] \input Tufte \stopchapter \stoptext — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] margin in TocEntry definition
> On 11 Mar 2021, at 22:22, jbf wrote: > > Thanks for trying, Bruce. That earlier question you refer to was for a > similar situation and the answer resolved that one at the time (it was my > question even then!) but not the precise one I am facing now. > > The problem, you see, is that \startalignment only offers a few key words > like flushleft, middle etc. and not what I need this time, which is a precise > indentation feature like .5cm. I suppose my real problem is not being > sufficiently au fait with how definitions work. I just can't seem to get a > definition that gives me a result like > > Chapter title >author . page number > > the \startalignment approach with flushleft would not give me the indentation > obviously, and middle does not work for what I need, and either of them also > pushes the page number line down onto the next line, which I don't want. I > tried \skip .5cm, so: > > \define[1]\SectionTocEntry{% > #1\crlf% title > \hskip > .5cm\doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}% > } > > But the \hskip is ignored at the beginning of a line. I wonder if there is > something else I can substitute it for? D'oh! Sorry - completely forgot about the indent. Best I can come up with at the moment is this - but I'm not sure how to get leading dots. \starttext \define[3]\SectionToCEntry{ #2\crlf \leftaligned \bgroup \hskip 0.5cm \structurelistuservariable{author} \rightaligned \bgroup #3 \egroup \egroup } \setuplist [chapter] [alternative=command, command=\SectionToCEntry, after=\endgraf] \completecontent \startchapter [title={This is my chapter title}] [author={Dummy Name}] \input Tufte \stopchapter \stoptext — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Write to tuc file
On 3/6/21 2:35 PM, Hans Hagen wrote: > On 3/6/2021 1:56 PM, Pablo Rodriguez wrote: >> [...] >> The select style could generate from start-identifier and >> stop-identifier, the result "identifier.pdf". > \startchapter[reference=whatever,title=foo] > \stopchapter > \startchapter[reference=moreover,title=oof] > \stopchapter > > and --pages=whatever,moreover will give you the info you need to call > context --extra=copy or whatever with the right arguments Hans, real-world needs may be complex, such as in the following sample: \starttext \completecontent \dorecurse{3} {\startpart \edef\pn{\recurselevel} \dorecurse{30} {\startchapter\markpage[start-\pn.\recurselevel] \dorecurse{\randomnumber{0}{30}} {\input knuth\par} \markpage[stop-\pn.\recurselevel]\stopchapter} \stoppart} \stoptext This generates a document to be split in 90 individual documents. I cannot even think in specifying them manually. It would be very useful to have something similar to: context --extra=select --selection=pages oeps --once --autopdf I hope my explanation is clearer now. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Write to tuc file
On 3/6/2021 1:56 PM, Pablo Rodriguez wrote: On 3/5/21 11:13 PM, Hans Hagen wrote: On 3/5/2021 10:38 PM, denis.ma...@ub.unibe.ch wrote: Thanks for this as well, Hans. Looks promising. So, this is to select pages or page-ranges for processing? assuming that you have either marked pages or proper refs for chapters you can use the reported values and feed them into whatever i could add something to the select style but i guess then there is no uniformity in how users do this Many thanks for the new stuff, Hans. This could be an approach: \starttext \completecontent \dorecurse{10} {\startchapter\markpage[start-\recurselevel] \dorecurse{\randomnumber{0}{1000}} {\input knuth\par} \markpage[stop-\recurselevel]\stopchapter} \stoptext "start-" and "stop-" could define page ranges when the same identifier is used. The select style could generate from start-identifier and stop-identifier, the result "identifier.pdf". \startchapter[reference=whatever,title=foo] \stopchapter \startchapter[reference=moreover,title=oof] \stopchapter and --pages=whatever,moreover will give you the info you need to call context --extra=copy or whatever with the right arguments - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Write to tuc file
On 3/5/21 11:13 PM, Hans Hagen wrote: > On 3/5/2021 10:38 PM, denis.ma...@ub.unibe.ch wrote: >> Thanks for this as well, Hans. Looks promising. >> So, this is to select pages or page-ranges for processing? > assuming that you have either marked pages or proper refs for chapters > you can use the reported values and feed them into whatever > > i could add something to the select style but i guess then there is no > uniformity in how users do this Many thanks for the new stuff, Hans. This could be an approach: \starttext \completecontent \dorecurse{10} {\startchapter\markpage[start-\recurselevel] \dorecurse{\randomnumber{0}{1000}} {\input knuth\par} \markpage[stop-\recurselevel]\stopchapter} \stoptext "start-" and "stop-" could define page ranges when the same identifier is used. The select style could generate from start-identifier and stop-identifier, the result "identifier.pdf". I think this is a simple approach. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] conditional formatting, checking the context (SOLVED)
Hi, in the example below I’m using a custom highlighting macro in titles. Now I don’t want this highlighting in the ToC or in bookmarks (in my real world example the changes affect bookmarks, not in the MWE). I know I can use the list= and bookmark= keys of \startchapter, but since the text is always the same for all, I’d like to check within the \SPECIAL macro if we’re within the chapter title or within a list or bookmarks. In preparing the MWE and this message I found a solution with the *chapter system mode. Wanted to share anyway ;) Hraban \define[1]\SPECIAL{\doifmodeelse{*chapter}{{\bf #1}}{#1}} \setupinteraction[state=start] \placebookmarks[chapter,title] \starttext \startchapter[title={This \SPECIAL{and} That}] \input knuth \stopchapter \startchapter[title={Something \SPECIAL{Other}}] \input tufte \stopchapter \completecontent[criterium=all] \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] 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 ___
Re: [NTG-context] style option not working for headings
On 2/13/21 12:13 AM, Pablo Rodriguez wrote: > Dear Hans, > > I’m afraid that style doesn’t work for headings in current latest > (2021.02.12 18:49): Hans, it might be that the style option doesn’t work in other commands (or at all): \setuphead[section][style=\it] \setuplist[section][style=\it] \starttext \completecontent \section{Section} \input zapf \stoptext Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Some interaction questions
Follow up, I'm trying to also ignore commands when setting PDF metadata: The wiki gives these examples: \appendtoks \def\CONTEXT{ConTeXt} \to \simplifiedcommands And: \appendtoks \let\quad\space \to \simplifiedcommands So, I just added this to my environment file: \appendtoks \def\em{\space} \to \simplifiedcommands But, the \em still shows up in the PDF metadata. Is this still the recommended way to do this? Or is there an easier way? I guess, even if this would remove the \em, that would still leave the braces in place. (I'd prefer to remove them as well, but I've no idea how that could work.) Best, Denis Am 13.10.2020 um 16:14 schrieb Pablo Rodriguez: On 10/13/20 11:40 AM, Denis Maier wrote: Hi, I have a few more question regarding interaction/PDF bookmarks and PDF links: - How can you ignore Commands in bookmarks? Like when instead of "The concept of {\em bookmarks}", I'd prefer to just have "The concept of bookmarks". I know I can just use something like \startchapter[title=The concept of {\em bookmarks}, bookmark=The concept of bookmarks] But is there an setting for that? Hi Denis, I think this is what you want: \enabledirectives[references.bookmarks.preroll] - When clicking on a link, the focus switches to the target page. Is it possible to go to the line of the target? (Would be nice for switching between notes and text. Otherwise linking between notes and note markers would be quite pointless.) "focus=standard" in \setupinteraction. With a minimal sample: \setupinteraction[state=start, focus=standard] \enabledirectives[references.bookmarks.preroll] \placebookmarks[chapter] \starttext \completecontent \chapter{The concept of {\em bookmarks}} \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 ___ ___ 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] Some interaction questions
Thanks. Both suggestions were very helpful. Best, Denis Am 13.10.2020 um 16:14 schrieb Pablo Rodriguez: On 10/13/20 11:40 AM, Denis Maier wrote: Hi, I have a few more question regarding interaction/PDF bookmarks and PDF links: - How can you ignore Commands in bookmarks? Like when instead of "The concept of {\em bookmarks}", I'd prefer to just have "The concept of bookmarks". I know I can just use something like \startchapter[title=The concept of {\em bookmarks}, bookmark=The concept of bookmarks] But is there an setting for that? Hi Denis, I think this is what you want: \enabledirectives[references.bookmarks.preroll] - When clicking on a link, the focus switches to the target page. Is it possible to go to the line of the target? (Would be nice for switching between notes and text. Otherwise linking between notes and note markers would be quite pointless.) "focus=standard" in \setupinteraction. With a minimal sample: \setupinteraction[state=start, focus=standard] \enabledirectives[references.bookmarks.preroll] \placebookmarks[chapter] \starttext \completecontent \chapter{The concept of {\em bookmarks}} \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 ___ ___ 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] Some interaction questions
On 10/13/20 11:40 AM, Denis Maier wrote: > Hi, > > I have a few more question regarding interaction/PDF bookmarks and PDF > links: > > - How can you ignore Commands in bookmarks? Like when instead of "The > concept of {\em bookmarks}", I'd prefer to just have "The concept of > bookmarks". I know I can just use something like > \startchapter[title=The concept of {\em bookmarks}, > bookmark=The concept of bookmarks] > But is there an setting for that? Hi Denis, I think this is what you want: \enabledirectives[references.bookmarks.preroll] > - When clicking on a link, the focus switches to the target page. Is it > possible to go to the line of the target? (Would be nice for switching > between notes and text. Otherwise linking between notes and note markers > would be quite pointless.) "focus=standard" in \setupinteraction. With a minimal sample: \setupinteraction[state=start, focus=standard] \enabledirectives[references.bookmarks.preroll] \placebookmarks[chapter] \starttext \completecontent \chapter{The concept of {\em bookmarks}} \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] Sections in content: macros v text
Thank you, Wolfgang, that's it! Tomáš Wed, Oct 07, 2020 ve 05:12:42PM +0200 Wolfgang Schuster napsal(a): # Tomas Hala schrieb am 05.10.2020 um 20:20: # >Hi all, # > # >the content generated by the MWE below contains # >1 bb ... 1 # >2 bb ... 1 # >instead of # >1 aa ... 1 # >2 bb ... 1 # >because the content structure refers to the macro name \name in both sections instead of to work with the text. # > # >Maybe it was already discussed by I am not able to find any solution how to send the text "aa" to the content in this case. # > # >Thanks in advance for any hint. # > # >Best wishes, # > # >Tomáš # > # >MWE (TL2020): # >\starttext # >\define\name{aa} \startsection[title=\name,list=\name] \stopsection # >\define\name{bb} \startsection[title=\name,list=\name] \stopsection # >\completecontent # >\stoptext # # Variant 1: # # \setuphead[section][expansion=yes] # # \starttext # # \defineexpandable\name{aa} # # \startsection[title=\name,list=\name] \stopsection # # \defineexpandable\name{bb} # # \startsection[title=\name,list=\name] \stopsection # # \completecontent # # \stoptext # # # Variant 2: # # \starttext # # \defineexpandable\name{aa} # # \expanded{\startsection[title=\name,list=\name]} \stopsection # # \defineexpandable\name{bb} # # \expanded{\startsection[title=\name,list=\name]} \stopsection # # \completecontent # # \stoptext # # # Wolfgang Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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] xml bookmarks + chapter no. in header
On 10/7/20 5:06 PM, Tomas Hala wrote: > Hi, > > I tried > \setuphead[section][expansion=yes] > with no effect before I wrote my question to the list here. > > With the \setuphead, the .tuc file still contains macro names instead of the > text: > ["title"]="\\expanded \\name ", > whereas without it only: > ["title"]=" \\name ", > > So is there any way how to solve it? Sorry, Tomáš, for not giving a reply to you. I noticed that your case didn’t work with my approach. But the problem is different in that case, I think (Wolfgang may correct me [or explain this better]). Expansion in list and bookmarks seems to be different: \setupinteraction[state=start] \setupinteractionscreen[option=bookmarks] \placebookmarks[section][section] \setuphead[title][page=no] \starttext %~ \placelist[section] % this doesn’t work \def\name{aa} \placelist[section] \startsection[title=\name, list=\expanded\name] \stopsection \def\name{bb} \startsection[title=\name, list=\expanded\name] \stopsection \completecontent \stoptext I’m afraid I don’t know why. Sorry not helping, 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] Sections in content: macros v text
Tomas Hala schrieb am 05.10.2020 um 20:20: Hi all, the content generated by the MWE below contains 1 bb ... 1 2 bb ... 1 instead of 1 aa ... 1 2 bb ... 1 because the content structure refers to the macro name \name in both sections instead of to work with the text. Maybe it was already discussed by I am not able to find any solution how to send the text "aa" to the content in this case. Thanks in advance for any hint. Best wishes, Tomáš MWE (TL2020): \starttext \define\name{aa} \startsection[title=\name,list=\name] \stopsection \define\name{bb} \startsection[title=\name,list=\name] \stopsection \completecontent \stoptext Variant 1: \setuphead[section][expansion=yes] \starttext \defineexpandable\name{aa} \startsection[title=\name,list=\name] \stopsection \defineexpandable\name{bb} \startsection[title=\name,list=\name] \stopsection \completecontent \stoptext Variant 2: \starttext \defineexpandable\name{aa} \expanded{\startsection[title=\name,list=\name]} \stopsection \defineexpandable\name{bb} \expanded{\startsection[title=\name,list=\name]} \stopsection \completecontent \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] Sections in content: macros v text
Hi all, the content generated by the MWE below contains 1 bb ... 1 2 bb ... 1 instead of 1 aa ... 1 2 bb ... 1 because the content structure refers to the macro name \name in both sections instead of to work with the text. Maybe it was already discussed by I am not able to find any solution how to send the text "aa" to the content in this case. Thanks in advance for any hint. Best wishes, Tomáš MWE (TL2020): \starttext \define\name{aa} \startsection[title=\name,list=\name] \stopsection \define\name{bb} \startsection[title=\name,list=\name] \stopsection \completecontent \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fwd: Re: styling individual parts of ToC entry
Forwarded Message Subject:Re: [NTG-context] styling individual parts of ToC entry Date: Tue, 8 Sep 2020 12:39:05 +1000 From: jbf To: Wolfgang Schuster Wolfgang, I have tried an MWE below but I think I am hopelessly lost at this point. It is not producing anything like what I want. But at least let me indicate what I have tried: (1) I have defined two different 'title' items (Foreword and Preface unnumbered) since both of these require an author name of the kind produced by the \ChapterListCommand. Do I also need a \TitleListCommand for these? The \ChapterListCommand seems to call in a chapter number, and I don't want one in the Frontmatter items like foreword and preface. I didn't know how to adjust that definition to leave out the number. I did try a renamed copy of it, leaving out the line: \hbox to 3cm{\currentlistsymbol\hss}, but that made no difference. (2) And since I also need some sections with an author (but the chapter they are in has no author), I defined a 'mysection', though I have only tried to 'call in' the Foreword so far in the text below, to see if that at least worked - but it doesn't. (3) I also assumed that having defined foreword, preface and mysection, they would need to be in a \setupcombinedlist. (4) And finally, I thought I would then need a \setuplist and \setuplabeltext for Foreword (as indeed I might for the other two as well, but to start with, I wanted to get one of them working at least). MWE: \definehead [foreword] [title] \definehead [preface] [title] \definehead [mysection] [section] \setupcombinedlist[chapter,foreword,preface,mysection,section, subsection] \define[3]\ChapterListCommand {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup \hsize\dimexpr\makeupwidth-3cm\relax \doifsomething{\rawstructurelistuservariable{year}} {{\it\structurelistuservariable{year}}\crlf}% \currentlistentrytitle % title \doifsomething{\rawstructurelistuservariable{author}} {\crlf{\bf\structurelistuservariable{author}}}% \hfill\currentlistentrypagenumber % pagenumber \egroup \egroup} \define[3]\TitleListCommand {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup \hsize\dimexpr\makeupwidth-3cm\relax \doifsomething{\rawstructurelistuservariable{year}} {{\it\structurelistuservariable{year}}\crlf}% \currentlistentrytitle % title \doifsomething{\rawstructurelistuservariable{author}} {\crlf{\bf\structurelistuservariable{author}}}% \hfill\currentlistentrypagenumber % pagenumber \egroup \egroup} \definehead [foreword] [title] \definehead [preface] [title] \definehead [mysection] [section] \setupcombinedlist[chapter,foreword,preface,mysection,section, subsection] \setuplist [chapter] [label=chapter, alternative=command, command=\ChapterListCommand] \setuplabeltext [en] [chapter=Chapter ] \setuplist [foreword] [label=foreword, alternative=command, command=\TitleListCommand] \setuplabeltext [en] [title=Foreword ] \starttext \completecontent \starttitle [title={Foreword}] [author={Author Name}] \unknown \stoptitle \startchapter \startchapter [title={Chapter title}] [author={Author Name},year={1980--2000}] \unknown \stopchapter \stoptext %%% Let me remind you of what I am trying to achieve. If I can grasp some basic principles about this layout, I can experiment further. Foreword A. Uthor pg no. Preface A. Uthor " A note on Contributors " Chapter One Chapter Title A. Uthor " Chapter Two Chapter title A section Context A. Uthor " Another section Reflection A. Author " Julian On 7/9/20 4:57 pm, Wolfgang Schuster wrote: \definehead [forward] [chapter] \definehead [preface] [chapter] ___ 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 Wolfgang, while I don't pretend to fully understand the setup you have provided (but am working on doing so!), of course it provides the correct result for a chapter that has a title, an author, and a year. My ever-so-complicated book (and its authors!) however, throws one small further complication into the mix. Where a chapter does not have a year-range, and I either omit that declaration, or I leave the curly brackets empty (e.g. year={}), then I find that the author name also does not appear in the ToC. What adjustment to the \ChapterListCommand do I need to make to accommodate the following? Possibly an \else statement, but not sure how to include that: \startchapter [title={Chapter title}] [author={Author Name}] Julian On 5/9/20 7:16 pm, Wolfgang Schuster wrote: jbf schrieb am 05.09.2020 um 03:35: Now that with Hraban's invaluable assistance I am able to include title, subtitle, author as and when necessary in the ToC and put them on the same line if I need to, I have two questions that I have not found a satisfactory solution to after playing around with various possibilities. I need: (1) the author's names lined up vertically throughout the ToC, and (2) the first part of the entry (e.g. Foreword) to be bold, but the author name to be regular text. An adjusted version of Hraban's setup can show what I have tried by way of example: % \define[1]\TitleTocEntry{% #1\hskip 1cm% title \structurelistuservariable{author}% } \setuplist[title][textstyle=bold, textcommand=\TitleTocEntry, ] %--- /Question 1:/ /How to get the two author names to line up vertically./ Given that I have both a Foreword and a Preface, I am using \title for these. And both have separate authors. The titles will be simply 'Foreword' and 'Preface', obviously. *Foreword Author name* *Preface Author name* I am using \hskip 1cm to separate the authors' names from either of those two words. But this does not give me the kind of exact positioning I need to get the two author names directly underneath each other in the list. I have tried various alternatives to \hskip, but none of them can give me the correct proportional distance. The distance is obviously being controlled by the fact that 'Foreword' is 8 characters and 'Preface' is 7. Is what I want only obtainable with a table setup? The issue might or might not be more complicated when I get to main chapters, where the author names need to line up with the Foreword and Preface author names as well. There will be, e.g. Chapter One Title Author name // /Question 2:/ /How to independently get Foreword and Preface to be bold, but the authors' names to be regular./ \setuplist offers me options like textstyle, pagestyle, numberstyle, but they apply to everything (both Foreword/Preface and Authors' name are bold). I thought perhaps I could control it from within the document, e.g. \starttitle[title={\ss\bf Foreword}][author={A. Uthor}] But that does the same - both Foreword and A. Uthor end up bold. And besides, I also want to style the ToC independently of the heads if I can. The wiki and various manuals do offer various tips on modifying the ToC, but I cannot find anything regarding the two questions above - not yet, anyway. If someone knows where, please point me to it. \define[3]\ChapterListCommand {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup \hsize\dimexpr\makeupwidth-3cm\relax \doifsomething{\rawstructurelistuservariable{year}} {{\it\structurelistuservariable{year}}\crlf}% \currentlistentrytitle % title \doifsomething{\rawstructurelistuservariable{year}} {\crlf{\bf\structurelistuservariable{author}}}% \hfill\currentlistentrypagenumber % pagenumber \egroup \egroup} \setuplist [chapter] [label=chapter, alternative=command, command=\ChapterListCommand] \setuplabeltext [en] [chapter=Chapter ] \starttext \completecontent \startchapter [title={Chapter title}] [author={Author Name},year={1980--2000}] \unknown \stopchapter \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 05.09.2020 um 03:35: Now that with Hraban's invaluable assistance I am able to include title, subtitle, author as and when necessary in the ToC and put them on the same line if I need to, I have two questions that I have not found a satisfactory solution to after playing around with various possibilities. I need: (1) the author's names lined up vertically throughout the ToC, and (2) the first part of the entry (e.g. Foreword) to be bold, but the author name to be regular text. An adjusted version of Hraban's setup can show what I have tried by way of example: % \define[1]\TitleTocEntry{% #1\hskip 1cm% title \structurelistuservariable{author}% } \setuplist[title][textstyle=bold, textcommand=\TitleTocEntry, ] %--- /Question 1:/ /How to get the two author names to line up vertically./ Given that I have both a Foreword and a Preface, I am using \title for these. And both have separate authors. The titles will be simply 'Foreword' and 'Preface', obviously. *Foreword Author name* *Preface Author name* I am using \hskip 1cm to separate the authors' names from either of those two words. But this does not give me the kind of exact positioning I need to get the two author names directly underneath each other in the list. I have tried various alternatives to \hskip, but none of them can give me the correct proportional distance. The distance is obviously being controlled by the fact that 'Foreword' is 8 characters and 'Preface' is 7. Is what I want only obtainable with a table setup? The issue might or might not be more complicated when I get to main chapters, where the author names need to line up with the Foreword and Preface author names as well. There will be, e.g. Chapter One Title Author name // /Question 2:/ /How to independently get Foreword and Preface to be bold, but the authors' names to be regular./ \setuplist offers me options like textstyle, pagestyle, numberstyle, but they apply to everything (both Foreword/Preface and Authors' name are bold). I thought perhaps I could control it from within the document, e.g. \starttitle[title={\ss\bf Foreword}][author={A. Uthor}] But that does the same - both Foreword and A. Uthor end up bold. And besides, I also want to style the ToC independently of the heads if I can. The wiki and various manuals do offer various tips on modifying the ToC, but I cannot find anything regarding the two questions above - not yet, anyway. If someone knows where, please point me to it. \define[3]\ChapterListCommand {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup \hsize\dimexpr\makeupwidth-3cm\relax \doifsomething{\rawstructurelistuservariable{year}} {{\it\structurelistuservariable{year}}\crlf}% \currentlistentrytitle % title \doifsomething{\rawstructurelistuservariable{year}} {\crlf{\bf\structurelistuservariable{author}}}% \hfill\currentlistentrypagenumber % pagenumber \egroup \egroup} \setuplist [chapter] [label=chapter, alternative=command, command=\ChapterListCommand] \setuplabeltext [en] [chapter=Chapter ] \starttext \completecontent \startchapter [title={Chapter title}] [author={Author Name},year={1980--2000}] \unknown \stopchapter \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 chapter and section numbering
Excellent, this was the solution. I'm certain to learn a great deal from it. Thanks again, Adrian Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Wednesday, August 19, 2020 9:44 AM, Wolfgang Schuster wrote: > Adrian schrieb am 18.08.2020 um 06:40: > > > Hello, > > I'm attempting to typeset a short book using ConTeXt > > (current version: 2020.08.09 22:03). > > EXAMPLE: > > [...] > > I would like all the chapters to be prefixed with "Chapter RN." and the > > sections to keep a single count, > > for example: > > Chapter I. Introductory . > > 1. The concept of a function > > 2. Extension and intension > > 3. Functions of several variables > > 4. Abstraction > > Chapter II. Lambda Conversion . > > 5. Primitive symbols and formulas > > 6. Conversion > > 7. Fundamental theorems on well-formed formulas and on the normal form > > I tried to the following for the chapters: > > \defineconversion[church][Chapter \Romannumerals.\quad] > > \setuphead[chapter][conversion=church] > > Which appeared to generate the prefix correctly but it overlapped the > > title. > > \setuplabeltext > [en] [chapter=Chapter ] > > \defineresetset > [default] [0,0,0] [1] > > \defineconversionset > [section] [n,R,n] [n] > > \setuphead > [chapter] > [sectionconversionset=section, > sectionstopper=.] > > \setuphead > [section] > [sectionsegments=section, > sectionconversionset=section, > sectionstopper=.] > > \setuphead > [title] > [alternative=middle, > style=WORD] > > \setuplist > [chapter] > [label=yes, > style=bold, > width=fit, > distance=\spaceamount] > > \setuplist > [section] > [margin=3em, > width=1.5em] > > \starttext > > \completecontent > > ... > > \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 chapter and section numbering
Adrian schrieb am 18.08.2020 um 06:40: Hello, I'm attempting to typeset a short book using ConTeXt (current version: 2020.08.09 22:03). *EXAMPLE*: [...] I would like all the chapters to be prefixed with "Chapter RN." and the sections to keep a single count, for example: *Chapter I. Introductory .* 1. The concept of a function 2. Extension and intension 3. Functions of several variables 4. Abstraction *Chapter II. Lambda Conversion .* 5. Primitive symbols and formulas 6. Conversion 7. Fundamental theorems on well-formed formulas and on the normal form I tried to the following for the chapters: \defineconversion[church][Chapter \Romannumerals.\quad] \setuphead[chapter][conversion=church] Which appeared to generate the prefix correctly but it overlapped the title. \setuplabeltext [en] [chapter=Chapter ] \defineresetset [default] [0,0,0] [1] \defineconversionset [section] [n,R,n] [n] \setuphead [chapter] [sectionconversionset=section, sectionstopper=.] \setuphead [section] [sectionsegments=section, sectionconversionset=section, sectionstopper=.] \setuphead [title] [alternative=middle, style=WORD] \setuplist [chapter] [label=yes, style=bold, width=fit, distance=\spaceamount] \setuplist [section] [margin=3em, width=1.5em] \starttext \completecontent ... \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] Help on tweaking alignment, page numbers and ToC
Nicola schrieb am 11.08.2020 um 22:21: On 2020-08-11, Pablo Rodriguez wrote: On 8/11/20 9:24 PM, Nicola wrote: Thank Pablo, Wolfgang, I have learned more by reading your replies than by myself in the rest of the afternoon. Hi Nicola, if you found replies useful, please update the wiki (this may help others). Just one more thing: [...] I'd prefer all the titles to be aligned: Preface I XYZ ... VIII XYZ ... I have tried to do my homework by playing with \setuphead, but I am afraid I need your help on this. Sorry, but too tired to type a sample. How about setting distance for \setuplist[chapter] in the sectionblock frontpart with the desired width? That does not seem to change the layout, unfortunately. I have tried with `margin` and `aligntitle` as well: \setuplist[chapter][distance=1cm,aligntitle=yes] \startsectionblockenvironment[frontpart] \setuplist[chapter][aligntitle=yes,margin=2cm,distance=2cm] \stopsectionblockenvironment I'll take a fresh look tomorrow. When you a unnumbered section with the list alternatives a-c your're out of luck with the regular \setuplist options because it always use a width of 0pt for regular section number. The aligntitle works only for numbered entries to align them when you disable the number entry in the TOC. To show the section entry and align all entries on the same line you can use the following method: 1. Set the width and distance for the section number to 0pt. 2. Set the margin key to a value large enough to fit all numbers 3. Apply a command to the numbercommand key where you shift the number to the left in the margin area you set in the previous step begin example \define[1]\ChapterListNumbercommand {\offset[x=-1cm,width=0pt]{\simplealignedbox{1cm}{flushleft}{#1}}} \setuplist [chapter] [distance=0cm, width=0cm, margin=1cm, numbercommand=\ChapterListNumbercommand] \starttext \startfrontmatter \completecontent \chapter{Preface} \stopfrontmatter \startbodymatter \chapter{Introduction} \chapter{Workflow} \chapter{Input} \chapter{Output} \stopbodymatter \startbackmatter \chapter{Index} \stopbackmatter \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 ___
[NTG-context] Help on tweaking alignment, page numbers and ToC
Hi, first of all, let me say *thank you* for the vast improvements on ConTeXt Garden! Browsing the documentation and finding stuff is so much easier and pleasant than it used to be (also the site seems faster). Thanks to the docs, dropcaps and protrusion have no secrets for me, but I am still struggling with some basic tasks (see the document below): 0. Push text to the bottom of the text area (see copyright). 1. Increase the space between Roman numbers and titles in the ToC. 2. Vertically center the ToC (wrt to the text area). 3. Suppress page numbers and headers in all blank pages. 4. Suppress headers in the front matter. 5. Style and position page numbers differently in the front and body matter (e.g., centered only in the front matter). As my full document uses environments, I would like most setups to be in the environment, if possible. E.g., is it possible to replace \setuphead[chapter][after={}] (see below) with an environment setup that applies only to the ToC? Nicola %%% \definepapersize[lsda][width=128.4mm,height=198.3mm] \setuppapersize[lsda] \setuplayout[ backspace=22.9mm, width=90.3mm, topspace=8.9mm, height=181.1mm, header=4mm, headerdistance=6.4mm, footerdistance=6.4mm, footer=4mm, leftmargin=15.2mm, leftmargindistance=0mm, rightmargindistance=0mm, rightmargin=15.2mm, ] \setuplabeltext[it][chapter=] \setuphead[chapter][ header=empty, alternative=middle, conversion=Romannumerals, numbercommand=\groupedcommand{\blank[20mm]}{\blank[10mm]}, after={\blank[3cm]}, ] \setupheadtext[content=] \setupheadertexts[] \setupheadertexts[\setups{text a}][][][\setups{text b}] \startsetups[text a] \rlap{whatever} \hfill \getmarking[chapter] \hfill \llap{whatever} \stopsetups \startsetups[text b] \rlap{} \hfill Some text goes here \hfill \llap{} \stopsetups \setuppagenumbering[ alternative=doublesided, location={text,footer,right}, style=\tfx ] \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \starttext \startfrontmatter \page[even] \startalignment[bottom,flushright] Copyright © 2020 Author \stopalignment \start \setuphead[chapter][after={}] \completecontent \stop \page[odd] \startchapter[title={Preface}]\input{knuth}\stopchapter \stopfrontmatter \startbodymatter \setuppagenumber[number=1] \dorecurse{10}{\startchapter[title={XYZ}]\input{tufte}\stopchapter} \stopbodymatter \stoptext %%% ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Using variables and macros for styling of section title and line in table of contents
Dear list I have a document with section headings which include a title, date and reference spread over two lines with different font style and justification, plus a slightly different text for the table of contents. So that I can alter the styling of the section headings without having to recode each \startsection command, I have used variables and a macro command for the style. This works for section 'title' and 'marking', but not for the 'list' attribute. The minimal working example below shows what I'm trying to do. Best wishes and many thanks in advance. James \define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}} \define\mylist{\getvariable{myvar}{list}---{\bf \getvariable{myvar}{date}}} \starttext \completecontent \setvariables[myvar][ title={What I would like}, date={2020}, ref={Reference No 1}, list={Variation on title}, ] \startsection[title=\mytitle,list={Variation on title---{\bf 2020}}] Contents line to look like this: \mylist \stopsection \setvariables[myvar][ title={What I get}, date={2021}, ref={Reference No 2}, list={Something for the contents}, ] \startsection[title=\mytitle,list=\mylist] Contents line to look like this: \mylist \stopsection \stoptext <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] french translation of ConTeXt interface - progress (v3)
file name can be confusing, it's not yet complete TypeNames TranslationsAchievement commands3962954 24% constants 841 708 84% elements26 25 DONE setupstrings135 56 41% variables 1330680 51% 6294242339% Following your feedbacks, I will update it and improve its consistency. As you advised, I will try first to complete constants and variables (keys/values) during July and August. And, if it makes sense for ConTeXt's community to use it as a "new" or an "updated" french interface, I may try to produce a 40~50 pages documentation for the basics commands (during 2020 S2): • \starttext • \startchapter, \startsection, \starttitle, \startsubject, \setuphead, \completecontent • \em, \bf, \cap, • \startitemize, \startitem, \starthead, • \placefigure, \externalfigure, • \placetable, \starttable,\starttabulate, \setupTABLE, \bTABLE • \index, \completeindex • \setuplayout, \setupfootertexts et \setupheadertexts • \definedescription, \defineenumeration • \at, \in Anyway, thanks again for your support. Le 19/07/2020 à 22:55, Hans Hagen a écrit : On 7/19/2020 8:27 PM, Garulfo wrote: file: mult-def.lua.complet i'll have a look at it Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 numbers
A useful distinction to know. Do you think this is made clear on the wiki? In fact I am sure that the information is there precisely as you have put it, but the challenge (for the wiki and the wiki user) is to find it. Your many brief and to-the-point explanations of these little matters, Wolfgang, are like grains of gold in the sands, that one has to pan for. Julian On 9/6/20 5:25 am, Wolfgang Schuster wrote: Duncan Hothersall schrieb am 08.06.2020 um 08:35: Use \setuplabeltext instead of \setupheadtext. I agree the documentation suggests \setupheadtext should work the same way, but it doesn't seem to. You might also want a space after the word Chapter. It works the same way but it's used for a different purpose. The \setupheadtext command is used to change the default titles for \completecontent, \completeindex etc. begin example \setupheadtext[en][content=Table of Contents] \starttext \completecontent \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] chapter numbers
Duncan Hothersall schrieb am 08.06.2020 um 08:35: Use \setuplabeltext instead of \setupheadtext. I agree the documentation suggests \setupheadtext should work the same way, but it doesn't seem to. You might also want a space after the word Chapter. It works the same way but it's used for a different purpose. The \setupheadtext command is used to change the default titles for \completecontent, \completeindex etc. begin example \setupheadtext[en][content=Table of Contents] \starttext \completecontent \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] TOC- removing Contents 0
On 4/22/20 2:44 AM, jbf wrote: > A simple question, but I have not found an answer to it as yet: > > \completecontent does everything it is supposed to, including providing > the title 'Contents' on the ToC page, but it also gives me as the first > line in the ToC: > > Contents 0 > > In fact the ToC appears on page 1, but regardless of the page it is > appearing on, is there a way I can prevent that line from being produced > as part of the ToC? I assume it would be something I need to do in the > following setup: > > \setupcombinedlist > [content] > [list={chapter,section,title,subject,subsection}] > \setuplist[chapter][style=normal,alternative=b, before=] Hi Julian, \completecontent is similar to simply use: \title{Contents} \placelist[content] If you include title in \setupcombinedlist[content], you are requesting that all titles are included in the TOC. A workaround could be to create a special title command for the TOC, such as in: \definehead [toctitle] [title] And then use the following instead of \completecontent: \toctitle{Contents} \placelist[content] This should avoid the problem. I hope ith 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- removing Contents 0
> Am 22.04.2020 um 02:44 schrieb jbf : > > A simple question, but I have not found an answer to it as yet: > > \completecontent does everything it is supposed to, including providing the > title 'Contents' on the ToC page, but it also gives me as the first line in > the ToC: > > Contents 0 > > In fact the ToC appears on page 1, but regardless of the page it is appearing > on, is there a way I can prevent that line from being produced as part of the > ToC? I assume it would be something I need to do in the following setup: > > \setupcombinedlist > [content] > [list={chapter,section,title,subject,subsection}] > \setuplist[chapter][style=normal,alternative=b, before=] > > Grateful for any help with this, Usually the unnnumbered headers aren’t part of any ToC, but since you include title, you also get the ToC title. (title = unnumbered chapter) If you need chapters without numbers, use \setuphead[chapter][number=no]. If you need some titles to appear in the ToC, you can use \definehead[MyTitle][chapter] etc. You can also replace \completecontent with \MySpecialTitle{Contents} \placecontent[...]. Best, Hraban ___ 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- removing Contents 0
A simple question, but I have not found an answer to it as yet: \completecontent does everything it is supposed to, including providing the title 'Contents' on the ToC page, but it also gives me as the first line in the ToC: Contents 0 In fact the ToC appears on page 1, but regardless of the page it is appearing on, is there a way I can prevent that line from being produced as part of the ToC? I assume it would be something I need to do in the following setup: \setupcombinedlist [content] [list={chapter,section,title,subject,subsection}] \setuplist[chapter][style=normal,alternative=b, before=] Grateful for any help with this, 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 ___