Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.Paragraph.append

Package: mlreportgen.dom

Append content to paragraph

Syntax

textObjOut = append(paraObj,text)
textObjOut = append(paraObj,text,styleName)
domObjOut = append(paraObj,domObj)

Description

example

textObjOut = append(paraObj,text) creates a text object containing the specified text and appends it to a paragraph.

example

textObjOut = append(paraObj,text,styleName) creates and appends a text object using the specified style.

example

domObjOut = append(paraObj,domObj) appends a document element object, such as an image, to a paragraph.

Examples

collapse all

import mlreportgen.dom.*;
d = Document('mydoc','html');

para = Paragraph('Results: ');
append(d,para);
append(para,'Study 1');

close(d);
rptview(d.OutputPath);
import mlreportgen.dom.*;
doc = Document('mydoc','docx');

para = Paragraph('Results: ','Title');
para.WhiteSpace = 'pre';
append(doc,para);
append(para,'Study 2');

close(doc);
rptview('mydoc','docx');
import mlreportgen.dom.*;
docLink = Document('mydocLink','html');

mathWorksLink = ExternalLink...
   ('http://www.mathworks.com/','MathWorks site');
para = Paragraph('Go to the ');
append(para, mathWorksLink);
append(docLink,para);

close(docLink);
rptview(docLink.OutputPath);

Input Arguments

collapse all

Paragraph to append content to, specified as an mlreportgen.dom.Paragraph object.

Text to append to the paragraph, specified as a character vector.

Name of the style to define the appearance of the text. Use a style that is in the style sheet of the document that contains the paragraph.

You can append the following types of document element object to a paragraph:

  • mlreportgen.dom.ExternalLink

  • mlreportgen.dom.Image

  • mlreportgen.dom.InternalLink

  • mlreportgen.dom.LinkTarget

  • mlreportgen.dom.Text

  • mlreportgen.dom.CustomElement

    If you specify a custom element, it must be a valid HTML or Word child of the paragraph, based on the document output type.

Output Arguments

collapse all

Text appended to a paragraph, represented by an mlreportgen.dom.Text object.

Document element appended to paragraph, specified as a DOM object.

Introduced in R2014b

Was this topic helpful?