【问题标题】:Rmarkdown beamer: How to left justify the title pageRmarkdown beamer:如何左对齐标题页
【发布时间】:2018-07-14 20:18:36
【问题描述】:

如何将我的 Rmarkdown beamer 演示文稿的标题页对齐到左侧而不是默认中心?

示例,默认居中:

---
title: "Untitled"
author: "S SS"
date: "2/4/2018"
output: beamer_presentation
---

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

## R Markdown

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

【问题讨论】:

    标签: r latex r-markdown beamer


    【解决方案1】:

    这是一个技巧,直到有人提出更好的答案:我们将放弃标准的投影仪标题幻灯片,只需将第一张幻灯片格式化为标题幻灯片:

    ---
    output: beamer_presentation
    header-includes:
      - \usepackage{color}
    ---
    
    \color{blue}
    \LARGE{\textbf{This is the title}}  
    \color{black}
    \vspace{0.2cm}
    \large{Author Name}  
    \large{February 4, 2018}
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = FALSE)
    ```
    
    ## R Markdown
    
    This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
    
    When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
    

    【讨论】:

      【解决方案2】:

      您可以使用

      简单地切换到左对齐的标题页
      \setbeamertemplate{title page}[default][left]
      

      要在 rmarkdown 中使用它,请将这一行放在一个名为 preamble.tex 的文件中并使用

      ---
      title: "Untitled"
      author: "S SS"
      date: "2/4/2018"
      output: 
        beamer_presentation:
          includes:
            in_header: preamble.tex
      
      ---
      
      test
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-02-18
        • 2021-10-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-04-12
        相关资源
        最近更新 更多