微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

投影仪框架 Pandoc RMarkdown 定义中的非法参数编号

如何解决投影仪框架 Pandoc RMarkdown 定义中的非法参数编号

虽然我想使用 Latex 将我的 Rmarkdown 文件渲染为 beamer pdf。我收到错误

!定义中的非法参数号 \beamer@doifinframe

我只在标签列中得到这个。


title: ""
output: 
  beamer_presentation: 
    toc: false
    keep_tex: false
params:
        one_touch_plot: NA
classoption: "aspectratio=169"   
---

```{r setup,include=FALSE}
library(ggplot2)
library(knitr)
library(markdown)

knitr::opts_chunk$set(echo = FALSE,warning = FALSE,message = FALSE)


```
\begin{frame}[fragile]
  \begin{columns}[T]
      \begin{column}{0.27\textwidth}
```{r,out.width='100%',out.height='38%'}
params$one_touch_plot
``` 
    \end{column}
    \hfill
  \end{columns}
\end{frame}

解决方法

Markdown 有自己的列语法:

---
title: ""
output: 
  beamer_presentation: 
    toc: false
    keep_tex: false
params:
        one_touch_plot: NA
classoption: "aspectratio=169"  
---

# Section 1

## A vs B

::: columns

:::: column
```{r,out.width='100%',out.height='38%'}
params$one_touch_plot
``` 
::::

:::: column
other test
::::

:::

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。