* Can \note repeat its footnote?
@ 2004-06-17 13:01 Stefan Wachter
2004-06-18 17:23 ` Peter Münster
2004-06-21 17:45 ` Hans Hagen
0 siblings, 2 replies; 6+ messages in thread
From: Stefan Wachter @ 2004-06-17 13:01 UTC (permalink / raw)
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?
Thanks for your attention,
--Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Can \note repeat its footnote?
2004-06-17 13:01 Can \note repeat its footnote? Stefan Wachter
@ 2004-06-18 17:23 ` Peter Münster
2004-06-21 17:45 ` Hans Hagen
1 sibling, 0 replies; 6+ messages in thread
From: Peter Münster @ 2004-06-18 17:23 UTC (permalink / raw)
On Thu, 17 Jun 2004, Stefan Wachter wrote:
> 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?
I've tried to build a macro based on \ifnum\currentpage=\at[xxx] (or
similar), but without success. In LaTeX I've used something like this:
\ifthenelse{\thepage=\pageref{LastPage}}
Perhaps, there is something similar in ConTeXt?
Cheers, Peter
--
http://pmrb.free.fr/contact/
_____________________________________
FilmSearch engine: http://f-s.sf.net/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Can \note repeat its footnote?
2004-06-17 13:01 Can \note repeat its footnote? Stefan Wachter
2004-06-18 17:23 ` Peter Münster
@ 2004-06-21 17:45 ` Hans Hagen
2004-06-23 14:00 ` Stefan Wachter
1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2004-06-21 17:45 UTC (permalink / raw)
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Can \note repeat its footnote?
2004-06-21 17:45 ` Hans Hagen
@ 2004-06-23 14:00 ` Stefan Wachter
2004-06-25 17:25 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Wachter @ 2004-06-23 14:00 UTC (permalink / raw)
Hi Hans,
thanks for your reply. Unfortunately your solution does not work
correctly. The following example produces one footnote at the first page
but no footnote on the second page.
\starttext
funny\myfootnote[funny]{funny} funny\mynote[funny]
\page
funny\mynote[funny] funny\mynote[funny]
\stoptext
--Stefan
PS: Would it be possible to use the same footnote mark again when a
footnote is repeated?
Hans Hagen wrote:
> 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
> -----------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Can \note repeat its footnote?
2004-06-23 14:00 ` Stefan Wachter
@ 2004-06-25 17:25 ` Hans Hagen
2004-06-30 16:02 ` Stefan Wachter
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2004-06-25 17:25 UTC (permalink / raw)
Stefan Wachter wrote:
> Hi Hans,
>
> thanks for your reply. Unfortunately your solution does not work
> correctly. The following example produces one footnote at the first
> page but no footnote on the second page.
>
> \starttext
>
> funny\myfootnote[funny]{funny} funny\mynote[funny]
> \page
> funny\mynote[funny] funny\mynote[funny]
>
> \stoptext
>
> --Stefan
>
> PS: Would it be possible to use the same footnote mark again when a
> footnote is repeated?
sure but this needs some thought (for instance clashing numbers/symbols)
\def\myfootnote[#1]#2% let's guess that #2 is without catcode problems
{\setgvalue{note:t:#1}%
{\setxvalue{note:l:#1}{\getvalue{note:n:#1}}%
\footnote[note:a:#1:\getvalue{note:l:#1}]{#2}}%
\setgvalue{note:n:#1}%
{1}%
\getvalue{note:t:#1}}%
\def\mynote[#1]%
{\removeunwantedspaces
\scratchcounter\getvalue{note:n:#1}\relax
\edef\NoteNumber{\the\scratchcounter}%
\doglobal\incrementvalue{note:n:#1}\relax
\doifreferencefoundelse{note:a:#1:1}
{\edef\NotePageA{\number\currentrealreference}%
\doifreferencefoundelse{note:a:#1:\getvalue{note:n:#1}}
{\edef\NotePageB{\number\currentrealreference}%
\doifreferencefoundelse{note:a:#1:\NoteNumber}
{\ifnum\currentrealreference=\NotePageB\relax
\pagereference[note:a:#1:\getvalue{note:n:#1}]%
\note[note:a:#1:\getvalue{note:l:#1}]%
\else\ifnum\NotePageA=\NotePageB\relax
\pagereference[note:a:#1:\getvalue{note:n:#1}]%
\note[note:a:#1:\getvalue{note:l:#1}]%
\else
\getvalue{note:t:#1}%
\fi\fi}
{\ifnum\NotePageA=\NotePageB\relax
\pagereference[note:a:#1:\getvalue{note:n:#1}]%
\note[note:a:#1:\getvalue{note:l:#1}]%
\else
\getvalue{note:t:#1}%
\fi}}
{\pagereference[note:a:#1:\getvalue{note:n:#1}]%
\note[note:a:#1:\getvalue{note:l:#1}]}}
{\pagereference[note:a:#1:\getvalue{note:n:#1}]%
\note[note:a:#1:\getvalue{note:l:#1}]}}
\starttext
% test \myfootnote[funny]{first occurence} test\mynote[funny]
% test \myfootnote[again]{first occurence} \page test \mynote[again]
funny \myfootnote[funny]{funny} funny \mynote[funny] \page
funny \mynote[funny] funny \mynote[funny] funny \mynote[funny] \page
funny \mynote[funny] funny \mynote[funny] \page
funny \mynote[funny] funny \mynote[funny] funny \mynote[funny] \page
\stoptext
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Can \note repeat its footnote?
2004-06-25 17:25 ` Hans Hagen
@ 2004-06-30 16:02 ` Stefan Wachter
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Wachter @ 2004-06-30 16:02 UTC (permalink / raw)
Hi Hans,
many thanks for your help. Now it works. Great!
I try to come along without having the same footnote marker for repeated
footnotes. (This would make sense only if footnotes are sequentially
numbered over a whole document.)
Thanks again,
--Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-30 16:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17 13:01 Can \note repeat its footnote? Stefan Wachter
2004-06-18 17:23 ` Peter Münster
2004-06-21 17:45 ` Hans Hagen
2004-06-23 14:00 ` Stefan Wachter
2004-06-25 17:25 ` Hans Hagen
2004-06-30 16:02 ` Stefan Wachter
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).