ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Footnote lost
@ 2007-01-09 11:57 Mike Bird
  2007-01-10  9:06 ` Taco Hoekwater
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Bird @ 2007-01-09 11:57 UTC (permalink / raw)


In this example, the first footnote number appears correctly
in the body of the page but the first footnote is never placed
in the footer.  The second footnote is handled correctly.
Therefore the first footnote is not merely deferred but lost.

\starttext
\setupquotation[right={''\footnote{First}}]
\startquotation
Loses footnote.
\stopquotation

\setupquotation[right={''}]
\quotation{OK}\footnote{Second}
\stoptext


--Mike Bird

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

* Re: Footnote lost
  2007-01-09 11:57 Footnote lost Mike Bird
@ 2007-01-10  9:06 ` Taco Hoekwater
  2007-01-10 16:28   ` Mike Bird
  0 siblings, 1 reply; 8+ messages in thread
From: Taco Hoekwater @ 2007-01-10  9:06 UTC (permalink / raw)



Hi Mike,

Can you look through the list archive a bit? There was a
thread begin december last year about the exact same topic.

  http://archive.contextgarden.net/

Best, Taco

Mike Bird wrote:
> In this example, the first footnote number appears correctly
> in the body of the page but the first footnote is never placed
> in the footer.  The second footnote is handled correctly.
> Therefore the first footnote is not merely deferred but lost.
> 
> \starttext
> \setupquotation[right={''\footnote{First}}]
> \startquotation
> Loses footnote.
> \stopquotation
> 
> \setupquotation[right={''}]
> \quotation{OK}\footnote{Second}
> \stoptext
> 
> 
> --Mike Bird
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: Footnote lost
  2007-01-10  9:06 ` Taco Hoekwater
@ 2007-01-10 16:28   ` Mike Bird
  2007-01-10 17:09     ` Aditya Mahajan
  2007-01-11  9:51     ` Taco Hoekwater
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Bird @ 2007-01-10 16:28 UTC (permalink / raw)


On Wednesday 10 January 2007 01:06, Taco Hoekwater wrote:
> Can you look through the list archive a bit? There was a
> thread begin december last year about the exact same topic.

Hi Taco,

I assume you're referring to this thread:
http://archive.contextgarden.net/thread/20061206.202611.e8722446.en.html

However that was a more complicated test case because it involved
the bib module and cite.  Also it referred to problems with
footnotes in vertical mode whereas the new test case includes
the footnote in setupdelimitedtext/right where it appears to be in
horizontal mode.  In fact the new test case is similar to the
workaround actually suggested in:
http://archive.contextgarden.net/message/20061203.141335.f50b33ff.en.html

Changing just \MyMagic in the suggested workaround to avoid \cite gives:
  \definedelimitedtext
    [myquotation]
    [left={\symbol[leftquotation]},
     right={\symbol[rightquotation]\MyMagic},
     leftmargin=standard]
  \long\def\startcitedquotation[#1]#2\stopcitedquotation
    {\bgroup
     \def\MyMagic{~\footnote{#1}}
     \startmyquotation #2\stopmyquotation
     \egroup}
  \starttext
  \startcitedquotation[schmitz2006]
  overly beautiful pusillanimous sesquipedalian longwinded
  \stopcitedquotation
  \stoptext

- which also loses the footnote.

The thread included another possible workaround at:
http://archive.contextgarden.net/message/20061204.095032.227c83ef.en.html
- but that lost all the power of setupdelimitedtext.

Therefore I suggest that my simple test case is still worthy of
consideration:
  \starttext
  \setupquotation[right={''\footnote{First}}]
  \startquotation
  Loses footnote.
  \stopquotation

  \setupquotation[right={''}]
  \quotation{OK}\footnote{Second}
  \stoptext

For those who need footnoted or cited quotations, another workaround
is to \setupquotation[location=text].  This retains the power of
\setupdelimitedtext without running into the bug which I suspect lies
in or near \dostopdelimitedtexpar.  You may have to fiddle with \par
and/or \nospace to get the layout exactly as desired.

--Mike Bird

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

* Re: Footnote lost
  2007-01-10 16:28   ` Mike Bird
@ 2007-01-10 17:09     ` Aditya Mahajan
  2007-01-11  9:51     ` Taco Hoekwater
  1 sibling, 0 replies; 8+ messages in thread
From: Aditya Mahajan @ 2007-01-10 17:09 UTC (permalink / raw)


On Wed, 10 Jan 2007, Mike Bird wrote:

> On Wednesday 10 January 2007 01:06, Taco Hoekwater wrote:
> > Can you look through the list archive a bit? There was a
> > thread begin december last year about the exact same topic.
> 
> The thread included another possible workaround at:
> http://archive.contextgarden.net/message/20061204.095032.227c83ef.en.html
> - but that lost all the power of setupdelimitedtext.

Can you explain which features of setupdelimitedtext you want. Maybe 
they can be implemented by copying things to setupnarrower.

%----------------------8<---------------------------------

\def\startfootnotequotation
   {\dosingleempty\dostartfootnotequotation}

\long\def\dostartfootnotequotation[#1]#2#3\stopfootnotequotation
        {\bgroup \par
         \startnarrower
           \symbol[leftquotation]%
           #3\removeunwantedspaces
           \symbol[rightquotation]%
           \footnote[#1]{#2}
         \stopnarrower
       \par \egroup}

\startfootnotequotation[ref]{First Footnote}
   \input knuth
\stopfootnotequotation

Knuth said (see \in footnote[ref])

%-------------------------8<---------------------------




Aditya

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

* Re: Footnote lost
  2007-01-10 16:28   ` Mike Bird
  2007-01-10 17:09     ` Aditya Mahajan
@ 2007-01-11  9:51     ` Taco Hoekwater
  2007-01-11 17:49       ` Mike Bird
  1 sibling, 1 reply; 8+ messages in thread
From: Taco Hoekwater @ 2007-01-11  9:51 UTC (permalink / raw)



Hi Mike,

Mike Bird wrote:
> 
> However that was a more complicated test case because it involved
> the bib module and cite.  Also it referred to problems with
> footnotes in vertical mode whereas the new test case includes
> the footnote in setupdelimitedtext/right where it appears to be in
> horizontal mode.  In fact the new test case is similar to the
> workaround actually suggested in:
> http://archive.contextgarden.net/message/20061203.141335.f50b33ff.en.html

Meanwhile, I have created:

https://foundry.supelec.fr/tracker/index.php?func=detail&aid=63&group_id=21&atid=164

Feel free to add extra wishes there, if needed.

Best,
Taco

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

* Re: Footnote lost
  2007-01-11  9:51     ` Taco Hoekwater
@ 2007-01-11 17:49       ` Mike Bird
  2007-01-11 21:54         ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Bird @ 2007-01-11 17:49 UTC (permalink / raw)


Hi Taco,

On Thursday 11 January 2007 01:51, Taco Hoekwater wrote:
> https://foundry.supelec.fr/tracker/index.php?func=detail&aid=63&group_id=21
>&atid=164

That page says:

> \setupquotation[right={''\footnote{First}}]
>
> is not usable because it gets fed into \symbol[]

Material is passed through \symbol BEFORE assigning to right:

  \definedelimitedtext
    [\v!quotation]
    [\c!left={\symbol[\c!leftquotation]},
     \c!right={\symbol[\c!rightquotation]},
     \c!leftmargin=\v!standard]

If right is subsequently passed through \symbol again, I haven't been able
to find where it is done.

--Mike Bird

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

* Re: Footnote lost
  2007-01-11 17:49       ` Mike Bird
@ 2007-01-11 21:54         ` Aditya Mahajan
  2007-01-12  9:21           ` Mike Bird
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2007-01-11 21:54 UTC (permalink / raw)


On Thu, 11 Jan 2007, Mike Bird wrote:

> Hi Taco,
> 
> On Thursday 11 January 2007 01:51, Taco Hoekwater wrote:
> > https://foundry.supelec.fr/tracker/index.php?func=detail&aid=63&group_id=21
> >&atid=164
> 
> That page says:
> 
> > \setupquotation[right={''\footnote{First}}]
> >
> > is not usable because it gets fed into \symbol[]
> 
> Material is passed through \symbol BEFORE assigning to right:
>
>   \definedelimitedtext
>     [\v!quotation]
>     [\c!left={\symbol[\c!leftquotation]},
>      \c!right={\symbol[\c!rightquotation]},
>      \c!leftmargin=\v!standard]
> 
> If right is subsequently passed through \symbol again, I haven't been able
> to find where it is done.

How about?

\unprotect

\def\rightdelimitedtextmark
   {\delimitedtextparameter\c!right}
% was  {\hsmash{\delimitedtextparameter\c!right}}

\protect

\starttext

\setupquotation[right={''\footnote{First}}]

\startquotation
  Loses footnote.
  \stopquotation

  \setupquotation[right={''}]
  \quotation{OK}\footnote{Second}

\stoptext

I do not know why the right delimited is hsmased. Maybe to prevent 
line breaks?

Aditya

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

* Re: Footnote lost
  2007-01-11 21:54         ` Aditya Mahajan
@ 2007-01-12  9:21           ` Mike Bird
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Bird @ 2007-01-12  9:21 UTC (permalink / raw)


On Thursday 11 January 2007 13:54, Aditya Mahajan wrote:
> How about?
>
> \unprotect
> \def\rightdelimitedtextmark
>    {\delimitedtextparameter\c!right}
> \protect

Hi Aditya,

I've run with your patch for a while.  It fixes the missing
footnote problem and I haven't noticed it causing any new
problems.

While you're on a winning streak, perhaps you'd like to look
at another problem in the same area?  When \quotation is used
instead of \startquotation a footnote number is skipped:

\starttext
\setupquotation[right={''\footnote{First}}]
\quotation{Skips footnote number.}
\stoptext

This happens with or without your \rightdelimitedtextmark
patch.

Thanks,

--Mike Bird

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

end of thread, other threads:[~2007-01-12  9:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-09 11:57 Footnote lost Mike Bird
2007-01-10  9:06 ` Taco Hoekwater
2007-01-10 16:28   ` Mike Bird
2007-01-10 17:09     ` Aditya Mahajan
2007-01-11  9:51     ` Taco Hoekwater
2007-01-11 17:49       ` Mike Bird
2007-01-11 21:54         ` Aditya Mahajan
2007-01-12  9:21           ` Mike Bird

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