保持在Rmarkdown投影仪中无法生成带有以下错误消息的表

问题描述 投票:0回答:1

我正在尝试在rmarkdown投影仪(Rstudio)中创建下表(如下所示)。它最初可以正常工作,但是自从我更新了R(3.6.3)和Rstudio以来,它一直没有工作。我还更新了所有的pkgs并重新安装了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}

图像:

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS94RHhSRC5wbmcifQ==” alt =“在此处输入图像描述”>“ >>

我正在尝试在rmarkdown投影仪(Rstudio)中创建下表(如下所示)。它最初可以正常工作,但是自从我更新了R(3.6.3)和Rstudio以来,它一直没有工作。我还更新了所有的...

r latex r-markdown beamer
1个回答
0
投票

Rmarkdown似乎无法处理方括号中的可选参数。作为解决方法,您可以将整个表作为真实的乳胶代码:

© www.soinside.com 2019 - 2024. All rights reserved.