ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: "ConTeXt" <ntg-context@ntg.nl>
Subject: Re: Interactive documents
Date: Sun, 11 Feb 2001 23:35:35 +0100	[thread overview]
Message-ID: <3.0.6.32.20010211233535.01dd2d70@server-1> (raw)
In-Reply-To: <000c01c093b0$48bc48c0$a3ccfea9@nuovo>

At 07:59 PM 2/10/01 +0100, Giuseppe Bilotta wrote:
>Hello,
>a couple of question on interactive documents.
>
>Since I use interaction also on "printable" documents,
>I find a feature to be a nuisance: when I click on a link,
>Acrobat sets the veiw to "fit in window", which I don't like.
>I assume the problem being using page destinations instead of
>named ones ... is there and advantage in this? is it possible
>to turn it off (so that the proper destination is reached,
>preserving the zoom factor)?

Page destinations are more save, especially in the past viewers have been
buggy with respect to named destination [some funny sort / search
optimization bugs in acroread 2 and 3] so this is why i always use page
destinations when possible; right from the start context supported the dual
scheme (although acro v 1 only had page dest while for instance dviwindo
only had neamed ones]. Page dest are more efficient too, but they need more
housekeeping in the macro package.

Concerning your problem: in spec-fdf you wile find something \setuppageview
which you can change into: 

\definespecial\dosetuppageview#1%
  {\processaction
     [#1]
     [\v!passend=>\def\PDFpageviewkey{   fit}%
                  \def\PDFpageviewwrd{  /Fit},
      \v!breedte=>\def\PDFpageviewkey{  fith}%   % watch the v-h
                  \def\PDFpageviewwrd{ /FitH},   % swapping here
       \v!hoogte=>\def\PDFpageviewkey{  fitv}%   % and here and
                  \def\PDFpageviewwrd{ /FitV},   % here too
%   \v!standaard=>\def\PDFpageviewkey{  xyz 0 0 0}%
%                 \def\PDFpageviewwrd{ /XYZ 0 0 0},
      \s!unknown=>\def\PDFpageviewkey{   fit}%
                  \def\PDFpageviewwrd{  /Fit}]%
   \edef\PDFpageview{/View [\PDFpageviewwrd]}}

with a aslightly adapted \dodosetupinteraction: 

\def\dodosetupinteraction[#1]% % \dosetupinteraction == special
  {\getparameters[\??ia][#1]%
   \doifelse{\@@iastatus}{\v!start}
     {\iflocation\else
        \showmessage{\m!interactions}{2}
          {\ifusepagedestinations\space(PAGE)\fi}%
        \global\locationtrue
      \fi}
     {\iflocation
        \showmessage{\m!interactions}{3}
          {\ifusepagedestinations\space(PAGE)\fi}%
        \global\locationfalse
      \fi}%
   \iflocation
     \enablemode [\systemmodeprefix\v!interactie]%
   \else
     \disablemode[\systemmodeprefix\v!interactie]%
   \fi
   \dosetuppageview{\@@iafocus}%
   \doifsomething{\@@iabereken}
     {\doregistercalculationset\@@iabereken}%
   \doifelse{\@@iastrut}{\v!ja}
     {\locationstruttrue}
     {\locationstrutfalse}%
   \doifelse{\@@iaklik}{\v!ja}
     {\highlighthyperlinkstrue}
     {\highlighthyperlinksfalse}%
   \doifelse{\@@iasplitsen}{\v!ja}
     {\locationsplittrue}
     {\locationsplitfalse}%
   \doifelse{\v!nieuw}{\@@iascherm}
     {\gotonewwindowtrue}
     {\gotonewwindowfalse}%
   \doifelse{\@@iapagina}{\v!ja}
     {\global\usepagedestinationstrue}
     {\global\usepagedestinationsfalse}}

and a setup like this: 

\setupinteraction[focus=width,state=start]

you have more control (width, height, fit). 

There is no way to preserve the current zoom, although the pdf spec
suggests it. If you find the right way ... 

Zooming and alike has always been buggy / fuzzy in pdf. This is why i never
finished proper thread support (and probably will remove it). It has to do
with the fact that annotations have a separate layer in pdf.  

>Second question: I have a document to be produced in both
>electronic and printable version. I use the \coupledocument
>feature (but it seems not to work).

It's a two stage def: 

\coupledocument
  [alternative] % symbolic name 
  [docu-p] % name of paper version 
  [chapter,section,subsection]
  [the printable version]

\setuphead
  [chapter,section,subsection]
  [file=alternative]

and the same for the screen doc. 

>I produce the two documents this way:
>
>texexec --pdf --mode=screen --result=usatex1-e usatex1
>
>texexec --pdf usatex1
>
>I have to use this order because creating the screen version
>deletes the print version (--result renames the file after
>completion). Two questions:

tex has fixed output names, so there is no other decent way; this is why i
use two times a suffix in that case (-s and -p). 

>1) MiKTeX 2.0 allows to specify the resulting filename;
>shouldn't texexec take advantage of this when --result is
>specified?

dunno, since i don't run miktex i cannot test it, also, the main name is to
be the original in order not to get problems with all kind of internal refs
and names and so; at most you would save a couple of renames which does not
take that much time 

>2) Is it possible to obtain both documents with a single run?

Eh, i don't think so, since I suppose that you use different layouts. 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  reply	other threads:[~2001-02-11 22:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-10 18:59 Giuseppe Bilotta
2001-02-11 22:35 ` Hans Hagen [this message]
2012-07-11  7:35 MANUEL GONZALEZ SUAREZ
2012-07-11  8:12 ` Hans Hagen
2012-07-11  8:25   ` Wolfgang Schuster
2012-07-11  8:14 ` Wolfgang Schuster

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=3.0.6.32.20010211233535.01dd2d70@server-1 \
    --to=pragma@wxs.nl \
    --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).