2

writing my thesis, book template and Libertine font. I choose to place footnotes in margin using the sidenotes packages. Works fine, but i found the in text numbers to the note quite big, and after some check, i found the realscripts package which allows the use of the specific superscript included in the font. But sidenotes seems not to fully capture this change, as only the margin number appears in superscript font, the in text number doesn't change.

Any way to force sidenotes using real superscripts font ?

\documentclass[11pt, a4paper]{book}
\usepackage[french]{babel}

\usepackage{libertine}

\usepackage{sidenotes}
\usepackage{realscripts}

\begin{document}

\section{Superscript font check}

This is a non specific font superscript \textsuperscript*{1}

And this is a specific font superscript \textsuperscript{1}

\medskip

The side note call uses a non specific superscript\sidenote{check font superscript}

The note itself in the margin is visibly using a specific font superscript...

Foot note is correctly using specific superscript\footnote{check foot note}

\end{document}

1 Answer 1

1

Added a redefinition of the sidenote mark to correct the issue.

b

% !TeX TS-program = xelatex

\documentclass[11pt, a4paper]{book}

\usepackage[french]{babel}
\usepackage{libertine}
\usepackage{sidenotes}
\usepackage{realscripts}

%%*************************************  added <<<<
\makeatletter
\RenewDocumentCommand \@sidenotes@thesidenotemark { m }
{\leavevmode%
    \ifhmode%
    \edef \@x@sf {\the\spacefactor}%
    \nobreak%
    \fi
    \hbox{\textsuperscript{#1}}%
    \ifhmode%
    \spacefactor \@x@sf%
    \fi
}
\makeatother
%%*************************************

\begin{document}
    
    \section{Superscript font check}
    
    This is a non specific font superscript \textsuperscript*{1}
    
    And this is a specific font superscript \textsuperscript{1}
    
    \medskip
    
    The side note call now uses a  specific superscript~\sidenote{check font superscript}
    
    The note itself in the margin is visibly using a specific font superscript...
    
    Foot note is correctly using specific superscript\footnote{check foot note}
    
\end{document}

Note the use of ~ if wanted to make a space before \sidenote (french rules), to avoid breaking the line there.

2
  • 1
    works fine, couln't have found this on my own ;) Is it something the sidenotes package should manage on his own ? actually, is it worth notifying the author of the package ?
    – Frédéric
    May 9, 2023 at 19:59
  • @Frédéric Thank for your feedback! Yes, it might be interesting to contact the author of the sidenotes package to get his comments. May 10, 2023 at 14:04

You must log in to answer this question.

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