MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guía de usuario Pagina 936

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 986
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 935
13 Create a Report Program
13-84
object alone or in combination with template-based styles or format object-based styles.
This example assumes that the template MyTemplate includes a TOC reference.
import mlreportgen.dom.*;
d = Document('MyReport','docx','MyTemplate');
h1 = {FontFamily('Arial'),FontSize('16pt')};
h2 = {FontFamily('Arial'),FontSize('14pt')};
h = append(d, Heading(1,'Chapter 1'));
h.style = h1;
h = append(d, Heading(2,'Section 1'));
p.style = h2;
close(d);
rptview(d.OutputPath); % Updates the TOC
The Heading objects generate HTML h1, h2 (and so on) elements. By using Heading
objects in an HTML report, you can ensure that your report uses the default styles for
headings implemented by the browser in which you display the report.
See Also
Functions
rptview | unzipTemplate | zipTemplate
Classes
mlreportgen.dom.Heading
Related Examples
“Create a Microsoft Word Template” on page 13-111
“Create an HTML Template” on page 13-122
Vista de pagina 935
1 2 ... 931 932 933 934 935 936 937 938 939 940 941 ... 985 986

Comentarios a estos manuales

Sin comentarios