【问题标题】:Using Unicode characters in math mode with Bookdown (xelatex)在 Bookdown (xelatex) 的数学模式中使用 Unicode 字符
【发布时间】:2019-10-31 23:36:18
【问题描述】:

我尝试在 Bookdown 的数学模式下使用 Unicode 字符 (U+2685),我设置了 mathfont: STIX Two Math(包含此字符),但生成的 PDF 包含一个空格。 (同时HTML是正确的。)

这里有什么问题?

(我最好的猜测是我可能应该使用unicode-math 包。不幸的是我不能将它包含在preamble.tex 中,因为它是incompatiblemathspec,但同时我看到没有办法摆脱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: $⚀$.

结果如下所示:

【问题讨论】:

标签: r unicode r-markdown bookdown xelatex


【解决方案1】:

此问题现已解决(更新至rmarkdown 后),请参阅here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-27
    • 2017-07-24
    • 2018-05-06
    • 2015-01-01
    相关资源
    最近更新 更多