ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* pagenumber suppression howto?
@ 2014-07-20 10:03 Meer, H. van der
  2014-07-20 18:35 ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Meer, H. van der @ 2014-07-20 10:03 UTC (permalink / raw)
  To: NTG ConTeXt

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



___________________________________________________________________________________
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] 8+ messages in thread

* Re: pagenumber suppression howto?
  2014-07-20 10:03 pagenumber suppression howto? Meer, H. van der
@ 2014-07-20 18:35 ` Wolfgang Schuster
  2014-07-20 19:35   ` Meer, H. van der
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2014-07-20 18:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 20.07.2014 um 12:03 schrieb Meer, H. van der <H.vanderMeer@uva.nl>:

> 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
___________________________________________________________________________________
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] 8+ messages in thread

* Re: pagenumber suppression howto?
  2014-07-20 18:35 ` Wolfgang Schuster
@ 2014-07-20 19:35   ` Meer, H. van der
  2014-07-20 19:51     ` Wolfgang Schuster
  2014-07-25 12:08     ` Wolfgang Schuster
  0 siblings, 2 replies; 8+ messages in thread
From: Meer, H. van der @ 2014-07-20 19:35 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 3213 bytes --]

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 <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:


Am 20.07.2014 um 12:03 schrieb Meer, H. van der <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl<mailto: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
___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5147 bytes --]

[-- 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] 8+ messages in thread

* Re: pagenumber suppression howto?
  2014-07-20 19:35   ` Meer, H. van der
@ 2014-07-20 19:51     ` Wolfgang Schuster
  2014-07-20 20:02       ` Meer, H. van der
  2014-07-25 12:08     ` Wolfgang Schuster
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2014-07-20 19:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 496 bytes --]


Am 20.07.2014 um 21:35 schrieb Meer, H. van der <H.vanderMeer@uva.nl>:

> 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


[-- Attachment #1.2: Type: text/html, Size: 1309 bytes --]

[-- 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] 8+ messages in thread

* Re: pagenumber suppression howto?
  2014-07-20 19:51     ` Wolfgang Schuster
@ 2014-07-20 20:02       ` Meer, H. van der
  2014-07-20 20:20         ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Meer, H. van der @ 2014-07-20 20:02 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 786 bytes --]



On 20 Jul 2014, at 21:51, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:

Am 20.07.2014 um 21:35 schrieb Meer, H. van der <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

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.

Hans van der Meer


[-- Attachment #1.2: Type: text/html, Size: 2389 bytes --]

[-- 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] 8+ messages in thread

* Re: pagenumber suppression howto?
  2014-07-20 20:02       ` Meer, H. van der
@ 2014-07-20 20:20         ` Wolfgang Schuster
  2014-07-21  7:12           ` Meer, H. van der
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2014-07-20 20:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 986 bytes --]


Am 20.07.2014 um 22:02 schrieb Meer, H. van der <H.vanderMeer@uva.nl>:

> 
> 
> On 20 Jul 2014, at 21:51, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
> 
>> Am 20.07.2014 um 21:35 schrieb Meer, H. van der <H.vanderMeer@uva.nl>:
>> 
>>> 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


[-- Attachment #1.2: Type: text/html, Size: 2912 bytes --]

[-- 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] 8+ messages in thread

* Re: pagenumber suppression howto?
  2014-07-20 20:20         ` Wolfgang Schuster
@ 2014-07-21  7:12           ` Meer, H. van der
  0 siblings, 0 replies; 8+ messages in thread
From: Meer, H. van der @ 2014-07-21  7:12 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 2209 bytes --]

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 <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:


Am 20.07.2014 um 22:02 schrieb Meer, H. van der <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:



On 20 Jul 2014, at 21:51, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:

Am 20.07.2014 um 21:35 schrieb Meer, H. van der <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl<http://www.pragma-ade.nl/> / http://tex.aanhet.net<http://tex.aanhet.net/>
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net<http://contextgarden.net/>
___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 15029 bytes --]

[-- 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] 8+ messages in thread

* Re: pagenumber suppression howto?
  2014-07-20 19:35   ` Meer, H. van der
  2014-07-20 19:51     ` Wolfgang Schuster
@ 2014-07-25 12:08     ` Wolfgang Schuster
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2014-07-25 12:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 20.07.2014 um 21:35 schrieb Meer, H. van der <H.vanderMeer@uva.nl>:

> Thanks. Please let us know if this addition of location=none will be taken up in a future beta.

Which the new beta you can now write

    \setuppagenumbering[location=none]

to hide the pagenumber.

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] 8+ messages in thread

end of thread, other threads:[~2014-07-25 12:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20 10:03 pagenumber suppression howto? Meer, H. van der
2014-07-20 18:35 ` Wolfgang Schuster
2014-07-20 19:35   ` Meer, H. van der
2014-07-20 19:51     ` Wolfgang Schuster
2014-07-20 20:02       ` Meer, H. van der
2014-07-20 20:20         ` Wolfgang Schuster
2014-07-21  7:12           ` Meer, H. van der
2014-07-25 12:08     ` Wolfgang Schuster

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