ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Reference + footnote = bug
@ 2002-12-16 21:33 Giuseppe Bilotta
  2002-12-16 22:50 ` Otared Kavian
  2002-12-17  9:18 ` Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Giuseppe Bilotta @ 2002-12-16 21:33 UTC (permalink / raw)


... and a rather odd bug, too!

\setupinteraction[state=start]

\starttext
Some text \goto{text with footnote\footnote{here it is} showing
the bug}[hook]
\page[yes]
Some text \reference[hook] referenced from before.
\stoptext

See how the word "footnote" is superscripted ... it's an odd bug
indeed, and it almost seems the footnote can detect the previous
word ...

-- 
Giuseppe "Oblomov" Bilotta

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

* Re: Reference + footnote = bug
  2002-12-16 21:33 Reference + footnote = bug Giuseppe Bilotta
@ 2002-12-16 22:50 ` Otared Kavian
  2002-12-17  9:00   ` Hans Hagen
  2002-12-17 10:00   ` Re[2]: " Giuseppe Bilotta
  2002-12-17  9:18 ` Hans Hagen
  1 sibling, 2 replies; 10+ messages in thread
From: Otared Kavian @ 2002-12-16 22:50 UTC (permalink / raw)



On lundi, déc 16, 2002, at 22:33 Europe/Paris, Giuseppe Bilotta wrote:

> ... and a rather odd bug, too!
>
> \setupinteraction[state=start]
>
> \starttext
> Some text \goto{text with footnote\footnote{here it is} showing
> the bug}[hook]
> \page[yes]
> Some text \reference[hook] referenced from before.
> \stoptext
>

Also it seems that instead of
\reference[hook] referenced...
one has to put
\reference[hook]{} referenced...
                ^^^^
since otherwise in the resulting typeset "referenced..." becomes 
"eferenced...".
Is this the normal use of the command "\reference[xxx]" ?

Otared Kavian

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

* Re: Reference + footnote = bug
  2002-12-16 22:50 ` Otared Kavian
@ 2002-12-17  9:00   ` Hans Hagen
  2002-12-17 10:00   ` Re[2]: " Giuseppe Bilotta
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2002-12-17  9:00 UTC (permalink / raw)


At 11:50 PM 12/16/2002 +0100, you wrote:

>On lundi, déc 16, 2002, at 22:33 Europe/Paris, Giuseppe Bilotta wrote:
>
>>... and a rather odd bug, too!
>>
>>\setupinteraction[state=start]
>>
>>\starttext
>>Some text \goto{text with footnote\footnote{here it is} showing
>>the bug}[hook]
>>\page[yes]
>>Some text \reference[hook] referenced from before.
>>\stoptext

this has to do with the text passed to goto being submitted to quite 
rigourous manipulations; footnotes are inserts and inserts, like marks and 
other funny nodes often spoil things, so here the solution is it to carry 
over the footnote:

\def\donaar#1[#2]%
   {\dontleavehmode
    \bgroup
    \postponefootnotes
    \doifreferencefoundelse{#2}
      {\doifelsenothing{#1}
         {\dosymbolreference{}{}[#2]}
         {\donaarspace{#1}[#2]}}
      {\unknownreference{#2}#1\relax}% \relax catches lookahead
    \egroup
    \referentieinfo{<}{#2}}

You can put this in the file "cont-new.tex" and see if it solves the problem


>Also it seems that instead of
>\reference[hook] referenced...
>one has to put
>\reference[hook]{} referenced...
>                ^^^^
>since otherwise in the resulting typeset "referenced..." becomes 
>"eferenced...".
>Is this the normal use of the command "\reference[xxx]" ?

indeed, if you want to refer to something, you use \in {something} [ref] or 
\at {somepage} [there] and alike; \reference just creates one, taking an 
argument which is to show up as reference:

%D There are three ways of defining a reference:
%D
%D \pagereference[here]
%D \textreference[here]{some text}
%D
%D the third alternative combines them in:
%D
%D \reference[here]{some text}

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: Reference + footnote = bug
  2002-12-16 21:33 Reference + footnote = bug Giuseppe Bilotta
  2002-12-16 22:50 ` Otared Kavian
@ 2002-12-17  9:18 ` Hans Hagen
  2002-12-17 10:15   ` Re[2]: " Giuseppe Bilotta
  2002-12-17 11:07   ` Giuseppe Bilotta
  1 sibling, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2002-12-17  9:18 UTC (permalink / raw)


At 10:33 PM 12/16/2002 +0100, you wrote:
>... and a rather odd bug, too!
>
>\setupinteraction[state=start]
>
>\starttext
>Some text \goto{text with footnote\footnote{here it is} showing
>the bug}[hook]
>\page[yes]
>Some text \reference[hook] referenced from before.
>\stoptext
>
>See how the word "footnote" is superscripted ... it's an odd bug
>indeed, and it almost seems the footnote can detect the previous
>word ...

actually, it kind of does, in case of:

   word \footnote

the footnote will be attached to 'word' and

   word \footnote {} \footnote {}

is also handled (some spacing between both notes, since 1 2 looks better 
than 12); there's lots of those hidden things in context

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re[2]: Reference + footnote = bug
  2002-12-16 22:50 ` Otared Kavian
  2002-12-17  9:00   ` Hans Hagen
@ 2002-12-17 10:00   ` Giuseppe Bilotta
  1 sibling, 0 replies; 10+ messages in thread
From: Giuseppe Bilotta @ 2002-12-17 10:00 UTC (permalink / raw)


Monday, December 16, 2002 Otared Kavian wrote:


OK> On lundi, déc 16, 2002, at 22:33 Europe/Paris, Giuseppe Bilotta wrote:

>> ... and a rather odd bug, too!
>>
>> \setupinteraction[state=start]
>>
>> \starttext
>> Some text \goto{text with footnote\footnote{here it is} showing
>> the bug}[hook]
>> \page[yes]
>> Some text \reference[hook] referenced from before.
>> \stoptext
>>

OK> Also it seems that instead of
OK> \reference[hook] referenced...
OK> one has to put
OK> \reference[hook]{} referenced...
OK>                 ^^^^
OK> since otherwise in the resulting typeset "referenced..." becomes 
OK> "eferenced...".
OK> Is this the normal use of the command "\reference[xxx]" ?

Uh, yes, that was an overlook on my part --use \pagereference
instead of \reference if you don't want to attach a text in the
reference. The bug is with the \footnote within the \ref. I
*think* it might be because the \footnote becomes a reference
itself, and it seems that ConTeXt doesn't deal well with refs
within refs ...

-- 
Giuseppe "Oblomov" Bilotta

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

* Re[2]: Reference + footnote = bug
  2002-12-17  9:18 ` Hans Hagen
@ 2002-12-17 10:15   ` Giuseppe Bilotta
  2002-12-17 11:07   ` Giuseppe Bilotta
  1 sibling, 0 replies; 10+ messages in thread
From: Giuseppe Bilotta @ 2002-12-17 10:15 UTC (permalink / raw)


Tuesday, December 17, 2002 Hans Hagen wrote:

HH> actually, it kind of does, in case of:

HH>    word \footnote

HH> the footnote will be attached to 'word' and

HH>    word \footnote {} \footnote {}

HH> is also handled (some spacing between both notes, since 1 2 looks better 
HH> than 12); there's lots of those hidden things in context

I have to investigate this. Get ready for something cool coming in
from me ;)

-- 
Giuseppe "Oblomov" Bilotta

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

* Re[2]: Reference + footnote = bug
  2002-12-17  9:18 ` Hans Hagen
  2002-12-17 10:15   ` Re[2]: " Giuseppe Bilotta
@ 2002-12-17 11:07   ` Giuseppe Bilotta
  2002-12-17 14:09     ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Giuseppe Bilotta @ 2002-12-17 11:07 UTC (permalink / raw)


Tuesday, December 17, 2002 Hans Hagen wrote:

>>See how the word "footnote" is superscripted ... it's an odd bug
>>indeed, and it almost seems the footnote can detect the previous
>>word ...

HH> actually, it kind of does, in case of:

HH>    word \footnote

HH> the footnote will be attached to 'word' and

HH>    word \footnote {} \footnote {}

HH> is also handled (some spacing between both notes, since 1 2 looks better 
HH> than 12); there's lots of those hidden things in context

Ok, I give up: is there some way to do extra manipulation on the
previous word? (like, making it a reference, or something)

-- 
Giuseppe "Oblomov" Bilotta

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

* Re[2]: Reference + footnote = bug
  2002-12-17 11:07   ` Giuseppe Bilotta
@ 2002-12-17 14:09     ` Hans Hagen
  2002-12-17 14:19       ` Re[3]: " Giuseppe Bilotta
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2002-12-17 14:09 UTC (permalink / raw)


At 12:07 PM 12/17/2002 +0100, you wrote:
>Tuesday, December 17, 2002 Hans Hagen wrote:
>
> >>See how the word "footnote" is superscripted ... it's an odd bug
> >>indeed, and it almost seems the footnote can detect the previous
> >>word ...
>
>HH> actually, it kind of does, in case of:
>
>HH>    word \footnote
>
>HH> the footnote will be attached to 'word' and
>
>HH>    word \footnote {} \footnote {}
>
>HH> is also handled (some spacing between both notes, since 1 2 looks better
>HH> than 12); there's lots of those hidden things in context
>
>Ok, I give up: is there some way to do extra manipulation on the
>previous word? (like, making it a reference, or something)

Can you be more explicit on what you want to achieve?

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re[3]: Reference + footnote = bug
  2002-12-17 14:09     ` Hans Hagen
@ 2002-12-17 14:19       ` Giuseppe Bilotta
  2002-12-17 15:53         ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Giuseppe Bilotta @ 2002-12-17 14:19 UTC (permalink / raw)


Tuesday, December 17, 2002 Hans Hagen wrote:

>>Ok, I give up: is there some way to do extra manipulation on the
>>previous word? (like, making it a reference, or something)

HH> Can you be more explicit on what you want to achieve?
Consider:

This word\footnote{with a footnote} has a footnote

Now, when producing DVIs, the foonote number (hyer)linked to the
footnote would suffice. When creating PDFs I would prefer the
footnote to be turned into a tooltip (this I already did) and the
word to be turned into the active area, i.e. a result similar to
\tooltip{footnote}{with a footnote}.

I can do this by defining a command \xfootnote{word}{with a
footnote} that gives either of the two results in each case, but
it would be nice if it was possible without changing the sources.

-- 
Giuseppe "Oblomov" Bilotta

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

* Re[3]: Reference + footnote = bug
  2002-12-17 14:19       ` Re[3]: " Giuseppe Bilotta
@ 2002-12-17 15:53         ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2002-12-17 15:53 UTC (permalink / raw)


At 03:19 PM 12/17/2002 +0100, you wrote:
>Tuesday, December 17, 2002 Hans Hagen wrote:
>
> >>Ok, I give up: is there some way to do extra manipulation on the
> >>previous word? (like, making it a reference, or something)
>
>HH> Can you be more explicit on what you want to achieve?
>Consider:
>
>This word\footnote{with a footnote} has a footnote
>
>Now, when producing DVIs, the foonote number (hyer)linked to the
>footnote would suffice. When creating PDFs I would prefer the
>footnote to be turned into a tooltip (this I already did) and the
>word to be turned into the active area, i.e. a result similar to
>\tooltip{footnote}{with a footnote}.

it is still on my agenda to make something generic for that

>I can do this by defining a command \xfootnote{word}{with a
>footnote} that gives either of the two results in each case, but
>it would be nice if it was possible without changing the sources.

the problem (well not that big a problem since it's seldom needed) is that 
one cannot look back into the input stream over the word; so indeed 
something with multiple args is needed, although clicking on some symbols 
is ok too

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

end of thread, other threads:[~2002-12-17 15:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-16 21:33 Reference + footnote = bug Giuseppe Bilotta
2002-12-16 22:50 ` Otared Kavian
2002-12-17  9:00   ` Hans Hagen
2002-12-17 10:00   ` Re[2]: " Giuseppe Bilotta
2002-12-17  9:18 ` Hans Hagen
2002-12-17 10:15   ` Re[2]: " Giuseppe Bilotta
2002-12-17 11:07   ` Giuseppe Bilotta
2002-12-17 14:09     ` Hans Hagen
2002-12-17 14:19       ` Re[3]: " Giuseppe Bilotta
2002-12-17 15:53         ` 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).