lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the actual page number


From: Jeff Kingston
Subject: Re: Getting the actual page number
Date: Fri, 04 Mar 2005 15:15:15 +1100

> > I'm not sure why you would need (the actual page number)
>
> I've written a Lout-producing back-end for another document authoring
> system (Skribe).  The back-end produces a PDF outline in the resulting
> Lout file.  The PDF outline uses PostScript's `pdfmark' and Lout's
> address@hidden' as in the following example...

Hmmm.

If you look in file lout/include/bsf, at the @PageMarker symbol,
you'll see it has two parameters:  "num", which is the page
number as printed, and "rawnum" which is the page number in
Arabic before conversion to Roman (or whatever).

So if your question had been just about getting the page number
not in Roman numerals the answer would have been fairly easy:
write a symbol alongside @PageOf that accesses the rawnum
parameter rather than the num parameter.

However, to get what we are calling actual page numbers
would be quite a lot harder.  You would have to declare
a third parameter, "actualnum", then go to the many
places where @PageMarker objects occur in the various
files, and ensure that each of those supplies a value
for this new parameter.  But even that would present
problems when there are two lists of pages, an
introductory list and a main list.  Getting the first
actualnum in the main list to be 1 + the last actualnum
in the introductory list would require a cross reference.

Just to clarify:  Lout has no builtin concept of a page.
But the applications place one @PageMarker object just
before every page, and it is the fount of wisdom about
page numbers for that page.

Even if you made all these changes you would have a
maintenance problem next time Lout was released.
I don't think you are going to be able to convince
me to add all this to the core packages; it's way
too specialized.

I wonder if there is some way you can get PostScript
to do the work instead of Lout.  e.g. you could
add some PostScript to the *body* of @PageMarker,
no idea about the details.

Jeff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]