Main Content

mlreportgen.ppt.Subscript Class

Namespace: mlreportgen.ppt

Subscript text

Description

Format that renders text in a presentation as a subscript.

The mlreportgen.ppt.Subscript class is a handle class.

Class Attributes

HandleCompatible
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Description

subscriptObj = mlreportgen.ppt.Subscript creates a subscript object.

example

subscriptObj = mlreportgen.ppt.Subscript(value) creates a subscript object and sets the Value property to value.

Properties

expand all

Option to display text as a subscript, specified as a numeric or logical 1 (true) or 0 (false). A setting of true or 1 renders text as a subscript.

ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of the object creation. You can specify an ID to replace the generated ID.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for this PPT API object, specified as a character vector or string scalar. A session-unique tag is generated as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object.

Specifying your own tag value can help you to identify where issues occur during presentation generation.

Attributes:

NonCopyable
true

Data Types: char | string

Examples

collapse all

Set up a paragraph to display H2O.

Set up a presentation.

import mlreportgen.ppt.*

ppt = Presentation('mySubscript.pptx');
open(ppt);
slide = add(ppt,'Title and Content');

Create the subscript text and append it to a paragraph with regular text.

sub = Text('2');
sub.Style = {Subscript(true)};

para = Paragraph('H');
append(para,sub);
append(para,'O');

Replace the slide content with the paragraph.

replace(slide,'Content',para);

Close and view the presentation.

close(ppt); 
rptview(ppt);

Version History

Introduced in R2015b