ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Manipulating \pagenumber with Lua code : example need
@ 2010-09-08 18:53 Vnpenguin
  2010-09-08 18:58 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Vnpenguin @ 2010-09-08 18:53 UTC (permalink / raw)
  To: ConTeXt list

Hi,
I would like to manipulate \pagenumber with Lua code, in order to add
an increment to page number, print out (\pagenumber + INC) instead of
\pagenumber.

I can't found any example in Wiki yet.

Some lines of simple code will be very appreciated :)

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

* Re: Manipulating \pagenumber with Lua code : example need
  2010-09-08 18:53 Manipulating \pagenumber with Lua code : example need Vnpenguin
@ 2010-09-08 18:58 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2010-09-08 18:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 08.09.2010 um 20:53 schrieb Vnpenguin:

> Hi,
> I would like to manipulate \pagenumber with Lua code, in order to add
> an increment to page number, print out (\pagenumber + INC) instead of
> \pagenumber.
> 
> I can't found any example in Wiki yet.
> 
> Some lines of simple code will be very appreciated :)

You can use TeX for this, e.g.:

- \number\numexpr\userpageno+2\relax
- \number\numexpr\userpageno*2\relax
- ...

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

end of thread, other threads:[~2010-09-08 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 18:53 Manipulating \pagenumber with Lua code : example need Vnpenguin
2010-09-08 18:58 ` 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).