Main Content

mlreportgen.ppt.Italic Class

Namespace: mlreportgen.ppt

Italic for text object

Description

Specifies whether to render text in italic.

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

Creation

Description

italicObj = Italic creates a format object that specifies to render text in italic.

italicObj = Italic(value) creates a format object that specifies to render text in italic if value is true; otherwise, the text renders without italic.

example

Input Arguments

expand all

Option to use italic for text, specified as a logical. A setting of true (or 1) renders text in italic.

Data Types: logical

Properties

expand all

Object identifier for the mlreportgen.ppt.Italic 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.Italic 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

The possible values are:

  • 0 — uses roman (straight) text

  • 1 — renders text in italic

Data Types: logical

Examples

collapse all

Create a presentation.

import mlreportgen.ppt.*

ppt = Presentation('myItalicPresentation.pptx');
open(ppt);
titleSlide = add(ppt,'Title and Content');

Create a paragraph and append text with italic and regular text.

p = Paragraph('Hello World');
p.Style = {Italic(true)};
t = Text(' How are you?');
t.Style = {Italic(false)};
append(p,t);

Add the paragraph to the slide. Close and view the presentation.

replace(titleSlide,'Content',p);

close(ppt);
rptview(ppt);

Sample slide with a paragraph that reads "Hello World How are you?", with "Hello World" displaying in italic

Version History

Introduced in R2015b