[NTG-context] how to put page X of N in header or top space?

David Walther david at clearbrookdistillery.com
Tue Aug 14 22:44:43 CEST 2018


Thank you Wolfgang, that worked nicely.  Two artifacts I'm not sure how to address:

I did page Page X of N, but in the output, it displays like
Page 2of 3, Page 1of 3, etc.  It ignores the space between the number and the word of.

Secondly, when I use the doublesided and the {singlesided,doublesided}
alternative page numbering, it rounds up to an even number of pages, even
though the last page is blank.  When I just use the singlesided option I get 3
pages as expected, but it doesn't do the nice interior margins and switching
sides of page numbers.  Even context doesn't view the blank page at the end as
a page, because it doesn't print the header or footer on it.

David


On Tue, Aug 14, 2018 at 09:32:29PM +0200, Wolfgang Schuster wrote:
>\setuppagenumbering
>  [alternative=doublesided,               % doublesided layout
>  %alternative={singlesided,doublesided}, % singlesided layout with 
>left/right pages
>   location=none]
>
>\setupheadertexts [My Spreadsheet]
>
>\setupheadertexts
>  [] [Page \userpagenumber\ of \lastuserpagenumber]
>  [Page \userpagenumber\ of \lastuserpagenumber] []
>
>\starttext
>\dorecurse{10}{\page[dummy]}
>\stoptext
>
>
>Wolfgang
>
>
>David Walther schrieb am 14.08.18 um 18:28:
>>Hi, I am slowly learning ConTeXt.  I am generating tables and 
>>spreadsheets, and
>>transforming them into ConTeXt, finally got it working after a lot of
>>mysterious errors about missing } as macro arguments.
>>
>>I have read this page carefully:  http://wiki.contextgarden.net/Layout
>>
>>How can I alter the page number?  Is it in the header, or is it in the
>>topspace?
>>
>>I want this to be at the top of each page of my spreadsheet:
>>
>>My Spreadsheet (centered) Page 1 of 3 (right justified)
>>
>>And on even pages, the other way around:
>>
>>Page 2 of 3 (left justified) My Spreadsheet (centered)
>>
>>What is the right way to do this?  Is there an override and a blob 
>>of code I need to put into one of the boxes in the Layout?
>>
>>David
>>___________________________________________________________________________________
>>
>>If your question is of interest to others as well, please add an 
>>entry to the Wiki!
>>
>>maillist : ntg-context at 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
>>___________________________________________________________________________________
>


More information about the ntg-context mailing list