ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* footer page number on first page of section: doesn't appear
@ 2013-12-04 17:37 Lars Huttar
  2013-12-04 20:16 ` Wolfgang Schuster
  2013-12-04 20:48 ` Lars Huttar
  0 siblings, 2 replies; 5+ messages in thread
From: Lars Huttar @ 2013-12-04 17:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,
Based on our reading of
http://wiki.contextgarden.net/FO_Page_Layout#First_Page
we have the following MWE, which we want to put a page number in the
footer on the first page only:

\definetext[footerpagenumber][footer][pagenumber]

\setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]

\starttext

\section{My Own Section}

\dorecurse{15}{ \input knuth \par }

\stoptext


Unfortunately, no page number shows up.

If we add
  \setuppagenumbering[location=footer]
before the \starttext, we get the page numbering we want, but it's on
every page, not just the first.


Is there something wrong with our setuphead?


Thanks,
Lars


___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: footer page number on first page of section: doesn't appear
  2013-12-04 17:37 footer page number on first page of section: doesn't appear Lars Huttar
@ 2013-12-04 20:16 ` Wolfgang Schuster
  2013-12-04 20:48 ` Lars Huttar
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2013-12-04 20:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 04.12.2013 um 18:37 schrieb Lars Huttar <lars_huttar@sil.org>:

> Hi,
> Based on our reading of
> http://wiki.contextgarden.net/FO_Page_Layout#First_Page
> we have the following MWE, which we want to put a page number in the
> footer on the first page only:
> 
> \definetext[footerpagenumber][footer][pagenumber]
> 
> \setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]
> 
> \starttext
> 
> \section{My Own Section}
> 
> \dorecurse{15}{ \input knuth \par }
> 
> \stoptext
> 
> 
> Unfortunately, no page number shows up.
> 
> If we add
>  \setuppagenumbering[location=footer]
> before the \starttext, we get the page numbering we want, but it's on
> every page, not just the first.
> 
> 
> Is there something wrong with our setup head?

This works only when your heading forces a page break with the “page=yes” setting in \setuphead.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: footer page number on first page of section: doesn't appear
  2013-12-04 17:37 footer page number on first page of section: doesn't appear Lars Huttar
  2013-12-04 20:16 ` Wolfgang Schuster
@ 2013-12-04 20:48 ` Lars Huttar
  2013-12-04 21:00   ` Aditya Mahajan
  1 sibling, 1 reply; 5+ messages in thread
From: Lars Huttar @ 2013-12-04 20:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Dec 4, 2013 12:16:12 pm Wolfgang Schuster wrote:
>
> On 12/4/2013 12:37 PM, Lars Huttar wrote:
>> Hi,
>> Based on our reading of
>> http://wiki.contextgarden.net/FO_Page_Layout#First_Page
>> we have the following MWE, which we want to put a page number in the
>> footer on the first page only:
>>
>> \definetext[footerpagenumber][footer][pagenumber]
>>
>> \setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]
>>
>> \starttext
>>
>> \section{My Own Section}
>>
>> \dorecurse{15}{ \input knuth \par }
>>
>> \stoptext
>>
>>
>> Unfortunately, no page number shows up.
>>
>> If we add
>>   \setuppagenumbering[location=footer]
>> before the \starttext, we get the page numbering we want, but it's on
>> every page, not just the first.
>>
>>
>> Is there something wrong with our setuphead?
>>
>
> This works only when your heading forces a page break with the “page=yes”
> setting in \setuphead.

Thanks for this response.
Actually, we were able to get it to work as follows.

First, we used
\definehead[section][chapter]
to get section to inherit some settings from chapter.
This included the "page=yes" setting you mentioned (which we don't want,
because we handle page breaks with some separate special logic); but it
also apparently includes some unknown magic that enables page numbers in
footers.

Then we add "page=no" to the \setuphead[section] command, to override
the inherited "page=yes".
Apparently, it works:

\definetext[footerpagenumber][footer][pagenumber]

\definehead[section][chapter]

\setuphead[section][page=no,header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]

\starttext

\section{My Own Section}

\dorecurse{15}{ \input knuth \par }

\stoptext


I would love to know what the default properties of the \chapter head
are, so we could know what we're inheriting, or how to set up section to
do what we want without inheriting unknown properties from chapter.

Thanks again,
Lars

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: footer page number on first page of section: doesn't appear
  2013-12-04 20:48 ` Lars Huttar
@ 2013-12-04 21:00   ` Aditya Mahajan
  2013-12-05 14:24     ` Lars Huttar
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2013-12-04 21:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2400 bytes --]

On Wed, 4 Dec 2013, Lars Huttar wrote:

> On Dec 4, 2013 12:16:12 pm Wolfgang Schuster wrote:
>>
>> On 12/4/2013 12:37 PM, Lars Huttar wrote:
>>> Hi,
>>> Based on our reading of
>>> http://wiki.contextgarden.net/FO_Page_Layout#First_Page
>>> we have the following MWE, which we want to put a page number in the
>>> footer on the first page only:
>>>
>>> \definetext[footerpagenumber][footer][pagenumber]
>>>
>>> \setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]
>>>
>>> \starttext
>>>
>>> \section{My Own Section}
>>>
>>> \dorecurse{15}{ \input knuth \par }
>>>
>>> \stoptext
>>>
>>>
>>> Unfortunately, no page number shows up.
>>>
>>> If we add
>>>   \setuppagenumbering[location=footer]
>>> before the \starttext, we get the page numbering we want, but it's on
>>> every page, not just the first.
>>>
>>>
>>> Is there something wrong with our setuphead?
>>>
>>
>> This works only when your heading forces a page break with the “page=yes”
>> setting in \setuphead.
>
> Thanks for this response.
> Actually, we were able to get it to work as follows.
>
> First, we used
> \definehead[section][chapter]
> to get section to inherit some settings from chapter.
> This included the "page=yes" setting you mentioned (which we don't want,
> because we handle page breaks with some separate special logic); but it
> also apparently includes some unknown magic that enables page numbers in
> footers.
>
> Then we add "page=no" to the \setuphead[section] command, to override
> the inherited "page=yes".
> Apparently, it works:
>
> \definetext[footerpagenumber][footer][pagenumber]
>
> \definehead[section][chapter]
>
> \setuphead[section][page=no,header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]
>
> \starttext
>
> \section{My Own Section}
>
> \dorecurse{15}{ \input knuth \par }
>
> \stoptext
>
>
> I would love to know what the default properties of the \chapter head
> are, so we could know what we're inheriting, or how to set up section to
> do what we want without inheriting unknown properties from chapter.

(Untested): Looking at the code, it looks that any value other than page=, 
(i.e, page=empty) should work. Did you try the above example without the 
\definehead[section][chapter] line?

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: footer page number on first page of section: doesn't appear
  2013-12-04 21:00   ` Aditya Mahajan
@ 2013-12-05 14:24     ` Lars Huttar
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Huttar @ 2013-12-05 14:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 12/4/2013 4:00 PM, Aditya Mahajan wrote:
> On Wed, 4 Dec 2013, Lars Huttar wrote:
>
>> On Dec 4, 2013 12:16:12 pm Wolfgang Schuster wrote:
>>> ...
>>> This works only when your heading forces a page break with the
>>> “page=yes”
>>> setting in \setuphead.
>>
>> Thanks for this response.
>> Actually, we were able to get it to work as follows.
>>
>> First, we used
>> \definehead[section][chapter]
>> to get section to inherit some settings from chapter.
>> This included the "page=yes" setting you mentioned (which we don't want,
>> because we handle page breaks with some separate special logic); but it
>> also apparently includes some unknown magic that enables page numbers in
>> footers.
>>
>> Then we add "page=no" to the \setuphead[section] command, to override
>> the inherited "page=yes".
>> Apparently, it works:
>>
>> \definetext[footerpagenumber][footer][pagenumber]
>>
>> \definehead[section][chapter]
>>
>> \setuphead[section][page=no,header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]
>>
>>
>> \starttext
>>
>> \section{My Own Section}
>>
>> \dorecurse{15}{ \input knuth \par }
>>
>> \stoptext
>>
>>
>> I would love to know what the default properties of the \chapter head
>> are, so we could know what we're inheriting, or how to set up section to
>> do what we want without inheriting unknown properties from chapter.
>
> (Untested): Looking at the code, it looks that any value other than
> page=, (i.e, page=empty) should work. Did you try the above example
> without the \definehead[section][chapter] line?
>
> Aditya

Uggh... I just tried it without the \definehead[section][chapter] line,
and it works! (I.e. there is a page number in the footer, only on the
first page of the section.) It wasn't working yesterday ... which makes
me wonder what else I changed since then.

Thanks,
Lars

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-05 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-04 17:37 footer page number on first page of section: doesn't appear Lars Huttar
2013-12-04 20:16 ` Wolfgang Schuster
2013-12-04 20:48 ` Lars Huttar
2013-12-04 21:00   ` Aditya Mahajan
2013-12-05 14:24     ` Lars Huttar

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).