Emi*_*ñez 5 latex r r-markdown
R Markdown在我的文档标题上可以正常工作,但是在正文上却不能正常工作,因为西班牙语字符看起来有所不同。当我使用纯乳胶(Overleaf)时,它既可以在正文中也可以在标头中使用。
如果我复制粘贴西班牙语字符(例如á, é, ñ, ó
),它们将保留原样,但是如果我使用反斜杠连字符方法(\'a, \'e, \~n, \'o
),则它们只能在文档的标题中正确翻译,而不能在正文中正确翻译。
我已经检查过我是否在使用utf8
(I was),并且headers-include
and \usepackage
函数也无济于事。
\section{Secci\'on \~n}
Hola, esta es mi primera edici\'on de texto
\subsection{Subsecci\'on}
Esto deber\'ia ser una subsecci\'on.
Ahora, anotaré una f\'ormula, tal que $\lim_{x \rightarrow y} x = y$
Run Code Online (Sandbox Code Playgroud)
这是当前的编织方式:
https://i.stack.imgur.com/P91QF.png
如您所见,标题正确地显示了上述字符,而正文仅在直接键入西班牙字符(即e)时才正确地显示了西班牙字符,我不能这样做,因为我的键盘没有它们。使用unicode并不是一个理想的解决方案。
\\\'
如果您设置xelatex
为latex_engine
.
---\ntitle: "Untitled"\nauthor: "Author"\ndate: "2020/4/16"\noutput:\n pdf_document2:\n #bookdown::pdf_document2: #When you need cross-referencing of figures and tabular\n latex_engine: xelatex\n---\n\n# Secci\xc3\xb3n \xc3\xb1\n\nHola, esta es mi primera edici\xc3\xb3n de texto\n\n## Subsecci\xc3\xb3n\n\nEsto deber\xc3\xada ser una subsecci\xc3\xb3n.\nAhora, anotar\xc3\xa9 una f\xc3\xb3rmula, tal que $\\lim_{x \\rightarrow y} x = y$\n
Run Code Online (Sandbox Code Playgroud)\n