Rmarkdown: add header under tabset

可紊 提交于 2019-12-11 15:45:33

问题


In Rmarkdown I use {.tabset} to split chunks into tabs:

# Tabset 1 {.tabset}    

## A    
Text under tab A

## B    
Text under tab B

I'd like to add a large header under some tabs:

# Tabset 1 {.tabset}

## A
Text under tab A

# Title that should be under tab A

## B
Text under tab B

But the single # gets interpreted as a new section and breaks up the tabbing:

Is there a way to add a header using #s without breaking the tabbing?


回答1:


This solution doesn't satisfy your "add a header using #s" requirement, but a workaround is to use HTML tags directly in your R markdown document:

<h1>Title that should be under tab A</h1>

The <h1> tag corresponds to the # level header and doesn't break the tabbing.



来源:https://stackoverflow.com/questions/52062672/rmarkdown-add-header-under-tabset

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!