rmarkdown
rmarkdown copied to clipboard
Float TOC issues with scrolling
Hello: when I have HTML documents where I can scroll sideways/horizontal (happens with wide tables, etc), the floating TOC stays fixed on the screen, and not fixed relative to the content. It’s then hidden behind code boxes and everything else that is transparent.
This seems to be a tough issue to solve. A workaround would be applying a CSS rule to the elements that might overflow. For example,
p {overflow-x: auto}
reprex
---
title: test
output:
html_document:
toc: true
toc_float: true
---
```{css}
p {overflow-x: auto}
```
# foo
## bar
### buz
```{r, out.extra='style="width:50cm; max-width:50cm"'}
plot(iris)
```
It would be easier to style such content if we can target output part from chunk. Applying overflow auto to any <p> may be too much, but that indeed works.
This could help for styling: https://github.com/rstudio/rmarkdown/issues/2025