【发布时间】:2020-08-09 17:44:01
【问题描述】:
我正在尝试在 rmarkdown beamer (Rstudio) 中创建下表(附在下面)。它最初有效,但自从我更新了 R (3.6.3) 和 Rstudio 后,它就没有用了。我还更新了所有 pkg 并重新安装了 tinytex pkg,但它不断生成以下错误消息:
output file: dp02_slide.knit.md
! File ended while scanning use of \beamer@collect@@body.
<inserted text>
\par
<*> dp02_slide.tex
Error: LaTeX failed to compile dp02_slide.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See dp02_slide.log for more info.
Execution halted
---
title: "Big Business"
output:
beamer_presentation:
citation_package: natbib
theme: "boxes"
header-includes:
- \widowpenalties 1 150
- \usepackage{amsmath}
- \renewcommand{\bibname}{References}
- \usepackage{adjustbox}
- \usepackage{booktabs}
- \usepackage{tikz}
- \usepackage{verbatim}
- \usepackage{chronosys}
- \usepackage{stackengine}
- \usepackage{xcolor}
- \usepackage{babel}
- \usetikzlibrary{arrows.meta}
- \usetikzlibrary{arrows,decorations.markings}
- \usetikzlibrary{intersections}
- \usepackage[font=small]{caption}
- \usepackage{adjustbox}
- \usepackage{tabularx}
- \usepackage{pgfplots}
- \pgfplotsset{compat=1.16}
- \usepackage[makeroom]{cancel}
- \renewcommand{\bibname}{References}
- \usepackage{subcaption}
- \usepackage{wrapfig}
---
# Table 1
\begin{table}[h!]
\centering
\small
\begin{adjustbox}{width=\columnwidth,center}
\begin{tabular}{ccccc}
\hline\hline
Stages & \textit{Financial regimes} & \textit{Preferential target} & \textit{Loan interest rates} & \begin{tabular}{@{}c@{}c@{}}\textit{Inequality} \\ \textit{trends} \\ \textit{(prediction)} \end{tabular} \\ [0.5ex]\hline
Stage I (1960s) & \begin{tabular}{@{}c@{}c@{}}Repressed\\(Industry-neutral) \end{tabular} & Exporting firms & \begin{tabular}{@{}c@{}c@{}}Preferential rate ($r^{I}$)\\(based on \\export performance) \end{tabular}&$\searrow$?\\[1ex]\hline
\end{tabular}
\end{adjustbox}
\end{table}
图片:
【问题讨论】:
-
你能不能发一个minimal reproducible example,我们可以复制+粘贴来重现你的问题?
-
如果我在基本测试文档中使用你的代码片段,它编译得很好。
-
我用相同问题的较短代码替换了它。我希望它有效。我还附上了我想作为链接生成的表格。谢谢@samcarter_is_at_topanswers.xyz
-
不幸的是,您仍然只显示一个代码片段而不是一个可以让我们重现问题的小型测试文档。
-
我认为这是您所期望的。否则,请告诉我。感谢您的耐心@samcarter
标签: r latex r-markdown beamer