This is reproducible, going back & forth between 1.11 and 1.12,
across my complicated app and a very simple example.
I thought this was the kind of problem that packrat is supposed to prevent... My buddy cloned my project with 1.10 in it, but apparently his rmarkdown 1.12 overrode packrat's rmarkdown 1.10. Anyone wish to give me a better understanding of packrat?
Is your primary question about the TOC issue or packrat? It might help to clarify that.
In some quick tests I didn't see any problems with adding a TOC in a variety of different formats with rmarkdown_1.12. It would be great to get a reproducible example. Can you add the code for the simple example you referenced in your question that demonstrates the problem?
The key question is, why is packrat not working.
If it works right, whatever problem there is with 1.12 is (for me) moot.
But this thread can help others who encounter the same problem,
and maybe the developer will be interested.
Here is my test code. Clicking "Run Document",
it looks like the TOC flashes briefly and disappears.
Removing the "runtime: shiny" ,
it doesn't run at all (knitr button).
---
title: "TestingTOC"
runtime: shiny
output:
html_document:
number_sections: yes
toc: yes
toc_depth: 6
toc_float:
collapsed: no
smooth_scroll: no
---
# A title
## A subtitle
### A subsubtitle
# A title
## A subtitle
### A subsubtitle
Is packrat project activated when you open the project ?
Check that .libPaths() points to your project library.
if not, you need to activate packrat::on()
Are packages all restored inside packrat library ? packrat::status() should help you with that to see if the mentioned in the lockfile are already all installed.
Is the packrat lockfile up to date ? Does it contains the correct version you want your project to depend about.
Hope it helps.
Note: Next version of packrat will be in this new package