RMarkdown: how to complete a tab

Once I have defined tabs, how do I define content outside / below tabs? Or, how do I end tabbed content?

I planned a layout like this:

title content above tabbed region. tab1 tab2 ------------------- tab content 1 ------------------- content below tabbed region 

which in rmarkdown will be

 ## title {.tabset .tabset-fade} content above tabbed region. ### tab 1 tab content 1 ### tab 2 tab content 2 content below tabbed region. 

But content below tabbed region. Appears as part of tab2. How can this be determined outside the tab?

Perhaps I may have the following headings in the content below. So the related question is how to determine which headers should be part of the tab and which should not be?

+21
r r-markdown
source share
3 answers

My approach to this problem is simple, but it works:

 ## title {.tabset .tabset-fade} content above tabbed region. ### tab 1 tab content 1 ### tab 2 tab content 2 ## content below tabbed region 

A tab only works for โ€œheader subheadings using the .tabset attribute will appear inside the tabs and not as a separate sectionโ€ (see here )

Thus, you just need to define a new title (in this case without a title) one level above the tabs to signal RMD so that it is not in the tabbed section.

enter image description here

It is also possible to create a document with different tabs in different headers:

 ## section 1 {.tabset .tabset-fade} content above tabbed region. ### tab 1 tab content 1 ### tab 2 tab content 2 ## section 2 {.tabset .tabset-fade} ### tab 1 tab content 1 ### tab 2 tab content 2 ### tab 3 tab content 3 # content below tabbed region 

enter image description here

Yours faithfully,
J_f

+49
source share

An alternative is to use a closing div tag (i.e. </div> ). See the following:

 --- title: "Test" output: html_document --- '''{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ''' ## Title {.tabset .tabset-fade} Content above tabbed region. ### Tab 1 Tab 1 content ### Tab 2 Tab 2 content </div> Content below tabbed region 
+6
source share

Use {-} to remove table of contents numbers after tabbed content ends

 tab content 2 ## section 2 {.tabset .tabset-fade} ### tab 1 tab content 1 ### tab 2 tab content 2 ### tab 3 tab content 3 ## {-} content below tabbed region 
+2
source share

All Articles