MATLAB: How to remove the chapter header from the RTF/DOC reports generated with MATLAB Report Generator

docgeneratorlabel;MATLABreportrtfword

I want to remove the chapter header from my generated RTF/DOC reports.

Best Answer

To remove the chapter header from RTF/DOC report, follow the steps below:
1) Using the Report Explorer, create a "Document Conversion Stylesheet".
2) The stylesheet should be of type DSSSL (RTF).
3) Add the following components from the "Labelling" section:
- Chapter Autolabel
- Label Preface Sections
4) After adding the components to the stylesheet, select each one of them and set their value to "false".
5) Give your stylesheet a meaningful display name under the stylesheet options, example: "No Chapter (RTF)".
6) Save the stylesheet in the folder that contains your report file, or, if you want to make it available to other reports, in a folder within MATLAB's reach. For this you can use the function ADDPATH (see the documentation for more information).
7) Go back to the report options dialog and, in the "Report Format and Stylesheet" section, set the stylesheet to be "No Chapter (RTF)".
8) You can now generate the report normally.
If the chapters are still numbered, check if the "Numbering" field in the Chapter component is set to 'Automatic'. This can be checked by clicking on the specific chapter component in the Report Explorer. If the "Numbering" is set to "Custom", it overrides the stylesheet setting. Change it to "Automatic", save and generate the report.
Related Question