MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guide de l'utilisateur Page 894

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 986
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 893
13 Create a Report Program
13-42
p = Paragraph(CharEntity('pound'));
append(d,p);
append(p,'3');
close(d);
rptview('test','html');
Append HTML or XML Markup
To append HTML markup to an HTML document or Microsoft Word XML markup to a
Word document, use an mlreportgen.dom.RawText object. This is useful for creating
HTML or Word elements that the DOM API does not support directly, such as the HTML
div element. This example shows how to create a RawText object to append HTML
markup.
import mlreportgen.dom.*;
d = Document('test','html');
append(d,RawText('<div id = toc> </toc>'));
close(d);
rptview('test','html');
Format Text
You can format text programmatically, using either DOM format objects or Text object
format properties. You can also use Word and HTML template styles. For information
about these formatting techniques and format inheritance, see “Report Formatting
Approaches” on page 13-20.
Format Text Programmatically
You can use format objects to format Text objects or format properties to specify
commonly used text formats. This example uses:
A FontFamily format object to specify the primary and backup font
The Bold format property to specify text weight
import mlreportgen.dom.*;
d = Document('test','html');
t = append(d, 'Bold Arial text');
Vue de la page 893
1 2 ... 889 890 891 892 893 894 895 896 897 898 899 ... 985 986

Commentaires sur ces manuels

Pas de commentaire