Changes

Jump to navigation Jump to search
1,062 bytes added ,  11:00, 27 January 2018
Created page with "In an interactive document it is useful to be able to put buttons which do specific navigation tasks. The {{cmd|button}} does precisely this, and it can be included in a layer wh..."
In an interactive document it is useful to be able to put buttons which do specific navigation tasks. The {{cmd|button}} does precisely this, and it can be included in a layer which can be put anywhere on a page. Here is an example:
<context source=yes mode=mkiv text="This results in the following:">
\setuppapersize[A5][A5]
\setupinteraction[state=start]
\setupbodyfont[10pt]

\definelayer[MyButton]
[width=\paperwidth,height=\paperheight]

\setlayerframed[MyButton]
[x=50mm,y=70mm,
location={lo,hi}]
[width=50mm,height=30mm,
%offset=-1mm,
frame=on]
{\button[frame=off]{\scale[height=2em]{\symbol[navigation 1][nextpage]}}[NextPage] \endgraf
We have a nice button here}

\setupbackgrounds[page]
[background={MyButton}]
\starttext
We have here a page with a layer containing a button.
\page
This is a second page, and here is a button to go back
\button{\symbol[navigation 1][previouspage]}[PreviousPage].
\stoptext
</context>
Indeed, instead of {{cmd|symbol}} one can use any other character, or even a figure with the command {{cmd|externalfigure}}.
106

edits

Navigation menu