如何将 \footnote 符号本地更改为音乐符号/音符?

如何将 \footnote 符号本地更改为音乐符号/音符?

我之前学过如何在几个地方本地更改 \footnote 符号?,如何将脚注更改为某些符号:例如

\renewcommand{\thefootnote}{\alph{footnote}}

\newcommand{\symfootnote}[1]{%
\let\oldthefootnote=\thefootnote%
\stepcounter{mpfootnote}%
\addtocounter{footnote}{-1}%
\renewcommand{\thefootnote}{\fnsymbol{mpfootnote}}%
\footnote{#1}%
\let\thefootnote=\oldthefootnote%
}

但这还不够我的目的,我希望能够局部地使用一些音乐符号或者下面的符号作为脚注。看到这个

在此处输入图片描述

我该怎么做呢?实际上,我只需要在首页的三个地方插入 4 位作者的电子邮件信息。我需要的是

G 谱号(高音谱号)、F 谱号(低音谱号)、升号、降号

作为我的引用和脚注符号。

也可以看看音乐 LaTex 一首双手乐曲(莫扎特的 C 大调 K545)

答案1

您可以使用lilyglyphs包(需要 XeLaTeX 或 LuaLaTeX)获取符号,并footmisc使用包定义脚注符号集。

% compile with XeLaTeX or LuaLaTeX
\documentclass{article}
\usepackage{fontspec}
\usepackage[perpage,symbol*]{footmisc}
\usepackage{lilyglyphs}
\DefineFNsymbols*{music}{\clefGInline\clefFInline\sharp\flat}
\setfnsymbol{music}
\begin{document}
Some text.\footnote{First footnote} Some more text\footnote{Second footnote} Some more text\footnote{Third footnote} Some more text\footnote{Fourth footnote}.
\end{document}

代码输出

如果您有包含谱号的字体(大多数字体都包含临时变音记号),那么您可以使用该字体来提供字符,而无需使用lilyglyphs。由于您可能不想在以下示例中将该字体用作主文档字体,因此我使用 Free Serif 专门为音乐符号创建了一个字体系列。但在我看来,与版本相比,符号的缩放效果不是很好lilyglyphs

\documentclass{article}

\usepackage{fontspec}
\newfontfamily\musicfont{Free Serif}
\DeclareTextFontCommand{\textmusic}{\musicfont}
\newcommand*\clefG{\textmusic{\char"1D122}}
\newcommand*\clefF{\textmusic{\char"1D11E}}
\usepackage[perpage,symbol*]{footmisc}
\DefineFNsymbols*{music}{\clefG\clefF{\textmusic{\sharp}}{\textmusic{\flat}}}
\setfnsymbol{music}
\begin{document}
Some text.\footnote{First footnote} Some more text\footnote{Second footnote} Some more text\footnote{Third footnote} Some more text\footnote{Fourth footnote}.
\end{document}

在此处输入图片描述

相关内容