pagenumber suppression howto?
![](https://secure.gravatar.com/avatar/29c7bbff49b1599eddb2ec73fd9ffa6e.jpg?s=120&d=mm&r=g)
My goal is pages without header info at the top and text plus a pagenumber on the bottom. This can be accomplished by: \setupheader[state=stop] \setupfooter[text][before=\hairline,style=small,location=left,strut=yes] \setupfootertexts[some text][pagenumber] I want the first page without that footer, to be done with: \noheaderandfooterlines But then comes the problem, because afterwards the default takes over and on the subsequent pages the pagenumber starts to appear in the header (the default setting apparently). Thus the \noheaderandfooterlines annuls the \setupheader[state=stop] I did not find out how to get rid of the default pagenumber. \setuppagenumber[state=stop] kills all pagenumbering, the programmed one in the leftbottom corner too. \setuppagenumbering[state=stop] kills all pagenumbers, included the one I want to appear. \setuppagenumbering[location=none] merely puts the pagenumber in the middle of the footer, obviously location=none has no meaning in ConTeXt. So, I am at the end of the possibilities I can think of. How to? Hans van der Meer
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 20.07.2014 um 12:03 schrieb Meer, H. van der
My goal is pages without header info at the top and text plus a pagenumber on the bottom. This can be accomplished by: \setupheader[state=stop] \setupfooter[text][before=\hairline,style=small,location=left,strut=yes] \setupfootertexts[some text][pagenumber]
I want the first page without that footer, to be done with: \noheaderandfooterlines
But then comes the problem, because afterwards the default takes over and on the subsequent pages the pagenumber starts to appear in the header (the default setting apparently). Thus the \noheaderandfooterlines annuls the \setupheader[state=stop]
I did not find out how to get rid of the default pagenumber. \setuppagenumber[state=stop] kills all pagenumbering, the programmed one in the leftbottom corner too. \setuppagenumbering[state=stop] kills all pagenumbers, included the one I want to appear. \setuppagenumbering[location=none] merely puts the pagenumber in the middle of the footer, obviously location=none has no meaning in ConTeXt.
So, I am at the end of the possibilities I can think of. How to?
Context performs only a check for a empty argument of the location key (i.e. \setuppagenumbering[location=]) and in all other keys checks the argument for a valid keyword, all unknown keywords are ignored. The ignored “none” keyword can be added by a simple change in the file page-txt.mkvi and I think such a change would make sense because there are many places “none” is used when you disable a function. \unexpanded\def\strc_pagenumbers_set_location {\edef\p_strc_pagenumbers_location{\directpagenumberingparameter\c!location}% \ifx\p_strc_pagenumbers_location\m_page_layouts_page_number_location % unchanged \else \let\m_page_layouts_page_number_location\p_strc_pagenumbers_location \page_layouts_reset_page_number_location \ifx\p_strc_pagenumbers_location\empty % set otherwise - \else + \else\ifx\p_strc_pagenumbers_location\v!none + % set otherwise + \else \page_layouts_identify_page_number_location \page_layouts_set_page_number_location - \fi + \fi\fi \fi} Wolfgang
![](https://secure.gravatar.com/avatar/29c7bbff49b1599eddb2ec73fd9ffa6e.jpg?s=120&d=mm&r=g)
Thanks. Please let us know if this addition of location=none will be taken up in a future beta.
I also realised that the effect wanted can be obtained by dividing the single
\noheaderandfooterlines
into two additional macros
\noheaderlines and \nofooterlines
Is that a viable idea too?
Hans van der Meer
On 20 Jul 2014, at 20:35, Wolfgang Schuster
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 20.07.2014 um 21:35 schrieb Meer, H. van der
Thanks. Please let us know if this addition of location=none will be taken up in a future beta.
I also realised that the effect wanted can be obtained by dividing the single \noheaderandfooterlines into two additional macros \noheaderlines and \nofooterlines Is that a viable idea too?
When you want disable only one element you can use the \setupheader or \setupfooter command. Wolfgang
![](https://secure.gravatar.com/avatar/29c7bbff49b1599eddb2ec73fd9ffa6e.jpg?s=120&d=mm&r=g)
On 20 Jul 2014, at 21:51, Wolfgang Schuster
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 20.07.2014 um 22:02 schrieb Meer, H. van der
On 20 Jul 2014, at 21:51, Wolfgang Schuster
wrote: Am 20.07.2014 um 21:35 schrieb Meer, H. van der
: Thanks. Please let us know if this addition of location=none will be taken up in a future beta.
I also realised that the effect wanted can be obtained by dividing the single \noheaderandfooterlines into two additional macros \noheaderlines and \nofooterlines Is that a viable idea too?
When you want disable only one element you can use the \setupheader or \setupfooter command.
I guess no. That was just the thing that did not worked out, because the \noheaderandfooterlines did the effect of the \setupheader vanish.
What \noheaderandfooterlines does is to call the following two setups: - \setupheader[state=empty] and - \setupfooter[state=empty] Wolfgang
![](https://secure.gravatar.com/avatar/29c7bbff49b1599eddb2ec73fd9ffa6e.jpg?s=120&d=mm&r=g)
Would it be a good idea to add to the definition of \noheaderandfooterlines?
For example
\def\noheaderandfooterlines{..}
% Separately kill header and footerlines on the current page.
\def\noheaderlines{\setuplayoutelement[header][state=empty]}
\def\nofooterlines{\setuplayoutelement[footer][state=empty]}
I added these to my macroset, because I find \noheaderlines easier to remember than \setuplayoutelement[header][state=empty].
Hans van der Meer
On 20 Jul 2014, at 22:20, Wolfgang Schuster
participants (2)
-
Meer, H. van der
-
Wolfgang Schuster