【发布时间】:2019-10-31 23:36:18
【问题描述】:
我尝试在 Bookdown 的数学模式下使用 Unicode 字符 (U+2685),我设置了 mathfont: STIX Two Math(包含此字符),但生成的 PDF 包含一个空格。 (同时HTML是正确的。)
这里有什么问题?
(我最好的猜测是我可能应该使用unicode-math 包。不幸的是我不能将它包含在preamble.tex 中,因为它是incompatible 和mathspec,但同时我看到没有办法摆脱mathspec;在使用xelatex 时,在Bookdown 中mathspec 似乎是usepackaged 的硬编码。)
最小可重现示例(显示index.Rmd,所有其他文件与使用 RStudio 创建的默认新项目相同):
---
title: "A Minimal Book Example"
author: "Yihui Xie"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
link-citations: yes
description: "This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook."
mainfont: STIX Two Math
mathfont: STIX Two Math
---
# Prerequisites
In text: ⚀.
In math mode: $⚀$.
结果如下所示:
【问题讨论】:
-
@samcarter 抱歉,我更新了问题。
标签: r unicode r-markdown bookdown xelatex