Title: | Highly Customizable 'rmarkdown' Theme for Scientific Reporting |
---|---|
Description: | Offers 'markdown' output formats designed with various scientific styles, allowing users to generate PDF and HTML outputs. The output has a contemporary appearance with vibrant visuals, providing numerous styles for effective highlighting. The package also includes additional features specifically tailored for front-page slides, enhancing the overall presentation and customization options. The package was created using the 'tufte' <https://rstudio.github.io/tufte/> package code as a starting point. |
Authors: | Obinna Obianom [aut, cre] |
Maintainer: | Obinna Obianom <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2024.2 |
Built: | 2024-11-04 04:18:41 UTC |
Source: | https://github.com/oobianom/scientific |
Template for creating scientific handout
handout( fig_width = 4, fig_height = 2.5, fig_crop = TRUE, dev = "pdf", highlight = "default", ... ) book( fig_width = 4, fig_height = 2.5, fig_crop = TRUE, dev = "pdf", highlight = "default", ... ) html(...) newthought(text) margin_note(text, icon = "⊕") quote_footer(text) sans_serif(text)
handout( fig_width = 4, fig_height = 2.5, fig_crop = TRUE, dev = "pdf", highlight = "default", ... ) book( fig_width = 4, fig_height = 2.5, fig_crop = TRUE, dev = "pdf", highlight = "default", ... ) html(...) newthought(text) margin_note(text, icon = "⊕") quote_footer(text) sans_serif(text)
fig_width |
Default width (in inches) for figures |
fig_height |
Default height (in inches) for figures |
fig_crop |
Whether to crop PDF figures with the command
|
dev |
Graphics device to use for figure output (defaults to pdf) |
highlight |
Syntax highlighting style passed to Pandoc. Supported built-in styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", "haddock", and "breezedark". Two custom styles are also included, "arrow", an accessible color scheme, and "rstudio", which mimics the default IDE theme. Alternatively, supply a path to a ‘.theme’ file to use a custom Pandoc style. Note that custom theme requires Pandoc 2.0+. Pass |
... |
Other arguments to be passed to |
text |
A character string to be presented as a “new thought” (using small caps), or a margin note, or a footer of a quote |
icon |
A character string to indicate there is a hidden margin note when the page width is too narrow (by default it is a circled plus sign) |
handout()
provides the PDF format
html()
provides the HTML format based on the scientific CSS
newthought()
can be used in inline R expressions in R
Markdown
`r newthought(Some text)`
and it works for both HTML (‘<span class="newthought">text</span>’) and PDF (‘\newthought{text}’) output.
margin_note()
can be used in inline R expressions to write a
margin note (like a sidenote but not numbered).
quote_footer()
formats text as the footer of a quote. It puts
text
in ‘<footer></footer>’ for HTML output, and
after ‘\hfill’ for LaTeX output (to right-align text).
sans_serif()
applies sans-serif fonts to text
.
a PDF or HTML notebook output based on the R markdown document provided
## Not run: # for Rmd to PDF library(rmarkdown) library(scientific) rmdfile <- "input.Rmd" rmarkdown::render(rmdfile, scientific::handout()) ## End(Not run) ## Not run: # for Rmd to HTML library(rmarkdown) library(scientific) rmdfile <- "input.Rmd" rmarkdown::render(rmdfile, scientific::html( toc = TRUE, toc_depth = 2)) ## End(Not run) newthought("In this section")
## Not run: # for Rmd to PDF library(rmarkdown) library(scientific) rmdfile <- "input.Rmd" rmarkdown::render(rmdfile, scientific::handout()) ## End(Not run) ## Not run: # for Rmd to HTML library(rmarkdown) library(scientific) rmdfile <- "input.Rmd" rmarkdown::render(rmdfile, scientific::html( toc = TRUE, toc_depth = 2)) ## End(Not run) newthought("In this section")