问题描述
我正在尝试用 RMarkdown pdf 写一篇论文.但我不知道如何使用特殊字符,如İ, ı, ğ, ü, ö".这些字符出现在土耳其语中.我可以很容易地在 Latex 中使用它们,例如u{g} – ğ、c{c} – ç、"{u} – ü、{i} – ı 等.
您能告诉我如何在 RMarkdown 中做同样的事情吗?
我在哪里可以找到一些 Rmarkdown 论文或书籍模板?
土耳其字符的 HTML 代码可以工作(示例来自 打包,或自己制作
对于书籍模板,请查看 pandoc 电子书,gitbook 和 预订
我最初建议的这个 xelatex 选项不适用于土耳其语字符:
xelatex
引擎是 推荐这种东西.然后您可以使用 mainfont
参数:
---标题:我的医生"输出:pdf_文档:latex_engine:xelatexmainfont:包含所有这些字符的系统字体的名称"---PDF 输出将采用您指定的字体.只需正常输入,无需特殊代码.
I am trying ot write a paper in RMarkdown pdf. But I dont know how to use special characters like "İ, ı, ğ, ü, ö". Those characters are present in Turkish. I can easily use them in Latex using e.g. u{g} – ğ, c{c} – ç, "{u} – ü, {i} – ı, etc.
Could you please tell how can I do the same in RMarkdown?
And where can I find some Rmarkdown paper or book templates?
HTML codes for Turkish characters will work (example from wikipedia):
---
title: "My doc"
output: pdf_document
---
HTML char detail anglicized
------- -- ------------------------------ ---
Ğ Ğ Uppercase "G" with breve accent gh1
İ İ Uppercase dotted "I"² i (as in "tree")
Ş Ş Uppercase "S" with cedilla sh
ğ ğ Lowercase "g" with breve accent gh1
ı ı Lowercase dotless "i"³ ou (as in "in")
ş ş Lowercase "s" with cedilla sh
------- -- ------------------------------- --
Which renders the PDF like this:
For article templates, see the rticles
package, or make your own
For book templates, have a look at pandoc ebook, gitbook and bookdown
This xelatex option I initially suggested will not work for Turkish characters:
The xelatex
engine is recommended for this kind of thing. Then you can access your system fonts with the mainfont
argument:
---
title: "My doc"
output:
pdf_document:
latex_engine: xelatex
mainfont: "name of your system font that has all those characters"
---
PDF output will be in the font you specify.
Just type as normal with no special codes.
这篇关于如何在 RMarkdown 乳胶文档中写入特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!