0
votes

I cannot seem to remove the table of contents from my RMarkdown pdf document. I have tried a number of different things such as.

  • Changing toc: no to false
  • using differrent base_format: rticles::ieee_article artiles from the getNamespaceExports("rticles").
  • removing csl: elsevier-harvard.csl

Nothing seems to work and everytime I compile the table of contents appears - what am I missing?

Markdown:

---
title: some title
author:
  - name: some name
    email: some email
    affiliation: some department
    footnote: some footnote
  - name: some name
    email: some email
    affiliation: some department
    footnote: 2
footnote:
  - code: 1
    text: "Corresponding Author"
  - code: 2
    text: "Corresponding Author"
abstract: |
 some abstract here

journal: "An awesome journal"
date: "`r Sys.Date()`"
bibliography: mybibfile.bib
#linenumbers: true
#numbersections: true
csl: elsevier-harvard.csl
output:
    bookdown::pdf_document2:
    base_format: rticles::ieee_article
    number_sections: no
    toc: no
    tables: true
header-includes:
  - \usepackage{floatrow}
  - \floatplacement{figure}{H}
  - \usepackage{booktabs}
  - \usepackage{array} 


---
1

1 Answers

1
votes

Try to format your output section of the YAML header as follows:

output:
    bookdown::pdf_document2:
      number_sections: no
      toc: no
      tables: true
    base_format: rticles::ieee_article

Then the TOC should disappear. I hope that the base_format argument will be taken into consideration. Please try and report.