【问题标题】:Insert a manual paragraph in an header of an R markdown beamer presentation在 R markdown beamer 演示文稿的标题中插入手动段落
【发布时间】:2019-10-23 11:45:08
【问题描述】:

我正在使用 R Markdown 进行投影仪演示。我想在某些标题中插入一个手动段落。到目前为止,这是我的代码:

---
title: "An Introduction to Statistical Analysis with R"
author: Me
date: "15th of October 2019"
output: 
  beamer_presentation:
    slide_level: 2
---

# This is my first header

在 Beamer PDF 文件中,我希望标题位于两个单独的段落中,如下所示:

This is my
first header

有没有办法做到这一点?

【问题讨论】:

    标签: r markdown r-markdown knitr


    【解决方案1】:

    您可以简单地使用 LaTeX \newline 命令:

    ---
    title: "Untitled"
    author: "duckmayr"
    date: "10/23/2019"
    output: beamer_presentation
    ---
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = FALSE)
    ```
    
    ## Multiline \newline Heading
    
    blah blah blah
    

    【讨论】:

    • 工作得很好。谢谢。
    【解决方案2】:

    最简单的方法是在 my 后面放 2 个空格,即

    这是我的[空间][空间]

    第一个标题

    试试看。

    【讨论】:

    • 这对我不起作用。如果我在输出没有改变之后做两个空格,并且如果我做两个空格并开始一个新行“第一个标题”不再是标题的一部分。
    猜你喜欢
    • 2020-08-09
    • 1970-01-01
    • 1970-01-01
    • 2015-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-30
    相关资源
    最近更新 更多