tex_list: Export object to TeX

View source: R/output.R

tex_listR Documentation

Export object to TeX

Description

Export object to TeX

Usage

tex_list(..., x = NULL, zero_as_dot = FALSE, matstr = NULL)

Arguments

...

Objects to be put in tex for. Can be caracas_symbols and other (simple) R objects (atomics, dataframes, matrices).

x

A such objects described above.

zero_as_dot

Print zero as dots

matstr

Replace ⁠\begin{matrix}⁠ with another environment, e.g. pmatrix. If vector of length two, the second element is an optional argument.

Examples

if (has_sympy()) {
  X <- matrix_sym(4,2,"a")
  b <- vector_sym(2,"b")
  y <- vector_sym(4,"y")
  tex_list(y, "=", X, b)
  tex_list(x=list(y, "=", X, b))

  M <- iris[1:3, 1:2]
  tex_list(M, "+", M, "=", M + M)
  tex_list(x=list(M, "+", M, "=", M + M))

}

r-cas/caracas documentation built on Feb. 28, 2025, 3:39 p.m.