Learn R Programming

TeXCheckR (version 0.2.0)

replace_LaTeX_argument: Replace contents of LaTeX argument

Description

Replace contents of LaTeX argument

Usage

replace_LaTeX_argument(tex_lines, command_name, replacement, arg = 1L,
  .dummy_replacer = "ZzZz")

Arguments

tex_lines

Lines of text (as from readLines).

command_name

Name of the command (without backslash) whose first argument will be replaced.

replacement

Replacement for the contents of each argument.

arg

The (mandatory) argument that will be replaced.

.dummy_replacer

What to replace every letter in the argument with during parsing. Selecting a .dummy_replacer that is present in tex_lines is an error.

Value

A character vector with the first argument of command_name replaced with replacement.