getSnapshotImage
Class: mlreportgen.report.Equation
Namespace: mlreportgen.report
Create equation image and return file path or data URL
Syntax
equationImage = getSnapshotImage(equation,report)
Description
creates an image of the formatted equation and returns the path of the file or
equationImage
= getSnapshotImage(equation
,report
)data
URL that contains the image. The returned value depends on
the value of the UseDirectRenderer
property of the mlreportgen.report.Equation
object specified by
equation
.
Input Arguments
Output Arguments
Examples
Create a Left-Aligned, Numbered Equation
import mlreportgen.report.* import mlreportgen.dom.* rpt = Report("equation","html"); ch = Chapter("Title","Equation"); eq = Equation("\int_{0}^{2} x^2\sin(x) dx"); eq.FontSize = 12; p = Paragraph("Eq 1: "); p.Bold = true; eqImg = Image(getSnapshotImage(eq,rpt)); t = Table({p,eqImg}); add(ch,t); add(rpt,ch); close(rpt); rptview(rpt);
Version History
Introduced in R2017b