Re: [NTG-context] \setuplist only for bodypart

2022-06-16 Thread Henning Hraban Ramm via ntg-context

Am 16.06.22 um 21:19 schrieb Pablo Rodriguez via ntg-context:


   \startsectionblockenvironment[bodypart]
 ...
   \stopsectionblockenvironment


This should work according to documentation.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \setuplist only for bodypart

2022-06-16 Thread Pablo Rodriguez via ntg-context
Dear list,

sorry for the very basic question, but I cannot find the way to do it.

Imagine I have the following command:

\setuplist
[chapter]
[alternative=d]

But I only want for sectionblock bodypart (nof for frontpart, backpart
or the appendices).

I have enclosed in:

  \startsectionblockenvironment[bodypart]
...
  \stopsectionblockenvironment

I have also tried:

\setuplist
[bodypart:chapter]
[alternative=d]

But nothing changed.

Which is the right way to do it?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] local footnotes and captions

2022-06-16 Thread Henning Hraban Ramm via ntg-context
If I combine the examples from the different threads (see attachment) – 
local and postponed footnotes – the local footnotes get repeated in 
global scope after the postponing.


Hraban

footnote-local.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Foonotes in Captions ... again

2022-06-16 Thread Henning Hraban Ramm via ntg-context

Am 16.06.22 um 13:09 schrieb Denis Maier via ntg-context:

Hmmm, I probably was to quick. Does not really work in my real document...

I'll try to solve the issue now by integrating the notes into the caption. 
Let's see if the authors accept it.

Anyway, maybe that would be a nice topic for the monthly context chat?


I agree – local, floating or postponed footnotes are an interesting topic.

In MkIV we needed \automigrateinserts, but that’s unnecessary and a noop 
in LMTX.


In my book still footnotes (esp. in table floats) go missing, and I need 
to find a MWE.


In your example, I get repeated footnotes in a strange order after the 
postponed notes.



Next online meetup is on July 13th. but maybe we can resolve everything 
before that date ;)


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from floatntg

2022-06-16 Thread Henning Hraban Ramm via ntg-context
It’s the same with footnotes in columns – they use the local width as 
default.


Hraban

Am 16.06.22 um 11:57 schrieb Denis Maier via ntg-context:

Yes, that works. But it’s still strange, isn’t it?

Denis

*Von:*ntg-context  *Im Auftrag von *jbf via 
ntg-context

*Gesendet:* Donnerstag, 16. Juni 2022 11:49
*An:* Denis Maier via ntg-context 
*Cc:* jbf ; mailing list for ConTeXt users 

*Betreff:* Re: [NTG-context] Footnotes in captions -> "inherit" 
textwidth from floatntg


Maybe \setupnote[footnote][width=\textwidth]?

Julian

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
I'm not quite I understand:
Are you saying I should leave the caption in "global scope"?

Regarding the second version: Shouldn't that be:
\startlocalfootnotes
\footnotetext[asdf]{asdf} % this
%\footnotetext[asdf]{\footnote{asdf}} % instead of this
\startplacetable[title={A breakfast table.\note[asdf]}]
 \placelegend
 {\starttable[|l|r|]
 \HL
 \VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
 \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
\VL\LR
 \HL
 \stoptable}
 {\placelocalfootnotes}
\stopplacetable
\stoplocalfootnotes

?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Donnerstag, 16. Juni 2022 14:13
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] local footnotes and captions
> 
> On 6/16/2022 12:43 PM, Denis Maier via ntg-context wrote:
> > Hi,
> >
> > another experiment with footnotes in captions, this time local footnotes :
> >
> > %%%
> >
> > \setupcaptions[location=top]
> >
> > \starttext
> >
> >      \startlocalfootnotes
> >
> >      \placetable
> >
> >      % The caption
> >
> >      {A breakfast table.\footnote{asdf}}
> >
> >      % the table
> >
> >      \placelegend
> >
> >      {\starttable[|l|r|]
> >
> >      \HL
> >
> >      \VL Spam \footnote {lovely} \VL Bacon \footnote
> > {wonderful} \VL\FR
> >
> >      \VL Eggs \footnote {wonderful} \VL Spam \footnote
> > {lovely} \VL\LR
> >
> >      \HL
> >
> >      \stoptable}
> >
> >      % the footnotes
> >
> >      {\placelocalfootnotes}
> >
> > \stoplocalfootnotes
> >
> > \stoptext
> >
> > %%%
> >
> > Two observations :
> >
> > 1. the footnote numbering is a bit odd, shouldn’t the footnote in the
> > caption be numbered with 1?
> >
> > 2. The footnote in the caption is not included in the local footnotes.
> > Why is that?
> \starttext
> 
> \startplacetable[title={A breakfast table.\footnote{asdf}}]
>  \startlocalfootnotes
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>  \HL
>  \stoptable}
>  {\placelocalfootnotes}
>  \stoplocalfootnotes
> \stopplacetable
> 
> \startlocalfootnotes
> \footnotetext[asdf]{\footnote{asdf}}
> \startplacetable[title={A breakfast table.\note[asdf]}]
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>  \HL
>  \stoptable}
>  {\placelocalfootnotes}
> \stopplacetable
> \stoplocalfootnotes
> 
> \stoptext
> 
> 
> -
>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 / http://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net archive  :
> https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> __
> _
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] local footnotes and captions

2022-06-16 Thread Hans Hagen via ntg-context

On 6/16/2022 12:43 PM, Denis Maier via ntg-context wrote:

Hi,

another experiment with footnotes in captions, this time local footnotes :

%%%

\setupcaptions[location=top]

\starttext

     \startlocalfootnotes

     \placetable

     % The caption

     {A breakfast table.\footnote{asdf}}

     % the table

     \placelegend

     {\starttable[|l|r|]

     \HL

     \VL Spam \footnote {lovely} \VL Bacon \footnote {wonderful} 
\VL\FR


     \VL Eggs \footnote {wonderful} \VL Spam \footnote {lovely} 
\VL\LR


     \HL

     \stoptable}

     % the footnotes

     {\placelocalfootnotes}

\stoplocalfootnotes

\stoptext

%%%

Two observations :

1. the footnote numbering is a bit odd, shouldn’t the footnote in the 
caption be numbered with 1?


2. The footnote in the caption is not included in the local footnotes. 
Why is that?

\starttext

\startplacetable[title={A breakfast table.\footnote{asdf}}]
\startlocalfootnotes
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
   \VL\LR

\HL
\stoptable}
{\placelocalfootnotes}
\stoplocalfootnotes
\stopplacetable

\startlocalfootnotes
\footnotetext[asdf]{\footnote{asdf}}
\startplacetable[title={A breakfast table.\note[asdf]}]
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
   \VL\LR

\HL
\stoptable}
{\placelocalfootnotes}
\stopplacetable
\stoplocalfootnotes

\stoptext


-
  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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Foonotes in Captions ... again

2022-06-16 Thread Denis Maier via ntg-context
Hmmm, I probably was to quick. Does not really work in my real document...

I'll try to solve the issue now by integrating the notes into the caption. 
Let's see if the authors accept it.

Anyway, maybe that would be a nice topic for the monthly context chat?

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Denis Maier
> via ntg-context
> Gesendet: Donnerstag, 16. Juni 2022 11:16
> An: mse...@telus.net; ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Foonotes in Captions ... again
> 
> Thanks, Max! That's very neat, and it indeed works in my use case.
> 
> Can anyone see any drawbacks here?
> 
> Best,
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: Max Chernoff 
> > Gesendet: Donnerstag, 16. Juni 2022 01:32
> > An: ntg-context@ntg.nl
> > Cc: Maier, Denis Christian (UB) 
> > Betreff: Re: [NTG-context] Foonotes in Captions ... again
> >
> > > What's the current state of affairs regarding footnotes in floats?
> > > Both
> > version in the example below don't quite work...
> > > (Ideally, the note should be on the page with the float and the
> > > caption, but the numbering should also be adjusted.)
> >
> > We can completely abuse a bunch of different ConTeXt features to
> > ensure that the footnote numbers are always in the page order.
> >
> >  % New Code
> >  \unprotect
> >
> >  \startluacode
> >  userdata.visual_order = 0
> >  userdata.input_order = 0
> >  userdata.save_data = job.passes.define("saved_footnotes")
> >  userdata.previous_data =
> > job.passes.getcollected("saved_footnotes")
> >
> >  interfaces.implement {
> >  name = "set_footnote_number",
> >  actions = function ()
> >  userdata.input_order = userdata.input_order + 1
> >
> >  local input_index = userdata.input_order
> >  local page_index =
> > userdata.previous_data[input_index]
> >
> >  if page_index then
> >  structures.counters.set("footnote", 1, page_index - 1)
> >  end
> >  end
> >  }
> >  \stopluacode
> >
> >  \def\save_footnote_data#1{%
> >  \latelua{
> >  userdata.visual_order = userdata.visual_order + 1
> >  userdata.save_data[#1] = userdata.visual_order
> >  }%
> >  }
> >
> >  \let\old_footnote=\footnote
> >
> >  \starttexdefinition protected footnote #1
> >  \begingroup
> >  \clf_set_footnote_number
> >
> >  \def\insert##1\bgroup##2\egroup{
> >  \normalexpanded{
> >  \noexpand\save_footnote_data
> >  {\cldcontext{userdata.input_order}}
> >  }
> >  \normalinsert##1{##2}
> >  }
> >
> >  \old_footnote{#1}
> >  \endgroup
> >  \stoptexdefinition
> >
> >  \protect
> >
> >  % Original Example
> >
> >  \starttext
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  \input ward
> >
> >  \startplacefigure[title={asdfasdf\footnote{test 1}}]
> >  \externalfigure[cow.pdf]
> >  \stopplacefigure
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  \startplacefigure[title={asdfasdf\footnote{test 2}}]
> >  \externalfigure[cow.pdf][height=10cm]
> >  \stopplacefigure
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >
> >  \page
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  \input ward
> >
> >  \startplacefigure[title={asdfasdf\footnote{test 1}}]
> >  \externalfigure[cow.pdf]
> >  \stopplacefigure
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  % (Can't use postponingnotes)
> >  % \startpostponingnotes
> >  \startplacefigure[title={asdfasdf\footnote{test 2}}]
> >  \externalfigure[cow.pdf][height=10cm]
> >  \stopplacefigure
> >  % \stoppostponingnotes
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >  \stoptext
> >
> > Here, we save a mapping between each footnote's index in the input and
> > its index in the output to the .tuc file. The code is definitely not
> > pretty, but works well enough for the sample file provided.
> >
> > -- Max
> __
> _
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net archive  :
> https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> __
> _
___
If your question is of interest to others as well, please 

[NTG-context] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
Hi,
another experiment with footnotes in captions, this time local footnotes :

%%%
\setupcaptions[location=top]
\starttext
\startlocalfootnotes
\placetable
% The caption
{A breakfast table.\footnote{asdf}}
% the table
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely} \VL Bacon \footnote {wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam \footnote {lovely} \VL\LR
\HL
\stoptable}
% the footnotes
{\placelocalfootnotes}
\stoplocalfootnotes
\stoptext
%%%

Two observations :
1. the footnote numbering is a bit odd, shouldn't the footnote in the caption 
be numbered with 1?
2. The footnote in the caption is not included in the local footnotes. Why is 
that?

Denis

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from floatntg

2022-06-16 Thread Denis Maier via ntg-context
Anyway, it’s possibly related to this question : 
https://www.mail-archive.com/ntg-context@ntg.nl/msg100815.html

Von: Maier, Denis Christian (UB)
Gesendet: Donnerstag, 16. Juni 2022 11:57
An: 'mailing list for ConTeXt users' 
Cc: jbf 
Betreff: AW: [NTG-context] Footnotes in captions -> "inherit" textwidth from 
floatntg

Yes, that works. But it’s still strange, isn’t it?

Denis

Von: ntg-context 
mailto:ntg-context-boun...@ntg.nl>> Im Auftrag von 
jbf via ntg-context
Gesendet: Donnerstag, 16. Juni 2022 11:49
An: Denis Maier via ntg-context mailto:ntg-context@ntg.nl>>
Cc: jbf mailto:roma83...@gmail.com>>; mailing list for 
ConTeXt users mailto:ntg-context@ntg.nl>>
Betreff: Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from 
floatntg


Maybe \setupnote[footnote][width=\textwidth]?

Julian
On 16/6/22 18:56, Denis Maier via ntg-context wrote:
Hi,
I think I’ve ran into a somewhat strange behaviour. If you have a footnote in a 
float caption, the footnote won’t use the full textwidth, but only the width of 
the corresponding caption. Is that on purpose, a context bug or a user bug?

Best,
Denis


\starttext

asdf

\startplacefigure[title={My caption with a long footnote.\footnote{\input 
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure

\stoptext


___

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



maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://context.aanhet.net

archive  : https://bitbucket.org/phg/context-mirror/commits/

wiki : http://contextgarden.net

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from floatntg

2022-06-16 Thread Denis Maier via ntg-context
Yes, that works. But it’s still strange, isn’t it?

Denis

Von: ntg-context  Im Auftrag von jbf via ntg-context
Gesendet: Donnerstag, 16. Juni 2022 11:49
An: Denis Maier via ntg-context 
Cc: jbf ; mailing list for ConTeXt users 

Betreff: Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from 
floatntg


Maybe \setupnote[footnote][width=\textwidth]?

Julian

On 16/6/22 18:56, Denis Maier via ntg-context wrote:
Hi,
I think I’ve ran into a somewhat strange behaviour. If you have a footnote in a 
float caption, the footnote won’t use the full textwidth, but only the width of 
the corresponding caption. Is that on purpose, a context bug or a user bug?

Best,
Denis


\starttext

asdf

\startplacefigure[title={My caption with a long footnote.\footnote{\input 
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure

\stoptext



___

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



maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://context.aanhet.net

archive  : https://bitbucket.org/phg/context-mirror/commits/

wiki : http://contextgarden.net

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from floatntg

2022-06-16 Thread jbf via ntg-context

Maybe \setupnote[footnote][width=\textwidth]?

Julian

On 16/6/22 18:56, Denis Maier via ntg-context wrote:


Hi,

I think I’ve ran into a somewhat strange behaviour. If you have a 
footnote in a float caption, the footnote won’t use the full 
textwidth, but only the width of the corresponding caption. Is that on 
purpose, a context bug or a user bug?


Best,

Denis

\starttext

asdf

\startplacefigure[title={My caption with a long 
footnote.\footnote{\input ward}}]


\externalfigure[cow.pdf]

\stopplacefigure

\stoptext


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

maillist :ntg-context@ntg.nl  /http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  :http://www.pragma-ade.nl  /http://context.aanhet.net
archive  :https://bitbucket.org/phg/context-mirror/commits/
wiki :http://contextgarden.net
__
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Foonotes in Captions ... again

2022-06-16 Thread Denis Maier via ntg-context
Thanks, Max! That's very neat, and it indeed works in my use case.

Can anyone see any drawbacks here?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Max Chernoff 
> Gesendet: Donnerstag, 16. Juni 2022 01:32
> An: ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Foonotes in Captions ... again
> 
> > What's the current state of affairs regarding footnotes in floats? Both
> version in the example below don't quite work...
> > (Ideally, the note should be on the page with the float and the
> > caption, but the numbering should also be adjusted.)
> 
> We can completely abuse a bunch of different ConTeXt features to ensure
> that the footnote numbers are always in the page order.
> 
>  % New Code
>  \unprotect
> 
>  \startluacode
>  userdata.visual_order = 0
>  userdata.input_order = 0
>  userdata.save_data = job.passes.define("saved_footnotes")
>  userdata.previous_data = job.passes.getcollected("saved_footnotes")
> 
>  interfaces.implement {
>  name = "set_footnote_number",
>  actions = function ()
>  userdata.input_order = userdata.input_order + 1
> 
>  local input_index = userdata.input_order
>  local page_index = userdata.previous_data[input_index]
> 
>  if page_index then
>  structures.counters.set("footnote", 1, page_index - 1)
>  end
>  end
>  }
>  \stopluacode
> 
>  \def\save_footnote_data#1{%
>  \latelua{
>  userdata.visual_order = userdata.visual_order + 1
>  userdata.save_data[#1] = userdata.visual_order
>  }%
>  }
> 
>  \let\old_footnote=\footnote
> 
>  \starttexdefinition protected footnote #1
>  \begingroup
>  \clf_set_footnote_number
> 
>  \def\insert##1\bgroup##2\egroup{
>  \normalexpanded{
>  \noexpand\save_footnote_data
>  {\cldcontext{userdata.input_order}}
>  }
>  \normalinsert##1{##2}
>  }
> 
>  \old_footnote{#1}
>  \endgroup
>  \stoptexdefinition
> 
>  \protect
> 
>  % Original Example
> 
>  \starttext
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  \input ward
> 
>  \startplacefigure[title={asdfasdf\footnote{test 1}}]
>  \externalfigure[cow.pdf]
>  \stopplacefigure
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  \startplacefigure[title={asdfasdf\footnote{test 2}}]
>  \externalfigure[cow.pdf][height=10cm]
>  \stopplacefigure
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
> 
>  \page
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  \input ward
> 
>  \startplacefigure[title={asdfasdf\footnote{test 1}}]
>  \externalfigure[cow.pdf]
>  \stopplacefigure
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  % (Can't use postponingnotes)
>  % \startpostponingnotes
>  \startplacefigure[title={asdfasdf\footnote{test 2}}]
>  \externalfigure[cow.pdf][height=10cm]
>  \stopplacefigure
>  % \stoppostponingnotes
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
>  \stoptext
> 
> Here, we save a mapping between each footnote's index in the input and its
> index in the output to the .tuc file. The code is definitely not pretty, but
> works well enough for the sample file provided.
> 
> -- Max
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Footnotes in captions -> "inherit" textwidth from float

2022-06-16 Thread Denis Maier via ntg-context
Hi,
I think I've ran into a somewhat strange behaviour. If you have a footnote in a 
float caption, the footnote won't use the full textwidth, but only the width of 
the corresponding caption. Is that on purpose, a context bug or a user bug?

Best,
Denis


\starttext

asdf

\startplacefigure[title={My caption with a long footnote.\footnote{\input 
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___