带有侧注的真正特定上标字体

带有侧注的真正特定上标字体

撰写论文、书籍模板和 Libertine 字体。我选择使用 sidenotes 包将脚注放在页边空白处。效果很好,但我发现注释中的文本数字相当大,经过一番检查,我发现 realscripts 包允许使用字体中包含的特定上标。但 sidenotes 似乎无法完全捕捉到这一变化,因为只有页边空白数字出现在上标字体中,文本数字没有变化。

有什么方法可以强制使用真实上标字体作为旁注吗?

\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

添加了侧注标记的重新定义以纠正该问题。

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}

请注意,~如果想在前面留一个空格\sidenote(法语规则),以避免在那里断线。

相关内容