Type: Package
Title: Individual R Markdown Templates
Version: 0.1.1
Description: Simplifies the generation of customized R Markdown PDF templates. A template may include an individual logo, typography, geometry or color scheme. The package provides a skeleton with detailed instructions for customizations. The skeleton can be modified by changing defaults in the 'YAML' header, by adding additional 'LaTeX' commands or by applying dynamic adjustments in R. Individual corporate design elements, such as a title page, can be added as R functions that produce 'LaTeX' code.
License: MIT + file LICENSE
URL: https://cynkra.github.io/indiedown/, https://github.com/cynkra/indiedown
BugReports: https://github.com/cynkra/indiedown/issues
Depends: R (≥ 4.0.0)
Imports: cli, fs, gfonts, rlang, withr
Suggests: callr, knitr (≥ 1.12), rcmdcheck, rmarkdown, spelling, testthat (≥ 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: TRUE
RoxygenNote: 7.1.1
NeedsCompilation: no
Packaged: 2021-03-21 08:49:06 UTC; christoph
Author: Christoph Sax ORCID iD [aut, cre], Kirill Müller ORCID iD [aut], Angelica Becerra [aut], Frederik Aust [aut], cynkra GmbH [fnd, cph]
Maintainer: Christoph Sax <christoph.sax@gmail.com>
Repository: CRAN
Date/Publication: 2021-03-22 15:30:06 UTC

Skeleton for a Customized R Markdown Template

Description

Set up the packages structure for an indiedown-based customized R Markdown template. See vignette("indiedown") for a more detailed usage example.

Usage

create_indiedown_package(path, overwrite = FALSE)

Arguments

path

Package path

overwrite

Should existing assets be overwritten?

Value

This function is called for its side effects and returns NULL, invisibly.

Examples

path <- file.path(tempdir(), "mydown")

# set up empty R Package 'mydown'
create_indiedown_package(path, overwrite = TRUE)

Download and Use Google Fonts

Description

Download and use Google fonts, using the gfonts package.

Usage

use_indiedown_gfonts(
  path = ".",
  id = "roboto",
  variants = c("regular", "300italic", "700", "700italic")
)

Arguments

path

Package path

id

Id of the font, correspond to column id from get_all_fonts.

variants

Variant(s) to download, default is to includes all available ones.

Value

This function is called for its side effects and returns NULL, invisibly.

Examples


path <- file.path(tempdir(), "mydown")
create_indiedown_package(path, overwrite = TRUE)
# Use Lora, instead of default Roboto
use_indiedown_gfonts(
  path = path,
  id = "lora",
  variants = c("regular", "italic", "700", "700italic")
)