我已经看到有关此问题的类似问题,并尝试了一些解决方案,但到目前为止都没有奏效。 我正在尝试使用以下代码从Excel工作表创建表格。它可以毫无错误地编织到html
title: "Exercise Studies"
author: "xxxx"
date: "19/12/2019"
output:
html_document: default
pdf_document:
classoption: landscape
```{r, echo =FALSE, results = 'asis'}
library(knitr)
library(readxl)
studies = read_xlsx("C:/Users/file path is correct/CKD exercise studies.xlsx")
kable(studies, caption = "Exercise Studies in CKD stages 1-4")```
我收到以下消息:
! Missing number, treated as zero.
<to be read again>
\protect
l.80 ...enter}\rule{0.5\linewidth}{\linethickness}
\end{center}
Error: LaTeX failed to compile Exercise-Studies.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Exercise-Studies.log for more info.
Execution halted
相关日志文件的底部是: LaTeX信息:在输入行78上重新定义\ ref。 LaTeX信息:在输入行78上重新定义\ pageref。 LaTeX信息:在输入行78上重新定义\ nameref。 @ outlinefile = \ write3 \ openout3 =`Exercise-Studies.out'。
geometry 驱动程序:自动检测 geometry 检测到的驱动程序:pdftex geometry 详细模式-[preamble]结果: *驱动程序:pdftex *纸: *布局: * layoutoffset:[h,v] = [0.0pt,0.0pt) *模式: * h-part:(L,W,R)=(72.26999pt,469.75502pt,72.26999pt) * v-part:(T,H,B)=(72.26999pt,650.43001pt,72.26999pt) * \ paperwidth = 614.295pt * \ paperheight = 794.96999pt * \ textwidth = 469.75502pt * \ textheight = 650.43001pt * \ oddsidemargin = 0.0pt * \ evensidemargin = 0.0pt * \ topmargin = -37.0pt * \ headheight = 12.0pt * \ headsep = 25.0pt * \ topskip = 10.0pt * \ footskip = 30.0pt * \ marginparwidth = 65.0pt * \ marginparsep = 11.0pt * \ columnsep = 10.0pt * \ skip \ footins = 9.0pt加上4.0pt减去2.0pt * \ hoffset = 0.0pt * \ voffset = 0.0pt * \ mag = 1000 * @twocolumnfalse * @twosidefalse * @mparswitchfalse * @reversemarginfalse *(1in = 72.27pt = 25.4mm,1cm = 28.453pt)
!缺少数字,视为零。 \保护 l.80 ...输入} \规则{0.5 \ linewidth} {\ linethickness} \ end {center} 这是您使用了多少TeX内存: 494107中的10848个字符串 6172028中的154427个字符串字符 5000000中有216784个记忆字 15000 + 600000中的14819个多字母控制序列 7393个单词的字体信息可获得16种字体,其中9000种为8000000 8191中有14个断字例外 5000i,500n,10000p,200000b,80000s中的40i,1n,37p,241b,78s堆栈位置
! ==>发生致命错误,没有输出PDF文件!
我已经重新安装了tinytex,但这没有帮助。 我正在使用R Studio的1.2版