Skip to contents

Read configuration from a YAML file to provide instructions for styling and PDF- or Word-specific options.

Usage

config_from_file(filename)

Arguments

filename

Path to the YAML configuration file, e.g. "glossr-config.yaml".

Value

Invisibly, the contents of the configuration file that passed validation.

Examples

config_file <- system.file("extdata/glossr-config.yml", package="glossr")
config_from_file(config_file)
print_config()
#> 
#> ── General line formatting ─────────────────────────────────────────────────────
#> 1. a: i
#> 2. b:
#> 3. c:
#> 4. preamble: b
#> 5. translation:
#> 
#> ── PDF-specific formatting ─────────────────────────────────────────────────────
#> 1. exskip: 2
#> 2. belowglpreambleskip: 0
#> 3. aboveglftskip: 0
#> 4. extraglskip: 0
#> 
#> ── Word-specific formatting ────────────────────────────────────────────────────
#> 1. font_family: Cambria, Times New Roman, and Times New Roman
#> 2. font_size: 12
#> 3. page_width: 1332
#> 
#> ── Other formatting ────────────────────────────────────────────────────────────
#> 1. output: word
#> 2. trans_quotes: '
#> 3. numbering: TRUE