Stefan Wachter wrote:

Hi all!

The \note[xxx] command is used to reference a previously defined footnote. Is it possible that the previously defined footnote is repeated if a page break had occured between the \footnote[xxx]{bla bla bla} and the corresponding \note[xxx] command?

it's incredible what kin dof wishes users can come up with -)

\def\myfootnote[#1]#2% let's guess that #2 is without catcode problems {\setxvalue{note:#1}{\footnote{#2}}\footnote[note:a:#1]{#2}}

\def\mynote[#1]%
 {\removeunwantedspaces
  \pagereference[note:b:#1]%
  \doifreferencefoundelse{note:a:#1}
    {\edef\NotePageA{\number\currentrealreference}%
     \doifreferencefoundelse{note:b:#1}
       {\edef\NotePageB{\number\currentrealreference}%
        \ifnum\NotePageA<\NotePageB\relax
          \getvalue{note:#1}%
        \else
          \note[note:a:#1]%
        \fi}
       {\note[note:a:#1]}}
    {\note[note:a:#1]}}

\starttext

test \myfootnote[funny]{first occurence} test\mynote[funny]
test \myfootnote[again]{first occurence} \page test \mynote[again]

\stoptext

hardly tested

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.com
                                            | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to