代码之家  ›  专栏  ›  技术社区  ›  Nautica

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

  •  0
  • Nautica  · 技术社区  · 7 年前

    一个基本的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
    

    将生成类似于此的内容:

    enter image description here

    我想在山药头和目录之间加一个空格,但我不知道怎么做。我可以指定CSS选择器和样式,但这只适用于自动生成TOC后的降价。

    1 回复  |  直到 7 年前
        1
  •  0
  •   Martin Schmelzer    7 年前

    只需在作者或标题字段中添加HTML换行符:

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

    或具有一定高度的DIV:

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