rmarkdown
rmarkdown copied to clipboard
.tabset-dropdown's menu right icon doesn't render properly with self_contained: false
I also noticed this problem two weeks ago, but didn't look into it. This is another reason why I wanted to drop this feature.
This looks to be related to self_contained
. Here's a minimal example:
---
title: "tabset dropdown"
output:
html_document:
self_contained: false
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# R Markdown {.tabset .tabset-dropdown}
## Tab A
This is an R Markdown document.
## Tab B
When you click the **Knit** button a document will be generated.
## Tab C
Here is a summary table.
```{r cars}
summary(cars)
```
## Tab D
Here is a plot:
```{r pressure, echo=FALSE}
plot(pressure)
```
# Here is another section {.tabset}
## Tab A
This is content in a standard tabset.
## Tab B
This is more content in a standard tabset.
any idea if it was a problem from the very beginning when https://github.com/rstudio/rmarkdown/pull/1405 got implemented or it appears later on, for example when migrating to bs4?
It has always been an issue
hello! I was wondering if this issue has been resolved, I am currently encountering this issue when I add a navbar to my R Markdown file knitted to html (the tabset-dropdown works as expected when knitting without _site.yml
)
I've pasted my site.yml file below:
name: Recovery Funds Dashboard
navbar:
title: Recovery Funds Dashboard
left:
- text: Home
href: index.html
- text: FAQ
href: faq.html
- text: Glossary
href: glossary.html
output:
html_document:
output_dir: '.'
css: !expr here::here("www", "web_report_trust.css")
self_contained: TRUE
output_dir: '.'
index.html
is the page that has the issue (see screenshot below). All of the component markdown files (including index.Rmd) set self_contained: TRUE
Thanks so much for your help!
Similar to @alenastern I am also still having this issue...does a solution exist?
Thanks for pinging again @michaelofrancis
I have pushed a fix that it simpler than unmerged #2054
It should work as expected
It works! Thank you.
I revisited this thread in the hopes of incorporating the fix but I'm still having the same issue posted in my original comment above. @michaelofrancis @cderv - are there any package/software updates I need to make in order to implement the fix? My session info is below and I'm using RStudio 2022.12.0. Thank you!!
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] zip_2.2.0 Rcpp_1.0.9 pillar_1.7.0 compiler_4.1.1 tools_4.1.1
[6] digest_0.6.28 gtable_0.3.0 lubridate_1.7.10 evaluate_0.19 lifecycle_1.0.3
[11] tibble_3.1.5 pkgconfig_2.0.3 rlang_1.0.6 cli_3.4.1 DBI_1.1.3
[16] rstudioapi_0.13 yaml_2.2.1 xfun_0.36 fastmap_1.1.0 dplyr_1.0.7
[21] stringr_1.4.0 janitor_2.1.0 knitr_1.41 generics_0.1.0 vctrs_0.5.1
[26] htmlwidgets_1.5.4 grid_4.1.1 rprojroot_2.0.2 DT_0.20 tidyselect_1.1.1
[31] glue_1.4.2 snakecase_0.11.0 here_1.0.1 R6_2.5.1 fansi_0.5.0
[36] rmarkdown_2.10 ggplot2_3.4.0 purrr_0.3.4 magrittr_2.0.3 scales_1.2.1
[41] ellipsis_0.3.2 htmltools_0.5.2 rsconnect_0.8.28 assertthat_0.2.1 colorspace_2.0-2
[46] utf8_1.2.2 stringi_1.7.5 munsell_0.5.0 crayon_1.5.0
[36] rmarkdown_2.10
@alenastern you are using an old R Markdown version - The fix is in rmarkdown 2.17
You need to update.
@cderv thanks so much!
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.