mlreportgen.ppt.Superscript class

Package: mlreportgen.ppt
Superclasses:

Description

Superscript

Construction

superscriptObj = Superscript() creates a superscript object.

superscriptObj = Superscript(value) creates a superscript object.

Input Arguments

expand all

Display text as a superscript, specified as a logical. A setting of true (or 1) renders text as a superscript.

Data Types: logical

Output Arguments

expand all

Superscript, returned as an mlreportgen.ppt.Superscript object.

Properties

expand all

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

Tag for this PPT API object, specified as a character vector. 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 an issue occurred during presentation generation.

Examples

collapse all

Set up a paragraph to display x2.

Set up a presentation.

import mlreportgen.ppt.*
slidesFile = 'mySuperscript.pptx';
slides = Presentation(slidesFile);
slide1 = add(slides,'Title and Content');

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

super = Text('2');
super.Style = {Superscript(true)};

para = Paragraph('x');
append(para,super);

Use the paragraph to replace the slide content, generate the presentation, and open the mySuperscript presentation. (The winopen code works on Windows® platforms.)

replace(slide1,'Content',para);
close(slides); 

if ispc
    winopen(slidesFile);
end

Introduced in R2015b