ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* doublesided margin page number
@ 2022-01-24  1:28 Youssef Cherem via ntg-context
  2022-01-31 18:19 ` Pablo Rodriguez via ntg-context
  2022-01-31 19:42 ` Wolfgang Schuster via ntg-context
  0 siblings, 2 replies; 4+ messages in thread
From: Youssef Cherem via ntg-context @ 2022-01-24  1:28 UTC (permalink / raw)
  To: ntg-context; +Cc: Youssef Cherem


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

I've managed to put double-sided page numbers -- but numbers are restarting
after two, though. What's going on?



====

\setuppagenumbering[location=,alternative=doublesided]


%
https://tex.stackexchange.com/questions/128854/context-eliminate-topspace-and-bottomspace?rq=1

\definelayer

[pagenumber]

[

width=\paperwidth,

height=\paperheight,

% preset=rightbottom,

voffset=.3\paperheight

]


%\setupbackgrounds[page][background=pagenumber, setups=setpagenumber]

\setupbackgrounds[text] [rightmargin] [background=pagenumber,
setups=setpagenumber]

%isso aqui é o que funciona para doublesided (frente e verso)


\startsetups setpagenumber

% Set the page number to be (2em, \lineheight) from the bottom right corner

% Note the `preset=rightbottom` above.

%

% The 2nd set of optional arguments are for the frame. For illustration I
change

% the color and font of the page number

\setlayerframed

[pagenumber]

[

x=3em,

y=2em,

]

[

frame=on,

foregroundcolor=red,

foregroundstyle=bold,

]

{\pagenumber}

\stopsetups


% Disable default page numbering



\starttext


Page 1


\page


Page 2


\page


Page 3


\page


Page 4


\dorecurse{15}{\input knuth}


\stoptext

=====================




Thanks a lot for any help!

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: doublesided margin page number
  2022-01-24  1:28 doublesided margin page number Youssef Cherem via ntg-context
@ 2022-01-31 18:19 ` Pablo Rodriguez via ntg-context
  2022-01-31 18:50   ` Pablo Rodriguez via ntg-context
  2022-01-31 19:42 ` Wolfgang Schuster via ntg-context
  1 sibling, 1 reply; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-01-31 18:19 UTC (permalink / raw)
  To: Youssef Cherem via ntg-context; +Cc: Pablo Rodriguez

On 1/24/22 2:28 AM, Youssef Cherem via ntg-context wrote:
> I've managed to put double-sided page numbers -- but numbers are
> restarting after two, though. What's going on?

Hi Yousesef,

I think this is related to how \setupbackgrounds is invoked.

The following command works:

  \setupbackgrounds[page] [setups=setpagenumber, background=pgnumber]

Of course, you have to place the layer properly.

Just in case it might help,

Pablo

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

* Re: doublesided margin page number
  2022-01-31 18:19 ` Pablo Rodriguez via ntg-context
@ 2022-01-31 18:50   ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-01-31 18:50 UTC (permalink / raw)
  To: Pablo Rodriguez via ntg-context; +Cc: Pablo Rodriguez

On 1/31/22 7:19 PM, Pablo Rodriguez via ntg-context wrote:
> On 1/24/22 2:28 AM, Youssef Cherem via ntg-context wrote:
>> I've managed to put double-sided page numbers -- but numbers are
>> restarting after two, though. What's going on?
>
> Hi Yousesef,
         ^

Sorry for the typo when writing your name, Youssef.

Pablo

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

* Re: doublesided margin page number
  2022-01-24  1:28 doublesided margin page number Youssef Cherem via ntg-context
  2022-01-31 18:19 ` Pablo Rodriguez via ntg-context
@ 2022-01-31 19:42 ` Wolfgang Schuster via ntg-context
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-01-31 19:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Youssef Cherem via ntg-context
  Cc: Wolfgang Schuster


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

Youssef Cherem via ntg-context schrieb am 24.01.2022 um 02:28:
> I've managed to put double-sided page numbers -- but numbers are 
> restarting after two, though. What's going on?

Add

     \setupbackgrounds[state=repeat]

to your setups to ensure the text background is refreshed.

Wolfgang


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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-31 19:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24  1:28 doublesided margin page number Youssef Cherem via ntg-context
2022-01-31 18:19 ` Pablo Rodriguez via ntg-context
2022-01-31 18:50   ` Pablo Rodriguez via ntg-context
2022-01-31 19:42 ` Wolfgang Schuster via ntg-context

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