User`s guide

mlreportgen.dom.ProgressMessage.formatAsHTML
11-85
mlreportgen.dom.ProgressMessage.formatAsHTML
Package: mlreportgen.dom
Wrap message in HTML tags
Syntax
htmlMessageOut = formatAsHTML(message)
Description
htmlMessageOut = formatAsHTML(message) returns the message text formatted
with HTML tags.
Examples
Format a Message as HTML
This example uses formatAsHTML with the Web command to display the progress
messages.
import mlreportgen.dom.*;
doctype = 'html';
d = Document('test',doctype);
d.Tag = 'My report';
dispatcher = MessageDispatcher.getTheDispatcher;
l = addlistener(dispatcher,'Message', ...
@(src, evtdata) disp(evtdata.Message.formatAsHTML));
open(d);
dispatch(dispatcher, ProgressMessage('starting chapter',d));
p = Paragraph('Chapter ');
p.Tag = 'chapter title';
p.Style = { CounterInc('chapter'),...
CounterReset('table'),WhiteSpace('pre') };
append(p,AutoNumber('chapter'));