ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Stefan Wachter <stefan.wachter@gmx.de>
Subject: Re: Can \note repeat its footnote?
Date: Wed, 23 Jun 2004 16:00:29 +0200	[thread overview]
Message-ID: <40D98CFD.5080308@gmx.de> (raw)
In-Reply-To: <40D71ECF.8040501@wxs.nl>

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
> -----------------------------------------------------------------

  reply	other threads:[~2004-06-23 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-17 13:01 Stefan Wachter
2004-06-18 17:23 ` Peter Münster
2004-06-21 17:45 ` Hans Hagen
2004-06-23 14:00   ` Stefan Wachter [this message]
2004-06-25 17:25     ` Hans Hagen
2004-06-30 16:02       ` Stefan Wachter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40D98CFD.5080308@gmx.de \
    --to=stefan.wachter@gmx.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).