Ressources for CSS styles suitable for Knitr-markdown output?

I'm looking for a ressource, where can I download CSS styles suitable for Rstudio / knitr markdown output?

By default, the CSS style is fine by default, but I would like to find a CSS style in which the content is in the middle of the screen.

I really don't know CSS, so I can't do it myself. I tried changing the default CSS style margin from 0px to 200 px:

body, td { font-family: sans-serif; background-color: white; font-size: 16px; margin: 200px; } 

The problem with this “solution” is that it only works if the browser window is maximized and the pdf printed in the browser is too narrow.

edit: This is good: https://gist.github.com/andyferra/2554919

edit2: Rstudio Preview (RStudio 0.98.932 - Windows XP / Vista / 7/8) has good CSS by default. Get it here: http://www.rstudio.com/products/rstudio/download/preview/

edit3: The newest version of Rstudio now includes some very nice CSS styles to choose from: http://www.rstudio.com/products/rstudio/download/

+6
source share
1 answer

Not just a CSS resource, but you can take a look at the knitrBootstrap project, which provides a way to convert Rmarkdown to bootstrap style HTML, including CSS style choices and some fancy javascript add-ons:

https://github.com/jimhester/knitrBootstrap

+6
source

Source: https://habr.com/ru/post/954420/


All Articles