Replies: 1 comment 2 replies
-
Could you properly format your post using code blocks for code and terminal outputs? Thanks. Please remove everything unnecessary from your code example. I highly doubt we need all those options.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I'm encountering a problem with Quarto in which the Table of Contents (TOC) stops rendering correctly after a specific R code chunk. Although headings prior to the code chunk are displayed in the TOC, all headings following the code chunk are missing from the TOC, even though they appear in the main document content.
YAML Configuration
Here’s my YAML setup:
yaml
title: "A Scoping Review of MCMC Applications in Single-Case Experimental Design Research"
format:
html:
theme: cosmo
toc: true
toc-location: left
toc-depth: 3
code-fold: true
code-tools: true
css: styles.css
self-contained: true
math: katex
highlight-style: tango
Problematic Section in Document
The issue begins after the following heading and code chunk:
3D MCMC Simulation Plot
The 3D plot below provides a visualization of the Markov Chain Monte Carlo (MCMC) process over time, specifically across two parameters,$\theta_1$ and $\theta_2$ . Each point in the plot represents one iteration of the MCMC process, where new values for these parameters are proposed and either accepted or rejected according to the Metropolis-Hastings algorithm.
...
r
run_mcmc_3d <- function(n_iter, target_mean = c(0, 0), target_sd = c(1, 1), proposal_sd = c(0.5, 0.5)) {
MCMC Simulation Code
...
}
n_iter <- 1000
mcmc_result <- run_mcmc_3d(n_iter)
interactive_plot_3d <- plot_ly(...)
interactive_plot_3d
TOC Behavior Observed
Troubleshooting Steps Taken
Expected vs. Actual Output
Could certain code chunks (e.g., complex or interactive plots) disrupt TOC rendering in Quarto?
Are there specific settings or workarounds to prevent code chunks from interfering with TOC generation?
Any guidance or suggestions to help resolve this TOC issue would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions