【发布时间】:2017-09-13 15:30:17
【问题描述】:
段落中的重音效果很好。图中的文本在绘图查看器中是正确的,但是一旦我编译了 pdf,重音就会从图中消失。
这是一个重现该问题的示例。
---
title: 'Some title'
author: 'This be me'
date: '`r format(Sys.Date(), "%B %Y")`'
lang: es
header-includes:
- \usepackage{tikz}
output:
pdf_document:
fig_caption: yes
---
```{r global options, echo = F, message=F}
library(knitr)
opts_chunk$set(fig.width=6, fig.height=3.5, dev = 'tikz')
```
I have some paragraphs that include cool accents like áspid.
If I run the next chunk in the R console I see the accent on the figure it generated. But the accent is missing in the pdf.
```{r}
plot(pressure, main= "áspid")
```
【问题讨论】:
-
我认为这是一个你需要考虑的简单编码问题。尝试使用堆栈中的这个旧建议:stackoverflow.com/questions/18146409/accent-in-knitr
-
感谢您的建议。编码不会影响整个文档吗?错误的编码不会也弄乱段落中的重音吗?
-
它可能...这取决于您用于整个文档的语言,您可能有带或不带重音的选项。
标签: r pdf knitr r-markdown tikz