【问题标题】:footnote function from kableExtra in R returns LateX error: multicol in Rmd file while knitting it to a PDF来自 R 中 kableExtra 的脚注函数返回 LateX 错误:Rmd 文件中的多列同时将其编织为 PDF
【发布时间】:2018-11-28 10:21:46
【问题描述】:

我正在使用 kableExtra 包的 footnote 函数在桌子上写脚注,但我得到了以下 LaTeX 错误:

! LaTeX Error: File `mulicol.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 

l.126 

pandoc.exe: Error producing PDF
Error: pandoc document conversion failed with error 43
Ejecución interrumpida

我正在运行的代码是:

---
output:
pdf_document:
  toc: yes
  toc_depth: 5
  keep_tex: yes
html_document:
  theme: united
  toc: yes
classoption: table
header-includes:
  - \usepackage{array}
  - \usepackage{float}
  - \usepackage{xcolor}
  - \usepackage{mulicol}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r results='asis'}
options(kableExtra.latex.load_packages = FALSE) 
require(kableExtra)
cat(kable(head(cars),"latex",digits=c(1,1), longtable =TRUE,row.names=FALSE, 
caption = "Descriptive analysis for the")%>%footnote(general= "Repeatability 
(%CV) = ")
      )
```

谁能帮我解决这个问题?

提前谢谢你!

【问题讨论】:

    标签: r-markdown kableextra latex-environment multicol


    【解决方案1】:

    许多 LaTeX 包也会出现同样的问题,错误消息总是:

    ! LaTeX Error: File `packagename.sty' not found.
    

    你的情况需要从ctan.org下载multicol包,解压并上传multicol.sty到你的Rmd文件所在的目录。

    道具转到this answer on the TeX stackexchange。

    编辑:

    对于 multicol 包,需要另一个步骤。下载后请参阅 multicol 包的 README。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-07
      • 2020-01-31
      • 2017-03-05
      • 2019-01-09
      • 1970-01-01
      • 1970-01-01
      • 2015-12-30
      • 1970-01-01
      相关资源
      最近更新 更多