Main Content


Insert preformatted paragraph


This component inserts a preformatted paragraph into a report. A preformatted paragraph is a paragraph that uses line feeds to break its content into lines and sequences of spaces to indent the lines. For accurate indentation, the Preformatted component default style uses the rgProgramListing default style, which specifies a monospace font. You can insert a Preformatted component as a child of a Chapter/Subsection or Table Entry component.


This component applies only to template-based reports, such as Direct PDF (from Template). In XSL style sheet-based reports, for example, web (HTML), it serves as a Paragraph component.


  • Preformatted content to include in report: Specifies the preformatted text to include in the report.

  • Style Name: Specifies the style to use with the text. By default this option specifies rgProgramListing, a style defined in the default document conversion templates installed with the Report Explorer. To modify the appearance of all preformatted paragraphs in a report, customize the rgProgramListing style. To modify the appearance of this paragraph only, 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.

      To use the custom style you specify, it must be defined as a span style in the HTML or PDF template used with this report. For a Word template, it must be defined as a character or linked paragraph/character style. For more information about template styles, see Report Templates.


  • Bold: Makes the text bold.

  • Italic: Makes the text italic.

  • Show text as syntax-highlighted MATLAB code: Uses colors to highlight MATLAB® syntax, such as comments and variable names, in the text content of the component.

  • 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. Paragraph that uses white space to divide its content into lines and indent the lines.

For example,

This shows text
containing     multiple  spaces
   an indented line, 
and line feeds
in a Preformatted component.



See Also

Code, Text, Paragraph