powered by
Renders a CVXR Problem, Expression, or Constraint as a LaTeX string. Problem-level output uses the optidef package (mini*/maxi* environments) and atom macros from dcp.sty (shipped as system.file("sty", "dcp.sty", package = "CVXR")).
Problem
Expression
Constraint
optidef
mini*
maxi*
dcp.sty
system.file("sty", "dcp.sty", package = "CVXR")
to_latex(x, ...)
A character string containing LaTeX code.
A Problem, Expression, Constraint, or Objective.
Objective
Reserved for future options.
x <- Variable(3, name = "x") cat(to_latex(p_norm(x, 2))) # \cvxnorm{x}_2
Run the code above in your browser using DataLab