Command/button
Jump to navigation
Jump to search
Contents
\button
Summary
The command \button is used for creating buttons in interactive documents.
Settings
| \button[...=...,...]{...}[...] | |
| ...=...,... | inherits from \setupbutton |
| {...} | text |
| [...] | reference |
| Option | Explanation |
|---|---|
Besides a normal reference, the value can also be one of the special references for interaction like for example
PreviousPage, NextPage, FirstPage, LastPage, ExitViewer, GotoPage, or page(pagenumber). See strc-ref.mkvi for the complete list. | |
Description
Creates a button in interactive documents.
Examples
Basic example to learn how to have button for Next/Previous Page and Backward/Stop/Forward
\setuppapersize[A6] \setupinteraction [state=start] \setupbutton [background=color, foregroundcolor=white, foregroundstyle={\bfxx\tt}, width=2em, frame=off, rulethickness=0pt, offset=0pt, toffset=0.1ex] \usesymbols[nav] \startsetups[doc:nav] \setupbutton[backgroundcolor=middlecyan] \button {\symbol[navigation 2][previouspage]} [PreviousPage] \button {\symbol[navigation 2][nextpage]} [NextPage] \hfill \setupbutton[backgroundcolor=middlemagenta] \button {\symbol[navigation 2][PreviousJump]} [PreviousJump] \button {\symbol[navigation 2][CloseDocument]} [CloseDocument] \button {\symbol[navigation 2][NextJump]} [NextJump] \stopsetups \setupfootertexts[\setup[doc:nav]] %\showframe \starttext \dorecurse {10} {% \startchapter[title={Chapter \recurselevel}] \input zapf \stopchapter} \stoptext
