* Metafun macros & Jump buttons
@ 2000-11-24 20:34 Johannes H?sing
2000-11-26 20:47 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Johannes H?sing @ 2000-11-24 20:34 UTC (permalink / raw)
Hi all,
two questions:
Which version provides the Metafun macros like \setMPtext and \MPstring?
I am using ConTeXt ver: 2000.3.13 fmt: 2000.11.9 int: english mes: english
I would like to set up buttons that jump back to the beginning of the current
section or forward to the beginning of the next section. I haven't found
any of them in the ConTeXt handboek. Is there a way to define these buttons?
Greetings
Johannes
--
Johannes Hüsing <hannes@ruhrau.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Metafun macros & Jump buttons
2000-11-24 20:34 Metafun macros & Jump buttons Johannes H?sing
@ 2000-11-26 20:47 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2000-11-26 20:47 UTC (permalink / raw)
Cc: ntg-context
At 09:34 PM 11/24/00 +0100, Johannes H?sing wrote:
>Hi all,
>
>two questions:
>
>Which version provides the Metafun macros like \setMPtext and \MPstring?
>I am using ConTeXt ver: 2000.3.13 fmt: 2000.11.9 int: english mes:
english
You need a more recent version, since some mp support is rather new. Fetch
the beta.
>I would like to set up buttons that jump back to the beginning of the
current
>section or forward to the beginning of the next section. I haven't found
>any of them in the ConTeXt handboek. Is there a way to define these buttons?
Hm. I think the best way it to automatically generate the refs which is
core stuff, so i should put it on the todo list.
What you can do is the following:
\setuppagenumbering[way=bychapter,state=start]
and then use buttons like:
\button{next section}[lastsubpage,NextPage]
which means as much as "goto the last page of the current subrange and then
let the viewer go to the next page". This is a nice example of chained
refs. Another solution is (untested):
\scratchcounter=\realpageno
\advance\scratchcounter by \lastsubpage
\advance\scratchcounter by -\subpageno
\edef\ThePageToGoto{\the\scratchcounter}
or
\setcounter\ThePageToGoto\realpageno
\increment(\ThePageToGoto,\lastsubpage)
\decrement(\ThePageToGoto,\subpageno)
and, given that this pagenumber is ok:
\goto{next section}[page(\ThePageToGoto)]
Yet another way is, (it would be implemented low level that way) :
for each section call:
\definereference[nextsection][... calculated page ...]
and then one could use:
\goto{next section}[nextsection]
This is the way linked tables of contents are implemented.
Actually, a nice solution would be:
\goto{next section}[afterlastsubpage]
which i can implement quite easily in a few lines of code if really needed.
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-11-26 20:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-24 20:34 Metafun macros & Jump buttons Johannes H?sing
2000-11-26 20:47 ` Hans Hagen
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).