3

With \usepackage[sups]{XCharter}, when I have two references separated by a comma after the same word, I can't typeset the comma in the same style as the reference marks: \textsuperscrip{,} places it too high, while \textsu{} only works for numbers. I've tried to dig XCharter.sty to find a definition of \textsu and change it but I haven't found anything (at least not anything that seemed to give some sort of vertical spacing instruction. I'm not good at code digging, though...)


MWE:

\documentclass{article}
\usepackage[sups]{XCharter}
\begin{document}
\noindent
Some text\footnote{First}\textsuperscript{,}\footnote{Second}\\
Some text\footnote{Third}\textsu{,}\footnote{Fourth}
\end{document}

Spits out

enter image description here


[EDIT]

I've decided to raise the numbers typeset by \textsu instead of lowering those set by \textsuperscript, but keeping the nice superscript figures provided by XCharter. I need this to work with

1) \textsu itself; I've settled for

\usepackage{letltxmacro}
\LetLtxMacro\vecchiotextsu\textsu% see tex.stackexchange.com/questions/88001/when-to-use-letltxmacro
\renewcommand{\textsu}[1]
    {\vecchiotextsu{\raisebox{0.28ex}{#1}}}

2) endnote

\renewcommand{\makeenmark}{\textsu{\theenmark}}

3) \footnote

\makeatletter
    \renewcommand{\@makefnmark}
        {\raisebox{0.28ex}{\sufigures \@thefnmark}}
\makeatother

So this basically answers my question.

  • The \textsu command chooses a variant of the Charter font, where the digits are superscripted, but no other character is. – egreg Oct 8 '15 at 8:50
  • Ciao egreg, thanks :-) I had the suspect. So I guess \raisebox is the way... – Arch Stanton Oct 8 '15 at 8:52
  • \newcommand*{\textsup}[1]{\raisebox{-1pt}{\textsuperscript{#1}}} seems to do the job. – Arch Stanton Oct 8 '15 at 9:00
3

The font selected when \textsu is called has only the digits as superscripts and no other character.

Here's my proposal:

\documentclass{article}
\usepackage[sups]{XCharter}

\newcommand{\commasup}{%
  \textsuperscript{\kern-0.11111em \raisebox{-\height}{,}}%
}


\begin{document}

Some text\footnote{First}\commasup\footnote{Second}

\end{document}

enter image description here

Using a command has the advantage that, if you decide to use a different font, the definition can be easily adjusted and the document needs no other change.

| improve this answer | |
  • Thanks again :-) I don't understand, in -\height, it is minus what height? Anyway, I resolved to shift up the numbers instead... I overcomplicate for exercise, I'm going to try by myself first. I'll update in the comments. – Arch Stanton Oct 8 '15 at 12:56
  • @ArchStanton \height refers to the height of the material to be raised. – egreg Oct 8 '15 at 13:12
  • I'm not sure I got this right. \height assumes the value of the height (above the baseline of the superscripts) of the glyph inside the braces, so you basically remove that space moving it back to the baseline. Is it correct? – Arch Stanton Oct 8 '15 at 13:50
  • @ArchStanton \height refers to the height of the comma in scriptsize (because the font size has already been chosen); it has nothing to do with the fact we're in a superscript, that will be done later. The raising of lowering is done with respect to the baseline of the superscript. – egreg Oct 8 '15 at 15:00
  • Hi egreg, I've edited the question, have you got any suggestions? (Well that's a question that sounds silly, asked to you.) The recursive redefinition is farina del tuo sacco, I admit I don't understand it at all but I'm going to read the tutorial and remedy asap. Thanks for all the help, not only when answering directly to me of course :-) – Arch Stanton Oct 9 '15 at 10:05

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.