* [NTG-context] Use of marking @ 2024-03-20 7:18 Thomas Meyer 2024-03-20 8:09 ` [NTG-context] " Hraban Ramm 0 siblings, 1 reply; 8+ messages in thread From: Thomas Meyer @ 2024-03-20 7:18 UTC (permalink / raw) To: NTG ConTeXt [-- Attachment #1.1: Type: text/plain, Size: 437 bytes --] HI folks, yesterday while reading along I learned how to suppress the chapter numbers in sections. That was something I was looking for myself. But how do you use marking correctly in startsection? I would like to see "1. Kapitel - 1. Aufgabe" in the header on the right. How can I automate this with marking? And how can I reduce the space between the number (1.) and the title (Kapitel or Aufgabe)? Thanks for your help Thomas [-- Attachment #1.2: Type: text/html, Size: 762 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: Use of marking 2024-03-20 7:18 [NTG-context] Use of marking Thomas Meyer @ 2024-03-20 8:09 ` Hraban Ramm 2024-03-20 11:18 ` Thomas Meyer 0 siblings, 1 reply; 8+ messages in thread From: Hraban Ramm @ 2024-03-20 8:09 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 869 bytes --] Am 20.03.24 um 08:18 schrieb Thomas Meyer: > HI folks, > > yesterday while reading along I learned how to suppress the chapter > numbers in sections. That was something I was looking for myself. > > But how do you use marking correctly in startsection? I would like to > see "1. Kapitel - 1. Aufgabe" in the header on the right. How can I > automate this with marking? > And how can I reduce the space between the number (1.) and the title > (Kapitel or Aufgabe)? > > Thanks for your help > Thomas > Hi Thomas, do you know how to use \setupheadertexts? https://wiki.contextgarden.net/Command/setupheadertexts I guess you're using the section level for "Aufgabe"? Then something like {\getmarking{chapter} – \getmarking{section}} might fit your request. The formatting should be possible with \setuphead[chapter,section][numberwidth=2em] or "fit". Hraban [-- Attachment #1.2: Type: text/html, Size: 1993 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: Use of marking 2024-03-20 8:09 ` [NTG-context] " Hraban Ramm @ 2024-03-20 11:18 ` Thomas Meyer 2024-03-20 14:22 ` Hraban Ramm 0 siblings, 1 reply; 8+ messages in thread From: Thomas Meyer @ 2024-03-20 11:18 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 1956 bytes --] Hi Hraban, and thanks. setuphead[chapter,section][numberwidth=2em] or "fit" works! I know \setupheadertexts, but do not know what shall I write here: \startsection[titel=Aufgabe, marking=?????] If I write marking=Aufgabe I get Aufgabe, no number! For chapter the same. \setupheadertexts [] [{\getmarking[chapter]} - {\getmarking[section]}] [{\getmarking[chapter]} - {\getmarking[section]}] [] ----> Kapitel - Aufgabe Thanks in advance Greetings Thomas Am 20.03.24 um 09:09 schrieb Hraban Ramm: > > > Am 20.03.24 um 08:18 schrieb Thomas Meyer: >> HI folks, >> >> yesterday while reading along I learned how to suppress the chapter >> numbers in sections. That was something I was looking for myself. >> >> But how do you use marking correctly in startsection? I would like to >> see "1. Kapitel - 1. Aufgabe" in the header on the right. How can I >> automate this with marking? >> And how can I reduce the space between the number (1.) and the title >> (Kapitel or Aufgabe)? >> >> Thanks for your help >> Thomas >> > Hi Thomas, > > do you know how to use \setupheadertexts? > > https://wiki.contextgarden.net/Command/setupheadertexts > > I guess you're using the section level for "Aufgabe"? > > Then something like {\getmarking{chapter} – \getmarking{section}} > might fit your request. > > The formatting should be possible with > \setuphead[chapter,section][numberwidth=2em] or "fit". > > Hraban > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 4401 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: Use of marking 2024-03-20 11:18 ` Thomas Meyer @ 2024-03-20 14:22 ` Hraban Ramm 2024-03-20 18:45 ` Andres Conrado Montoya 0 siblings, 1 reply; 8+ messages in thread From: Hraban Ramm @ 2024-03-20 14:22 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 2757 bytes --] \setupheadtext[de][section=Aufgabe] Rename the section, then you don’t need marking. Sorry, I'm in a hurry and must look up how to get the number… Am 20.03.24 um 12:18 schrieb Thomas Meyer: > Hi Hraban, > > and thanks. > > setuphead[chapter,section][numberwidth=2em] or "fit" > works! > > I know \setupheadertexts, but do not know what shall I write here: > \startsection[titel=Aufgabe, marking=?????] > If I write marking=Aufgabe I get Aufgabe, no number! For chapter the same. > > \setupheadertexts > [] [{\getmarking[chapter]} - {\getmarking[section]}] > [{\getmarking[chapter]} - {\getmarking[section]}] [] > ----> Kapitel - Aufgabe > > > Thanks in advance > Greetings > Thomas > > > Am 20.03.24 um 09:09 schrieb Hraban Ramm: >> >> >> Am 20.03.24 um 08:18 schrieb Thomas Meyer: >>> HI folks, >>> >>> yesterday while reading along I learned how to suppress the chapter >>> numbers in sections. That was something I was looking for myself. >>> >>> But how do you use marking correctly in startsection? I would like >>> to see "1. Kapitel - 1. Aufgabe" in the header on the right. How can >>> I automate this with marking? >>> And how can I reduce the space between the number (1.) and the title >>> (Kapitel or Aufgabe)? >>> >>> Thanks for your help >>> Thomas >>> >> Hi Thomas, >> >> do you know how to use \setupheadertexts? >> >> https://wiki.contextgarden.net/Command/setupheadertexts >> >> I guess you're using the section level for "Aufgabe"? >> >> Then something like {\getmarking{chapter} – \getmarking{section}} >> might fit your request. >> >> The formatting should be possible with >> \setuphead[chapter,section][numberwidth=2em] or "fit". >> >> Hraban >> >> >> ___________________________________________________________________________________ >> 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 > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 6501 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: Use of marking 2024-03-20 14:22 ` Hraban Ramm @ 2024-03-20 18:45 ` Andres Conrado Montoya 2024-03-21 15:34 ` Bruce Horrocks 0 siblings, 1 reply; 8+ messages in thread From: Andres Conrado Montoya @ 2024-03-20 18:45 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 6309 bytes --] As I understand, Thomas needs a layout in which the header shows something like 1. Chapter title -- 1.1. Section title (including the numbers! *This is the important bit!*) There are a couple things about this: 1. In a section (part, chapter, section, etc.) you can introduce three versions of the title for that section. title= is the general one and if nothing else is specified, this will be used in markings (headers or footer or wherever you want to put therm) and in listings (contents). If you give those arguments, marking= and listing=, you will get those texts in those places: marking= on markings (you can call them with \getmarking) and listing= in the table of contents. 2. As far as I have found, including the chapter/section number in the marking is *not really a trivial task*. I usually hack something using \headnumber and \getmarking, like so: \setuppagenumbering[alternative=doublesided,location=,] \setupheadertexts[{\headnumber[section].~\getmarking[section]}---{\headnumber[chapter].~\getmarking[chapter]}] \setupfootertexts[][pagenumber][pagenumber][] \setuphead[chapter][header=high] \starttext \dorecurse{10}{ \startchapter[title={This is my chapter}] This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv \startsection[title={This is my section}] This is a section\par \dorecurse{6}{\input knuth }\input math-kontinuitet-sv \stopsection \stopchapter } \stoptext But with a caveat: the `header=high` setting in setuphead for the chapter needs to be included, or you will get a section number in the first page, even if there is no section. I have not found a better mechanism yet, but I'm quite sure there is a correct solution for this... I just haven't found it yet. Checking for the presence of \getmarking[section] with \doifsomething does not work, or I could not make it work. A little bit more info here: https://wiki.contextgarden.net/Command/getmarking https://wiki.contextgarden.net/Command/headnumber El mié, 20 mar 2024 a las 9:23, Hraban Ramm (<texml@fiee.net>) escribió: > \setupheadtext[de][section=Aufgabe] > Rename the section, then you don’t need marking. > > Sorry, I'm in a hurry and must look up how to get the number… > > > Am 20.03.24 um 12:18 schrieb Thomas Meyer: > > Hi Hraban, > > and thanks. > > setuphead[chapter,section][numberwidth=2em] or "fit" > works! > > I know \setupheadertexts, but do not know what shall I write here: > \startsection[titel=Aufgabe, marking=?????] > If I write marking=Aufgabe I get Aufgabe, no number! For chapter the same. > > \setupheadertexts > [] [{\getmarking[chapter]} - {\getmarking[section]}] > [{\getmarking[chapter]} - {\getmarking[section]}] [] > ----> Kapitel - Aufgabe > > > Thanks in advance > Greetings > Thomas > > > Am 20.03.24 um 09:09 schrieb Hraban Ramm: > > > Am 20.03.24 um 08:18 schrieb Thomas Meyer: > > HI folks, > > yesterday while reading along I learned how to suppress the chapter > numbers in sections. That was something I was looking for myself. > > But how do you use marking correctly in startsection? I would like to see > "1. Kapitel - 1. Aufgabe" in the header on the right. How can I automate > this with marking? > And how can I reduce the space between the number (1.) and the title > (Kapitel or Aufgabe)? > > Thanks for your help > Thomas > > Hi Thomas, > > do you know how to use \setupheadertexts? > > https://wiki.contextgarden.net/Command/setupheadertexts > > I guess you're using the section level for "Aufgabe"? > > Then something like {\getmarking{chapter} – \getmarking{section}} might > fit your request. > > The formatting should be possible with > \setuphead[chapter,section][numberwidth=2em] or "fit". > > Hraban > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ > -- Andrés Conrado Montoya Andi Kú andresconrado@gmail.com http://sesentaycuatro.com http://messier87.com http://chiquitico.org ---------------------------------------- Los fines no justifican los medios, porque la medida verdadera de nuestro carácter está dada por los medios que estamos dispuestos a utilizar, no por los fines que proclamamos. ---------------------------------------- “You develop an instant global consciousness, a people orientation, an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, ‘Look at that, you son of a bitch.’” — Apollo 14 astronaut Edgar Mitchell [-- Attachment #1.2: Type: text/html, Size: 10527 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: Use of marking 2024-03-20 18:45 ` Andres Conrado Montoya @ 2024-03-21 15:34 ` Bruce Horrocks 2024-03-21 18:00 ` Thomas Meyer 0 siblings, 1 reply; 8+ messages in thread From: Bruce Horrocks @ 2024-03-21 15:34 UTC (permalink / raw) To: ntg-context mailing list > On 20 Mar 2024, at 18:45, Andres Conrado Montoya <andresconrado@gmail.com> wrote: > > 2. As far as I have found, including the chapter/section number in the marking is not really a trivial task. I usually hack something using \headnumber and \getmarking, like so: You can do the following: \startsetups[doc:header] \getmarking[chapternumber] \space - \space \getmarking[chapter] \space :: \space \getmarking[sectionnumber] \space - \space \getmarking[section] \stopsetups \setupheadertexts[\setup{doc:header}] \starttext \dorecurse{10}{ \startchapter[title={This is my chapter}] This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv \startsection[title={This is my section}] This is a section\par \dorecurse{6}{\input knuth }\input math-kontinuitet-sv \stopsection \stopchapter } \stoptext Caveat: it needs an if...then test around the section number for when a section hasn't started. — 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: Use of marking 2024-03-21 15:34 ` Bruce Horrocks @ 2024-03-21 18:00 ` Thomas Meyer 2024-03-22 17:23 ` Pablo Rodriguez via ntg-context 0 siblings, 1 reply; 8+ messages in thread From: Thomas Meyer @ 2024-03-21 18:00 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 747 bytes --] Hi Pablo and Bruce, thank you very much for your two solutions. That helps me enormously now. Greetings Thomas Am 21.03.24 um 16:34 schrieb Bruce Horrocks: > \startsetups[doc:header] > \getmarking[chapternumber] \space - \space \getmarking[chapter] > \space :: \space > \getmarking[sectionnumber] \space - \space \getmarking[section] > \stopsetups > \setupheadertexts[\setup{doc:header}] > > \starttext > \dorecurse{10}{ > \startchapter[title={This is my chapter}] > This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv > > \startsection[title={This is my section}] > This is a section\par \dorecurse{6}{\input knuth }\input math-kontinuitet-sv > \stopsection > \stopchapter > } > \stoptext [-- Attachment #1.2: Type: text/html, Size: 1323 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: Use of marking 2024-03-21 18:00 ` Thomas Meyer @ 2024-03-22 17:23 ` Pablo Rodriguez via ntg-context 0 siblings, 0 replies; 8+ messages in thread From: Pablo Rodriguez via ntg-context @ 2024-03-22 17:23 UTC (permalink / raw) To: ntg-context; +Cc: Pablo Rodriguez On 3/21/24 19:00, Thomas Meyer wrote: > Hi Pablo and Bruce, > > thank you very much for your two solutions. That helps me enormously now. Hi Thomas, literally, »nichts zu danken«, since it was Andrés and not me who provided a solution. Cheers, 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-22 17:38 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-03-20 7:18 [NTG-context] Use of marking Thomas Meyer 2024-03-20 8:09 ` [NTG-context] " Hraban Ramm 2024-03-20 11:18 ` Thomas Meyer 2024-03-20 14:22 ` Hraban Ramm 2024-03-20 18:45 ` Andres Conrado Montoya 2024-03-21 15:34 ` Bruce Horrocks 2024-03-21 18:00 ` Thomas Meyer 2024-03-22 17:23 ` Pablo Rodriguez 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).