* A book with sections @ 2021-10-23 13:20 Gerben Wierda via ntg-context 2021-10-23 13:34 ` Wolfgang Schuster via ntg-context 0 siblings, 1 reply; 7+ messages in thread From: Gerben Wierda via ntg-context @ 2021-10-23 13:20 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Gerben Wierda [-- Attachment #1.1: Type: text/plain, Size: 520 bytes --] 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? Thanks, Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>) R&A Enterprise Architecture <https://ea.rna.nl/> (main site) Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/> [-- Attachment #1.2: Type: text/html, Size: 3130 bytes --] [-- Attachment #2: Type: text/plain, Size: 493 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A book with sections 2021-10-23 13:20 A book with sections Gerben Wierda via ntg-context @ 2021-10-23 13:34 ` Wolfgang Schuster via ntg-context 2021-10-23 13:51 ` Gerben Wierda via ntg-context 0 siblings, 1 reply; 7+ messages in thread From: Wolfgang Schuster via ntg-context @ 2021-10-23 13:34 UTC (permalink / raw) To: mailing list for ConTeXt users, Gerben Wierda via ntg-context Cc: Wolfgang Schuster [-- Attachment #1.1: Type: text/plain, Size: 323 bytes --] 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. Wolfgang [-- Attachment #1.2: Type: text/html, Size: 773 bytes --] [-- Attachment #2: Type: text/plain, Size: 493 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A book with sections 2021-10-23 13:34 ` Wolfgang Schuster via ntg-context @ 2021-10-23 13:51 ` Gerben Wierda via ntg-context 2021-10-23 14:43 ` Wolfgang Schuster via ntg-context ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Gerben Wierda via ntg-context @ 2021-10-23 13:51 UTC (permalink / raw) To: Wolfgang Schuster; +Cc: Gerben Wierda, Gerben Wierda via ntg-context > On 23 Oct 2021, at 15:34, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> 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 - 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? Gerben > > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A book with sections 2021-10-23 13:51 ` Gerben Wierda via ntg-context @ 2021-10-23 14:43 ` Wolfgang Schuster via ntg-context 2021-10-23 14:48 ` Pablo Rodriguez via ntg-context 2021-10-23 23:01 ` Bruce Horrocks via ntg-context 2 siblings, 0 replies; 7+ messages in thread From: Wolfgang Schuster via ntg-context @ 2021-10-23 14:43 UTC (permalink / raw) To: Gerben Wierda; +Cc: Wolfgang Schuster, mailing list for ConTeXt users Gerben Wierda schrieb am 23.10.2021 um 15:51: >> On 23 Oct 2021, at 15:34, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A book with sections 2021-10-23 13:51 ` Gerben Wierda via ntg-context 2021-10-23 14:43 ` Wolfgang Schuster via ntg-context @ 2021-10-23 14:48 ` Pablo Rodriguez via ntg-context 2021-10-23 23:01 ` Bruce Horrocks via ntg-context 2 siblings, 0 replies; 7+ messages in thread From: Pablo Rodriguez via ntg-context @ 2021-10-23 14:48 UTC (permalink / raw) To: Gerben Wierda via ntg-context; +Cc: Pablo Rodriguez 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A book with sections 2021-10-23 13:51 ` Gerben Wierda via ntg-context 2021-10-23 14:43 ` Wolfgang Schuster via ntg-context 2021-10-23 14:48 ` Pablo Rodriguez via ntg-context @ 2021-10-23 23:01 ` Bruce Horrocks via ntg-context 2021-10-24 8:33 ` Duncan Hothersall via ntg-context 2 siblings, 1 reply; 7+ messages in thread From: Bruce Horrocks via ntg-context @ 2021-10-23 23:01 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Bruce Horrocks > On 23 Oct 2021, at 14:51, Gerben Wierda via ntg-context <ntg-context@ntg.nl> wrote: > > >> On 23 Oct 2021, at 15:34, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> 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 > - 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? I define my own versions of \part and \chapter (called \Part and \Chapter) and specify a different display style using setups. The definition for \Part is below, \Chapter is very similar so I haven't included it. %% Double rule above part title \startsetups PartSetup \setupheader[state=empty] \par \startMPcode draw (0,2mm)--(TextWidth,2mm) withpen pensquare scaled 1.5mm ; draw (0,0)--(TextWidth,0) withpen pensquare scaled 1.0mm ; clip currentpicture to unitsquare yscaled 1cm xscaled TextWidth \stopMPcode \stopsetups \define[2]\placePartTitle{\midaligned{#2}} %% The above line is what I use. You want Roman numerals so maybe adapt it to: %% \define[2]\placePartTitle{\midaligned{\convertnumber[Romannumerals][#1] #2}} \definehead [Part] [part] \setuphead[Part] [ page=right, placehead=yes, style={\stylePartTitle}, %% this is just from a \definefont before={\setups{PartSetup}}, command=\placePartTitle, ] With \setuplayout[location=doublesided] this then comes out on the RHS. For the ToC, I use: \setuplist [alternative=b] \setuplist [Part] [ headnumber=no, margin=0cm, width=0cm, distance=0cm, style=\tocStylePartTitle, ] \setuplist [Chapter] [ headnumber=no, margin=1em, width=0cm, distance=0cm, ] \setupcombinedlist [content] [list={Part,Chapter}] then \placecontent prints the chapter titles indented under each part. HTH — Bruce Horrocks Hampshire, UK — 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A book with sections 2021-10-23 23:01 ` Bruce Horrocks via ntg-context @ 2021-10-24 8:33 ` Duncan Hothersall via ntg-context 0 siblings, 0 replies; 7+ messages in thread From: Duncan Hothersall via ntg-context @ 2021-10-24 8:33 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Duncan Hothersall [-- Attachment #1.1: Type: text/plain, Size: 3935 bytes --] Worth just quickly noting that the default for \part is placehead=no. You need to explicitly set placehead=yes for it to actually output the heading. See https://wiki.contextgarden.net/Command/_section#Parts On Sun, 24 Oct 2021 at 00:02, Bruce Horrocks via ntg-context < ntg-context@ntg.nl> wrote: > > > > On 23 Oct 2021, at 14:51, Gerben Wierda via ntg-context < > ntg-context@ntg.nl> wrote: > > > > > >> On 23 Oct 2021, at 15:34, Wolfgang Schuster < > wolfgang.schuster.lists@gmail.com> 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 > > - 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? > > I define my own versions of \part and \chapter (called \Part and \Chapter) > and specify a different display style using setups. The definition for > \Part is below, \Chapter is very similar so I haven't included it. > > %% Double rule above part title > \startsetups PartSetup > \setupheader[state=empty] > \par > \startMPcode > draw (0,2mm)--(TextWidth,2mm) withpen pensquare scaled 1.5mm ; > draw (0,0)--(TextWidth,0) withpen pensquare scaled 1.0mm ; > clip currentpicture to unitsquare yscaled 1cm xscaled TextWidth > \stopMPcode > \stopsetups > > \define[2]\placePartTitle{\midaligned{#2}} > %% The above line is what I use. You want Roman numerals so maybe adapt it > to: > %% \define[2]\placePartTitle{\midaligned{\convertnumber[Romannumerals][#1] > #2}} > > \definehead [Part] [part] > \setuphead[Part] > [ page=right, > placehead=yes, > style={\stylePartTitle}, %% this is just from a \definefont > before={\setups{PartSetup}}, > command=\placePartTitle, > ] > > With \setuplayout[location=doublesided] this then comes out on the RHS. > > For the ToC, I use: > > \setuplist [alternative=b] > \setuplist [Part] > [ headnumber=no, > margin=0cm, > width=0cm, > distance=0cm, > style=\tocStylePartTitle, > ] > \setuplist [Chapter] > [ headnumber=no, > margin=1em, > width=0cm, > distance=0cm, > ] > \setupcombinedlist [content] [list={Part,Chapter}] > > then \placecontent prints the chapter titles indented under each part. > > HTH > — > Bruce Horrocks > Hampshire, UK > > > > — > 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 > > ___________________________________________________________________________________ > -- Duncan Hothersall, Operations Director CAPDM Limited - Online Program Enablers 0131 677 2400 www.capdm.com Registered in Scotland: SC168970 VAT: 682 846 983 Registered address: 20 Forth Street Edinburgh EH1 3LH UK <https://maps.google.com/?q=22+Forth+Street,+Edinburgh,+EH1+3LH,+UK&entry=gmail&source=g> Capture, author, publish, deliver and manage your learning materials. *Sign up to the CAPDM newsletter here <http://eepurl.com/bqzBQn>* [-- Attachment #1.2: Type: text/html, Size: 5891 bytes --] [-- Attachment #2: Type: text/plain, Size: 493 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-10-24 8:33 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-10-23 13:20 A book with sections Gerben Wierda via ntg-context 2021-10-23 13:34 ` Wolfgang Schuster via ntg-context 2021-10-23 13:51 ` Gerben Wierda via ntg-context 2021-10-23 14:43 ` Wolfgang Schuster via ntg-context 2021-10-23 14:48 ` Pablo Rodriguez via ntg-context 2021-10-23 23:01 ` Bruce Horrocks via ntg-context 2021-10-24 8:33 ` Duncan Hothersall via ntg-context
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).