Print 'LaTeX' equations built with extract_eq nicely in R Markdown environments.

# S3 method for class 'equation'
knit_print(
  x,
  ...,
  tex_packages = "\\renewcommand*\\familydefault{\\rmdefault}"
)

Arguments

x

'LaTeX' equation built with extract_eq

...

not used

tex_packages

A string with LaTeX code to include in the header, usually to include LaTeX packages in the output.

Value

A string with the equation formatted according to R Markdown's output format (different output for HTML, PDF, docx, gfm, markdown_strict). The format is detected automatically, so, you do not have to worry about it.