PresentationML Slides - Properties - Text and Notes Styles
Text Styles
The formatting of text within a presentation is specified on the master slide, within a <p:txStyles> element, which is a child of <p:sldMaster>, the root element of the master slide. Within the <p:txStyles> element the styles for body text, title text, and other text are specified in corresponding child elements <p:bodyStyle>, <p:titleStyle>, and <p:otherStyle>. Each of these three main style types has the same model. Each may specify a set of default paragraph properties (within <a:defPPr>) which are applied when no other properties are specified, and each may specify list styles for levels 1 through 9 (<a:lvl1pPr> through <a:lvl9pPr>). Note that these are within the main drawingML namespace with prefix 'a'. A list of possible properties (sometimes specified as child elements and sometimes as attributes) of the levels and default properties is below, with links for more details at the related discussion of list styles in drawingML.
Notes Style
The formatting of text within a notes slide is specified on the notes master, within a <p:notesStyles> element, which is a child of <p:notesMaster>, the root element of the notes master. Within the <p:notesStyles> there may be a set of default paragraph properties (within <a:defPPr>) which are applied when no other properties are specified. There may also be a list of styles for levels 1 through 9 (<a:lvl1pPr> through <a:lvl9pPr>). Note that these are within the main drawingML namespace with prefix 'a'. A list of possible properties (sometimes specified as child elements and sometimes as attributes) of the levels and default properties is below, with links for more details at the related discussion of list styles in drawingML.
Element | Description |
---|---|
<a:buAutoNum/> (auto-numbering bullet) | |
<a:buBlip> (picture bullet) | |
<a:buChar/> (character bullet) | |
<a:buClr> (color of bullets) | |
<a:buClrTx> (color of bullets is same as text run) | |
<a:buFont/> (font for bullets) | |
<a:buFontTx> (font for bullets is same as text run) | |
<a:buNone> (no bullet) | |
<a:buSzPct> (size in percentage of bullet characters) | |
<a:buSzPts/> (size in points of bullet characters) | |
<a:buSzTx> (size of bullet characters to be size of text run) | |
<a:defRPr> (default text run properties) | |
<a:lnSpc> (line spacing) | |
<a:spcAft> (spacing after the paragraph) | |
<a:spcBef> (spacing before the paragraph) | |
<a:tabLst> (list of tab stops in a paragraph) |
Attribute | Description |
---|---|
algn (alignment) | |
defTabSz (default tab size) | |
fontAlgn (font alignment) | |
hangingPunct (specifies the handling of hanging text) | |
indent (indentation for the first line of text) | |
latinLnBrk (specifies whether to break words) | |
lvl (the level of the text -- only applicable for <a:defPPr>; values are 0 to 8 for the nine levels) | |
marL and marR (left and right margins) |
Below is sample xml from a master slide. Note the right alignment (highlighted in red) for the second-level text (lvl="1"). The xml for the actual slide has some styling overrides on the second level-2 bullet (with text "Second level 2 bullet"). See the discussion that follows regarding style overrides.
Overriding Styles for a Shape
The styles defined within the <p:txStyles> element of the master slide can, of course, be overrriden by specifying different styles for the shape, either within the shape of the master slide or slide layout, or within the shape within a particular slide. For example, below we have specified a style for the level 2 text within the shape on the slide, altering the style from right-aligned to centered.
Overriding Styles for a Paragraph Within a Shape
The styles specified at the master slide level, or even for a particular slide within a presentation slide, can themselves be overridden by specifiying different styling within the paragraph or run properties of a paragraph of text within a shape. Below is the same sample above, except that a paragraph property of left alignment is specified for the first of the second-level paragraphs. Note that the second of the level-2 paragraphs does not override the paragraph alignment as specified for the shape, but it does override the bullet font and bullet character.