User`s guide

Create Callback Functions and Results
25-45
Format Text
Text is the simplest form of output. You can format text in many different ways. The
default text formatting is:
Empty
Default color (black)
Unformatted (not bold, italicized, underlined, linked, subscripted, or superscripted)
To change text formatting, use the ModelAdvisor.Text constructor. When you want
one type of formatting for all text, use this syntax:
ModelAdvisor.Text(content, {attributes})
When you want multiple types of formatting, you must build the text.
t1 = ModelAdvisor.Text('It is ');
t2 = ModelAdvisor.Text('recommended', {'italic'});
t3 = ModelAdvisor.Text(' to use same font for ');
t4 = ModelAdvisor.Text('blocks', {'bold'});
t5 = ModelAdvisor.Text(' for a uniform appearance in the model.');
result = [t1, t2, t3, t4, t5];
Add ASCII and Extended ASCII characters using the MATLAB char command. For
more information, see the ModelAdvisor.Text class page.
Format Lists
You can create two types of lists: numbered and bulleted. The default list formatting
is bulleted. Use the ModelAdvisor.List constructor to create and format lists (see
ModelAdvisor.List). You can create lists with indented subsections, formatted as
either numbered or bulleted.
subList = ModelAdvisor.List();
subList.setType('numbered')
subList.addItem(ModelAdvisor.Text('Sub entry 1', {'pass','bold'}));
subList.addItem(ModelAdvisor.Text('Sub entry 2', {'pass','bold'}));
topList = ModelAdvisor.List();
topList.addItem([ModelAdvisor.Text('Entry level 1',{'keyword','bold'}), subList]);
topList.addItem([ModelAdvisor.Text('Entry level 2',{'keyword','bold'}), subList]);
Format Tables
The default table formatting is:
Default color (black)
Left justified