简体   繁体   中英

rticles and rmarkdown not removing table of contents

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} 


---

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM