Edit Stylesheet Data Items

Data Item Categories in Built-In Stylesheets

You can edit data items in built-in stylesheets to customize them. Data items appear in categories, according to their function. The following tables list the categories and data items for each type of stylesheet provided with the MATLAB® Report Generator™ software.

Categories of Styles in PDF (FO) Stylesheets

CategoryDescription of Data Items in Category
Automatic labelingOptions for enumeration of parts of the report, such as chapters and sections
CalloutsOptions and specifications related to callouts, such as defaults, use of graphics, size, path, fonts, characters, and extensions
Cross ReferencesOption to control whether page numbers appear in report
Font FamiliesSpecification of defaults for body text, copyright, quotes, symbols, dingbats, monospace, sans serif, and titles
GraphicsSpecification of default width and options related to scaling attributes
ListsSpecification of spacing related to lists and list items
Meta/*InfoOptions related to year ranges
MiscellaneousOptions and specifications for placement of titles, comments, variable lists, block quotations, ulinks, hyphenations of URLs, verbatim environment display, use of SVG, table footnote numbers, superscript, and subscript
Pagination and General StylesSpecifications of page orientation, margins, double-sided, paper type, hyphenation, line height, columns, master font, draft mode, watermark, blank pages, rules for headers and footers, and content of headers and footers

    Note:   You can specify parameters in this category, such as margin widths and header and footer height, in units of inches (in), millimeters (mm), or picas (pi), where 1 pica = 1/6 inch.

Property SetsSpecification and options related to figure titles, monospace properties, verbatim text, section titles, and levels of sections
Reference PagesOption to control whether the class name is displayed
Stylesheet ExtensionsLine numbering and table columns extensions
Table of Contents (TOC)/List of Tables (LOT)/Index GenerationSpecifications for layout of TOC, depth of sections, indentation, and margins
TablesSpecifications for size of tables and their borders
Title PageSpecifications for positioning and transformation of title page elements and properties of title page text elements

For information about DocBook XSL stylesheets, see http://docbook.sourceforge.net/release/xsl/current/doc/ .

You can set up font mappings for non-English PDF fonts. The PDF stylesheets override those mappings. For details, see

Categories of Styles in HTML and Multi-Page HTML Stylesheets

Category of StyleDescription of Data Items in Category
Automatic labelingOptions for enumeration of parts of the report, such as chapters and sections
CalloutsOptions and specifications related to callouts, such as defaults, use of graphics, size, path, fonts, characters, and extensions
ChunkingOptions related to using an explicit TOC for chunking, depth of section chunks, navigational graphics, and display of titles in headers and footers
Stylesheet ExtensionsLine numbering, graphic size, and table columns extensions
GraphicsSpecification of default width and depth, use of HTML embed for SVG, viewports, and options related to scaling attributes
HTMLSpecifications related to dynamically served HTML, base and head elements, type of stylesheet, css, propagation of styles, longdesc, validation, cleanup, draft mode, watermark, and generation of abstract
LinkingSpecification of Mailto URL and target for ulinks
Meta/*InfoOptions related to year ranges
MiscellaneousOptions and specifications for comments, verbatim environment pixels, em space, use of SVG, and table footnote numbers
Reference PagesOption control whether the class name is displayed
Table of Contents (TOC)/List of Tables (LOT)/Index GenerationSpecifications for layout of TOC, depth of sections, indentation, and margins
TablesSpecifications for size of tables, table cell spacing and padding, and borders
Title PageSpecifications for positioning and transformation of title page elements and properties of title page text elements
XSLT ProcessingOptions related to header and footer navigation and rules

For information about:

Categories of Styles in RTF (DSSSL) Stylesheets

Category of StyleDescription of Data Items in Category
AdmonitionsOptions and path for admonition graphics
BackendsOptions for Tex, MIF, and RTF back-end usage
BibliographiesOptions related to checking citations; suppressing, enumerating, and using titles of entries
FontsSpecifications for font family and size to use for some elements
FootnotesOptions for ulinks as footnotes and page location
GraphicsSpecifications for file extensions, file names, and loading library database
IndentsSpecifications for hanging indents, first paragraphs, and start of blocks
LabelingEnumeration of sections and other elements
MiscellaneousOptions for floating formal objects, punctuation for run-in heads and honorifics, bold for first use of term, minimum leading between lines, and automatic hyphenation
OLinksUsing an extension for finding outline information
Object RulesSpecifications for placement and width of rules
Paper/Page CharacteristicsSpecifications for paper type, page numbers, width of pages, margins, and columns; heading-levels, sides; and writing mode (such as left-to-right)
QuaddingSpecifications for justifying paragraphs
RefEntries and FunctionsOptions related to generation and display of reference entries and synopses for functions
Running headsOptions for generating and displaying running heads of chapters
Table of Contents (TOC)/List of Tables (LOT)Options to produce or display TOC for sets, books, parts, references, articles. Options to display TOC on title page
TablesSpecification of width in simple list
VariableListsOptions and specifications for term length and formatting
Verbatim EnvironmentsSpecifications for width, enumeration, size, indentation, line frequency, and callouts
Vertical SpacingSpecifications for space between lines and paragraphs

Edit Data Items in Simple or Advanced Edit Mode

  • To edit a data item in simple edit mode, edit a simple string that corresponds to the data in the stylesheet. This string appears in the field to the right of the Value label. For some values, use a selection list to change the value instead of typing in text.

  • To edit a data item in advanced edit mode, edit the XML code directly.

    Note:   This section gives instructions for simple edit mode, except where explicitly specified otherwise.

The user interface is in simple edit mode when the data item appears in a pane labeled Value. It is in advanced edit mode when the data item appears in a pane labeled Value (XML). To switch from simple to advanced edit mode, click Edit as XML.

Edit values for most data items in PDF and HTML stylesheets in either simple edit mode or advanced edit mode. Edit values for RTF stylesheets in simple edit mode only. Data items in RTF stylesheets do not support advanced edit mode.

    Note:   To modify content for headers and footers you edit stylesheet cells, which do not appear in either simple or advanced mode. For more information, see Stylesheet Cells for Headers and Footers.

Data Items

Select a stylesheet from the Options pane in the middle of the Report Explorer. The Outline pane on the left shows the name of the current style data item inside its stylesheet. The Options pane in the middle shows a list of available stylesheet data items. The Properties pane on the right displays Stylesheet Editor: Data. It also includes the following information:

  • The value of the data item is in a pane labeled Value in simple edit mode or Value (XML) in advanced edit mode.

  • To the right of the value is the Edit as XML toggle button.

  • The Preview pane includes a partial view of the stylesheet that specifies the data item. The data in this pane is not editable.

  • The Help pane contains information about the data item. This information is not editable.

Edit Boolean and Enumerated Values

In the previous figure, theShow Comments data item is of type Boolean. Its current value is true(1). Change this value using the menu list for the value field. In this case, the only other possible value is false(2).

Edit Strings

For the values of some data items, the Report Explorer displays text in the editable Value field. You can specify an XML expression, though you are not required to do so.

Edit XML Expressions

To make complex changes to a stylesheet, consider using Advanced edit mode. This enables you to edit XML expressions directly in the Value (XML) pane. If this pane does not appear, click Edit as XML to switch to advanced edit mode.

Make sure that you enter valid XML. Invalid XML values generate an error, which appears at the top of the Properties pane.

Modify Title Page Properties

For PDF or HTML stylesheets, you can modify the layout, contents, and format of a title page by using the Stylesheet Editor.

  1. In the Outline pane, select the stylesheet you want to edit.

  2. In the Options pane, in the Title Page Templates section, select:

    • Book Titlepage Recto to specify properties for the front side of the title page

    • Book Titlepage Verso to specify properties for the back side of the title page

  3. In the Properties pane, select Add to current stylesheet and edit the properties.

To adjust the grid used to position the title page elements (such as the title and author) on the page, in the Properties pane specify:

  • Columns — The number of columns in the page grid

  • Width — The width of each column

  • Rows — The number of rows in the page grid

  • Width — The width of each row

To view the grid layout on the generated title page, select Show grid.

By default, all of the title page elements appear on the title page. To exclude display of a title page element:

  1. In the Properties pane, in the Include on title page list, select an element to exclude.

  2. Click the right arrow button. The element appears in the Exclude from Title Page list.

To specify properties for an individual title page element:

  1. In Properties pane, in the Include on title page list, select the title page element.

  2. Adjust the applicable properties:

    • Layout options — Specify which title page grid row and column in which you which you want the element to appear. To span multiple rows or columns, specify numbers for the Span row and Span column properties.

    • Format options — For text elements, specify the font size, whether to use bold or italics, text color, and text alignment.

    • Transform options — You can use these options to specify XSLT code to customize the contents and format of title page elements. Use the XPath property to specify the path to the XSLT object that you want to modify. Use the Transform property to specify the custom content and layout.

Modify TOC Properties

To change values for generation of the report's table of contents (TOC), select the appropriate values from a matrix of check boxes.

The following figure shows the values for the Generate Toc data item on the PDF stylesheet. Select the check boxes to control the values that appear in the report's title page and table of contents.

Modify Title Placement Properties

The Title Placement data items, which are in the Miscellaneous category, control the position of titles for figures and tables.

Selecting one of these data items for editing causes the Properties pane on the right to display possible values in a menu list. Specify whether you want the title to appear before or after a given figure or table.

Modify Attributes

An attribute is a data item that specifies information for an XML element. An attribute must be a child of an attribute set. For more information, see Edit Attribute Sets.

    Note:   The information in the Help area of the Properties pane of an attribute describes the set to which the attribute belongs.

Edit Attribute Sets

An attribute set consists of a group of attributes. Selecting an attribute set in the Outline pane on the left causes the Properties pane to list the attributes that belong to that set.

To edit a specific attribute, expand the attribute set in the Outline pane and select the attribute you want to edit.

To edit the attribute set, type text in the Inherit attribute sets area of the Properties pane.

An example of an attribute set is Formal Object Properties, a data item in the Property Sets category of the default print stylesheet for PDF documents.

Here is an example of the Report Explorer showing the Formal Object Properties attribute set in the Properties pane.

Edit Varpair Values

Data items in RTF stylesheets appear as varpair data items, which are name/value pairs of information. RTF stylesheets are the only type of stylesheet that includes varpair data items.

Edit varpair data items as strings or as Boolean values. Boolean values appear as true (#t) and false (#f).

    Note:   You cannot edit RTF stylesheet data items as XML.

    Note:   Data of type varpair is sometimes represented in stylesheets as DSSSL rather than XML. As a result, the code that appears in the Preview pane of the Properties pane on the right looks different from code associated with other kinds of MATLAB Report Generator stylesheets.

Delete Data Items

To delete a customized data item:

  1. Right-click the data item in the Outline pane on the left.

  2. Select Delete.

Was this topic helpful?