ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Why don't footnotes appear in floats or figures?
       [not found] <283000316.1075436.1713746718305.ref@mail.yahoo.com>
@ 2024-04-22  0:45 ` Joel via ntg-context
  2024-04-22  5:54   ` [NTG-context] " Pablo Rodriguez via ntg-context
  2024-04-22  8:28   ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 7+ messages in thread
From: Joel via ntg-context @ 2024-04-22  0:45 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 1702 bytes --]

I'm three days out from sending my work to an editor, and found some serious problem: many footnotes just aren't rendering.

I have a history text that uses ConTeXt-SBL for the citations, as such, it has lots of footnotes. Sometimes the footnotes are just in the main text, but sometimes also in figure captions, inside floats, inside tables that are inside floats, inside tabulations inside floats, etc.
What I find alarming is it is frequently not rendering all of the footnote messages at the bottom of the page. The actual footnote number within the body is rendered, but no number is listed in at the bottom of the page. So I might see a list of footnotes, for instance, on page 1, I only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.

---------------1 message2 message3 message5 message6 message

After a lot of trial-and-error and checking logs and checking my BibTeX files for errors, running everything through BibTex Tidy, etc., and failures to make a minimum working example, I found a single pattern:
If the footnote marker appears on the SAME page as the footnote text, it has no problem rendering the footnote. But, if ConTeXt decides to move a float a page or two later on--as it frequently seems to do---such that the footnote marker and footnote text at bottom of page should be on DIFFERENT pages, the footnote message at the bottom of the page won't render.
I've seen some 2+ year old mailing list posts suggesting ConTeXt might have issues with footnotes; they appear to be similar to my issue--is that still a problem? Is there a fix or workaround? Old fixes I could finding in the mailing list don't seem to work with current versions of ConTeXt anymore.
--Joel

[-- Attachment #1.2: Type: text/html, Size: 2719 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Why don't footnotes appear in floats or figures?
  2024-04-22  0:45 ` [NTG-context] Why don't footnotes appear in floats or figures? Joel via ntg-context
@ 2024-04-22  5:54   ` Pablo Rodriguez via ntg-context
  2024-04-22  8:28   ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-04-22  5:54 UTC (permalink / raw)
  To: Joel via ntg-context; +Cc: Pablo Rodriguez

On 4/22/24 02:45, Joel via ntg-context wrote:
> I'm three days out from sending my work to an editor, and found some
> serious problem: many footnotes just aren't rendering.

Joel,

please provide a minimal sample, otherwise it is really hard to help.

> I've seen some 2+ year old mailing list posts suggesting ConTeXt might
> have issues with footnotes; they appear to be similar to my issue--is
> that still a problem? Is there a fix or workaround? Old fixes I could
> finding in the mailing list don't seem to work with current versions of
> ConTeXt anymore.

\postponenotes and \flushnotes might be an option.

\setlocalfootnotes and \placelocalfootnotes might be another option.

Just in case it might help,

Pablo



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Why don't footnotes appear in floats or figures?
  2024-04-22  0:45 ` [NTG-context] Why don't footnotes appear in floats or figures? Joel via ntg-context
  2024-04-22  5:54   ` [NTG-context] " Pablo Rodriguez via ntg-context
@ 2024-04-22  8:28   ` Hans Hagen via ntg-context
  2024-04-22 12:38     ` Joel via ntg-context
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen via ntg-context @ 2024-04-22  8:28 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 4/22/2024 2:45 AM, Joel via ntg-context wrote:
> I'm three days out from sending my work to an editor, and found some 
> serious problem: many footnotes just aren't rendering.
> 
> I have a history text that uses ConTeXt-SBL for the citations, as such, 
> it has lots of footnotes. Sometimes the footnotes are just in the main 
> text, but sometimes also in figure captions, inside floats, inside 
> tables that are inside floats, inside tabulations inside floats, etc.
> 
> What I find alarming is it is frequently not rendering all of the 
> footnote messages at the bottom of the page. The actual footnote number 
> within the body is rendered, but no number is listed in at the bottom of 
> the page. So I might see a list of footnotes, for instance, on page 1, I 
> only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.
> 
> 
> ---------------
> 1 message
> 2 message
> 3 message
> 5 message
> 6 message
> 
> After a lot of trial-and-error and checking logs and checking my BibTeX 
> files for errors, running everything through BibTex Tidy, etc., and 
> failures to make a minimum working example, I found a single pattern:
> 
> If the footnote marker appears on the SAME page as the footnote text, it 
> has no problem rendering the footnote. But, if ConTeXt decides to move a 
> float a page or two later on--as it frequently seems to do---such that 
> the footnote marker and footnote text at bottom of page should be on 
> DIFFERENT pages, the footnote message at the bottom of the page won't 
> render.
> 
> I've seen some 2+ year old mailing list posts suggesting ConTeXt might 
> have issues with footnotes; they appear to be similar to my issue--is 
> that still a problem? Is there a fix or workaround? Old fixes I could 
> finding in the mailing list don't seem to work with current versions of 
> ConTeXt anymore.
you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)
- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
     \startplacefigure[location=here,title={test \footnote{oeps 1}}]
         \blackrule[width=1tw]
         here
         \footnote{hello 1} and
         \footnote{hello 2} and
         \footnote{hello 3} done
     \stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).

I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Why don't footnotes appear in floats or figures?
  2024-04-22  8:28   ` Hans Hagen via ntg-context
@ 2024-04-22 12:38     ` Joel via ntg-context
  2024-04-22 13:20       ` vm via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Joel via ntg-context @ 2024-04-22 12:38 UTC (permalink / raw)
  To: ntg-context; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 5841 bytes --]

 I've managed to get a minimum working example. If you check, you'll see the 5th footnote inside a placefigure doesn't render anywhere:
\starttext

    \input knuth
    \placefigure{Caption\footnote{message A}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message B}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message C}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message D}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message E}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message F}}{\externalfigure[cow][width=\textwidth]}

\stoptext


Is this the correct way to be using the \startpostponing code (see example below)?
\starttext
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message A}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message B}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message C}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message D}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message E}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message F}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoptext




    On Monday, April 22, 2024 at 02:31:30 AM MDT, Hans Hagen via ntg-context <ntg-context@ntg.nl> wrote:  
 
 On 4/22/2024 2:45 AM, Joel via ntg-context wrote:
> I'm three days out from sending my work to an editor, and found some 
> serious problem: many footnotes just aren't rendering.
> 
> I have a history text that uses ConTeXt-SBL for the citations, as such, 
> it has lots of footnotes. Sometimes the footnotes are just in the main 
> text, but sometimes also in figure captions, inside floats, inside 
> tables that are inside floats, inside tabulations inside floats, etc.
> 
> What I find alarming is it is frequently not rendering all of the 
> footnote messages at the bottom of the page. The actual footnote number 
> within the body is rendered, but no number is listed in at the bottom of 
> the page. So I might see a list of footnotes, for instance, on page 1, I 
> only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.
> 
> 
> ---------------
> 1 message
> 2 message
> 3 message
> 5 message
> 6 message
> 
> After a lot of trial-and-error and checking logs and checking my BibTeX 
> files for errors, running everything through BibTex Tidy, etc., and 
> failures to make a minimum working example, I found a single pattern:
> 
> If the footnote marker appears on the SAME page as the footnote text, it 
> has no problem rendering the footnote. But, if ConTeXt decides to move a 
> float a page or two later on--as it frequently seems to do---such that 
> the footnote marker and footnote text at bottom of page should be on 
> DIFFERENT pages, the footnote message at the bottom of the page won't 
> render.
> 
> I've seen some 2+ year old mailing list posts suggesting ConTeXt might 
> have issues with footnotes; they appear to be similar to my issue--is 
> that still a problem? Is there a fix or workaround? Old fixes I could 
> finding in the mailing list don't seem to work with current versions of 
> ConTeXt anymore.
you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)
- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
    \startplacefigure[location=here,title={test \footnote{oeps 1}}]
        \blackrule[width=1tw]
        here
        \footnote{hello 1} and
        \footnote{hello 2} and
        \footnote{hello 3} done
    \stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).

I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem




-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki    : https://wiki.contextgarden.net
___________________________________________________________________________________
  

[-- Attachment #1.2: Type: text/html, Size: 9518 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Why don't footnotes appear in floats or figures?
  2024-04-22 12:38     ` Joel via ntg-context
@ 2024-04-22 13:20       ` vm via ntg-context
  2024-04-24  0:15         ` Joel via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: vm via ntg-context @ 2024-04-22 13:20 UTC (permalink / raw)
  To: ntg-context; +Cc: vm



On 22/04/2024 14:38, Joel via ntg-context wrote:
> Is this the correct way to be using the \startpostponing code (see 
> example below)?
> 
> \starttext
>      \input knuth
> \startpostponing
>      \placefigure{Caption\footnote{message 
> A}}{\externalfigure[cow][width=\textwidth]}
> \stoppostponing
> \stoppostponing



double stop ?

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Why don't footnotes appear in floats or figures?
  2024-04-22 13:20       ` vm via ntg-context
@ 2024-04-24  0:15         ` Joel via ntg-context
  2024-04-24 16:04           ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Joel via ntg-context @ 2024-04-24  0:15 UTC (permalink / raw)
  To: ntg-context; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 2157 bytes --]

 Okay, I've been trying many things with this \startpostponing code--if I understand what's happening, its moving the figures to a later page. I'm not sure that's quite ideal, its not fully working with my actual documents, and leaves lots of empty white space, when I'm already in a situation where I need to reduce page count.
So I thought an alternative route:
(1) have a code that checks "what is current footnote number?" that sets that as a variable
\def\currentfoodnote{\somevariableincontextthatgetsfoodnotenumber}
(2) adjust my placefigure macro such that the footnote is outside the placefigure, but color it white so its invisible:
\define\showafigure{

\cite[author2019]<--somehow hide this invisible
 \placefigure{Caption\superscript{\currentfootnote}}}{\externalfigure[cow][width=\textwidth]} <--this places a superscript number inside the caption, but it isn't the true marker(3) in the caption, place a superscript number with value to \currentfootnoteIts basically a fake footnote, just a superscript number of the same value as the real footnote.


Shouldn't this result work? Any idea how I can get current footnote value?
--Joel

   On Monday, April 22, 2024 at 07:22:24 AM MDT, vm via ntg-context <ntg-context@ntg.nl> wrote:  
 
 

On 22/04/2024 14:38, Joel via ntg-context wrote:
> Is this the correct way to be using the \startpostponing code (see 
> example below)?
> 
> \starttext
>      \input knuth
> \startpostponing
>      \placefigure{Caption\footnote{message 
> A}}{\externalfigure[cow][width=\textwidth]}
> \stoppostponing
> \stoppostponing



double stop ?

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki    : https://wiki.contextgarden.net
___________________________________________________________________________________
  

[-- Attachment #1.2: Type: text/html, Size: 4865 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Why don't footnotes appear in floats or figures?
  2024-04-24  0:15         ` Joel via ntg-context
@ 2024-04-24 16:04           ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-04-24 16:04 UTC (permalink / raw)
  To: Joel via ntg-context; +Cc: Pablo Rodriguez


On 4/24/24 02:15, Joel via ntg-context wrote:
> [...] Any idea how I can get current footnote value?

Hi Joel,

current footnote value can be accessed with \rawcountervalue[footnote],
such as in:

  \starttext
  \dorecurse{25}
    {\ \footnote{Footnote \recurselevel}:
     \rawcountervalue[footnote]\par}
  \stoptext

Just in case it helps,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-04-24 16:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <283000316.1075436.1713746718305.ref@mail.yahoo.com>
2024-04-22  0:45 ` [NTG-context] Why don't footnotes appear in floats or figures? Joel via ntg-context
2024-04-22  5:54   ` [NTG-context] " Pablo Rodriguez via ntg-context
2024-04-22  8:28   ` Hans Hagen via ntg-context
2024-04-22 12:38     ` Joel via ntg-context
2024-04-22 13:20       ` vm via ntg-context
2024-04-24  0:15         ` Joel via ntg-context
2024-04-24 16:04           ` Pablo Rodriguez via ntg-context

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