Skip to Content.
Sympa Menu

texmacs-users - Re: retrieving page numbers

Subject: mailing-list for TeXmacs Users

List archive

Re: retrieving page numbers


Chronological Thread 
  • From: Benno Dielmann <address@hidden>
  • To: David Allouche <address@hidden>
  • Cc: address@hidden
  • Subject: Re: retrieving page numbers
  • Date: Fri, 18 Jul 2003 12:34:35 +0200

On Friday 18 July 2003 12:15, you wrote:
| On Fri, Jul 18, 2003 at 11:09:10AM +0200, Benno Dielmann wrote:
| > Hi all,
| >
| > perhaps my first attempt to get an answer to my question about retrieving
| > page numbers was not formulated clearly enough... So I give it another
| > try:
| >
| > How do I retrieve the number of the actual page I'm on somwhere in the
| > document body? The value of "thepage" or "page number" is always zero.
|
| I think it is not easy at the moment.
|
| The variables "thepage" and "page number" are only assigned when
| building pages, that is after the page bodies have been typeset.
| Currently they are only meant to be used in headers and footers (which
| are typeset after page breaking).
|
| Page references use a special mechanism using an "auxilliary
| collection" which you cannot access without special primitives or
| glue, which AFAIK do not exist yet.
|
| It might be possible to do what you want with the following approach:
|
| -- Define a function which uses a counter to produce unique labels.
|
| -- Do some C++ and glue hacking to allow programmatic lookup in the
| "references" auxilliary collection (discussion of this should go
| on texmacs-dev).
|
| -- Have this function access the auxilliary buffer (maybe using
| extern or a friend) to return a tree containing the page number
| of the current unique label.
|
| -- Do not forget to "Update Buffer" when you want to get the page
| numbers right.

Sound like some kind of hack... I'm writing my thesis now an definitively
haven't got the time to try this out.

I was trying to define some macro/function which does or does not display
some
argument in dependency of the number of the actual page its call is on. This
whould make page-referencing much more flexible.

But thanks for your reply and for this extraordinary great tool unadequately
called Texmacs ;-),

Benno.



Archive powered by MHonArc 2.6.19.

Top of Page