Edit Style Sheet Data Items
Data Item Categories in Built-In Style Sheets
You can edit data items in built-in style sheets 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 style sheet provided with the MATLAB® Report Generator™ software.
Categories of Styles in PDF (FO) Style Sheets
Category | Description of Data Items in Category |
---|---|
Automatic labeling | Options for enumeration of parts of the report, such as chapters and sections |
Callouts | Options and specifications related to callouts, such as defaults, use of graphics, size, path, fonts, characters, and extensions |
Cross References | Option to control whether page numbers appear in report |
Font Families | Specification of defaults for body text, copyright, quotes, symbols, dingbats, monospace, sans serif, and titles |
Graphics | Specification of default width and options related to scaling attributes |
Lists | Specification of spacing related to lists and list items |
Meta/*Info | Options related to year ranges |
Miscellaneous | Options 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 Styles | Specifications 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 (
|
Property Sets | Specification and options related to figure titles, monospace properties, verbatim text, section titles, and levels of sections |
Reference Pages | Option to control whether the class name is displayed |
Style Sheet Extensions | Line numbering and table columns extensions |
Table of Contents (TOC)/List of Tables (LOT)/Index Generation | Specifications for layout of TOC, depth of sections, indentation, and margins |
Tables | Specifications for size of tables and their borders |
Title Page | Specifications for positioning and transformation of title page elements and properties of title page text elements |
For information about DocBook XSL style sheets, see https://docbook.sourceforge.net/release/xsl/current/doc/.
You can set up font mappings for non-English PDF fonts. The PDF style sheets override those mappings. For details, see
Categories of Styles in HTML and Multi-Page HTML Style Sheets
Category of Style | Description of Data Items in Category |
---|---|
Automatic labeling | Options for enumeration of parts of the report, such as chapters and sections |
Callouts | Options and specifications related to callouts, such as defaults, use of graphics, size, path, fonts, characters, and extensions |
Chunking | Options related to using an explicit TOC for chunking, depth of section chunks, navigational graphics, and display of titles in headers and footers |
Style Sheet Extensions | Line numbering, graphic size, and table columns extensions |
Graphics | Specification of default width and depth, use of HTML embed for SVG, viewports, and options related to scaling attributes |
HTML | Specifications related to dynamically served HTML, base and head elements, type of style sheet, CSS, propagation of styles, longdesc, validation, cleanup, draft mode, watermark, and generation of abstract |
Linking | Specification of Mailto URL and target for ulinks |
Meta/*Info | Options related to year ranges |
Miscellaneous | Options and specifications for comments, verbatim environment pixels, em space, use of SVG, and table footnote numbers |
Reference Pages | Option control whether the class name is displayed |
Table of Contents (TOC)/List of Tables (LOT)/Index Generation | Specifications for layout of TOC, depth of sections, indentation, and margins |
Tables | Specifications for size of tables, table cell spacing and padding, and borders |
Title Page | Specifications for positioning and transformation of title page elements and properties of title page text elements |
XSLT Processing | Options related to header and footer navigation and rules |
For information about:
DocBook — see https://www.oasis-open.org/docbook/documentation/reference/html/docbook.html
DocBook XSL style sheets — see https://docbook.sourceforge.net/release/xsl/current/doc/
DocBook print parameters, see https://docbook.sourceforge.net/release/dsssl/1.79/doc/print/
Categories of Styles in RTF (DSSSL) Style Sheets
Edit Data Items in Simple or Advanced Edit Mode
To edit a data item in simple edit mode, edit a simple text value that corresponds to the data in the style sheet. This value 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 style sheets in either simple edit mode or advanced edit mode. Edit values for RTF style sheets in simple edit mode only. Data items in RTF style sheets do not support advanced edit mode.
Note
To modify content for headers and footers you edit style sheet cells, which do not appear in either simple or advanced mode. For more information, see Style Sheet Cells for Headers and Footers.
Data Items
Select a style sheet 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 style sheet. The Options pane in the middle shows a list of available style sheet data items. The Properties pane on the right displays Edit Style Sheet: 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 style sheet 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 Values
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 style sheet, 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 style sheets, you can modify the layout, contents, and format of a title page by using the Style Sheet Editor.
In the Outline pane, select the style sheet you want to edit.
In the Options pane, in the Title Page Templates section, select:
Book Titlepage Recto
to specify properties for the front side of the title pageBook Titlepage Verso
to specify properties for the back side of the title page
In the Properties pane, select Add to current style sheet 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:
In the Properties pane, in the Include on title page list, select an element to exclude.
Click the right arrow button. The element appears in the Exclude from Title Page list.
To specify properties for an individual title page element:
In Properties pane, in the Include on title page list, select the title page element.
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 style sheet. 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 style sheet 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 style sheets appear as varpair
data items, which
are name/value pairs of information. RTF style sheets are the only type of style sheet
that includes varpair
data items.
Edit varpair
data items as character vectors or as Boolean values.
Boolean values appear as true (#t)
and false
(#f)
.
Note
You cannot edit RTF style sheet data items as XML.
Note
Data of type varpair
is sometimes represented in style sheets 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 style sheets.
Delete Data Items
To delete a customized data item:
Right-click the data item in the Outline pane on the left.
Select Delete.