问题
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