latex_equation_to_png: Write an equation in Rmarkdown to a LaTeX format for...

View source: R/latex_equation_to_png.R

latex_equation_to_pngR Documentation

Write an equation in Rmarkdown to a LaTeX format for compiling into a png equation image

Description

Write an equation in Rmarkdown to a LaTeX format for compiling into a png equation image

Usage

latex_equation_to_png(A, b, file = NULL, format = "system of equations")

Arguments

A

An array to convert to Latex format

b

A vector to convert to Latex format

file

The file location to save the pdf output

format

The kind of equation to plot. The options are "system of euqations", "matrix equation", or "vector equation"

Value

A string that can be put into an Rmarkdown document by using cat() to direct the output

Examples

latex_string <- array_to_latex(matrix(1:6, 3, 2))

# within Rmarkdown chunk
# cat(latex_string)

jtipton25/dasc2594 documentation built on Oct. 7, 2022, 3:46 p.m.