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

HTML output should default to sans-setif section headings and serif text #904

Closed krishnakumarg1984 closed 3 years ago

krishnakumarg1984 commented 4 years ago

In the canonical LaTeX documentclass book or report for a long-form document (which is bookdown's target category), it is desirable to have the body text is typeset using serif version of the font while having the section headings typeset using sans-serif versions of the font. This appears to be a strong typographical convention for reasons of the comfort of reading.

https://tex.stackexchange.com/questions/64059/sans-serif-headings-serif-body-text http://www.khirevich.com/latex/font/ https://subscription.packtpub.com/book/hardware_and_creative/9781847199867/11/ch11lvl1sec155/time-for-action-designing-chapter-and-section-headings

Right now, looking at the gitbook output of the bookdown book as well as the gitbook output generated by bookdown-minimal project template, it is not easy to make such a fine-tuned change. The changes of font type currently get applied throughout the document. Can we fine-tune this somehow?

cderv commented 3 years ago

With HTML output, you should be able to customize font using CSS as any other HTML output. You can target specific part of the document using CSS selector.

Did you try that already ?

I'll close this as I don't think this is bookdown specific.

You can follow the issue guide and ask such question in Q&A website: https://yihui.org/issue/#got-a-question

Please feel free to reopen if there is something specific I missed.

Thank you.

github-actions[bot] commented 3 years ago

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.