Skip to contents

Write LaTeX representation of a model

Usage

# S3 method for class 'model'
write_latex(
  x,
  file = NULL,
  append = FALSE,
  preamble = NULL,
  ending = NULL,
  title = paste0("Model: ", x$name),
  subtitle = x$desc,
  author = x$authors,
  show_date = TRUE,
  subsection_number = TRUE,
  include_sets = TRUE,
  include_aliases = TRUE,
  include_parameters = TRUE,
  include_variables = TRUE,
  include_equations = TRUE,
  eq_substitute = list(when = "condition"),
  alias_map = NULL,
  verbose = FALSE,
  ...
)

Arguments

append

Logical; if TRUE, appends to the file instead of overwriting.

preamble

Character vector; LaTeX preamble to use. If NULL, uses the default preamble.

ending

Character vector; LaTeX ending to use. If NULL, uses the default ending.

subsection_number

Logical; if TRUE, includes subsection numbering in the LaTeX output.

eq_substitute

Named list; substitutions for specific AST elements in the equation with ast_where object to display conditions, indices, etc. below the equation.

verbose

Logical; if TRUE, prints additional information during processing.

...

Additional arguments passed to the as_latex function for rendering the equation.