When I make an rmd to create a word file, the table of contents does not automatically populate. I have to go into the word file and click ‘Update Table’, refreshing the table of contents, under the Table of contents header. I dont know why I have to do this, but this is for a mass produced document so I need it to appear automatically without any input. Here is an example from the default rmd, which gives me this problem.
---
title: "ex"
author: "Example"
date: "`r Sys.Date()`"
output:
word_document:
toc: true
---
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
## Including Plots
You can also embed plots, for example:
1