nops_language {exams}R Documentation

Read NOPS Language Specifciation

Description

Read a NOPS language specification from a DCF file and optionally convert the language text to HTML.

Usage

  nops_language(file, converter = c("none", "tth", "pandoc"), ...)

Arguments

file

character. Path to a DCF file with a language specification. See exams2nops for a list of languages shipped in the package.

converter

character. The HTML converter to be used for the language text elements. Can be "none", "tth", or "pandoc".

...

further arguments passed to the converter (if any), e.g., for obtaining output formats other than HTML.

Details

The NOPS exams infrastructure is internationalized and can be customized through DCF files (borrowing the format from Debian configuration files). For a detailed description see: https://www.R-exams.org/tutorials/nops_language/. The DCF files typically either contain special characters as LaTeX commands or in UTF-8 encoding. To handle the former case, a converter can be applied to convert the language texts to HTML.

Value

A list with all language components provided by the DCF file.

See Also

exams2nops, nops_eval

Examples

## English
en <- nops_language("en")
names(en)
en$NoChanges

## French (LaTeX vs. HTML)
nops_language("fr", converter = "none")$NoChanges
nops_language("fr", converter = "tth")$NoChanges

## French (HTML or Markdown via pandoc)
nops_language("fr", converter = "pandoc")$NoChanges
nops_language("fr", converter = "pandoc", to = "markdown_strict")$NoChanges

[Package exams version 2.4-0 Index]