4

In LuaLaTeX I can use the realscripts package to use superior figures as footnote marks. How can I use superior figures as footnote marks in ConTeXt?

5

When you have a font which supports the sups feature can enable it for the footnote number. It is also necessary to disable the default value for the textcommand and numbercommand keys which are used to create a raised number for fonts without this feature.

\setupbodyfont [antykwa-poltawskiego]

\setupnote
  [footnote]
  [textstyle={\feature[+][f:superiors]},
   textcommand=]

\setupnotation
  [footnote]
  [headstyle={\feature[+][f:superiors]},
   numbercommand=]

\setuppapersize [A6]

\starttext
\dorecurse{10}{\convertnumber{word}{\recurselevel}\expanded{\footnote{Footnote \recurselevel}} }
\stoptext

enter image description here

When you need a solution which works for fonts with and without the sups feature you can create your own command for the placement of the footnote number and use the \doifelsecurrentfonthasfeature command to check if the current font supports the feature.

\define[1]\FootnoteNumber
  {\doifelsecurrentfonthasfeature{sups}
     {{\feature[+][f:superiors]#1}}
     {\high{#1}}}

\setupnote
  [footnote]
  [textcommand=\FootnoteNumber]

\setupnotation
  [footnote]
  [numbercommand=\FootnoteNumber]

\setuppapersize [A6]

\starttext

\dorecurse{5}{\convertnumber{word}{\recurselevel}\expanded{\footnote{Footnote \recurselevel}} }

\switchtobodyfont [antykwa-poltawskiego]

\dorecurse{5}{\convertnumber{word}{\recurselevel}\expanded{\footnote{Footnote \recurselevel}} }

\stoptext

enter image description here

  • Does your second approach entail any (serious) disadvantages? What speaks against using the more flexible, font independent solution? I am going to use this in a pandoc template, and I prefer not having to change the template when I select a different font. – Denis Dec 31 '18 at 17:13
  • 1
    Just because a font supports superscripts doesn’t mean it provides also alternatives for all numbers or letters. – Wolfgang Schuster Dec 31 '18 at 17:32
  • 1
    @Denis In some fonts superiors are there but all messed up, e.g. in Crimson (screenshot), so you might not always want to use them even if they're available. – Henri Menke Dec 31 '18 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.