如何在左侧包含图像,在右侧包含文本以进行rmarkdown演示

wol*_*oor 5 html markdown r beamer r-markdown

如何在Markdown中完成?

我正在使用Rmarkdown中的投影仪演示文稿,我希望幻灯片左侧的图像和幻灯片右侧的文本.

基本上,这是做什么的:https://tex.stackexchange.com/questions/165475/figure-next-to-text-in-beamer

但对于Markdown而言不是乳胶.

Mar*_*zer 6

使用multicol包:

---
title: "Untitled"
author: "Martin"
date: "7/9/2017"
output: 
  beamer_presentation: 
    keep_tex: yes
header-includes:
  - \usepackage{multicol}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## R Markdow

\begin{multicols}{2}

  \null \vfill
  \includegraphics[width=.3\textwidth]{unnamed.png}
  \vfill \null

\columnbreak

  \null \vfill
  \begin{itemize}
    \item Item 1
    \item Item 2
  \end{itemize}
  \vfill \null
\end{multicols}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

  • 请向下滚动人员:[这是正确答案](/sf/answers/4500005261/_ (2认同)

Cyr*_*Yip 5

你可以用 Pandoc 的方式做到这一点!有关更多信息,请参阅手册

---
output: beamer_presentation
---

:::: {.columns}
::: {.column width="60%"}
![giraffe](giraffe.jpg)
:::
::: {.column width="40%"}
["Funny giraffe looking at the side"](https://www.flickr.com/photos/8070463@N03/9594476129) by [Tambako the Jaguar](https://www.flickr.com/photos/8070463@N03) is licensed under [CC BY-ND 2.0](https://creativecommons.org/licenses/by-nd/2.0/?ref=ccsearch&atype=rich)
:::
::::
Run Code Online (Sandbox Code Playgroud)

截屏