ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* hyperlinks in PDF
@ 2004-02-21 13:21 Alan Bowen
  2004-02-22 23:06 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Bowen @ 2004-02-21 13:21 UTC (permalink / raw)


Using the \setupinteraction and \useURL commands, I can  now generate 
active blue email links my PDFs—which is very cool. The downside is 
that my footnote numbers (both in the text and below) are now blue too.

I can go two ways with this. One way would be to set the footnote links 
to toggle between the footnote call in the text and the footnote 
itself. The other would be to prevent ConTeXt from treating the 
footnote numbers as links. I have no idea about how to do either and 
would be grateful for suggestions for either strategy, though my 
preference would be for the first (assuming that it is possible).

As it is now, clicking on the footnote call in the text changes the 
magnification so that the whole page fits on the screen, which is not 
all that desirable under the present circumstances.

Alan

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

* Re: hyperlinks in PDF
  2004-02-21 13:21 hyperlinks in PDF Alan Bowen
@ 2004-02-22 23:06 ` Hans Hagen
  2004-02-24 17:28   ` Alan Bowen
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2004-02-22 23:06 UTC (permalink / raw)


At 14:21 21/02/2004, you wrote:
>Using the \setupinteraction and \useURL commands, I can  now generate 
>active blue email links my PDFs—which is very cool. The downside is that 
>my footnote numbers (both in the text and below) are now blue too.
>
>I can go two ways with this. One way would be to set the footnote links to 
>toggle between the footnote call in the text and the footnote itself. The 
>other would be to prevent ConTeXt from treating the footnote numbers as 
>links. I have no idea about how to do either and would be grateful for 
>suggestions for either strategy, though my preference would be for the 
>first (assuming that it is possible).
>
>As it is now, clicking on the footnote call in the text changes the 
>magnification so that the whole page fits on the screen, which is not all 
>that desirable under the present circumstances.

since i'm in the middle of implementing some new nice interactive trickery 
i cannot upload a new version now, so you have to patch:

% in cont-new.tex: (asumes a recent version with multiple footnote types 
support)

\unprotect

\def\dostartnote% nog gobble als in pagebody
   {\bgroup
    \settrue\processingnote
   %\restorecatcodes % to be tested first
    \ifinregels % otherwise problems with \type <crlf> {xxx}
      \ignorelines % makes footnotes work in \startlines ... \stoplines
    \fi
    \ifnotesymbol
      \dolastnotesymbol
    \else
      \unskip\unskip
      \globallet\lastnotesymbol\dolastnotesymbol
    \fi
    \ignorespaces
    \localnoteinsert\currentnoteins\bgroup
      \penalty\notepenalty
      \forgetall
      \setnotebodyfont
      \redoconvertfont % to undo \undo calls in in headings etc
      \splittopskip\strutht  % not actually needed here
      \splitmaxdepth\strutdp % not actually needed here
      \iffixedlayoutdimensions % ugly hack, will change
        \linkermargeafstand\noteparameter\c!margeafstand
        \rechtermargeafstand\linkermargeafstand
      \else
        \def\linkermargeafstand{\noteparameter\c!margeafstand}%
        \let\rechtermargeafstand\linkermargeafstand
      \fi
      \ifcase\noteparameter\c!n\relax % new 31-07-99 ; always ?
        \doifnotinset{\noteparameter\c!breedte}{\v!passend,\v!ruim}\setnotehsize
      \fi
      \startpushnote
        {\ifx\lastnotenumber\empty \else
           \preparethenumber{\??vn\currentnote}\lastnotenumber\preparednumber
           \doifelse{\noteparameter\c!interactie}\v!nee
             {\noteparameter\c!nummercommando
                {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}}%
             {\naarbox{\noteparameter\c!commando % was \c!nummercommando, 
but compatible
                {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}}%
                [\s!fnt:f:\internalfootreference]}%
         \fi
         \doifelse{\noteparameter\c!interactie}\v!nee
           {\ifconditional\pagewisenotes
              \rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}%
            \fi}}%
           {\rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}}%
      \bgroup
      \postponenotes
      \aftergroup\dostopnote
      \begstrut
      \let\next}

\def\dolastnotesymbol
   {\unskip\unskip
    \ifdim\lastkern=\notesignal
      \dodonotesymbol{\kern\noteparameter\c!afstand}% gets the font right, 
hack !
    \fi
    \nobreak
    \doifelse{\noteparameter\c!interactie}\v!nee
      {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}%
       \ifconditional\pagewisenotes
         \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}%
       \fi}
      {\naarbox
         {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}%
         [\s!fnt:t:\internalfootreference]%
       \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}}%
    \globallet\lastnotesymbol\relax}

\protect

% test file

\setupinteraction[state=start]

\setupcolors[state=start]

\setupfootnotes[interaction=no] % new

\starttext

test \footnote {test}

\stoptext

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

* Re: hyperlinks in PDF
  2004-02-22 23:06 ` Hans Hagen
@ 2004-02-24 17:28   ` Alan Bowen
  2004-02-24 17:41     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Bowen @ 2004-02-24 17:28 UTC (permalink / raw)


Hans—

This is wonderful. I installed ConTeXt beta (to ensure support for  
multiple footnote types) and used the patch. Problem solved! The  
footnote numbers are showing/behaving properly. So we are now just  
about ready to go online.

Many thanks.

Alan

PS: What version number will ConTeXt have when there is no need for the  
patch? A.



On Feb 22, 2004, at 6:06 PM, Hans Hagen wrote:

> At 14:21 21/02/2004, you wrote:
>> Using the \setupinteraction and \useURL commands, I can  now generate  
>> active blue email links my PDFs—which is very cool. The downside is  
>> that my footnote numbers (both in the text and below) are now blue  
>> too.
>>
>> I can go two ways with this. One way would be to set the footnote  
>> links to toggle between the footnote call in the text and the  
>> footnote itself. The other would be to prevent ConTeXt from treating  
>> the footnote numbers as links. I have no idea about how to do either  
>> and would be grateful for suggestions for either strategy, though my  
>> preference would be for the first (assuming that it is possible).
>>
>> As it is now, clicking on the footnote call in the text changes the  
>> magnification so that the whole page fits on the screen, which is not  
>> all that desirable under the present circumstances.
>
> since i'm in the middle of implementing some new nice interactive  
> trickery i cannot upload a new version now, so you have to patch:
>
> % in cont-new.tex: (asumes a recent version with multiple footnote  
> types support)
>
> \unprotect
>
> \def\dostartnote% nog gobble als in pagebody
>   {\bgroup
>    \settrue\processingnote
>   %\restorecatcodes % to be tested first
>    \ifinregels % otherwise problems with \type <crlf> {xxx}
>      \ignorelines % makes footnotes work in \startlines ... \stoplines
>    \fi
>    \ifnotesymbol
>      \dolastnotesymbol
>    \else
>      \unskip\unskip
>      \globallet\lastnotesymbol\dolastnotesymbol
>    \fi
>    \ignorespaces
>    \localnoteinsert\currentnoteins\bgroup
>      \penalty\notepenalty
>      \forgetall
>      \setnotebodyfont
>      \redoconvertfont % to undo \undo calls in in headings etc
>      \splittopskip\strutht  % not actually needed here
>      \splitmaxdepth\strutdp % not actually needed here
>      \iffixedlayoutdimensions % ugly hack, will change
>        \linkermargeafstand\noteparameter\c!margeafstand
>        \rechtermargeafstand\linkermargeafstand
>      \else
>        \def\linkermargeafstand{\noteparameter\c!margeafstand}%
>        \let\rechtermargeafstand\linkermargeafstand
>      \fi
>      \ifcase\noteparameter\c!n\relax % new 31-07-99 ; always ?
>         
> \doifnotinset{\noteparameter\c!breedte}{\v!passend,\v! 
> ruim}\setnotehsize
>      \fi
>      \startpushnote
>        {\ifx\lastnotenumber\empty \else
>            
> \preparethenumber{\??vn\currentnote}\lastnotenumber\preparednumber
>           \doifelse{\noteparameter\c!interactie}\v!nee
>             {\noteparameter\c!nummercommando
>                 
> {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}}%
>             {\naarbox{\noteparameter\c!commando % was  
> \c!nummercommando, but compatible
>                 
> {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}}%
>                [\s!fnt:f:\internalfootreference]}%
>         \fi
>         \doifelse{\noteparameter\c!interactie}\v!nee
>           {\ifconditional\pagewisenotes
>              \rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}%
>            \fi}}%
>           {\rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}}%
>      \bgroup
>      \postponenotes
>      \aftergroup\dostopnote
>      \begstrut
>      \let\next}
>
> \def\dolastnotesymbol
>   {\unskip\unskip
>    \ifdim\lastkern=\notesignal
>      \dodonotesymbol{\kern\noteparameter\c!afstand}% gets the font  
> right, hack !
>    \fi
>    \nobreak
>    \doifelse{\noteparameter\c!interactie}\v!nee
>       
> {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v! 
> volgendepagina}%
>       \ifconditional\pagewisenotes
>         \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}%
>       \fi}
>      {\naarbox
>          
> {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v! 
> volgendepagina}}%
>         [\s!fnt:t:\internalfootreference]%
>       \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}}%
>    \globallet\lastnotesymbol\relax}
>
> \protect
>
> % test file
>
> \setupinteraction[state=start]
>
> \setupcolors[state=start]
>
> \setupfootnotes[interaction=no] % new
>
> \starttext
>
> test \footnote {test}
>
> \stoptext
>
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

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

* Re: hyperlinks in PDF
  2004-02-24 17:28   ` Alan Bowen
@ 2004-02-24 17:41     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2004-02-24 17:41 UTC (permalink / raw)


At 18:28 24/02/2004, you wrote:

>PS: What version number will ConTeXt have when there is no need for the
>patch? A.

you can download the latest (i synced the site yesterday)

Hans  

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

end of thread, other threads:[~2004-02-24 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-21 13:21 hyperlinks in PDF Alan Bowen
2004-02-22 23:06 ` Hans Hagen
2004-02-24 17:28   ` Alan Bowen
2004-02-24 17:41     ` 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).