0

I am knitting my Rmd file into HTML. Since there are a lot of codes in my Rmd file, I did the following so that my reader can navigate to a certain section within the HTML file:

---
title: "xxx"
author: "xxx"
date: "xx/xx/xx"
output:
  html_document:
    toc: true
    toc_float: true
---

However, the TOC in the HTML file is not working correctly:

enter image description here

Is there a way to solve such issue ? Thanks a lot!

RofyRafy
  • 73
  • 1
  • 7

1 Answers1

0

I realize what is causing the problem. Instead of doing:

# A {.tabset}

## a

## b

### b1

### b2

## c

Doing

# A {.tabset}

## a

## b {.tabset}

### b1

### b2

## c

solves the problem. Having smaller headers in tabset kind of mess up the TOC.

RofyRafy
  • 73
  • 1
  • 7