Closed konstruktur closed 3 years ago
I'm not very familiar with bookdown::gitbook()
but if you post a more complete minimal reproducible example where panelset doesn't work as expected, there's a much higher likelihood that I'll be curious and try to figure out why.
Hi Garrick,
sorry I prepared a reprex, but forgot to post it. Here it comes - it's a default bookdown project where I added 00a-panelset.Rmd
and 00b-panelset.Rmd
with examples for panelset and added two output format (html_document2
and html_book
) to _output.yml
. Please check whether this is of use for you - I'll be happy to send you more examples (hopefully reproducible :-)
Thanks a lot, G
The panel content is there, but not rendered visible - seems like a CSS issue. The CSS for .panelset .panel-active interferes with .book
If we add !important
for a quick fix the content becomes visible. I'll have to check whether this has undesirable consequences.
Hi Garrick,
I added !important
to the stylesheet (style.css
) and it works - the panel content shows when active, just as it should.
.panelset .panel-active {
display: block !important;
}
I do not know whether hardcoding this is the best way, but at least it's a simple one. Sorry for bothering you with this, I could have found out earlier. Thanks a lot for your work on xaringanExtra! Best, G
Hi Garrick,
thanks so much for xaringanExtra! From all these amazing features I'd like to use panelset in a bookdown project. Tabsets are not native in bookdown, because of the focus on portability between formats (s. https://github.com/rstudio/bookdown/issues/393). However in a recent question xaringanExtra's panelset was found as a solution to integrate tabs in bookdown: https://stackoverflow.com/a/65921791/3680150
It seems that the panelset works correctly in
bookdown::html_book()
(with optionsplit_by: chapter
)bookdown::html_document2()
but in my preferred format gitbook the content of the panels does not yet appear
bookdown::gitbook()
Do you see a reason for that?
I use R 4.0.4 xaringanExtra 0.4.0 bookdown 0.21.4 knitr 1.3.2
Thanks a lot and all the best, G