* headers again
@ 2020-08-13 0:03 jbf
2020-08-13 2:53 ` Aditya Mahajan
0 siblings, 1 reply; 10+ messages in thread
From: jbf @ 2020-08-13 0:03 UTC (permalink / raw)
To: mailing list for ConTeXt users
Understandably, with work going on for the new \command pages,
heatwaves, upcoming ConTeXt meeting, people are very busy. I understand
that. In the meantime, I haven't yet found a solution (though I have
tried many) to my own problem, small though it is by comparison. So let
me try again, putting it simply:
Where running heads (headers) are concerned, if I use \chapter I have no
problems, nor should I expect any. But because I am also using \title,
given that I need some unnumbered chapters interspersed among them, I
run into difficulties with headers. Numbered chapters have the correct
headers, unnumbered ones (with \title) either don't have them, or do not
have the proper chapter header (they pick up the header from the
previous numbered chapter).
At the moment the only thing I have in the preamble is the expected set
of commands for the numbered chapters:
[{\hfill\getmarking[chapter]\hfill}][]
[{\hfill\documentvariable{metadata:title}\hfill}][]
I thought that might work for the unnumbered ones (\title), thinking
that maybe \title inherits from \chapter, but it doesn't. But no amount
of variations on the above commands (repeating them but replacing
'chapter' with 'title'; adding [title] or just title, in the first set
of commands in various positions...) gives me the correct result.
I am assuming, of course, that there is a solution to this difficulty,
and that it may be simple. But I haven't found it. Is the problem that I
am using \title in the main body to get my unnumbered chapters? I
wouldn't think so? It produces the correct result, utlimatley, in the
TOC, Is it possible that I may have something else in my preamble that
is causing the problem? If so, I can't expect someone to 'guess' that
from outside! But at the moment I don't think that is the problem.
If not a direct solution, are there any clues someone might give me that
will lead me to finding my own solution? It would be much appreciated.
Julian
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: headers again
2020-08-13 0:03 headers again jbf
@ 2020-08-13 2:53 ` Aditya Mahajan
2020-08-13 3:35 ` jbf
2020-08-13 18:16 ` Wolfgang Schuster
0 siblings, 2 replies; 10+ messages in thread
From: Aditya Mahajan @ 2020-08-13 2:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 2186 bytes --]
On Thu, 13 Aug 2020, jbf wrote:
> Where running heads (headers) are concerned, if I use \chapter I have no
> problems, nor should I expect any. But because I am also using \title,
> given that I need some unnumbered chapters interspersed among them, I
> run into difficulties with headers. Numbered chapters have the correct
> headers, unnumbered ones (with \title) either don't have them, or do not
> have the proper chapter header (they pick up the header from the
> previous numbered chapter).
>
> At the moment the only thing I have in the preamble is the expected set
> of commands for the numbered chapters:
>
> [{\hfill\getmarking[chapter]\hfill}][]
> [{\hfill\documentvariable{metadata:title}\hfill}][]
>
> I thought that might work for the unnumbered ones (\title), thinking
> that maybe \title inherits from \chapter, but it doesn't. But no amount
> of variations on the above commands (repeating them but replacing
> 'chapter' with 'title'; adding [title] or just title, in the first set
> of commands in various positions...) gives me the correct result.
>
> I am assuming, of course, that there is a solution to this difficulty,
> and that it may be simple. But I haven't found it. Is the problem that I
> am using \title in the main body to get my unnumbered chapters? I
> wouldn't think so? It produces the correct result, utlimatley, in the
> TOC, Is it possible that I may have something else in my preamble that
> is causing the problem? If so, I can't expect someone to 'guess' that
> from outside! But at the moment I don't think that is the problem.
>
> If not a direct solution, are there any clues someone might give me that
> will lead me to finding my own solution? It would be much appreciated.
A rose by any other name would smell as sweet ...
\showframe
\setupheadertexts[\setups{header}]
\startsetups header
\getmarking[chapter]
\stopsetups
\starttext
\startchapter[title={This is a chapter}]
\input knuth
\page
\input knuth
\stopchapter
\startchapter[title={This is a title}, number=no]
\input ward
\page
\input knuth
\stopchapter
\stoptext
Aditya
[-- 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] 10+ messages in thread
* Re: headers again
2020-08-13 2:53 ` Aditya Mahajan
@ 2020-08-13 3:35 ` jbf
2020-08-13 5:36 ` Aditya Mahajan
2020-08-13 18:16 ` Wolfgang Schuster
1 sibling, 1 reply; 10+ messages in thread
From: jbf @ 2020-08-13 3:35 UTC (permalink / raw)
To: Aditya Mahajan; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3118 bytes --]
Almost as perfect as Shakespeare's Juliet! Is there any reason why the
header for the Introduction, done using your approach (it is in
frontmatter), does not produce the header on the last recto page? This
intro consists of 8 pages. Page 7 does not produce the 'Introduction'
header. The other relevant recto pages are all headed 'Introduction' as
they should be.
J
On 13/8/20 12:53 pm, Aditya Mahajan wrote:
> On Thu, 13 Aug 2020, jbf wrote:
>
>> Where running heads (headers) are concerned, if I use \chapter I have no
>> problems, nor should I expect any. But because I am also using \title,
>> given that I need some unnumbered chapters interspersed among them, I
>> run into difficulties with headers. Numbered chapters have the correct
>> headers, unnumbered ones (with \title) either don't have them, or do not
>> have the proper chapter header (they pick up the header from the
>> previous numbered chapter).
>>
>> At the moment the only thing I have in the preamble is the expected set
>> of commands for the numbered chapters:
>>
>> [{\hfill\getmarking[chapter]\hfill}][]
>> [{\hfill\documentvariable{metadata:title}\hfill}][]
>>
>> I thought that might work for the unnumbered ones (\title), thinking
>> that maybe \title inherits from \chapter, but it doesn't. But no amount
>> of variations on the above commands (repeating them but replacing
>> 'chapter' with 'title'; adding [title] or just title, in the first set
>> of commands in various positions...) gives me the correct result.
>>
>> I am assuming, of course, that there is a solution to this difficulty,
>> and that it may be simple. But I haven't found it. Is the problem that I
>> am using \title in the main body to get my unnumbered chapters? I
>> wouldn't think so? It produces the correct result, utlimatley, in the
>> TOC, Is it possible that I may have something else in my preamble that
>> is causing the problem? If so, I can't expect someone to 'guess' that
>> from outside! But at the moment I don't think that is the problem.
>>
>> If not a direct solution, are there any clues someone might give me that
>> will lead me to finding my own solution? It would be much appreciated.
> A rose by any other name would smell as sweet ...
>
> \showframe
> \setupheadertexts[\setups{header}]
>
> \startsetups header
> \getmarking[chapter]
> \stopsetups
>
> \starttext
> \startchapter[title={This is a chapter}]
> \input knuth
> \page
> \input knuth
> \stopchapter
>
> \startchapter[title={This is a title}, number=no]
> \input ward
> \page
> \input knuth
> \stopchapter
> \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
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 4107 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] 10+ messages in thread
* Re: headers again
2020-08-13 3:35 ` jbf
@ 2020-08-13 5:36 ` Aditya Mahajan
2020-08-13 5:57 ` jbf
0 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2020-08-13 5:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 13 Aug 2020, jbf wrote:
> Almost as perfect as Shakespeare's Juliet! Is there any reason why the header
> for the Introduction, done using your approach (it is in frontmatter), does
> not produce the header on the last recto page? This intro consists of 8 pages.
> Page 7 does not produce the 'Introduction' header. The other relevant recto
> pages are all headed 'Introduction' as they should be.
A minimal working example will help in diagnosing what is going on ...
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: headers again
2020-08-13 5:36 ` Aditya Mahajan
@ 2020-08-13 5:57 ` jbf
0 siblings, 0 replies; 10+ messages in thread
From: jbf @ 2020-08-13 5:57 UTC (permalink / raw)
To: Aditya Mahajan; +Cc: mailing list for ConTeXt users
Rightly so, and as I was producing such an MWE (stripping away a lot of
other 'clutter') I found what was causing the problem. At one stage,
trying to solve the problem, I had created a MyChapter definition and
had left a command referencing it in the following:
\setuphead
[chapter][header=empty,alternative=middle,style=\tfa,
numbercommand=\groupedcommand{}{\blank[1cm]},after={\blank[3cm]},command=\MyChapter]
Give that I was now no longer using MyChapter to solve the problem, that
command=\MyChapter was causing a conflict. I removed it and, using your
earlier
\setupheadertexts[\setups{header}]
\startsetups header
\getmarking[chapter]
\stopsetups
and referencing it in the \chapter or \title items, was able to achieve
the desired result in every way, including that missing header on one page.
Thank you.
J
On 13/8/20 3:36 pm, Aditya Mahajan wrote:
> On Thu, 13 Aug 2020, jbf wrote:
>
>> Almost as perfect as Shakespeare's Juliet! Is there any reason why the header
>> for the Introduction, done using your approach (it is in frontmatter), does
>> not produce the header on the last recto page? This intro consists of 8 pages.
>> Page 7 does not produce the 'Introduction' header. The other relevant recto
>> pages are all headed 'Introduction' as they should be.
> A minimal working example will help in diagnosing what is going on ...
>
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 10+ messages in thread
* Re: headers again
2020-08-13 2:53 ` Aditya Mahajan
2020-08-13 3:35 ` jbf
@ 2020-08-13 18:16 ` Wolfgang Schuster
2020-08-13 23:44 ` Aditya Mahajan
1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2020-08-13 18:16 UTC (permalink / raw)
To: mailing list for ConTeXt users, Aditya Mahajan
Aditya Mahajan schrieb am 13.08.2020 um 04:53:
> On Thu, 13 Aug 2020, jbf wrote:
>
>> Where running heads (headers) are concerned, if I use \chapter I have no
>> problems, nor should I expect any. But because I am also using \title,
>> given that I need some unnumbered chapters interspersed among them, I
>> run into difficulties with headers. Numbered chapters have the correct
>> headers, unnumbered ones (with \title) either don't have them, or do not
>> have the proper chapter header (they pick up the header from the
>> previous numbered chapter).
>>
>> At the moment the only thing I have in the preamble is the expected set
>> of commands for the numbered chapters:
>>
>> [{\hfill\getmarking[chapter]\hfill}][]
>> [{\hfill\documentvariable{metadata:title}\hfill}][]
>>
>> I thought that might work for the unnumbered ones (\title), thinking
>> that maybe \title inherits from \chapter, but it doesn't. But no amount
>> of variations on the above commands (repeating them but replacing
>> 'chapter' with 'title'; adding [title] or just title, in the first set
>> of commands in various positions...) gives me the correct result.
>>
>> I am assuming, of course, that there is a solution to this difficulty,
>> and that it may be simple. But I haven't found it. Is the problem that I
>> am using \title in the main body to get my unnumbered chapters? I
>> wouldn't think so? It produces the correct result, utlimatley, in the
>> TOC, Is it possible that I may have something else in my preamble that
>> is causing the problem? If so, I can't expect someone to 'guess' that
>> from outside! But at the moment I don't think that is the problem.
>>
>> If not a direct solution, are there any clues someone might give me that
>> will lead me to finding my own solution? It would be much appreciated.
>
> A rose by any other name would smell as sweet ...
>
> \showframe
> \setupheadertexts[\setups{header}]
>
> \startsetups header
> \getmarking[chapter]
> \stopsetups
>
> \starttext
> \startchapter[title={This is a chapter}]
> \input knuth
> \page
> \input knuth
> \stopchapter
>
> \startchapter[title={This is a title}, number=no]
> \input ward
> \page
> \input knuth
> \stopchapter
> \stoptext
Don't do this, unnumbered chapter still increase the counter and
when you add another chapter afterwards you wonder why the number
is wrong. The correct way here is to reset the marking entries
at the begin of a new chapter or title with
\setuphead
[chapter,title]
[marking=reset]
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] 10+ messages in thread
* Re: headers again
2020-08-13 18:16 ` Wolfgang Schuster
@ 2020-08-13 23:44 ` Aditya Mahajan
2020-08-14 0:28 ` jbf
2020-08-14 6:34 ` Hans Hagen
0 siblings, 2 replies; 10+ messages in thread
From: Aditya Mahajan @ 2020-08-13 23:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 2948 bytes --]
On Thu, 13 Aug 2020, Wolfgang Schuster wrote:
> Aditya Mahajan schrieb am 13.08.2020 um 04:53:
> > On Thu, 13 Aug 2020, jbf wrote:
> >
> > > Where running heads (headers) are concerned, if I use \chapter I have no
> > > problems, nor should I expect any. But because I am also using \title,
> > > given that I need some unnumbered chapters interspersed among them, I
> > > run into difficulties with headers. Numbered chapters have the correct
> > > headers, unnumbered ones (with \title) either don't have them, or do not
> > > have the proper chapter header (they pick up the header from the
> > > previous numbered chapter).
> > >
> > > At the moment the only thing I have in the preamble is the expected set
> > > of commands for the numbered chapters:
> > >
> > > [{\hfill\getmarking[chapter]\hfill}][]
> > > [{\hfill\documentvariable{metadata:title}\hfill}][]
> > >
> > > I thought that might work for the unnumbered ones (\title), thinking
> > > that maybe \title inherits from \chapter, but it doesn't. But no amount
> > > of variations on the above commands (repeating them but replacing
> > > 'chapter' with 'title'; adding [title] or just title, in the first set
> > > of commands in various positions...) gives me the correct result.
> > >
> > > I am assuming, of course, that there is a solution to this difficulty,
> > > and that it may be simple. But I haven't found it. Is the problem that I
> > > am using \title in the main body to get my unnumbered chapters? I
> > > wouldn't think so? It produces the correct result, utlimatley, in the
> > > TOC, Is it possible that I may have something else in my preamble that
> > > is causing the problem? If so, I can't expect someone to 'guess' that
> > > from outside! But at the moment I don't think that is the problem.
> > >
> > > If not a direct solution, are there any clues someone might give me that
> > > will lead me to finding my own solution? It would be much appreciated.
> >
> > A rose by any other name would smell as sweet ...
> >
> > \showframe
> > \setupheadertexts[\setups{header}]
> >
> > \startsetups header
> > \getmarking[chapter]
> > \stopsetups
> >
> > \starttext
> > \startchapter[title={This is a chapter}]
> > \input knuth
> > \page
> > \input knuth
> > \stopchapter
> >
> > \startchapter[title={This is a title}, number=no]
> > \input ward
> > \page
> > \input knuth
> > \stopchapter
> > \stoptext
>
> Don't do this, unnumbered chapter still increase the counter and
> when you add another chapter afterwards you wonder why the number
> is wrong.
(this reply is in jest ....)
incrementnumber=no,
> The correct way here is to reset the marking entries
> at the begin of a new chapter or title with
>
> \setuphead
> [chapter,title]
> [marking=reset]
Agreed. This is a better solution. Any idea why this is not the default?
Aditya
[-- 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] 10+ messages in thread
* Re: headers again
2020-08-13 23:44 ` Aditya Mahajan
@ 2020-08-14 0:28 ` jbf
2020-08-14 9:04 ` Wolfgang Schuster
2020-08-14 6:34 ` Hans Hagen
1 sibling, 1 reply; 10+ messages in thread
From: jbf @ 2020-08-14 0:28 UTC (permalink / raw)
To: Aditya Mahajan; +Cc: ntg >> mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3753 bytes --]
I will let the people with far superior knowledge than I have work
through this, but I am following it with interest. All I can say is that
by adopting Aditya's solution, ensuring that for the unnumbered titles I
also included 'number=no', the numbered chapters did increment
correctly, after being interrupted by an unnumbered one.
Julian
On 14/8/20 9:44 am, Aditya Mahajan wrote:
> On Thu, 13 Aug 2020, Wolfgang Schuster wrote:
>
>> Aditya Mahajan schrieb am 13.08.2020 um 04:53:
>>> On Thu, 13 Aug 2020, jbf wrote:
>>>
>>>> Where running heads (headers) are concerned, if I use \chapter I have no
>>>> problems, nor should I expect any. But because I am also using \title,
>>>> given that I need some unnumbered chapters interspersed among them, I
>>>> run into difficulties with headers. Numbered chapters have the correct
>>>> headers, unnumbered ones (with \title) either don't have them, or do not
>>>> have the proper chapter header (they pick up the header from the
>>>> previous numbered chapter).
>>>>
>>>> At the moment the only thing I have in the preamble is the expected set
>>>> of commands for the numbered chapters:
>>>>
>>>> [{\hfill\getmarking[chapter]\hfill}][]
>>>> [{\hfill\documentvariable{metadata:title}\hfill}][]
>>>>
>>>> I thought that might work for the unnumbered ones (\title), thinking
>>>> that maybe \title inherits from \chapter, but it doesn't. But no amount
>>>> of variations on the above commands (repeating them but replacing
>>>> 'chapter' with 'title'; adding [title] or just title, in the first set
>>>> of commands in various positions...) gives me the correct result.
>>>>
>>>> I am assuming, of course, that there is a solution to this difficulty,
>>>> and that it may be simple. But I haven't found it. Is the problem that I
>>>> am using \title in the main body to get my unnumbered chapters? I
>>>> wouldn't think so? It produces the correct result, utlimatley, in the
>>>> TOC, Is it possible that I may have something else in my preamble that
>>>> is causing the problem? If so, I can't expect someone to 'guess' that
>>>> from outside! But at the moment I don't think that is the problem.
>>>>
>>>> If not a direct solution, are there any clues someone might give me that
>>>> will lead me to finding my own solution? It would be much appreciated.
>>> A rose by any other name would smell as sweet ...
>>>
>>> \showframe
>>> \setupheadertexts[\setups{header}]
>>>
>>> \startsetups header
>>> \getmarking[chapter]
>>> \stopsetups
>>>
>>> \starttext
>>> \startchapter[title={This is a chapter}]
>>> \input knuth
>>> \page
>>> \input knuth
>>> \stopchapter
>>>
>>> \startchapter[title={This is a title}, number=no]
>>> \input ward
>>> \page
>>> \input knuth
>>> \stopchapter
>>> \stoptext
>> Don't do this, unnumbered chapter still increase the counter and
>> when you add another chapter afterwards you wonder why the number
>> is wrong.
> (this reply is in jest ....)
>
> incrementnumber=no,
>
>> The correct way here is to reset the marking entries
>> at the begin of a new chapter or title with
>>
>> \setuphead
>> [chapter,title]
>> [marking=reset]
> Agreed. This is a better solution. Any idea why this is not the default?
>
> 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
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 5051 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] 10+ messages in thread
* Re: headers again
2020-08-13 23:44 ` Aditya Mahajan
2020-08-14 0:28 ` jbf
@ 2020-08-14 6:34 ` Hans Hagen
1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2020-08-14 6:34 UTC (permalink / raw)
To: mailing list for ConTeXt users, Aditya Mahajan
On 8/14/2020 1:44 AM, Aditya Mahajan wrote:
> On Thu, 13 Aug 2020, Wolfgang Schuster wrote:
>
>> Aditya Mahajan schrieb am 13.08.2020 um 04:53:
>>> On Thu, 13 Aug 2020, jbf wrote:
>>>
>>>> Where running heads (headers) are concerned, if I use \chapter I have no
>>>> problems, nor should I expect any. But because I am also using \title,
>>>> given that I need some unnumbered chapters interspersed among them, I
>>>> run into difficulties with headers. Numbered chapters have the correct
>>>> headers, unnumbered ones (with \title) either don't have them, or do not
>>>> have the proper chapter header (they pick up the header from the
>>>> previous numbered chapter).
>>>>
>>>> At the moment the only thing I have in the preamble is the expected set
>>>> of commands for the numbered chapters:
>>>>
>>>> [{\hfill\getmarking[chapter]\hfill}][]
>>>> [{\hfill\documentvariable{metadata:title}\hfill}][]
>>>>
>>>> I thought that might work for the unnumbered ones (\title), thinking
>>>> that maybe \title inherits from \chapter, but it doesn't. But no amount
>>>> of variations on the above commands (repeating them but replacing
>>>> 'chapter' with 'title'; adding [title] or just title, in the first set
>>>> of commands in various positions...) gives me the correct result.
>>>>
>>>> I am assuming, of course, that there is a solution to this difficulty,
>>>> and that it may be simple. But I haven't found it. Is the problem that I
>>>> am using \title in the main body to get my unnumbered chapters? I
>>>> wouldn't think so? It produces the correct result, utlimatley, in the
>>>> TOC, Is it possible that I may have something else in my preamble that
>>>> is causing the problem? If so, I can't expect someone to 'guess' that
>>>> from outside! But at the moment I don't think that is the problem.
>>>>
>>>> If not a direct solution, are there any clues someone might give me that
>>>> will lead me to finding my own solution? It would be much appreciated.
>>>
>>> A rose by any other name would smell as sweet ...
>>>
>>> \showframe
>>> \setupheadertexts[\setups{header}]
>>>
>>> \startsetups header
>>> \getmarking[chapter]
>>> \stopsetups
>>>
>>> \starttext
>>> \startchapter[title={This is a chapter}]
>>> \input knuth
>>> \page
>>> \input knuth
>>> \stopchapter
>>>
>>> \startchapter[title={This is a title}, number=no]
>>> \input ward
>>> \page
>>> \input knuth
>>> \stopchapter
>>> \stoptext
>>
>> Don't do this, unnumbered chapter still increase the counter and
>> when you add another chapter afterwards you wonder why the number
>> is wrong.
>
> (this reply is in jest ....)
>
> incrementnumber=no,
>
>> The correct way here is to reset the marking entries
>> at the begin of a new chapter or title with
>>
>> \setuphead
>> [chapter,title]
>> [marking=reset]
>
> Agreed. This is a better solution. Any idea why this is not the default?
because this is all kind of tricky wrt when to reset ... chapters can
start a new page or not ... esp in a double sided layout it can be that
one does or doesn't do things that neeed to be reflected on a following
page (so in a complex setup when one changes headers or other properties
oneself, one also might have to make sure a \page happens at the right
spot)
changing something like this for sure will break something else
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] 10+ messages in thread
* Re: headers again
2020-08-14 0:28 ` jbf
@ 2020-08-14 9:04 ` Wolfgang Schuster
0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2020-08-14 9:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
jbf schrieb am 14.08.2020 um 02:28:
>
> I will let the people with far superior knowledge than I have work
> through this, but I am following it with interest. All I can say is
> that by adopting Aditya's solution, ensuring that for the unnumbered
> titles I also included 'number=no', the numbered chapters did
> increment correctly, after being interrupted by an unnumbered one.
>
\starttext
\startchapter[title={Chapter one}] \stopchapter
\startchapter[title={Chapter two},number=no] \stopchapter
\startchapter[title={Chapter three}] \stopchapter
\startchapter[title={Chapter four},number=no] \stopchapter
\startchapter[title={Chapter five}] \stopchapter
\startchapter[title={Chapter six},number=no] \stopchapter
\startchapter[title={Chapter seven}] \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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-08-14 9:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 0:03 headers again jbf
2020-08-13 2:53 ` Aditya Mahajan
2020-08-13 3:35 ` jbf
2020-08-13 5:36 ` Aditya Mahajan
2020-08-13 5:57 ` jbf
2020-08-13 18:16 ` Wolfgang Schuster
2020-08-13 23:44 ` Aditya Mahajan
2020-08-14 0:28 ` jbf
2020-08-14 9:04 ` Wolfgang Schuster
2020-08-14 6:34 ` Hans Hagen
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).