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