XiangyunHuang/ElegantBookdown

编译失败

Closed this issue · 3 comments

报错
! LaTeX Error: Command `\Bbbk' already defined.

不知道怎么修改

错误是因为调用的字体宏包有冲突。不知道你是不是自己加了字体包。如果没有,试试在index.Rmd的开头(yml之后)加上

```{r remove_amsthm,  include=FALSE}
options(bookdown.post.latex = function(x) {
    from <- grep("usepackage\\{amsthm\\}", x)
    to <- grep("newtheorem\\*\\{solution", x)
    x <- x[-c(from:to)]
  })
```

XiangyunHuang升级到elegantbook 3.10版本,这个问题消失了

本质是不要使用 unicode-math 包去渲染公式,它和上游的模版存在冲突,所以我启用了 mathspec 包

mathspec: yes