render_changes: Render changes as HTML

View source: R/render_changes.R

render_changesR Documentation

Render changes as HTML

Description

Makes and HTML rendering of the track changes markup in markdown.

Usage

render_changes(text = NULL, file = NULL, ...)

Arguments

text

The markdown as a character vector with a single value (i.e. not one value per line). Either 'text' or 'file' must be used, but not both.

file

The file containing the markdown to be rendered. Either 'text' or 'file' must be used, but not both.

...

Arguments passed on to rmarkdown::render

input

Input file (R script, Rmd, or plain markdown).

output_format

R Markdown output format to convert to. Pass "all" to render all formats defined within the file. Pass the name of a format (e.g. "html_document") to render a single format or pass a vector of format names to render multiple formats. Alternatively you can pass an output format object; e.g. html_document(). If NULL is passed then the output format is the first one defined in the YAML metadata of the input file (defaulting to HTML if none is specified).

output_options

List of output options that can override the options specified in metadata (e.g. could be used to force self_contained or mathjax = "local"). Note that this is only valid when the output format is read from metadata (i.e. not a custom format object passed to output_format).

output_file

Output file. If NULL then a default based on the name of the input file is chosen.

output_dir

Output directory. An alternate directory to write the output file to (defaults to the directory of the input file).

intermediates_dir

Intermediate files directory. If NULL, intermediate files are written to the same directory as the input file; otherwise.

knit_root_dir

The working directory in which to knit the document; uses knitr's root.dir knit option. NULL means to follow the knitr default, which is to use the parent directory of the document.

runtime

The runtime target for rendering. static produces output intended for static files; shiny produces output suitable for use in a Shiny document (see run). The default, auto, allows the runtime target specified in the YAML metadata to take precedence, and renders for a static runtime target otherwise.

clean

TRUE to clean intermediate files created during rendering.

params

List of named parameters that override custom params specified within the YAML front-matter (e.g. specifying a dataset to read or a date range to confine output to). Pass "ask" to start an application that helps guide parameter configuration.

knit_meta

(For expert use) Meta data generated by knitr.

envir

The environment in which the code chunks are to be evaluated during knitting (can use new.env() to guarantee an empty new environment).

run_pandoc

Whether to run Pandoc to convert Markdown output.

quiet

TRUE to suppress printing of the pandoc command line.

encoding

The encoding of the input file; see file.


ropenscilabs/trackmd documentation built on May 16, 2022, 9:31 p.m.