rstudio / bookdown

Authoring Books and Technical Documents with R Markdown
https://pkgs.rstudio.com/bookdown/
GNU General Public License v3.0
3.78k stars 1.27k forks source link

Include Tufte-style margin notes and figures in gitbook/bookdown #1054

Open isaactpetersen opened 3 years ago

isaactpetersen commented 3 years ago

Thanks for your work on this excellent package. I'd like to put in a feature request to allow Tufte-style margin notes in gitbook/bookdown. Margin/side notes and figures are possible with the tufte_html_book() output format using ^[footnote content] or margin_note() or marginfigure. But I'd prefer to stick with gitbook because gitbook has features that the Tufte style does not, including a floating table of contents. If it's helpful, there are other attempts to adapt gitbook to include margin notes (see below), but it'd be nice for this feature to be integrated into the package for use with gitbook and bookdown.

https://community.rstudio.com/t/bookdown-contest-submission-gitbook-style-tufte-style-for-web-book/11666/6 https://rdrr.io/github/dtkaplan/SDSdata/man/margin_note.html https://github.com/susanemcg/pandoc-tufteLaTeX2GitBook https://github.com/CrumpLab/statisticsLab/issues/17

Thanks!


By filing an issue to this repo, I promise that

I understand that my issue may be closed if I don't fulfill my promises.

eijoac commented 3 years ago

I second this idea. The gitbook+tufte style could have a default gitbook view without the tufte-style margin. The hamburger menu icon can be used as a display toggle between toc and margin. In that way, we won't have both the side-bar toc and the margin on display at the same, which is an efficient way of using the screen space.