MATLAB: How to change the FONT-FAMILY and FONT-SIZE properties of the HTML report generated using MATLAB Report Generator 3.2.1 (R2007b)

cascadingcssfontMATLAB Report Generatorsize;stylestylesheet

I am trying to change the "font-family" and "font-size" properties of the HTML report that I generate using the MATLAB Report Generator 3.2.1 (R2007b). However, I am unable to locate a component in the stylesheet editor that would enable me to achieve this functionality. The same functionality can easily be achieved for DSSSL (RTF) stylesheets where I can specify the "font-family" under the FONTS category.

Best Answer

In order to change the "font family" property of the text in your HTML report, it is necessary to create your own CSS (Cascading Style Sheet) file. CSS files can be used to specify the font-family as well as the font-size. See the attached CSS stylesheet (mystyle.css) as an example. The headers for each section specify the section of the HTML for which the font will be used.
You may add the parameters "font-size" and "font-style" (Bold, Italic etc.) for each section of your report and specify your own preferences for those parameters. The CSS file needs to be included in a Report Generator stylesheet. The Report Generator stylesheet may be created as follows:
1. Execute the following at the MATLAB command prompt:
rpteditstyle
2. Click on the "NEW HTML" stylesheet.
3. Add the "HTML stylesheet" component under the HTML section.
4. Enter 'mystyle.css' in single quotes.
5. Save the report generator stylesheet with a unique display name.
The next time you create a HTML report, select the stylesheet from the drop-down menu.