ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: How to control the placement of a button
Date: Fri, 26 Jan 2018 06:51:46 +0100	[thread overview]
Message-ID: <F2034175-5E97-4F1F-97F0-691DBD727AC8@gmail.com> (raw)

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2018-01-26  5:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26  5:51 Otared Kavian [this message]
2018-01-26 13:12 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F2034175-5E97-4F1F-97F0-691DBD727AC8@gmail.com \
    --to=otared@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).