exams (version 2.3-6)

nops_language: 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"))

Value

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

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".

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: http://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.

See Also

exams2nops, nops_eval

Examples

Run this code
## 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
if (requireNamespace("rmarkdown") && rmarkdown::pandoc_available()) {
nops_language("fr", converter = "pandoc")$NoChanges
}

Run the code above in your browser using DataLab