Rmarkdown 不在公式中显示点(pdf 输出)

Rmarkdown doesn't display dots in formulae (pdf output)

我正在尝试 RStudio 的最新 1.0 版本,我生成了一个以前工作正常的文档,但现在我在编译为 pdf_output 时遇到公式中的点问题。 例如当我写:

$A(L) = 1 - 1.6  L  + 0.96 L^2  -  0.256 L^3$

我进入 pdf:

我在网上搜索过,没有找到有用的东西。预先感谢您的帮助。

babel 在使用西班牙语时期望逗号作为小数点分隔符。因此,这将开箱即用(我认为这是正确的解决方案)。

$A(L) = 1 - 1,6  L  + 0,96 L^2  -  0,256 L^3$

但是,您仍然可以使您的示例起作用。根据 this tex.SE answer,你可以通过这样设置语言来强制 babel 使用点作为小数点分隔符(注意没有 lang 选项):

---
title: "Test"
output: pdf_document
header-includes:
- \usepackage[spanish,es-nodecimaldot]{babel}
---