Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

**Package: **mlreportgen.report

**Superclasses: **

Equation reporter

Create an equation reporter that adds an equation to a report. This class inherits
from `mlreportgen.report.Reporter`

.

creates an empty
equation reporter. Use its properties to specify the equation and its formatting. When
you add the equation to a report, it is added as an image of the formatted equation. The
image is centered on the page and is scalable in all reports except Microsoft`equation`

= Equation()^{®} Word reports generated on non-Windows^{®} platforms. If the equation image is wider than the page width, it is
scaled to fit. Otherwise, it is not scaled.

The snapshot image of the equation is stored in the temporary folder of the report.
When the report is closed, the equation image is copied into the report and, then, the
image is deleted from the temporary folder. To prevent the equation image files from
being deleted, use the `Debug`

property of the report. See `mlreportgen.report.Report`

.

formats the equation specified by the LaTeX markup for the equation. `equation`

= Equation(`markup`

)

sets properties using name-value pairs. You can specify multiple name-value pair
arguments in any order. Enclose each property name in single quotes.`equation`

= Equation(`Name,Value`

)

createTemplate | Create equation template |

customizeReporter | Create custom equation reporter class |

getClassFolder | Equation class definition file location |

getContentReporter | Get equation content hole reporter |

getSnapshotImage | Create equation image path |

getImpl | Get implementation of reporter |

Handle. To learn how handle classes affect copy operations, see Copying Objects (MATLAB).

Create a report that includes an equation in a chapter.

import mlreportgen.report.* rpt = Report('equation','docx'); ch = Chapter('Title','Equation'); add(ch,Equation('\int_{0}^{2} x^2\sin(x) dx')); add(rpt,ch); close(rpt); rptview(rpt);

Create a report that includes an equation on a yellow background in 14 pt font.

import mlreportgen.report.* rpt = Report('equation','docx'); ch = Chapter('Title','Equation'); eq = Equation; eq.Content = '\int_{0}^{2} x^2\sin(x) dx'; eq.FontSize = 14; eq.Color = 'b'; eq.BackgroundColor = 'y'; add(ch,eq); add(rpt,ch); close(rpt); rptview(rpt);

Was this topic helpful?