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.

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

example

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.

Object identifier for the mlreportgen.ppt.Subscript object, specified as a character vector or string scalar. The PPT API generates a session-unique identifier when it creates the document element object. You can specify your own value for Id.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for the mlreportgen.ppt.Subscript object, specified as a character vector or string scalar. The PPT API generates a session-unique tag 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. Specify your own tag value to help you identify where to look when an issue occurs during document 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