* \setupheadertexts for chapters with different authors @ 2022-03-18 0:48 jbf via ntg-context 2022-03-18 7:52 ` Henning Hraban Ramm via ntg-context 0 siblings, 1 reply; 9+ messages in thread From: jbf via ntg-context @ 2022-03-18 0:48 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: jbf [-- Attachment #1.1: Type: text/plain, Size: 361 bytes --] I thought this should work, since \structurelistuservariable{author} works fine to call the author name into the TOC, but the same does not work for header texts it seems: \setupheadertexts [{\hfill\getmarking[\structurelistuservariable{author}]\hfill}][] [{\hfill\documentvariable{metadata:title}\hfill}][] But it doesn't. What am I doing wrong? Julian [-- Attachment #1.2: Type: text/html, Size: 1498 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] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-18 0:48 \setupheadertexts for chapters with different authors jbf via ntg-context @ 2022-03-18 7:52 ` Henning Hraban Ramm via ntg-context 2022-03-18 9:13 ` jbf via ntg-context 2022-03-19 2:16 ` jbf via ntg-context 0 siblings, 2 replies; 9+ messages in thread From: Henning Hraban Ramm via ntg-context @ 2022-03-18 7:52 UTC (permalink / raw) To: ntg-context; +Cc: Henning Hraban Ramm Am 18.03.22 um 01:48 schrieb jbf via ntg-context: > I thought this should work, since \structurelistuservariable{author} > works fine to call the author name into the TOC, but the same does not > work for header texts it seems: > > \setupheadertexts > > [{\hfill\getmarking[\structurelistuservariable{author}]\hfill}][] > > [{\hfill\documentvariable{metadata:title}\hfill}][] > > But it doesn't. What am I doing wrong? The *list* variables work only in lists. There’s also \structurevariable and \structureuservariable. Make sure you use setups for the header, otherwise the variable gets expanded only once at the beginning. Like in: \setuppagenumbering[alternative=doublesided] \setupheadertexts[] % empty \setupheadertexts[\setups{text right}][][][\setups{text left}] \startsetups[text right] \rlap{\pagenumber} \hfill \getmarking[chapter] \hfill \llap{Un Nom} \stopsetups \startsetups[text left] \rlap{Una Person} \hfill \getmarking[section] \hfill \llap{\pagenumber} \stopsetups HTH 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-18 7:52 ` Henning Hraban Ramm via ntg-context @ 2022-03-18 9:13 ` jbf via ntg-context 2022-03-18 10:49 ` Henning Hraban Ramm via ntg-context 2022-03-19 2:16 ` jbf via ntg-context 1 sibling, 1 reply; 9+ messages in thread From: jbf via ntg-context @ 2022-03-18 9:13 UTC (permalink / raw) To: Henning Hraban Ramm via ntg-context; +Cc: jbf Off list for the moment. Late at night where I am. I will take a look at this more closely on the morrow. Thanks. Julian On 18/3/22 18:52, Henning Hraban Ramm via ntg-context wrote: > \setupheadertexts[] % empty > \setupheadertexts[\setups{text right}][][][\setups{text left}] > > \startsetups[text right] > \rlap{\pagenumber} > \hfill > \getmarking[chapter] > \hfill > \llap{Un Nom} > \stopsetups > > \startsetups[text left] > \rlap{Una Person} > \hfill > \getmarking[section] > \hfill > \llap{\pagenumber} > \stopsetups ___________________________________________________________________________________ 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] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-18 9:13 ` jbf via ntg-context @ 2022-03-18 10:49 ` Henning Hraban Ramm via ntg-context 0 siblings, 0 replies; 9+ messages in thread From: Henning Hraban Ramm via ntg-context @ 2022-03-18 10:49 UTC (permalink / raw) To: jbf via ntg-context; +Cc: Henning Hraban Ramm Am 18.03.22 um 10:13 schrieb jbf via ntg-context: > Off list for the moment. Late at night where I am. I will take a look at > this more closely on the morrow. Thanks. You’re welcome. BTW I answered with some German last time since I mixed up jbf and juh – the latter I know to be German. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-18 7:52 ` Henning Hraban Ramm via ntg-context 2022-03-18 9:13 ` jbf via ntg-context @ 2022-03-19 2:16 ` jbf via ntg-context 2022-03-19 2:55 ` jbf via ntg-context 2022-03-19 9:18 ` Henning Hraban Ramm via ntg-context 1 sibling, 2 replies; 9+ messages in thread From: jbf via ntg-context @ 2022-03-19 2:16 UTC (permalink / raw) To: Henning Hraban Ramm via ntg-context, mailing list for ConTeXt users; +Cc: jbf [-- Attachment #1.1: Type: text/plain, Size: 1935 bytes --] I might need a little more help just to understand how best to adapt this to my situation: One thing is clear: I was attempting to use a 'list' variable, and I can see why that was an error, since it is headertexts, not TOC that I want to influence. But let me simplify my situation: You seem to suggest initially that I could use \structureuservariable (or \structurevariable) instead, especially since I already have a variable to call on, e.g \startchapter[title={My title}][author={A. uthor}]. But in the example you then gave, you made no use of either of these. My current setting is: \setupheadertexts [{\hfill\getmarking[chapter]\hfill}][] [{\hfill\documentvariable{metadata:title}\hfill}][] which gives me the book title centred on verso pages, and the chapter title centred on recto pages. All I want to do is to have the chapter contributors' name for each chapter instead of the chapter title. So why can't I create a setups along the lines of: \startsetups[contributor] \getmarking[\structureuservariable{author}] \stopsetups Then just swap 'chapter' in \setupheadertexts, with 'contributor'? I tried it but it doesn't work. I thought it would be logical. Clearly I'm wrong but don't appreciate why. Julian On 18/3/22 18:52, Henning Hraban Ramm via ntg-context wrote: > The *list* variables work only in lists. > > There’s also \structurevariable and \structureuservariable. > > Make sure you use setups for the header, otherwise the variable gets > expanded only once at the beginning. > > Like in: > > \setuppagenumbering[alternative=doublesided] > \setupheadertexts[] % empty > \setupheadertexts[\setups{text right}][][][\setups{text left}] > > \startsetups[text right] > \rlap{\pagenumber} > \hfill > \getmarking[chapter] > \hfill > \llap{Un Nom} > \stopsetups > > \startsetups[text left] > \rlap{Una Person} > \hfill > \getmarking[section] > \hfill > \llap{\pagenumber} > \stopsetups [-- Attachment #1.2: Type: text/html, Size: 2860 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] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-19 2:16 ` jbf via ntg-context @ 2022-03-19 2:55 ` jbf via ntg-context 2022-03-19 9:18 ` Henning Hraban Ramm via ntg-context 1 sibling, 0 replies; 9+ messages in thread From: jbf via ntg-context @ 2022-03-19 2:55 UTC (permalink / raw) To: Henning Hraban Ramm via ntg-context, mailing list for ConTeXt users; +Cc: jbf Sorry, of course I meant swap 'chapter' with \setups{contributor} J On 19/3/22 13:16, jbf wrote: > Then just swap 'chapter' in \setupheadertexts, with 'contributor'? ___________________________________________________________________________________ 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] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-19 2:16 ` jbf via ntg-context 2022-03-19 2:55 ` jbf via ntg-context @ 2022-03-19 9:18 ` Henning Hraban Ramm via ntg-context 2022-03-19 9:32 ` Hans Hagen via ntg-context 2022-03-20 2:50 ` jbf via ntg-context 1 sibling, 2 replies; 9+ messages in thread From: Henning Hraban Ramm via ntg-context @ 2022-03-19 9:18 UTC (permalink / raw) To: jbf via ntg-context; +Cc: Henning Hraban Ramm Hi Julian, you’re right, the example didn’t do what you wanted, and it didn’t intend to. Using \getmarking you can get a section title (or another “mark”), you can’t combine it with the variable commands, and you don’t need it for your case. https://wiki.contextgarden.net/Command/getmarking isn’t really helpful since there’s no example with section titles, but it shows you can also get previous or next “marks”. BTW, I can’t remember when you need \structurevariable vs. \namedstructurevariable... Hraban Am 19.03.22 um 03:16 schrieb jbf via ntg-context: > I might need a little more help just to understand how best to adapt > this to my situation: > > One thing is clear: I was attempting to use a 'list' variable, and I can > see why that was an error, since it is headertexts, not TOC that I want > to influence. > > But let me simplify my situation: > > You seem to suggest initially that I could use \structureuservariable > (or \structurevariable) instead, especially since I already have a > variable to call on, e.g \startchapter[title={My title}][author={A. > uthor}]. But in the example you then gave, you made no use of either of > these. > > My current setting is: > > \setupheadertexts [{\hfill\getmarking[chapter]\hfill}][] > [{\hfill\documentvariable{metadata:title}\hfill}][] > > which gives me the book title centred on verso pages, and the chapter > title centred on recto pages. All I want to do is to have the chapter > contributors' name for each chapter instead of the chapter title. > > So why can't I create a setups along the lines of: > > \startsetups[contributor] \getmarking[\structureuservariable{author}] > \stopsetups > > Then just swap 'chapter' in \setupheadertexts, with 'contributor'? I > tried it but it doesn't work. I thought it would be logical. Clearly I'm > wrong but don't appreciate why. > > Julian > > On 18/3/22 18:52, Henning Hraban Ramm via ntg-context wrote: >> The *list* variables work only in lists. >> >> There’s also \structurevariable and \structureuservariable. >> >> Make sure you use setups for the header, otherwise the variable gets >> expanded only once at the beginning. >> >> Like in: >> >> \setuppagenumbering[alternative=doublesided] >> \setupheadertexts[] % empty >> \setupheadertexts[\setups{text right}][][][\setups{text left}] >> >> \startsetups[text right] >> \rlap{\pagenumber} >> \hfill >> \getmarking[chapter] >> \hfill >> \llap{Un Nom} >> \stopsetups >> >> \startsetups[text left] >> \rlap{Una Person} >> \hfill >> \getmarking[section] >> \hfill >> \llap{\pagenumber} >> \stopsetups > > ___________________________________________________________________________________ > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-19 9:18 ` Henning Hraban Ramm via ntg-context @ 2022-03-19 9:32 ` Hans Hagen via ntg-context 2022-03-20 2:50 ` jbf via ntg-context 1 sibling, 0 replies; 9+ messages in thread From: Hans Hagen via ntg-context @ 2022-03-19 9:32 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Hans Hagen On 3/19/2022 10:18 AM, Henning Hraban Ramm via ntg-context wrote: > BTW, I can’t remember when you need \structurevariable vs. > \namedstructurevariable... the first is the current, the second a specific one ... so current can be subsubsubsubsubsection but with named you can still get the current chapter BTW, best write it down (your book) some place as it can come in handy ... 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: \setupheadertexts for chapters with different authors 2022-03-19 9:18 ` Henning Hraban Ramm via ntg-context 2022-03-19 9:32 ` Hans Hagen via ntg-context @ 2022-03-20 2:50 ` jbf via ntg-context 1 sibling, 0 replies; 9+ messages in thread From: jbf via ntg-context @ 2022-03-20 2:50 UTC (permalink / raw) To: Henning Hraban Ramm via ntg-context, Hans Hagen, mailing list for ConTeXt users Cc: jbf Thanks for the bits and pieces to the puzzle. I'll do my best to make sense of them and solve the problem. Julian On 19/3/22 20:18, Henning Hraban Ramm via ntg-context wrote: > Hi Julian, > > you’re right, the example didn’t do what you wanted, and it didn’t > intend to. > > Using \getmarking you can get a section title (or another “mark”), you > can’t combine it with the variable commands, and you don’t need it for > your case. > > https://wiki.contextgarden.net/Command/getmarking isn’t really helpful > since there’s no example with section titles, but it shows you can > also get previous or next “marks”. > > BTW, I can’t remember when you need \structurevariable vs. > \namedstructurevariable... > > Hraban > > > Am 19.03.22 um 03:16 schrieb jbf via ntg-context: >> I might need a little more help just to understand how best to adapt >> this to my situation: >> >> One thing is clear: I was attempting to use a 'list' variable, and I >> can see why that was an error, since it is headertexts, not TOC that >> I want to influence. >> >> But let me simplify my situation: >> >> You seem to suggest initially that I could use \structureuservariable >> (or \structurevariable) instead, especially since I already have a >> variable to call on, e.g \startchapter[title={My title}][author={A. >> uthor}]. But in the example you then gave, you made no use of either >> of these. >> >> My current setting is: >> >> \setupheadertexts [{\hfill\getmarking[chapter]\hfill}][] >> [{\hfill\documentvariable{metadata:title}\hfill}][] >> >> which gives me the book title centred on verso pages, and the chapter >> title centred on recto pages. All I want to do is to have the chapter >> contributors' name for each chapter instead of the chapter title. >> >> So why can't I create a setups along the lines of: >> >> \startsetups[contributor] \getmarking[\structureuservariable{author}] >> \stopsetups >> >> Then just swap 'chapter' in \setupheadertexts, with 'contributor'? I >> tried it but it doesn't work. I thought it would be logical. Clearly >> I'm wrong but don't appreciate why. >> >> Julian >> >> On 18/3/22 18:52, Henning Hraban Ramm via ntg-context wrote: >>> The *list* variables work only in lists. >>> >>> There’s also \structurevariable and \structureuservariable. >>> >>> Make sure you use setups for the header, otherwise the variable gets >>> expanded only once at the beginning. >>> >>> Like in: >>> >>> \setuppagenumbering[alternative=doublesided] >>> \setupheadertexts[] % empty >>> \setupheadertexts[\setups{text right}][][][\setups{text left}] >>> >>> \startsetups[text right] >>> \rlap{\pagenumber} >>> \hfill >>> \getmarking[chapter] >>> \hfill >>> \llap{Un Nom} >>> \stopsetups >>> >>> \startsetups[text left] >>> \rlap{Una Person} >>> \hfill >>> \getmarking[section] >>> \hfill >>> \llap{\pagenumber} >>> \stopsetups >> >> ___________________________________________________________________________________ >> >> If your question is of interest to others as well, please add an >> entry to the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___________________________________________________________________________________ >> > > ___________________________________________________________________________________ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-03-20 2:50 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-03-18 0:48 \setupheadertexts for chapters with different authors jbf via ntg-context 2022-03-18 7:52 ` Henning Hraban Ramm via ntg-context 2022-03-18 9:13 ` jbf via ntg-context 2022-03-18 10:49 ` Henning Hraban Ramm via ntg-context 2022-03-19 2:16 ` jbf via ntg-context 2022-03-19 2:55 ` jbf via ntg-context 2022-03-19 9:18 ` Henning Hraban Ramm via ntg-context 2022-03-19 9:32 ` Hans Hagen via ntg-context 2022-03-20 2:50 ` jbf 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).