How to control the placement of a button
Hi all, Some years ago Wolfgang Schuster answered a question about interactive buttons placed on a page in order to navigate in a PDF document. Somehow, unfortunately, I did not keep his complete answer, but kept just an example code he sent, which I copy below. So my question is: how can one control the placement of a button created by the commands \startbut[GoToDestination] NameOfTheButton \stopbut For instance if one wishes to put a button on the bottom, or even somewhere on a page? Is it possible to give coordinates, like when one places a layer? In the example below if the layout is modified then the buttons may disappear, since they might be out of the boundaries of the predefined locations of the buttons (which are unknown to me…). Thanks in advance: OK %%% begin button-example.tex \setuppapersize[S6,S6] \setuplayout [width=13cm, rightedge=1.5cm] \setupinteraction [state=start, menu=on] \setupinteractionmenu[right] [state=start, align=middle, background=screen, frame=on, width=broad, style=bold, color=] \startinteractionmenu[right] \startbut[content] $\leftarrow$ \stopbut % this button is too high on the page \vfill \startbut[index] $\rightarrow$ \stopbut % this button should be a little bit lower \stopinteractionmenu \starttext \completecontent \showframe \dorecurse{4} {\chapter{Chapter #1}\index{chapter #1} \input knuth \index{Knuth}\page} \completeindex \stoptext %%% end button-example.tex
On 1/26/2018 6:51 AM, Otared Kavian wrote:
Hi all,
Some years ago Wolfgang Schuster answered a question about interactive buttons placed on a page in order to navigate in a PDF document.
Somehow, unfortunately, I did not keep his complete answer, but kept just an example code he sent, which I copy below. So my question is: how can one control the placement of a button created by the commands \startbut[GoToDestination] NameOfTheButton \stopbut For instance if one wishes to put a button on the bottom, or even somewhere on a page? Is it possible to give coordinates, like when one places a layer?
In the example below if the layout is modified then the buttons may disappear, since they might be out of the boundaries of the predefined locations of the buttons (which are unknown to me…).
Thanks in advance: OK
%%% begin button-example.tex \setuppapersize[S6,S6]
\setuplayout [width=13cm, rightedge=1.5cm]
\setupinteraction [state=start, menu=on]
\setupinteractionmenu[right] [state=start, align=middle, background=screen, frame=on, width=broad, style=bold, color=]
\startinteractionmenu[right] \startbut[content] $\leftarrow$ \stopbut % this button is too high on the page \vfill \startbut[index] $\rightarrow$ \stopbut % this button should be a little bit lower \stopinteractionmenu
\starttext
\completecontent \showframe
\dorecurse{4} {\chapter{Chapter #1}\index{chapter #1} \input knuth \index{Knuth}\page}
\completeindex
\stoptext %%% end button-example.tex
maybe \button does the job (you can put it in a layer) and \interactionmenu[right] will place a whole menu ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Otared Kavian