ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Zooming in to a specific part of the page
Date: Wed, 17 Nov 2010 02:15:20 +0100	[thread overview]
Message-ID: <AANLkTi=oWbfOxw28aKwCXy5C0jnLQYjNyMHuf-bRq6V2@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1011161943460.24166@ybpnyubfg.ybpnyqbznva>

On Wed, Nov 17, 2010 at 01:52, Aditya Mahajan wrote:
> Hi,
>
> Is it possible to zoom into a specific part of the page? I am thinking of
> the following scenario. Suppose I have the following document
>
> \setuppapersize[S6][S6]
> \starttext
> \placefigure[right,none]{\externalfigure[dummy][width=0.3\textwidth]}
> \input knuth
>
> \page
>
> \input tufte
>
> \stoptext
>
> I want that when I click on the image, the pdf is zoomed in so that the
> image occupies the full screen[1], and when I click on the zoomed in image,
> it zooms out and I get the previous page view.
>
> How do I achieve this? I am guessing that some javascript magic might be
> needed, but I do not understand the interaction code at all. This feature
> will be pretty handy for presentations.

You don't need JavaScript. You can use a normal hyperlink:

[page /FitR left bottom right top]

Display the page designated by page, with its contents magnified just
enough to fit the rectangle specified by the coordinates left, bottom,
right, and top entirely within the window both horizontally and
vertically. If the required horizontal and vertical magnification
factors are different, use the smaller of the two, centering the
rectangle within the window in the other dimension.

https://www.adobe.com/devnet/pdf/pdf_reference_archive.html
Section "8.2.1 Destinations" of PDFReference16.pdf

You only need to find a way to transfer the data from nice interface
in ConTeXt into PDF literals.

Mojca

PS: in case that you start hacking with that, please also convince
Hans to fix hyperlinks in formulas/chapters/tables/... (see equation
\in[eq:formulalabel]) to point to specific location on some page, not
to the whole page.
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2010-11-17  1:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17  0:52 Aditya Mahajan
2010-11-17  1:15 ` Mojca Miklavec [this message]
2010-11-17  1:27   ` Aditya Mahajan
2010-11-17 18:36     ` 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='AANLkTi=oWbfOxw28aKwCXy5C0jnLQYjNyMHuf-bRq6V2@mail.gmail.com' \
    --to=mojca.miklavec.lists@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).