The immediate problem you face is that the URL widget
has the position:
inline
where it should be:
inline relative amru2popup
With the plain inline that you have, you are effectively requesting:
inline relative amru1
where amu1 is the outermost widget, rather than than the
next widget up in the nesting, which here is amru2popup.
Now you could argue that latex::widget should be smart enough to keep
track of the inner parent, but I'm afraid that was an oversight
when I constructed the machinery, or at least it was too difficult
for me to program in TeX. Note that pdflatex does not allow widgets
to be nested and the way that latex::widget achieves the nesting
is quite horrific in terms of the hoops it has to jump through.
I also note that your script is misusing the macros:
\amrBeginWidgets
\amrEndWidgets
These macros are not intended to be nested. They were
intended to be used as a one-off around a set of widgets
so that no footprint would be left on TeX's current page.
Given the way the macros work, I'm not really sure
what happens when they are nested.
On balance, I can't help but feel that your approach
to building Popup notes is becoming cumbersome and
fraught with hidden dangers. I know that I put you
on this path a number of years ago, but that was
to meet a particular need you had at the time
and I would argue that you've now outgrown the approach.
If I were programming your slides, I would
make direct use of AMRITA's tree structure
in conjunction with fold::markup.
James
The orginal fold::markup is described at:
http://www.amrita-ebook.org/doc/fold::markup
it has evolved a bit since the document was written.
The essential idea, however, is that fold::markup
provides a high-level wrapper to latex::widget
for annotating a document. Here you can view your
talk as annotating a blank document. When I get
a moment I'll ship you an example that shows
how it can be used to produce the example you sent me.
James
>
> Ralph
>
With the attached mailit, which modified the procedure lib/url.amr,
I got the previous example to work.
Then I added a second AddPoint with a url and I get
amrpdf warning: duplicated widget amru2url!
and it doesn't work.
This can be seen by running
amrita -sys second urltoggle
I then fixed this by adding directive to url handler
id &latex::wid(id)
This can be seen by running
amrita -sys second -sys id urltoggle
But I thought without directive id that latex::widget would
assign new id, so I don't see why it is needed ?
Also, in lib/PopupBox.amr there is extra pair
\amrBeginWidgets
\amrEndWidgets
But without this misuse, there are extraneous blank lines in the popup box
before and after the url.
Am I doing something else wrong ?
Ralph
On Tue, 4 Nov 2008, Ralph Menikoff wrote:
> James,
>
> With the attached mailit, which modified the procedure lib/url.amr,
> I got the previous example to work.
> Then I added a second AddPoint with a url and I get
> amrpdf warning: duplicated widget amru2url!
> and it doesn't work.
This indicates that two widgets have the same id
which PDF does not allow.
> This can be seen by running
> amrita -sys second urltoggle
> I then fixed this by adding directive to url handler
> id &latex::wid(id)
You would be better to use:
wid -> token
> This can be seen by running
> amrita -sys second -sys id urltoggle
> But I thought without directive id that latex::widget would
> assign new id, so I don't see why it is needed ?
It does, but there's a chicken-and-egg glitch that
I haven't sorted out yet.
> Also, in lib/PopupBox.amr there is extra pair
> \amrBeginWidgets
> \amrEndWidgets
> But without this misuse, there are extraneous blank lines in the popup box
> before and after the url.
> Am I doing something else wrong ?
Yes. But I would need to go through the generated TeX output
to determine exactly what it is. I'll take a look this evening
and get back to you.
James
>
> Ralph
>
>
> >
>