4

How can I redefine the numbering style of footnotes in ConTeXt, such that is displays a combination of a number and letter (e.g. 1.A, 1.B, 1.C) instead of the usual 1, 2, 3 sequence, e.g.:

This is some text.^1.A This is some more text.^1.B

This is yet some more text.^2.A This is the last text.^2.B
  • The number needs to only be incremented when done so manually, e.g. with something like \incrementnumber[footnote].
  • The letter needs to be incremented each time a new footnote is defined, and reset whenever the number is incremented, e.g. 1.A, 1.B, 1.C, 2.A, 2.B, 2.C.

I have managed to create a partial solution:

\definenumber[prefixcounter]
\setnumber[prefixcounter]{1}
\def\footnoteprefix#1{\getnumber[prefixcounter].#1}
\setupnote[footnote][left=\footnoteprefix, numberconversion=set 2]
\starttext
    This is some text.\footnote{This is a footnote.}
    This is some more text.\footnote{This is another footnote.}
    \incrementnumber[prefixcounter]
    This is yet some more text.\footnote{This is yet another footnote.}
    This is the last text.\footnote{This is the last footnote.}
\stoptext

This solution has several problems:

  • left=\footnoteprefix is only appearing near the footnote, not in the document text as well.
  • numberconversion seems to have a limited number of options, such as set 1, set 2, I could not find any way to set this to use A, B, C, etc., such as is available for enumerated lists according to the ConTeXt wiki.

How can footnotes be created which use this number-letter format?

1 Answer 1

5
+750

You can use the \subfootnote feature for this. Here is a small example:

\setuplayout [height=15cm] % for a smaller screenshot

\definestructureconversionset [footnote] [numbers, Characters] [numbers]
\setupenumerations            [footnote] [numberconversionset=footnote]

\starttext

\startlines
Footnote\footnote{Lorem}
Footnote\footnote{Ipsum}
Subfootnote\subfootnote{Foo}, Subfootnote\subfootnote{Bar}\par

\incrementnumber [footnote]

Footnote\footnote{Dolor}
Footnote\footnote{Sit}
Subfootnote\subfootnote{Foo}, Subfootnote\subfootnote{Bar}\par
\stoplines

\stoptext

result

You need to define a new structureconversionset to get the alphabetical numbering. The third argument of \definestructureconversionset is the scheme that is used as a default. Unfortunately there's not much documentation available about conversionsets (and the interface has changed in MkIV). Some info is available on the wiki - setupreferencestructureprefix

Defining a new numberseparatorset is not necessary, since the default one already contains a dot.

Tested with context version: 2011.05.18 18:04, the betas upto November 2011 should work fine, as well. The betas from this year are a nightmare when it comes to footnotes.

2
  • Is there any \subfootnote equivalent to \note and \footnotetext?
    – Village
    Commented Apr 10, 2012 at 10:51
  • 2
    Use \donote[subfootnote][foo]{*} as \note and \setnotetext[subfootnote][foo]{bar} as \footnotetext.
    – Marco
    Commented Apr 10, 2012 at 11:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .