Skip to contents

Generate a LaTeX environment

Usage

latex_environment(
  x,
  environment_name,
  required_args = list(),
  optional_args = list()
)

Arguments

x

The contents of the environment, a scalar vector where it will be collapsed with newlines.

environment_name

The name of the environment (like "tabular" or "minipage")

required_args

A list of the required arguments to the environment, in order.

optional_args

A named list of the optional arguments to the environment, in order. It is an error for an optional argument to be NULL prior to a non-optional argument.

Value

A character scalar of the environment with newlines as "\n" characters embedded.