Courvoisier
Courvoisier

Reputation: 983

Remove section number from main text and from Table of Content

In Rmarkdown (output = PDF), if I add {-} to the section it removes the number, but it still shows in the TOC. How to do if I don't want it to show in the TOC?

thank you

Upvotes: 0

Views: 1359

Answers (1)

Dan
Dan

Reputation: 12074

I'm not sure exactly what you're asking, but hopefully one of these will do the job.

---
title: "Test"
author: "Test"
date: "Today"
output: 
  pdf_document:
    toc: true
    number_sections: true
---

# First 
Number and title appear in TOC.

# Second {-}
Title appears in TOC.

\section*{Third}
Nothing appears in TOC.

enter image description here

Upvotes: 1

Related Questions