问题描述
我正在尝试使用 yaml 序言中加载的乳胶包中的符号(例如,本例中的音乐学)。它适用于设置为 pdf 的输出,但不适用于 hmtl 输出。如何从输出设置为 html_document 的加载包中访问命令/符号?
---
title: test
output:
html_document
header-includes:
- \usepackage{musicography}
---
$\musHalf$
解决方法
编辑:并非所有 Latex 软件包都适用于 output: html_document
。引用用户 cderv here:
你需要看看MathJax是否支持Tex包作为扩展
This 对 Mathematics Meta SE 的回答提出了一种使用 Unicode 字符的解决方法,如果您找到相应的字符。 有关音乐符号的完整列表,请参阅 the Unicode Standard,Version 13.0。拥有 Unicode 后,接下来需要 HTML 实体。最后,将 HTML 实体放入文档中并编织。
从您的示例中,我认为您正在尝试表示一个半音符,为此我发现 Unicode 是 1D15E
。相应的 HTML 实体 是 𝅗𝅥
和 𝅗𝅥
,我找到了 here:
代码如下:
---
title: test
output:
html_document
---
𝅗𝅥
𝅗𝅥
最后,this 维基百科条目提供了指向 Western Musical Symbols、Byzantine Musical Symbols 和 Ancient Greek Musical Notation 的链接,以备您需要。