ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* page number with brief centered line above
@ 2020-05-14  5:30 jbf
  2020-05-14 15:28 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: jbf @ 2020-05-14  5:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi list,

I am trying to achieve a layout where there is a brief line above the 
bottom-centered page number (of a double-sided document). I am able to 
achieve the centered bottom-located page number easily and obviously 
enough with:

\setuppagenumbering
   [alternative=doublesided,location={footer,middle}]
\setupfooter
   [style=bold]

And I was able to achieve a result with a short line above where the 
page number should be - but by adopting the solution below I have now 
lost the page number.

\setuppagenumbering
   [alternative=doublesided,location={footer,middle}]
\setupfootertexts[{\framed[frame=off,topframe=on,width=.5\textwidth]}]

So then I thought that having left out any reference to page numbers I 
had better put it in, so I added [pagenumber] to the above, but I ended 
up with two page numbers, one centered, the other to the inner or outer 
margins (depending on recto/verso), and the line was likewise to the 
right or left of the centred number. So clearly not what I want.

Maybe the solution lies with some combination of the above I haven't 
thought of, or maybe there is another solution altogether. Any thoughts?

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

* Re: page number with brief centered line above
  2020-05-14  5:30 page number with brief centered line above jbf
@ 2020-05-14 15:28 ` Wolfgang Schuster
  2020-05-14 22:39   ` jbf
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2020-05-14 15:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users, jbf

jbf schrieb am 14.05.2020 um 07:30:
> Hi list,
>
> I am trying to achieve a layout where there is a brief line above the 
> bottom-centered page number (of a double-sided document). I am able to 
> achieve the centered bottom-located page number easily and obviously 
> enough with:
>
> \setuppagenumbering
>   [alternative=doublesided,location={footer,middle}]
> \setupfooter
>   [style=bold]
>
> And I was able to achieve a result with a short line above where the 
> page number should be - but by adopting the solution below I have now 
> lost the page number.
>
> \setuppagenumbering
>   [alternative=doublesided,location={footer,middle}]
> \setupfootertexts[{\framed[frame=off,topframe=on,width=.5\textwidth]}]
You forgot the braces for the argument of \framed.
> So then I thought that having left out any reference to page numbers I 
> had better put it in, so I added [pagenumber] to the above, but I 
> ended up with two page numbers, one centered, the other to the inner 
> or outer margins (depending on recto/verso), and the line was likewise 
> to the right or left of the centred number. So clearly not what I want.
>
> Maybe the solution lies with some combination of the above I haven't 
> thought of, or maybe there is another solution altogether. Any thoughts?

1. Add a rule at the top of the footer.

\setuppagenumbering
   [location=footer]

\setupfooter
   [text]
   [before=\hrule]

\starttext
\page[dummy]
\stoptext


2. Put the page number in a frame (preferred method).

\setuppagenumbering
   [location=]

\setupfootertexts
   [{\framed[width=max,frame=off,topframe=on]{\pagenumber}}]

\starttext
\page[dummy]
\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] 3+ messages in thread

* Re: page number with brief centered line above
  2020-05-14 15:28 ` Wolfgang Schuster
@ 2020-05-14 22:39   ` jbf
  0 siblings, 0 replies; 3+ messages in thread
From: jbf @ 2020-05-14 22:39 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

Thanks Wolfgang. It seems I was almost there, but had forgotten the 
braces for \pagenumber!  I am grateful for the observation. \framed is 
definitely the preferred solution.

Julian

On 15/5/20 1:28 am, Wolfgang Schuster wrote:
> jbf schrieb am 14.05.2020 um 07:30:
>> Hi list,
>>
>> I am trying to achieve a layout where there is a brief line above the 
>> bottom-centered page number (of a double-sided document). I am able 
>> to achieve the centered bottom-located page number easily and 
>> obviously enough with:
>>
>> \setuppagenumbering
>>   [alternative=doublesided,location={footer,middle}]
>> \setupfooter
>>   [style=bold]
>>
>> And I was able to achieve a result with a short line above where the 
>> page number should be - but by adopting the solution below I have now 
>> lost the page number.
>>
>> \setuppagenumbering
>>   [alternative=doublesided,location={footer,middle}]
>> \setupfootertexts[{\framed[frame=off,topframe=on,width=.5\textwidth]}]
> You forgot the braces for the argument of \framed.
>> So then I thought that having left out any reference to page numbers 
>> I had better put it in, so I added [pagenumber] to the above, but I 
>> ended up with two page numbers, one centered, the other to the inner 
>> or outer margins (depending on recto/verso), and the line was 
>> likewise to the right or left of the centred number. So clearly not 
>> what I want.
>>
>> Maybe the solution lies with some combination of the above I haven't 
>> thought of, or maybe there is another solution altogether. Any thoughts?
>
> 1. Add a rule at the top of the footer.
>
> \setuppagenumbering
>   [location=footer]
>
> \setupfooter
>   [text]
>   [before=\hrule]
>
> \starttext
> \page[dummy]
> \stoptext
>
>
> 2. Put the page number in a frame (preferred method).
>
> \setuppagenumbering
>   [location=]
>
> \setupfootertexts
>   [{\framed[width=max,frame=off,topframe=on]{\pagenumber}}]
>
> \starttext
> \page[dummy]
> \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] 3+ messages in thread

end of thread, other threads:[~2020-05-14 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14  5:30 page number with brief centered line above jbf
2020-05-14 15:28 ` Wolfgang Schuster
2020-05-14 22:39   ` jbf

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