如何在 rmarkdown 演示文稿中包含左侧图像和右侧文本

新手上路,请多包涵

如何在 Markdown 中完成此操作?

我在 Rmarkdown 中使用 beamer 演示文稿,我想要幻灯片左侧的图像和幻灯片右侧的文本。

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

但是对于 Markdown 不是乳胶。

原文由 wolfsatthedoor 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 511
2 个回答

使用 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}

在此处输入图像描述

原文由 Martin Schmelzer 发布,翻译遵循 CC BY-SA 3.0 许可协议

你可以按照 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)
:::
::::

截屏

原文由 Cyrus Yip 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题