Open bastistician opened 4 months ago
Summary after the R dev day:
Contributors:
We got a good first version of the CSS improving on many things. The CSS code lives here: https://collabedit.com/ggk9x and there is a copy on the google doc.
There are a few issues to keep working on, those are listed under Outstanding issues in the same google doc
Adding an inline copy of the CSS below, just to make sure it's safe in this issue
*/ pre code, pre samp, pre var, pre kbd { padding: 0; border: none; } /* But not inside*/ pre code { padding: 0; border: none; } /* Nav bar ----------------------------------------------------- */ /* nav-panel and header duplicated for different versions*/ .nav-panel, .header { font-size: smaller; padding: 4px; margin-block-start: 50px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; text-align: center; border-block-start-style: solid; border-block-start-color: grey; border-block-start-width: 1.75px; } /* Hide horizontal line --------------------------------------------------- */ hr { display: none; } /* Misceallaneous styles ------------------------------------ */ /* Eliminate borders for table cartouche */ table.cartouche, table.cartouche td, table.cartouche th {border: none} table.cartouche {width: 100%} /* Customise bullets */ li { margin-bottom: 0.75em;} table.multitable { margin: 1em 0; border-spacing: 0.25em} table th {text-align: left;} /* In TOC, only show two levels and make as compact as possible */ .contents ul ul li { margin: 0; } .contents ul ul ul { display: none; } /* change the properties of the images */ img.image { vertical-align: middle; } ```
The R manuals (like Writing R Extensions) are written in the GNU documentation format Texinfo and converted into several formats, most prominently HTML. The HTML versions are installed with R under
file.path(R.home("doc"), "manual")
and linked fromhelp.start()
. They are also built and published on CRAN, see https://CRAN.R-project.org/manuals.html. Currently they use a minimalistic CSS (which is baked into the generated HTML files). A simple CSS is certainly desirable for maintenance reasons, browser compatibility, and robustness against changes in thetexi2any
converter, but I believe the appearance of these single-page manuals could still be improved under these constraints.To make the manuals from their Texinfo sources, one needs the
texi2any
program from GNU Texinfo. The HTML manuals will be built by default when building R andtexi2any
is available. To update the HTML outputs after modifyingRman.css
simply runmake
indoc/manuals
. If this is too cumbersome, one could of course also play directly with one of the generated HTML manuals (e.g., WRE from R-release on CRAN) and tweak the CSS therein (everything above thebody
selector are default styles inserted bytexi2any
).