简体   繁体   English

如何在目录和YAML标题之间添加空格?

[英]How can I add space between the table of contents and the YAML title?

A basic R markdown script: 基本的R降价脚本:

---
title: "Untitled"
author: "Example example"
output: 
  html_document:
    df_print: paged
    toc: true
    number_sections: true
---

# ALPHA Header

## Alpha sub-1

## Alpha sub-2

## Alpha sub-3

Will generate something akin to this: 会产生类似于以下内容:

在此处输入图片说明

I'd like to pad the space between the YAML headers and the table of contents - but I'm not sure how. 我想在YAML标头和目录之间填充空格-但我不确定如何填充。 I can specify CSS selector and styles but this only applies to Markdown after the auto generated ToC. 我可以指定CSS选择器和样式,但这仅适用于自动生成的ToC之后的Markdown。

Just add HTML line breaks in your author or title fields: 只需在您的作者或标题字段中添加HTML换行符:

author: "Example example<br><br>"

Or a div with a certain height: 或具有一定高度的div:

author: "Example example<div style=\"height: 100px;\"></div>" 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在YAML输出-Rmarkdown中的标题和作者之间添加空白行? - How add a blank line between title and authors in YAML output - Rmarkdown? 如何在 Bookdown 的目录中添加任意元素? - How can I add arbitrary elements to the Table of Contents in Bookdown? 如何在 R Markdown 中添加目录? - How can I add a table of contents in R Markdown? 如何将标题页与 RMarkdown Word output 中的目录分开? - How can I separate the title page from the table of contents in a RMarkdown Word output? 如何指定初始级别以将我的目录扩展到 R bookdown 项目(gitbook 输出格式)? 使用 YAML 设置? - How can I specific the initial level to have my table of contents be expanded to in an R bookdown project (gitbook output format)? With YAML setting? 如何在tableGrob图中添加标题? - How can I add a title to a tableGrob plot? 如何将类属性添加到`<ul> ` Rmarkdown 自动目录中的标签? - How can I add a class attribute to the `<ul>` tag in the automated table of contents in Rmarkdown? 从 R Markdown 文件列表的 yaml 标题标题生成目录 - Generate table of contents from the yaml header title of a list of R Markdown files 在 Rmarkdown 中创建表时如何增加列之间的空间? - How can I increase the space between columns when creating a table in Rmarkdown? 我无法在y值之间添加更多空间 - I can't add more space between the y values
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM