ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* PDF "dirty" trick
@ 2000-09-13 20:36 Giuseppe Bilotta (Oblomov)
  2000-09-14  9:47 ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Giuseppe Bilotta (Oblomov) @ 2000-09-13 20:36 UTC (permalink / raw)


Hello,

what I would like to obtain:

in a PDF "interactive" document, I would like to have a pop-up window
containing some typeset material (sort of a "minipage" in a pop-up window).

how did i try to do it:

I managed to create pop-up notes, but they can only contain "normal text",
they are resizable by the user, etc.

I managed to create xforms, but I can only place them in the document, not
in a pop-up environment.

Is it possible to obtain what I want? If yes, can somebody give me some
clue?

Thanks,

--
Giuseppe Bilotta


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

* Re: PDF "dirty" trick
  2000-09-13 20:36 PDF "dirty" trick Giuseppe Bilotta (Oblomov)
@ 2000-09-14  9:47 ` Hans Hagen
  2000-09-14 19:50   ` Giuseppe Bilotta (Oblomov)
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2000-09-14  9:47 UTC (permalink / raw)
  Cc: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]

At 10:36 PM 9/13/00 +0200, Giuseppe Bilotta (Oblomov) wrote:
>Hello,
>
>what I would like to obtain:
>
>in a PDF "interactive" document, I would like to have a pop-up window
>containing some typeset material (sort of a "minipage" in a pop-up window).
>
>how did i try to do it:
>
>I managed to create pop-up notes, but they can only contain "normal text",
>they are resizable by the user, etc.
>
>I managed to create xforms, but I can only place them in the document, not
>in a pop-up environment.
>
>Is it possible to obtain what I want? If yes, can somebody give me some
>clue?

This kind of problems is easy to solve on the one hand, since the
functionality is already there, but not always easy to use, since you need
to sync with the otr (output routine). But you're lucky. A quick demo in
tex, mp and widgets: 

% output=pdftex

\setuppapersize[S6][S6] 
\setupbodyfont[pos]
\setuplayout[width=middle,height=middle]
\setuptexttexts[\helpdata] 
\setupframedtexts[helptext][background=myframe]
\setupcolors[state=start]
\setupinteraction[state=start]
\setupbuttons[frame=off,background=myframe]

\defineoverlay[myframe][\uniqueMPgraphic{myframe}]

\startuniqueMPgraphic{myframe}
  path p ; p := unitsquare 
    xyscaled(\overlaywidth,\overlayheight) superellipsed .90 ;
  fill p withcolor .85yellow ; 
  draw p withpen pencircle scaled 2pt withcolor .85red ; 
\stopuniqueMPgraphic 

\starttext 

\starthelptext[test]
  Now, how many hidden features do you think that are present
  in \ConTeXt ? Actually this one is not that hidden, since 
  it's used in the flow chart module. This undocumented 
  feature is implemented in \type {core-hlp.tex}.
\stophelptext 

\input tufte 

\setpagehelpdata{test}

\setupfootertexts
  [{\button{show help}[JS(Vide_Fields{help:test})]\quad
    \button{hide all that help}[JS(Hide_Fields)]}]

\stoptext 

[-- Attachment #2: help.zip --]
[-- Type: application/zip, Size: 6046 bytes --]

[-- Attachment #3: Type: text/plain, Size: 370 bytes --]

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------

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

* Re: PDF "dirty" trick
  2000-09-14  9:47 ` Hans Hagen
@ 2000-09-14 19:50   ` Giuseppe Bilotta (Oblomov)
  2000-09-15  7:51     ` Hans Hagen
  2000-09-17 15:54     ` Giuseppe Bilotta
  0 siblings, 2 replies; 9+ messages in thread
From: Giuseppe Bilotta (Oblomov) @ 2000-09-14 19:50 UTC (permalink / raw)


That's _exactly_ what I wanted (even too much :-)). It also explains why I
didn't manage to do it with "normal" pdfTeX commands ---it required
JavaScript.

Now for a harder one: pop-up window reacting when the mouse passes over a
certain point (no need to click)? I've seen in the PDF tech ref it is
possible, and know the PDF implementation. What about ConTeXt?

Hans Hagen wrote:
> At 10:36 PM 9/13/00 +0200, Giuseppe Bilotta (Oblomov) wrote:
> >Hello,
> >
> >what I would like to obtain:
> >
> >in a PDF "interactive" document, I would like to have a pop-up window
> >containing some typeset material (sort of a "minipage" in a pop-up
window).
> >
> >how did i try to do it:
> >
> >I managed to create pop-up notes, but they can only contain "normal
text",
> >they are resizable by the user, etc.
> >
> >I managed to create xforms, but I can only place them in the document,
not
> >in a pop-up environment.
> >
> >Is it possible to obtain what I want? If yes, can somebody give me some
> >clue?
>
> This kind of problems is easy to solve on the one hand, since the
> functionality is already there, but not always easy to use, since you need
> to sync with the otr (output routine). But you're lucky. A quick demo in
> tex, mp and widgets:
>
> % output=pdftex
>
> \setuppapersize[S6][S6]
> \setupbodyfont[pos]
> \setuplayout[width=middle,height=middle]
> \setuptexttexts[\helpdata]
> \setupframedtexts[helptext][background=myframe]
> \setupcolors[state=start]
> \setupinteraction[state=start]
> \setupbuttons[frame=off,background=myframe]
>
> \defineoverlay[myframe][\uniqueMPgraphic{myframe}]
>
> \startuniqueMPgraphic{myframe}
>   path p ; p := unitsquare
>     xyscaled(\overlaywidth,\overlayheight) superellipsed .90 ;
>   fill p withcolor .85yellow ;
>   draw p withpen pencircle scaled 2pt withcolor .85red ;
> \stopuniqueMPgraphic
>
>
> \starttext
>
> \starthelptext[test]
>   Now, how many hidden features do you think that are present
>   in \ConTeXt ? Actually this one is not that hidden, since
>   it's used in the flow chart module. This undocumented
>   feature is implemented in \type {core-hlp.tex}.
> \stophelptext
>
> \input tufte
>
> \setpagehelpdata{test}
>
> \setupfootertexts
>   [{\button{show help}[JS(Vide_Fields{help:test})]\quad
>     \button{hide all that help}[JS(Hide_Fields)]}]
>
> \stoptext
>


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

* Re: PDF "dirty" trick
  2000-09-14 19:50   ` Giuseppe Bilotta (Oblomov)
@ 2000-09-15  7:51     ` Hans Hagen
  2000-09-15 17:58       ` Giuseppe Bilotta (Oblomov)
  2000-09-17 15:54     ` Giuseppe Bilotta
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2000-09-15  7:51 UTC (permalink / raw)
  Cc: ConTeXt

At 09:50 PM 9/14/00 +0200, Giuseppe Bilotta (Oblomov) wrote:
>That's _exactly_ what I wanted (even too much :-)). It also explains why I
>didn't manage to do it with "normal" pdfTeX commands ---it required
>JavaScript.
>
>Now for a harder one: pop-up window reacting when the mouse passes over a
>certain point (no need to click)? I've seen in the PDF tech ref it is
>possible, and know the PDF implementation. What about ConTeXt?

\tooltip {Newby} {I suggest you take a look at up-to-date 1998 issue 001.} 

So, this is already pretty old functionality. 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Re: PDF "dirty" trick
  2000-09-15  7:51     ` Hans Hagen
@ 2000-09-15 17:58       ` Giuseppe Bilotta (Oblomov)
  0 siblings, 0 replies; 9+ messages in thread
From: Giuseppe Bilotta (Oblomov) @ 2000-09-15 17:58 UTC (permalink / raw)


My fault. Didn't get enough of the "beta" stuff which is not really that
"beta".

Guess I have to download all that beta and updates, uh?

----- Original Message -----
From: Hans Hagen <pragma@wxs.nl>
To: Giuseppe Bilotta (Oblomov) <oblomov@freemail.it>
Cc: ConTeXt <ntg-context@ntg.nl>
Sent: Friday, September 15, 2000 9:51 AM
Subject: Re: PDF "dirty" trick

> At 09:50 PM 9/14/00 +0200, Giuseppe Bilotta (Oblomov) wrote:
> >That's _exactly_ what I wanted (even too much :-)). It also explains why
I
> >didn't manage to do it with "normal" pdfTeX commands ---it required
> >JavaScript.
> >
> >Now for a harder one: pop-up window reacting when the mouse passes over a
> >certain point (no need to click)? I've seen in the PDF tech ref it is
> >possible, and know the PDF implementation. What about ConTeXt?
>
> \tooltip {Newby} {I suggest you take a look at up-to-date 1998 issue 001.}
>
> So, this is already pretty old functionality.
>
>
> Hans
> -------------------------------------------------------------------------
>                                                   Hans Hagen | PRAGMA ADE
>                       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
> -------------------------------------------------------------------------
>
>


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

* Re: PDF "dirty" trick
  2000-09-14 19:50   ` Giuseppe Bilotta (Oblomov)
  2000-09-15  7:51     ` Hans Hagen
@ 2000-09-17 15:54     ` Giuseppe Bilotta
  2000-09-17 21:53       ` Hans Hagen
  1 sibling, 1 reply; 9+ messages in thread
From: Giuseppe Bilotta @ 2000-09-17 15:54 UTC (permalink / raw)


> That's _exactly_ what I wanted (even too much :-)).

Overrule :-)

I did some experimenting (help text that toggle, etc), and there is
something more that I want now.

Precisely, I'd like something like the comments as they are dealt with in
WordPerfect for Windows: in page view, the presence of a comment is
displayed as a little ballon in the margin. If you click on it, a balloon
with the comment text is displayed; the "foot" of the ballon points to the
place where the comment is inserted, and the balloon itself is put where
there is enough space on screen.

(Let's just assume that no more than one comment are available per line)

Giuseppe Bilotta


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

* Re: PDF "dirty" trick
  2000-09-17 15:54     ` Giuseppe Bilotta
@ 2000-09-17 21:53       ` Hans Hagen
  2000-09-18 14:31         ` Giuseppe Bilotta
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2000-09-17 21:53 UTC (permalink / raw)
  Cc: ConTeXt

At 05:54 PM 9/17/00 +0200, Giuseppe Bilotta wrote:
>
>> That's _exactly_ what I wanted (even too much :-)).
>
>Overrule :-)
>
>I did some experimenting (help text that toggle, etc), and there is
>something more that I want now.

You're greedy -) 

>Precisely, I'd like something like the comments as they are dealt with in
>WordPerfect for Windows: in page view, the presence of a comment is
>displayed as a little ballon in the margin. If you click on it, a balloon
>with the comment text is displayed; the "foot" of the ballon points to the
>place where the comment is inserted, and the balloon itself is put where
>there is enough space on screen.

I'm not sure if balloons are available in all viewers. 

\startcomment
  hello beautiful\\world
\stopcommentaar

\startcomment[hello]
  hello \<< \'e\'erste \>>
  beautiful
  world
\stopcomment

\startcomment[hallo][color=green,width=4cm,height=3cm]
  hello \<< \'e\'erste \>>
  beautiful
  world
\stopcomment

\startcomment[hello][color=green,width=4cm,height=3cm]
  hello \<< \'e\'erste \>>

  beautiful

  world
\stopcomment

\startcomment[symbol=Balloon]
  Do we want this kind of rubish? And, why isn't this and
  some more features related to text annotations so poorly
  (actually not) documented? Anyhow, by providing this
  functionality we demonstrate that \pdfTeX\ can do it. By
  the way, it's funny that when in Acrobat we scale up the
  text, the symbols scale down.
\stopcomment

>(Let's just assume that no more than one comment are available per line)

Why. They now stack in the margin, unless you use the \comment alternative
inline. Isn't this in the up to date document? I should check -) 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

* Re: PDF "dirty" trick
  2000-09-17 21:53       ` Hans Hagen
@ 2000-09-18 14:31         ` Giuseppe Bilotta
  2000-09-19  7:31           ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Giuseppe Bilotta @ 2000-09-18 14:31 UTC (permalink / raw)


> At 05:54 PM 9/17/00 +0200, Giuseppe Bilotta wrote:
> >
> >> That's _exactly_ what I wanted (even too much :-)).
> >
> >Overrule :-)
> >
> >I did some experimenting (help text that toggle, etc), and there is
> >something more that I want now.
>
> You're greedy -)
>

Oh yes I am :-)

> >Precisely, I'd like something like the comments as they are dealt with in
> >WordPerfect for Windows: in page view, the presence of a comment is
> >displayed as a little ballon in the margin. If you click on it, a balloon
> >with the comment text is displayed; the "foot" of the ballon points to
the
> >place where the comment is inserted, and the balloon itself is put where
> >there is enough space on screen.
>
> I'm not sure if balloons are available in all viewers.

Doesn't matter. The _shape_ is not important.

>
> \startcomment
>   hello beautiful\\world
> \stopcommentaar
>
> \startcomment[hello]
>   hello \<< \'e\'erste \>>
>   beautiful
>   world
> \stopcomment
>
> \startcomment[hallo][color=green,width=4cm,height=3cm]
>   hello \<< \'e\'erste \>>
>   beautiful
>   world
> \stopcomment
>
> \startcomment[hello][color=green,width=4cm,height=3cm]
>   hello \<< \'e\'erste \>>
>
>   beautiful
>
>   world
> \stopcomment
>
> \startcomment[symbol=Balloon]
>   Do we want this kind of rubish? And, why isn't this and
>   some more features related to text annotations so poorly
>   (actually not) documented? Anyhow, by providing this
>   functionality we demonstrate that \pdfTeX\ can do it. By
>   the way, it's funny that when in Acrobat we scale up the
>   text, the symbols scale down.
> \stopcomment
>

*sigh*

No, this is not what I wanted. I mean, this is the first thing I tried (with
pdfLaTeX, btw). But you cannot get "strangely" typeset material in this
comments. You see, I'd need something like the solution you sent me in the
help.zip file, combined with this.

What I currently do is preparing an \pdfxform with the material I want to
put in this pop-up whatever (balloon, boxes ... we'll think about the shape
later -)). Then I discovered I could not put the xform in a note (comment in
ConTeXt). Your "help" solution is more or less what I want to obtain, but it
still lacks some "features":

1) I couldn't make it work inline: only in the footer.

2) I managed to turn the "show" button in a "toggle" button. But this way,
the "hide all that help" button doesn't work (it only hides shown helps,
doesn't toggle off toggled on helps).

3) if I understood correctly, it appears in a fixed place in the document,
while I would like it to appear in the visible part of the document (thus,
if the line the note referst to is at the bottom of the _screen_ [not page],
the note should appear above; if the line is at the top, the note should
appear below).

Any ideas?

Giuseppe Bilotta


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

* Re: PDF "dirty" trick
  2000-09-18 14:31         ` Giuseppe Bilotta
@ 2000-09-19  7:31           ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2000-09-19  7:31 UTC (permalink / raw)
  Cc: ConTeXt

At 04:31 PM 9/18/00 +0200, Giuseppe Bilotta wrote:

>1) I couldn't make it work inline: only in the footer.
>
>2) I managed to turn the "show" button in a "toggle" button. But this way,
>the "hide all that help" button doesn't work (it only hides shown helps,
>doesn't toggle off toggled on helps).
>
>3) if I understood correctly, it appears in a fixed place in the document,
>while I would like it to appear in the visible part of the document (thus,
>if the line the note referst to is at the bottom of the _screen_ [not page],
>the note should appear above; if the line is at the top, the note should
>appear below).

I have no time now to write it, but this is how you should proceed: 

(1) put the text in a symbol
(2) define a check field 
(3) use the symbol as on value
(4) turn on/off the check field

Technically what you want is not complicated, not even the top/bottom part,
the main thing being housekeeping. I may write it anyway, maybe later this
week i can look into it. Remind me.  

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


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

end of thread, other threads:[~2000-09-19  7:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-13 20:36 PDF "dirty" trick Giuseppe Bilotta (Oblomov)
2000-09-14  9:47 ` Hans Hagen
2000-09-14 19:50   ` Giuseppe Bilotta (Oblomov)
2000-09-15  7:51     ` Hans Hagen
2000-09-15 17:58       ` Giuseppe Bilotta (Oblomov)
2000-09-17 15:54     ` Giuseppe Bilotta
2000-09-17 21:53       ` Hans Hagen
2000-09-18 14:31         ` Giuseppe Bilotta
2000-09-19  7:31           ` Hans Hagen

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