我正在尝试编织一个 pdf,将数据帧列表打印到 pdf。我有以下代码,它给了我以下错误:
---
geometry: margin=1.7cm
output:
pdf_document:
fig_caption: yes
fig_height: 3.5
fig_width: 6.4
keep_tex: yes
knit: (function(inputFile, encoding) { rmarkdown::render(inputFile, encoding = encoding, output_file=paste0('IIDP Data Dictionary ',Sys.Date(),'.pdf')) })
---
\clearpage
\tableofcontents
{r setup, include=FALSE}
library(knitr)
library(kableExtra)
options(tinytex.verbose = TRUE)
opts_chunk$set(echo = FALSE, fig.align='center', message=FALSE)
source("H:/IU_DataManagement/Data_Dict_Code_IIDP_20201104.R")
\newpage
\begin{center}
\section{Demographic Variables}
\end{center}
{r, results = "asis", echo = FALSE}
## tables
for(i in seq_along(demo)) {
print(
kable(demo[[i]], format = "latex", caption = names(demo)[i], longtable = TRUE, col.names = NULL) %>%
kable_styling(font_size = 7, latex_options = "repeat_header", full_width = FALSE)
)
}
### There are 19 other for loops that use the same format but a different list.
我收到的错误但不知道它的含义是:
!错位 对齐。 \h行-> 对齐 {\ifnum 0=`} i \let \hskip 跳过 \let 规则 \hrule \let... l.15724 348} extbackslash{} \hline 第453章
错误:LaTeX 无法编译 IIDP 数据字典 2020-11-05.tex。请参阅https://yihui.org/tinytex/r/#debugging 了解调试技巧。有关更多信息,请参阅 IIDP 数据字典 2020-11-05.log。 执行停止