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

将水平规则添加到html rmarkdown文档中会隐藏文本部分

  •  16
  • rrr  · 技术社区  · 8 年前

    根据 http://rmarkdown.rstudio.com/authoring_basics.html 这将被称为“水平规则”,我可以用三条或更多条来做到这一点 ---

    ---
    title: "formatting issue"
    author: "rrr"
    output: 
      html_document:
        toc: true
        toc_depth: 2
        toc_float: true
    ---
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = TRUE)
    ```
    
    # bla {.tabset}  
    
    ## tab 1  
    
    ---  
    **text1**  
    bla  
    
    ---
    **text2**  
    bla
    
    ---
    **text3**  
    bla  
    
    ---  
    
    ## tab 2  
    
    bla
    
    ## tab 3  
    
    bla
    
    # bla  
    
    bla bla bla bla
    

    请注意,文本部分 文本1 文本3 在编写html时,不要全部显示。当我把它弄得一团糟的时候,我最终会发现不同的东西不见了,但我无法让它们全部出现,也无法找出原因。

    1 回复  |  直到 8 年前
        1
  •  22
  •   Dan    5 年前

    水平分界符需要由一条前导新线和一条后新线包围,如下所示:

    ## heading
    much interesting text ...
    
    ---
    
    ## heading
    more interesting text