ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: jbf <roma83537@gmail.com>
To: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: page number with brief centered line above
Date: Fri, 15 May 2020 08:39:54 +1000	[thread overview]
Message-ID: <16a1a10a-c5e0-4038-e067-82b528c24c62@gmail.com> (raw)
In-Reply-To: <62c7c729-9c21-b7cc-0aff-aa48da6dc0bc@gmail.com>

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
___________________________________________________________________________________

      reply	other threads:[~2020-05-14 22:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  5:30 jbf
2020-05-14 15:28 ` Wolfgang Schuster
2020-05-14 22:39   ` jbf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16a1a10a-c5e0-4038-e067-82b528c24c62@gmail.com \
    --to=roma83537@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).