mlreportgen.ppt.HAlign class
Package: mlreportgen.ppt
Horizontal alignment of paragraph
Description
Specify the horizontal alignment of a paragraph.
Construction
creates a horizontal
alignment object having the value alignObj
= HAlign()'left'
.
creates a horizontal alignment object having the specified value. alignObj
= HAlign(value
)
Input Arguments
value
— Horizontal alignment
character vector
Horizontal alignment, specified as one of these values:
'center'
— Centered'left'
— Left justified'right'
— Right justified'justified'
— Left justified and right justified, spacing words evenly'distributed'
— Left justified and right justified, spacing letters evenly'thaiDistributed'
— Left justified and right justified Thai text, spacing characters evenly'justifiedLow'
— Justification for Arabic text
Output Arguments
horizontalAlignObj
— Horizontal alignment
mlreportgen.ppt.HAlign
object
Horizontal alignment, returned as an
mlreportgen.ppt.HAlign
object.
Properties
Id
— ID for this PPT API object
character vector | string scalar
ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of object creation. You can specify an ID to replace the generated ID.
Tag
— Tag for this PPT API object
character vector | string scalar
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 an issue occurred during presentation generation.
Value
— Horizontal alignment
character vector
Horizontal alignment, specified as one of these values:
'center'
— Centered'left'
— Left justified'right'
— Right justified'justified'
— Left justified and right justified, spacing words evenly'distributed'
— Left justified and right justified, spacing letters evenly'thaiDistributed'
— Left justified and right justified Thai text, spacing characters evenly'justifiedLow'
— Justification for Arabic text
Examples
Center a Title Paragraph
The presentation title page in the PPT API default template is to left-justify the title. This example overrides that default by centering the paragraph.
Create a presentation and add a title slide.
import mlreportgen.ppt.* ppt = Presentation('myHAlignPresentation.pptx'); open(ppt); titleSlide = add(ppt,'Title Slide');
Create a centered paragraph.
p = Paragraph('Title for First Slide'); p.Style = {HAlign('center')};
Add the paragraph to the slide, generate the presentation, and open
myHAlignPresentation
.
replace(titleSlide,'Title',p);
close(ppt);
rptview(ppt);
MATLAB®:
Version History
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)