Main Content


Format and insert text into report


This component formats and inserts text into the report. For Word and PDF reports, it must have the Paragraph component as its parent.


  • Text to include in report: Specifies text to include in the report. The specified text can include computed property expressions of the form %<expr> where expr is a MATLAB expression that evaluates to a string when the report is generated. For example, the text “This report was generated on %<date>.” inserts the specified text in the report with %<date> replaced by the date on which the report is generated.

  • Style Name: Specifies the style to use with the text for reports whose output format is one of the from template types, for example, Direct PDF (from template). By default, this component's content inherits the style of the paragraph in which it is inserted. To override the paragraph style, specify another style defined in the report template. To specify another style:

    1. Set Style Name to Specify.

    2. In the Style Name text box, type a style name.

      The custom style you specify must be a span style for HTML and PDF reports or a character or linked paragraph/character style for Word reports defined in the template that you use to generate the report. For more information about template styles, see Report Templates.

In Microsoft® Word, paragraph styles and text styles applied using a named style can interact when you apply both to the same text. This interaction occurs for formatting properties that paragraphs and text have in common, such as bold, italic, and underline.

For example, you apply the paragraph style MyStyle to a paragraph and that MyStyle specifies bold formatting. Then, you apply a text style named BoldStyle to text in the paragraph. The text formatted with BoldStyle toggles the paragraph style bold off for that text. To ensure the text is bold, create a text style that does not use bold but has the other properties you want to apply to text in that type of paragraph.


  • Bold: Makes the text bold.

  • Italic: Makes the text italic.

  • Underline: Underlines the text.

  • Strikethrough: Strikes through the text.

  • Subscript: Formats text as a subscript, in a smaller font than the other text, set slightly below the other text.

  • Superscript: Formats text as a superscript, in a smaller font than the other text, set slightly above the other text.

  • Preserve white space: Preserves sequences of spaces in the text content of this component. Deselecting this option causes sequences of spaces to be reduced to one space. This option does not appear if this component is the child of a Paragraph component that has its Preserve white space option selected. The Preserve white space option applies to all children of that Paragraph component. This option applies only to HTML (from template), Single-File HTML (from template, or Word (from template) reports. The Preserve white space option does not appear for other output types.

  • Color: Specifies the color of the text.

    • Select a color from the list of colors.

    • Enter a hexadecimal RGB value as #RRGGBB. For example, #0000ff is a shade of blue.

    • Enter %<expr>, where expr is a MATLAB® expression that evaluates to a color name or a hexadecimal RGB value.


These format options override any corresponding formats defined in the custom style you specify. For example, selecting Bold makes the text bold, even if the specified style uses regular weight text.

Insert Anything into Report?

Yes. Text.