Subject: mailing-list for TeXmacs Users
List archive
From : Joris van der Hoeven <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] Reset counter on each page
- Date: Tue, 20 Jul 2010 20:38:10 +0200
On Mon, Jul 19, 2010 at 10:50:14AM +0100, Sam Liddicott wrote:
> I need to have a counter reset each time a new page starts.
This operations is ill-defined. The point is that the page numbers are
not computed during the typesetting phase, but only after all pages have
been typeset and during the page breaking stage. So you cannot let
page numbers interact directly with the macro language.
> As I don't find a page counter to do it for me (with counter groups) and
> as I am making heavy use of labels, I could compare the page-ref of
> the previous label with the page-ref of the new label - except that
> <equal> doesn't seem to work when applied to a pageref.
Page references are links, defined by the following macro:
(macro "x"
(locus (id (hard-id (arg "x")))
(hyperlink (id (hard-id (arg "x")))
(url (merge "#" (arg "x"))))
(get-binding (arg "x") "1")))
So I guess that (get-binding (arg "x") "1") will do the job.
Best wishes, --Joris
- [TeXmacs] Reset counter on each page, Sam Liddicott, 07/19/2010
- [TeXmacs] Re: Reset counter on each page, Sam Liddicott, 07/19/2010
- Re: [TeXmacs] Reset counter on each page, Joris van der Hoeven, 07/20/2010
Archive powered by MHonArc 2.6.19.