Skip to Main Content Skip to Search
Product Documentation

Working with Stylesheets

Using the Report Explorer to Edit Stylesheets

To edit a stylesheet:

  1. In Report Explorer, select a report template in the Outline pane on the left.

  2. From the menu bar, click Tools > Edit Stylesheet.

The Report Explorer displays as follows.

You can use the Report Explorer to work with stylesheets as follows.

TaskPane to UseAction
Create a stylesheetProperties Click the link that corresponds to the kind of stylesheet you want to create
Open an existing stylesheet Properties Click the name of the stylesheet, which appear in the Open Stylesheets area
Select a stylesheet to use for converting an XML source fileOptionsSelect a stylesheet by clicking on it
View a list of customized styles in a stylesheetOutlineExpand any open stylesheet
View a list of styles in a stylesheetOutline or
Options
Double-click the stylesheet
View a list of stylesheets available for editing in a given categoryOptions Double-click the folder that corresponds to the kind of output you want (that is, HTML, PDF, RTF, or Word)
View open stylesheets OutlineExpand the Stylesheet Editor item in Report Explorer
Change the name or description of the current stylesheetPropertiesEdit the text in the Display Name or Description field.
Convert an XML source file using the current stylesheetPropertiesClick Send to Source File Converter in the Properties pane.
Edit customized style dataPropertiesClick the style data item, which appears in the Stylesheet Customizations area
Open a style data item for editing or viewingOptionsDouble-click the data item that you want to edit.
View a list of customized style data OutlineExpand the stylesheet

Creating New Stylesheets

To create a stylesheet:

  1. Open the Report Explorer.

  2. From the menu bar, click Tools > Edit Stylesheet.

  3. In the Properties pane on the right, choose the built-in stylesheet for the format with which you want to work. Options are:

    • New HTML. Creates a stylesheet for HTML reports.

    • New multi-page HTML. Creates a stylesheet for HTML reports with more than one page.

    • New FO (PDF). Creates a stylesheet for PDF reports.

    • New DSSSL (RTF). Creates a stylesheet for RTF reports.

    The new stylesheet appears in the Outline pane on the left.

  4. In the Properties pane on the right, modify the properties for the stylesheet as needed. Add data items to the new stylesheet:

    1. Drag the data item you want to add from the Options pane in the middle to the stylesheet in the Outline pane on the left.

    2. In the Properties pane on the right, edit the data items for the selected style. For more information, see Editing Stylesheet Data Items

  5. Save the stylesheet. For information about how to save a stylesheet, see Saving Stylesheets.

Saving Stylesheets

You must save a stylesheet before you can use it to convert a source file or associate it with a report. To use the Report Explorer to save a stylesheet:

  1. Select the stylesheet that you want to save in the Outline pane on the left.

  2. Select File > Save As from the menu bar and specify a new name for the stylesheet (to avoid overwriting built-in stylesheets). You must save the file in a folder in your MATLAB path for the stylesheet to appear in the Report Explorer. The file name must be unique in the MATLAB path.

    By convention, MATLAB Report Generator stylesheets have .rgs as their file name extension.

Deleting Stylesheets

To use the Report Explorer to delete a stylesheet that you created:

  1. Select the stylesheet that you want to delete in the Outline pane on the left.

  2. Click the stylesheet to delete from the Options pane in the middle.

  3. Click Delete stylesheet in the stylesheet's Properties pane on the right.

You must restart the MATLAB software session for deleted stylesheets to disappear from the Options pane.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS