ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* goto with external document
@ 1999-08-12 12:57 Matthew Baker
  1999-08-12 15:14 ` Tobias Burnus
  1999-08-12 19:54 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Matthew Baker @ 1999-08-12 12:57 UTC (permalink / raw)


Hi,

I'm trying to make a PDF file (actually a collection of linked PDF files)
idiot-proof.  I have a top-level PDF file with links to others.  When you
click on the others, they close themselves (\goto{....}[CloseDocument]).
The trouble is, if the user doesn't have Acrobat set up to open links in
separate windows, the top level document disappears because it's already
been replaced by the other document.  Anyway around this?  Can you make a
\goto go to the previous view if it is the only open window and close the
document otherwise?  Or something similar?  I can't provide two buttons
because the linked-to document only contains one thing: an image.

Of course, the user can click on the back arrow instead of clicking on the
document but that requires a bit of brain and I can't guarrantee the users
would have that unfortunately.

- Matthew

--
Dr. Matthew Baker           matthew.baker@gmd.de
GMD - FIT.MMK               http://fit.gmd.de/hci/pages/matthew.baker.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: goto with external document
  1999-08-12 12:57 goto with external document Matthew Baker
@ 1999-08-12 15:14 ` Tobias Burnus
  1999-08-12 19:54 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Tobias Burnus @ 1999-08-12 15:14 UTC (permalink / raw)
  Cc: Context List

Hi Matthew,

> been replaced by the other document.  Anyway around this?  Can you make a
> \goto go to the previous view if it is the only open window and close the
> document otherwise?  Or something similar?  I can't provide two buttons
> because the linked-to document only contains one thing: an image.
I fear this isn't possible. But how about only adding a \goto[PreviousJump]?
I haven't tested it, but this should always work. If a seperate window is open,
well then you end up with several open windows (if you don't use
\goto[ExitViewer] in the main document ;-) but I think this is best.

It might also be possible to set this value, but I don't know how.

> Of course, the user can click on the back arrow instead of clicking on the
> document but that requires a bit of brain and I can't guarrantee the users
> would have that unfortunately.
Well you can assume they have more brain than you think -- in finding settings
which prevent your program/document from working ;-)

Tobias


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: goto with external document
  1999-08-12 12:57 goto with external document Matthew Baker
  1999-08-12 15:14 ` Tobias Burnus
@ 1999-08-12 19:54 ` Hans Hagen
  1999-08-13  7:16   ` Matthew Baker
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 1999-08-12 19:54 UTC (permalink / raw)
  Cc: Context List

Matthew Baker wrote:

> I'm trying to make a PDF file (actually a collection of linked PDF files)
> idiot-proof.  I have a top-level PDF file with links to others.  When you
> click on the others, they close themselves (\goto{....}[CloseDocument]).
> The trouble is, if the user doesn't have Acrobat set up to open links in
> separate windows, the top level document disappears because it's already
> been replaced by the other document.  Anyway around this?  Can you make a
> \goto go to the previous view if it is the only open window and close the
> document otherwise?  Or something similar?  I can't provide two buttons
> because the linked-to document only contains one thing: an image.
> 
> Of course, the user can click on the back arrow instead of clicking on the
> document but that requires a bit of brain and I can't guarrantee the users
> would have that unfortunately.

In spec-fdf.tex search for: 

             {\uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR

and change it into 

             {/NewWindow true \upper.....}}%

maybe that works (untested). If so, I can add it as an option. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: goto with external document
  1999-08-12 19:54 ` Hans Hagen
@ 1999-08-13  7:16   ` Matthew Baker
  1999-08-13  7:39     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Baker @ 1999-08-13  7:16 UTC (permalink / raw)


On Thu, 12 Aug 1999, Hans Hagen wrote:

> In spec-fdf.tex search for: 
> 
>              {\uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR
> 
> and change it into 
>        
>              {/NewWindow true \upper.....}}%

My new line looks like:

{/NewWindow true \uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR

Is that right?  I get the text

  /NewWindow true 

in my document and Acrobat complains about not having the required plugin.

--
Dr. Matthew Baker           matthew.baker@gmd.de
GMD - FIT.MMK               http://fit.gmd.de/hci/pages/matthew.baker.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: goto with external document
  1999-08-13  7:16   ` Matthew Baker
@ 1999-08-13  7:39     ` Hans Hagen
  1999-08-13  7:56       ` Matthew Baker
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 1999-08-13  7:39 UTC (permalink / raw)
  Cc: Context List

Matthew Baker wrote:

> >              {/NewWindow true \upper.....}}%
> 
> My new line looks like:
> 
> {/NewWindow true \uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR
> 
> Is that right?  I get the text
> 
>   /NewWindow true
> 
> in my document and Acrobat complains about not having the required plugin.

Ah yes, I see. Now tested it myself. 

First add: 

  \newif\ifgotonewwindow \gotonewwindowtrue % false by default, will be
key/value

Then change two times in spec-fdf.tex

  {\uppercasestring R /F (#4.pdf)\to\PDFfile % /Goto+\PDFfile=/GotoR ...
   \ifgotonewwindow\edef\PDFfile{\PDFfile\space/NewWindow true}\fi}}

so, the command is appended only when the bool is true. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: goto with external document
  1999-08-13  7:39     ` Hans Hagen
@ 1999-08-13  7:56       ` Matthew Baker
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Baker @ 1999-08-13  7:56 UTC (permalink / raw)


On Fri, 13 Aug 1999, Hans Hagen wrote:

> Ah yes, I see. Now tested it myself. 
> 
> First add: 
> 
>   \newif\ifgotonewwindow \gotonewwindowtrue % false by default, will be
> key/value
> 
> Then change two times in spec-fdf.tex
> 
>   {\uppercasestring R /F (#4.pdf)\to\PDFfile % /Goto+\PDFfile=/GotoR ...
>    \ifgotonewwindow\edef\PDFfile{\PDFfile\space/NewWindow true}\fi}}
> 
> so, the command is appended only when the bool is true. 

Ah.  Works beautifully.  Can you make this an option?  Or, can I replace
it with something in my source file so that it doesn't happen by default?

--
Dr. Matthew Baker           matthew.baker@gmd.de
GMD - FIT.MMK               http://fit.gmd.de/hci/pages/matthew.baker.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-08-13  7:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-12 12:57 goto with external document Matthew Baker
1999-08-12 15:14 ` Tobias Burnus
1999-08-12 19:54 ` Hans Hagen
1999-08-13  7:16   ` Matthew Baker
1999-08-13  7:39     ` Hans Hagen
1999-08-13  7:56       ` Matthew Baker

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).