ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Can I just put a footnote without marking in the main text?
@ 2022-05-18  5:55 Zhichu Chen via ntg-context
  2022-05-18  7:35 ` mf via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Zhichu Chen via ntg-context @ 2022-05-18  5:55 UTC (permalink / raw)
  To: ntg-context; +Cc: Zhichu Chen

Hi everybody,


After some attempts to put footnotes in a mixed 1&2 columns layout, I 
decide to put marks in the one-column environment and flush them when 
entering the two-column environment.


The code is ugly but the result is acceptable. Except that the invisible 
footnote marks do generate something in the main text, so there's a 
blank line for each footnote.


Here's an MWE:


=============================================

\definenote[address]
\setupnote[address][rule=off,location=text]



\definenote[putjustmark]
\setupnote[putjustmark][location=none]
\setupnotation[putjustmark][numberconversion=set 2]


\definenote[putjustnote]%[footnote] % if footnotes need to be grouped, 
uncomment the second argument and the line after \the\titlefootnotes
\setupnote[putjustnote][textcommand=\gobbleoneargument]
\setupnotation[putjustnote][numberconversion=set 2]


\newtoks\titlefootnotes


\def\thanks#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to 
\titlefootnotes}
\def\email#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to 
\titlefootnotes}


\appendtoks
   \setcounter[footnote][0] % this looks stupid because it has no effect
   %\setupnotation[footnote][numberconversion=numerals]
\to \titlefootnotes

\definenamespace
    [addr]
    [type=module,
     name=address,
     command=yes,
     setup=list,
     parent=addr,
   ]

\define[1]\useaddress
     {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}}


\starttext



\defineaddress[fst][name={Name of Institute or Affiliation, City, Country}]
\defineaddress[snd][name={Name of Secondary Institute or Affiliation, 
City, Country}]

\processcommacommand[fst,snd]\useaddress


The Title\thanks{Work supported by somebody.}

Me\email{myemail@some.where}\high{,}\note[address][fst]\high{,}\note[address][snd] 



\placenotes[address]

\blank[medium]

\startcolumns


\the\titlefootnotes

%\setcounter[footnote][0] % why it's necessary to set the counter 
outside the token if I define [putjustnote] as [footnote]?


test\footnote{test}

\input knuth



\stopcolumns

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

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

* Re: Can I just put a footnote without marking in the main text?
  2022-05-18  5:55 Can I just put a footnote without marking in the main text? Zhichu Chen via ntg-context
@ 2022-05-18  7:35 ` mf via ntg-context
  2022-05-18  8:07   ` Ross via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: mf via ntg-context @ 2022-05-18  7:35 UTC (permalink / raw)
  To: Zhichu Chen via ntg-context; +Cc: mf

Is this what you mean?

\starttext
Hello\footnotetext{Footnote without mark}.
\stoptext

Kind regards,
Massi

Il 18/05/22 07:55, Zhichu Chen via ntg-context ha scritto:
> Hi everybody,
> 
> 
> After some attempts to put footnotes in a mixed 1&2 columns layout, I 
> decide to put marks in the one-column environment and flush them when 
> entering the two-column environment.
> 
> 
> The code is ugly but the result is acceptable. Except that the invisible 
> footnote marks do generate something in the main text, so there's a 
> blank line for each footnote.
> 
> 
> Here's an MWE:
> 
> 
> =============================================
> 
> \definenote[address]
> \setupnote[address][rule=off,location=text]
> 
> 
> 
> \definenote[putjustmark]
> \setupnote[putjustmark][location=none]
> \setupnotation[putjustmark][numberconversion=set 2]
> 
> 
> \definenote[putjustnote]%[footnote] % if footnotes need to be grouped, 
> uncomment the second argument and the line after \the\titlefootnotes
> \setupnote[putjustnote][textcommand=\gobbleoneargument]
> \setupnotation[putjustnote][numberconversion=set 2]
> 
> 
> \newtoks\titlefootnotes
> 
> 
> \def\thanks#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to 
> \titlefootnotes}
> \def\email#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to 
> \titlefootnotes}
> 
> 
> \appendtoks
>    \setcounter[footnote][0] % this looks stupid because it has no effect
>    %\setupnotation[footnote][numberconversion=numerals]
> \to \titlefootnotes
> 
> \definenamespace
>     [addr]
>     [type=module,
>      name=address,
>      command=yes,
>      setup=list,
>      parent=addr,
>    ]
> 
> \define[1]\useaddress
>      {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}}
> 
> 
> \starttext
> 
> 
> 
> \defineaddress[fst][name={Name of Institute or Affiliation, City, Country}]
> \defineaddress[snd][name={Name of Secondary Institute or Affiliation, 
> City, Country}]
> 
> \processcommacommand[fst,snd]\useaddress
> 
> 
> The Title\thanks{Work supported by somebody.}
> 
> Me\email{myemail@some.where}\high{,}\note[address][fst]\high{,}\note[address][snd] 
> 
> 
> 
> \placenotes[address]
> 
> \blank[medium]
> 
> \startcolumns
> 
> 
> \the\titlefootnotes
> 
> %\setcounter[footnote][0] % why it's necessary to set the counter 
> outside the token if I define [putjustnote] as [footnote]?
> 
> 
> test\footnote{test}
> 
> \input knuth
> 
> 
> 
> \stopcolumns
> 
> \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
___________________________________________________________________________________

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

* Re: Can I just put a footnote without marking in the main text?
  2022-05-18  7:35 ` mf via ntg-context
@ 2022-05-18  8:07   ` Ross via ntg-context
       [not found]     ` <5379aa6c-246a-0dbb-b121-4839c0fabf2d@fastwebnet.it>
  0 siblings, 1 reply; 6+ messages in thread
From: Ross via ntg-context @ 2022-05-18  8:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Ross


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

Dear Massi,

Thanks for your solution. But the thing may be related to the \appendtoks
macro. It doesn't work to put just \setnotetext there.
\note works fine, so that's the reason I need the "full functional macro".

Maybe I didn't get the point, so if it's not too much to ask, could you do
it on my MWE?

PS: sorry I have to use another email account because my institute mailbox
took forever to get the message before my government (China) finishes
auditing it.

Best wishes,
Zhichu

On Wed, May 18, 2022 at 3:36 PM mf via ntg-context <ntg-context@ntg.nl>
wrote:

> Is this what you mean?
>
> \starttext
> Hello\footnotetext{Footnote without mark}.
> \stoptext
>
> Kind regards,
> Massi
>
> Il 18/05/22 07:55, Zhichu Chen via ntg-context ha scritto:
> > Hi everybody,
> >
> >
> > After some attempts to put footnotes in a mixed 1&2 columns layout, I
> > decide to put marks in the one-column environment and flush them when
> > entering the two-column environment.
> >
> >
> > The code is ugly but the result is acceptable. Except that the invisible
> > footnote marks do generate something in the main text, so there's a
> > blank line for each footnote.
> >
> >
> > Here's an MWE:
> >
> >
> > =============================================
> >
> > \definenote[address]
> > \setupnote[address][rule=off,location=text]
> >
> >
> >
> > \definenote[putjustmark]
> > \setupnote[putjustmark][location=none]
> > \setupnotation[putjustmark][numberconversion=set 2]
> >
> >
> > \definenote[putjustnote]%[footnote] % if footnotes need to be grouped,
> > uncomment the second argument and the line after \the\titlefootnotes
> > \setupnote[putjustnote][textcommand=\gobbleoneargument]
> > \setupnotation[putjustnote][numberconversion=set 2]
> >
> >
> > \newtoks\titlefootnotes
> >
> >
> > \def\thanks#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
> > \titlefootnotes}
> > \def\email#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
> > \titlefootnotes}
> >
> >
> > \appendtoks
> >    \setcounter[footnote][0] % this looks stupid because it has no effect
> >    %\setupnotation[footnote][numberconversion=numerals]
> > \to \titlefootnotes
> >
> > \definenamespace
> >     [addr]
> >     [type=module,
> >      name=address,
> >      command=yes,
> >      setup=list,
> >      parent=addr,
> >    ]
> >
> > \define[1]\useaddress
> >      {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}}
> >
> >
> > \starttext
> >
> >
> >
> > \defineaddress[fst][name={Name of Institute or Affiliation, City,
> Country}]
> > \defineaddress[snd][name={Name of Secondary Institute or Affiliation,
> > City, Country}]
> >
> > \processcommacommand[fst,snd]\useaddress
> >
> >
> > The Title\thanks{Work supported by somebody.}
> >
> > Me\email{myemail@some.where}\high{,}\note[address][fst]\high{,}\note[address][snd]
>
> >
> >
> >
> > \placenotes[address]
> >
> > \blank[medium]
> >
> > \startcolumns
> >
> >
> > \the\titlefootnotes
> >
> > %\setcounter[footnote][0] % why it's necessary to set the counter
> > outside the token if I define [putjustnote] as [footnote]?
> >
> >
> > test\footnote{test}
> >
> > \input knuth
> >
> >
> >
> > \stopcolumns
> >
> > \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
>
> ___________________________________________________________________________________
>


-- 
Best Regards
Chen

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

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

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

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

* Re: Can I just put a footnote without marking in the main text?
       [not found]     ` <5379aa6c-246a-0dbb-b121-4839c0fabf2d@fastwebnet.it>
@ 2022-05-18  8:56       ` Ross via ntg-context
  2022-05-18 14:02         ` Ross via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Ross via ntg-context @ 2022-05-18  8:56 UTC (permalink / raw)
  To: mf, mailing list for ConTeXt users; +Cc: Ross


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

Hi Massi,

You are a champion!

On Wed, May 18, 2022 at 4:41 PM mf <massifr@fastwebnet.it> wrote:

> I hope I got the point now:
>
> ...
> \startcolumns
>
> \the\titlefootnotes
>
> \kern-\rawcountervalue[address]\lineheight % dirty trick
>
> test\footnote{test}
>
> \input knuth
>
> \stopcolumns
> ...
>
> Massi
>
> Il 18/05/22 10:07, Ross ha scritto:
> > Dear Massi,
> >
> > Thanks for your solution. But the thing may be related to the
> > \appendtoks macro. It doesn't work to put just \setnotetext there.
> > \note works fine, so that's the reason I need the "full functional
> macro".
> >
> > Maybe I didn't get the point, so if it's not too much to ask, could you
> > do it on my MWE?
> >
> > PS: sorry I have to use another email account because my institute
> > mailbox took forever to get the message before my government (China)
> > finishes auditing it.
> >
> > Best wishes,
> > Zhichu
> >
> > On Wed, May 18, 2022 at 3:36 PM mf via ntg-context <ntg-context@ntg.nl
> > <mailto:ntg-context@ntg.nl>> wrote:
> >
> >     Is this what you mean?
> >
> >     \starttext
> >     Hello\footnotetext{Footnote without mark}.
> >     \stoptext
> >
> >     Kind regards,
> >     Massi
> >
> >     Il 18/05/22 07:55, Zhichu Chen via ntg-context ha scritto:
> >      > Hi everybody,
> >      >
> >      >
> >      > After some attempts to put footnotes in a mixed 1&2 columns
> >     layout, I
> >      > decide to put marks in the one-column environment and flush them
> >     when
> >      > entering the two-column environment.
> >      >
> >      >
> >      > The code is ugly but the result is acceptable. Except that the
> >     invisible
> >      > footnote marks do generate something in the main text, so there's
> a
> >      > blank line for each footnote.
> >      >
> >      >
> >      > Here's an MWE:
> >      >
> >      >
> >      > =============================================
> >      >
> >      > \definenote[address]
> >      > \setupnote[address][rule=off,location=text]
> >      >
> >      >
> >      >
> >      > \definenote[putjustmark]
> >      > \setupnote[putjustmark][location=none]
> >      > \setupnotation[putjustmark][numberconversion=set 2]
> >      >
> >      >
> >      > \definenote[putjustnote]%[footnote] % if footnotes need to be
> >     grouped,
> >      > uncomment the second argument and the line after
> \the\titlefootnotes
> >      > \setupnote[putjustnote][textcommand=\gobbleoneargument]
> >      > \setupnotation[putjustnote][numberconversion=set 2]
> >      >
> >      >
> >      > \newtoks\titlefootnotes
> >      >
> >      >
> >      > \def\thanks#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
> >      > \titlefootnotes}
> >      > \def\email#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
> >      > \titlefootnotes}
> >      >
> >      >
> >      > \appendtoks
> >      >    \setcounter[footnote][0] % this looks stupid because it has no
> >     effect
> >      >    %\setupnotation[footnote][numberconversion=numerals]
> >      > \to \titlefootnotes
> >      >
> >      > \definenamespace
> >      >     [addr]
> >      >     [type=module,
> >      >      name=address,
> >      >      command=yes,
> >      >      setup=list,
> >      >      parent=addr,
> >      >    ]
> >      >
> >      > \define[1]\useaddress
> >      >      {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}}
> >      >
> >      >
> >      > \starttext
> >      >
> >      >
> >      >
> >      > \defineaddress[fst][name={Name of Institute or Affiliation, City,
> >     Country}]
> >      > \defineaddress[snd][name={Name of Secondary Institute or
> >     Affiliation,
> >      > City, Country}]
> >      >
> >      > \processcommacommand[fst,snd]\useaddress
> >      >
> >      >
> >      > The Title\thanks{Work supported by somebody.}
> >      >
> >      >
> >     Me\email{myemail@some.where
> }\high{,}\note[address][fst]\high{,}\note[address][snd]
> >
> >      >
> >      >
> >      >
> >      > \placenotes[address]
> >      >
> >      > \blank[medium]
> >      >
> >      > \startcolumns
> >      >
> >      >
> >      > \the\titlefootnotes
> >      >
> >      > %\setcounter[footnote][0] % why it's necessary to set the counter
> >      > outside the token if I define [putjustnote] as [footnote]?
> >      >
> >      >
> >      > test\footnote{test}
> >      >
> >      > \input knuth
> >      >
> >      >
> >      >
> >      > \stopcolumns
> >      >
> >      > \stoptext
> >      >
> >      > =============================================
> >      >
> >      >
> >
>  ___________________________________________________________________________________
> >
> >      >
> >      > If your question is of interest to others as well, please add an
> >     entry
> >      > to the Wiki!
> >      >
> >      > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> /
> >      > http://www.ntg.nl/mailman/listinfo/ntg-context
> >     <http://www.ntg.nl/mailman/listinfo/ntg-context>
> >      > webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl> /
> >     http://context.aanhet.net <http://context.aanhet.net>
> >      > archive  : https://bitbucket.org/phg/context-mirror/commits/
> >     <https://bitbucket.org/phg/context-mirror/commits/>
> >      > wiki     : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> /
> >     http://www.ntg.nl/mailman/listinfo/ntg-context
> >     <http://www.ntg.nl/mailman/listinfo/ntg-context>
> >     webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl> /
> >     http://context.aanhet.net <http://context.aanhet.net>
> >     archive  : https://bitbucket.org/phg/context-mirror/commits/
> >     <https://bitbucket.org/phg/context-mirror/commits/>
> >     wiki     : http://contextgarden.net <http://contextgarden.net>
> >
>  ___________________________________________________________________________________
> >
> >
> >
> > --
> > Best Regards
> > Chen
>


-- 
Best Regards
Chen

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

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

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

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

* Re: Can I just put a footnote without marking in the main text?
  2022-05-18  8:56       ` Ross via ntg-context
@ 2022-05-18 14:02         ` Ross via ntg-context
  2022-05-18 14:40           ` Ross via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Ross via ntg-context @ 2022-05-18 14:02 UTC (permalink / raw)
  To: mf, mailing list for ConTeXt users; +Cc: Ross


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

After some visualisations, I found that my token \titlefootnotes will
ALWAYS generate two lines if there is/are any non-zero number of footnotes
there. Interesting. So I need a \newif that each time a \thanks or \email
is invoked, it'll set to true and I'll unskip the 2\lineheight afterwards.

I still don't know why this \kern macro won't have any effect if it's
inside a token or a \startsetup.

On Wed, May 18, 2022 at 4:56 PM Ross <zhichu.chen@gmail.com> wrote:

> Hi Massi,
>
> You are a champion!
>
> On Wed, May 18, 2022 at 4:41 PM mf <massifr@fastwebnet.it> wrote:
>
>> I hope I got the point now:
>>
>> ...
>> \startcolumns
>>
>> \the\titlefootnotes
>>
>> \kern-\rawcountervalue[address]\lineheight % dirty trick
>>
>> test\footnote{test}
>>
>> \input knuth
>>
>> \stopcolumns
>> ...
>>
>> Massi
>>
>> Il 18/05/22 10:07, Ross ha scritto:
>> > Dear Massi,
>> >
>> > Thanks for your solution. But the thing may be related to the
>> > \appendtoks macro. It doesn't work to put just \setnotetext there.
>> > \note works fine, so that's the reason I need the "full functional
>> macro".
>> >
>> > Maybe I didn't get the point, so if it's not too much to ask, could you
>> > do it on my MWE?
>> >
>> > PS: sorry I have to use another email account because my institute
>> > mailbox took forever to get the message before my government (China)
>> > finishes auditing it.
>> >
>> > Best wishes,
>> > Zhichu
>> >
>> > On Wed, May 18, 2022 at 3:36 PM mf via ntg-context <ntg-context@ntg.nl
>> > <mailto:ntg-context@ntg.nl>> wrote:
>> >
>> >     Is this what you mean?
>> >
>> >     \starttext
>> >     Hello\footnotetext{Footnote without mark}.
>> >     \stoptext
>> >
>> >     Kind regards,
>> >     Massi
>> >
>> >     Il 18/05/22 07:55, Zhichu Chen via ntg-context ha scritto:
>> >      > Hi everybody,
>> >      >
>> >      >
>> >      > After some attempts to put footnotes in a mixed 1&2 columns
>> >     layout, I
>> >      > decide to put marks in the one-column environment and flush them
>> >     when
>> >      > entering the two-column environment.
>> >      >
>> >      >
>> >      > The code is ugly but the result is acceptable. Except that the
>> >     invisible
>> >      > footnote marks do generate something in the main text, so
>> there's a
>> >      > blank line for each footnote.
>> >      >
>> >      >
>> >      > Here's an MWE:
>> >      >
>> >      >
>> >      > =============================================
>> >      >
>> >      > \definenote[address]
>> >      > \setupnote[address][rule=off,location=text]
>> >      >
>> >      >
>> >      >
>> >      > \definenote[putjustmark]
>> >      > \setupnote[putjustmark][location=none]
>> >      > \setupnotation[putjustmark][numberconversion=set 2]
>> >      >
>> >      >
>> >      > \definenote[putjustnote]%[footnote] % if footnotes need to be
>> >     grouped,
>> >      > uncomment the second argument and the line after
>> \the\titlefootnotes
>> >      > \setupnote[putjustnote][textcommand=\gobbleoneargument]
>> >      > \setupnotation[putjustnote][numberconversion=set 2]
>> >      >
>> >      >
>> >      > \newtoks\titlefootnotes
>> >      >
>> >      >
>> >      > \def\thanks#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
>> >      > \titlefootnotes}
>> >      > \def\email#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
>> >      > \titlefootnotes}
>> >      >
>> >      >
>> >      > \appendtoks
>> >      >    \setcounter[footnote][0] % this looks stupid because it has no
>> >     effect
>> >      >    %\setupnotation[footnote][numberconversion=numerals]
>> >      > \to \titlefootnotes
>> >      >
>> >      > \definenamespace
>> >      >     [addr]
>> >      >     [type=module,
>> >      >      name=address,
>> >      >      command=yes,
>> >      >      setup=list,
>> >      >      parent=addr,
>> >      >    ]
>> >      >
>> >      > \define[1]\useaddress
>> >      >
>> {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}}
>> >      >
>> >      >
>> >      > \starttext
>> >      >
>> >      >
>> >      >
>> >      > \defineaddress[fst][name={Name of Institute or Affiliation, City,
>> >     Country}]
>> >      > \defineaddress[snd][name={Name of Secondary Institute or
>> >     Affiliation,
>> >      > City, Country}]
>> >      >
>> >      > \processcommacommand[fst,snd]\useaddress
>> >      >
>> >      >
>> >      > The Title\thanks{Work supported by somebody.}
>> >      >
>> >      >
>> >     Me\email{myemail@some.where
>> }\high{,}\note[address][fst]\high{,}\note[address][snd]
>> >
>> >      >
>> >      >
>> >      >
>> >      > \placenotes[address]
>> >      >
>> >      > \blank[medium]
>> >      >
>> >      > \startcolumns
>> >      >
>> >      >
>> >      > \the\titlefootnotes
>> >      >
>> >      > %\setcounter[footnote][0] % why it's necessary to set the counter
>> >      > outside the token if I define [putjustnote] as [footnote]?
>> >      >
>> >      >
>> >      > test\footnote{test}
>> >      >
>> >      > \input knuth
>> >      >
>> >      >
>> >      >
>> >      > \stopcolumns
>> >      >
>> >      > \stoptext
>> >      >
>> >      > =============================================
>> >      >
>> >      >
>> >
>>  ___________________________________________________________________________________
>> >
>> >      >
>> >      > If your question is of interest to others as well, please add an
>> >     entry
>> >      > to the Wiki!
>> >      >
>> >      > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> /
>> >      > http://www.ntg.nl/mailman/listinfo/ntg-context
>> >     <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> >      > webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl> /
>> >     http://context.aanhet.net <http://context.aanhet.net>
>> >      > archive  : https://bitbucket.org/phg/context-mirror/commits/
>> >     <https://bitbucket.org/phg/context-mirror/commits/>
>> >      > wiki     : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> /
>> >     http://www.ntg.nl/mailman/listinfo/ntg-context
>> >     <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> >     webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl> /
>> >     http://context.aanhet.net <http://context.aanhet.net>
>> >     archive  : https://bitbucket.org/phg/context-mirror/commits/
>> >     <https://bitbucket.org/phg/context-mirror/commits/>
>> >     wiki     : http://contextgarden.net <http://contextgarden.net>
>> >
>>  ___________________________________________________________________________________
>> >
>> >
>> >
>> > --
>> > Best Regards
>> > Chen
>>
>
>
> --
> Best Regards
> Chen
>


-- 
Best Regards
Chen

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

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

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

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

* Re: Can I just put a footnote without marking in the main text?
  2022-05-18 14:02         ` Ross via ntg-context
@ 2022-05-18 14:40           ` Ross via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Ross via ntg-context @ 2022-05-18 14:40 UTC (permalink / raw)
  To: mf, mailing list for ConTeXt users; +Cc: Ross


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

I found a way to wrap everything before \startdocument, so I think this
looks like a template more or less:

In case anyone is interested, here's the MWE:

\definenote[address]
\setupnote[address][rule=off,location=text]


\setupnotation[footnote][numberconversion=numerals]

\definenote[putjustmark]
\setupnote[putjustmark][location=none]
\setupnotation[putjustmark][numberconversion=set 2]


\definenote[putjustnote][footnote]
\setupnote[putjustnote][textcommand=\gobbleoneargument]
\setupnotation[putjustnote][numberconversion=set 2]

\newif\ifnoteintitle
\newtoks\titlefootnotes

\titlefootnotes\emptytoks


\def\thanks#1{\noteintitletrue\putjustmark{#1}\doglobal\appendtoks
\putjustnote{#1} \to \titlefootnotes}
\def\email#1{\noteintitletrue\putjustmark{#1}\doglobal\appendtoks
\putjustnote{#1} \to \titlefootnotes}

\def\unskipfunnylines{\ifnoteintitle\endgraf\kern-2\lineheight\fi}


\definenamespace
   [addr]
   [type=module,
    name=address,
    command=yes,
    setup=list,
    parent=addr,
  ]

\define[1]\useaddress
    {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}}



\setupaddress[style=italic]
\defineaddress[fst][name={Name of Institute or Affiliation, City, Country}]
\defineaddress[snd][name={Name of Secondary Institute or Affiliation, City,
Country}]
\defineaddress[thd][name={Name of Third Institute or Affiliation, City,
Country}]

\processcommacommand[fst,snd,thd]\useaddress



\startsetups [document:start]
The Title\dorecurse{10}{\expanded{\thanks{Work supported by fund
\recurselevel.}}}
\endgraf

Me\dorecurse{10}{\expanded{\email{\tt my.name@mailbox.\recurselevel.com
}}\high{,}}\note[address][fst]\high{,}\note[address][snd]\high{,}\note[address][thd]
\endgraf

\placenotes[address]

\blank[medium]
  \startcolumns\hyphenpenalty1000

  \the\titlefootnotes\relax

  \setcounter[footnote][0]

  \unskipfunnylines

\stopsetups

\startsetups [document:stop]
  \stopcolumns
\stopsetups



\startdocument


test\footnote{test}

\input knuth

\input knuth

\input knuth

\input knuth

\stopdocument



On Wed, May 18, 2022 at 10:02 PM Ross <zhichu.chen@gmail.com> wrote:

> After some visualisations, I found that my token \titlefootnotes will
> ALWAYS generate two lines if there is/are any non-zero number of footnotes
> there. Interesting. So I need a \newif that each time a \thanks or \email
> is invoked, it'll set to true and I'll unskip the 2\lineheight afterwards.
>
> I still don't know why this \kern macro won't have any effect if it's
> inside a token or a \startsetup.
>
> On Wed, May 18, 2022 at 4:56 PM Ross <zhichu.chen@gmail.com> wrote:
>
>> Hi Massi,
>>
>> You are a champion!
>>
>> On Wed, May 18, 2022 at 4:41 PM mf <massifr@fastwebnet.it> wrote:
>>
>>> I hope I got the point now:
>>>
>>> ...
>>> \startcolumns
>>>
>>> \the\titlefootnotes
>>>
>>> \kern-\rawcountervalue[address]\lineheight % dirty trick
>>>
>>> test\footnote{test}
>>>
>>> \input knuth
>>>
>>> \stopcolumns
>>> ...
>>>
>>> Massi
>>>
>>> Il 18/05/22 10:07, Ross ha scritto:
>>> > Dear Massi,
>>> >
>>> > Thanks for your solution. But the thing may be related to the
>>> > \appendtoks macro. It doesn't work to put just \setnotetext there.
>>> > \note works fine, so that's the reason I need the "full functional
>>> macro".
>>> >
>>> > Maybe I didn't get the point, so if it's not too much to ask, could
>>> you
>>> > do it on my MWE?
>>> >
>>> > PS: sorry I have to use another email account because my institute
>>> > mailbox took forever to get the message before my government (China)
>>> > finishes auditing it.
>>> >
>>> > Best wishes,
>>> > Zhichu
>>> >
>>> > On Wed, May 18, 2022 at 3:36 PM mf via ntg-context <ntg-context@ntg.nl
>>> > <mailto:ntg-context@ntg.nl>> wrote:
>>> >
>>> >     Is this what you mean?
>>> >
>>> >     \starttext
>>> >     Hello\footnotetext{Footnote without mark}.
>>> >     \stoptext
>>> >
>>> >     Kind regards,
>>> >     Massi
>>> >
>>> >     Il 18/05/22 07:55, Zhichu Chen via ntg-context ha scritto:
>>> >      > Hi everybody,
>>> >      >
>>> >      >
>>> >      > After some attempts to put footnotes in a mixed 1&2 columns
>>> >     layout, I
>>> >      > decide to put marks in the one-column environment and flush them
>>> >     when
>>> >      > entering the two-column environment.
>>> >      >
>>> >      >
>>> >      > The code is ugly but the result is acceptable. Except that the
>>> >     invisible
>>> >      > footnote marks do generate something in the main text, so
>>> there's a
>>> >      > blank line for each footnote.
>>> >      >
>>> >      >
>>> >      > Here's an MWE:
>>> >      >
>>> >      >
>>> >      > =============================================
>>> >      >
>>> >      > \definenote[address]
>>> >      > \setupnote[address][rule=off,location=text]
>>> >      >
>>> >      >
>>> >      >
>>> >      > \definenote[putjustmark]
>>> >      > \setupnote[putjustmark][location=none]
>>> >      > \setupnotation[putjustmark][numberconversion=set 2]
>>> >      >
>>> >      >
>>> >      > \definenote[putjustnote]%[footnote] % if footnotes need to be
>>> >     grouped,
>>> >      > uncomment the second argument and the line after
>>> \the\titlefootnotes
>>> >      > \setupnote[putjustnote][textcommand=\gobbleoneargument]
>>> >      > \setupnotation[putjustnote][numberconversion=set 2]
>>> >      >
>>> >      >
>>> >      > \newtoks\titlefootnotes
>>> >      >
>>> >      >
>>> >      > \def\thanks#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
>>> >      > \titlefootnotes}
>>> >      > \def\email#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to
>>> >      > \titlefootnotes}
>>> >      >
>>> >      >
>>> >      > \appendtoks
>>> >      >    \setcounter[footnote][0] % this looks stupid because it has
>>> no
>>> >     effect
>>> >      >    %\setupnotation[footnote][numberconversion=numerals]
>>> >      > \to \titlefootnotes
>>> >      >
>>> >      > \definenamespace
>>> >      >     [addr]
>>> >      >     [type=module,
>>> >      >      name=address,
>>> >      >      command=yes,
>>> >      >      setup=list,
>>> >      >      parent=addr,
>>> >      >    ]
>>> >      >
>>> >      > \define[1]\useaddress
>>> >      >
>>> {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}}
>>> >      >
>>> >      >
>>> >      > \starttext
>>> >      >
>>> >      >
>>> >      >
>>> >      > \defineaddress[fst][name={Name of Institute or Affiliation,
>>> City,
>>> >     Country}]
>>> >      > \defineaddress[snd][name={Name of Secondary Institute or
>>> >     Affiliation,
>>> >      > City, Country}]
>>> >      >
>>> >      > \processcommacommand[fst,snd]\useaddress
>>> >      >
>>> >      >
>>> >      > The Title\thanks{Work supported by somebody.}
>>> >      >
>>> >      >
>>> >     Me\email{myemail@some.where
>>> }\high{,}\note[address][fst]\high{,}\note[address][snd]
>>> >
>>> >      >
>>> >      >
>>> >      >
>>> >      > \placenotes[address]
>>> >      >
>>> >      > \blank[medium]
>>> >      >
>>> >      > \startcolumns
>>> >      >
>>> >      >
>>> >      > \the\titlefootnotes
>>> >      >
>>> >      > %\setcounter[footnote][0] % why it's necessary to set the
>>> counter
>>> >      > outside the token if I define [putjustnote] as [footnote]?
>>> >      >
>>> >      >
>>> >      > test\footnote{test}
>>> >      >
>>> >      > \input knuth
>>> >      >
>>> >      >
>>> >      >
>>> >      > \stopcolumns
>>> >      >
>>> >      > \stoptext
>>> >      >
>>> >      > =============================================
>>> >      >
>>> >      >
>>> >
>>>  ___________________________________________________________________________________
>>> >
>>> >      >
>>> >      > If your question is of interest to others as well, please add an
>>> >     entry
>>> >      > to the Wiki!
>>> >      >
>>> >      > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> /
>>> >      > http://www.ntg.nl/mailman/listinfo/ntg-context
>>> >     <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>> >      > webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl>
>>> /
>>> >     http://context.aanhet.net <http://context.aanhet.net>
>>> >      > archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> >     <https://bitbucket.org/phg/context-mirror/commits/>
>>> >      > wiki     : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> /
>>> >     http://www.ntg.nl/mailman/listinfo/ntg-context
>>> >     <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>> >     webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl> /
>>> >     http://context.aanhet.net <http://context.aanhet.net>
>>> >     archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> >     <https://bitbucket.org/phg/context-mirror/commits/>
>>> >     wiki     : http://contextgarden.net <http://contextgarden.net>
>>> >
>>>  ___________________________________________________________________________________
>>> >
>>> >
>>> >
>>> > --
>>> > Best Regards
>>> > Chen
>>>
>>
>>
>> --
>> Best Regards
>> Chen
>>
>
>
> --
> Best Regards
> Chen
>


-- 
Best Regards
Chen

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

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

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

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

end of thread, other threads:[~2022-05-18 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18  5:55 Can I just put a footnote without marking in the main text? Zhichu Chen via ntg-context
2022-05-18  7:35 ` mf via ntg-context
2022-05-18  8:07   ` Ross via ntg-context
     [not found]     ` <5379aa6c-246a-0dbb-b121-4839c0fabf2d@fastwebnet.it>
2022-05-18  8:56       ` Ross via ntg-context
2022-05-18 14:02         ` Ross via ntg-context
2022-05-18 14:40           ` Ross 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).