Slides do not repeat their formatting. A slide is based on a layout, and a layout on a
master. Each level’s shapes are matched by their placeholder idx, and what a
shape leaves out, such as position or text style, comes from the level above.
slideppt/slides/slideN.xml a slide, with aslideLayoutrelationshipp:sldlayoutppt/slideLayouts/slideLayoutN.xml a layout, with aslideMasterrelationshipp:sldLayoutmasterppt/slideMasters/slideMasterN.xml a master, with athemerelationshipp:sldMasterthemeppt/theme/themeN.xml the colours and fontsa:theme
Slide layouts
The root is p:sldLayout. Its type attribute is one of the
standard layouts, such as title, obj, twoObj,
titleOnly or blank. Its p:cSld has a
name, the layout’s name as PowerPoint shows it, and a shape tree of
placeholders.
Slide masters
The root is p:sldMaster. It holds a shape tree for what appears behind every
slide, p:txStyles (the title, body and other text styles) and
p:sldLayoutIdLst, the list of its layouts. A master’s relationships lead to
its layouts and its theme.
A presentation can have several masters: each is listed in
p:sldMasterIdLst in presentation.xml.
Rules, attributes and defaults
Sources read: ECMA-376 5th edition Part 1 (research/ooxml/ecma376/p1/part1.txt) 19.3.1.6, 19.3.1.7, 19.3.1.39 to
19.3.1.43, 19.7.14 to 19.7.16 and Annex A.3 (CT_SlideLayout, CT_SlideMaster,
CT_SlideMasterTextStyles, CT_SlideLayoutIdListEntry, CT_HeaderFooter,
CT_ColorMapping); [MS-OI29500] v20260818 2.1.1118 to 2.1.1127; python-pptx oxml/slide.py
(research/pptx/src/pptx-oxml-slide.py).
p:sldLayout (19.3.1.39)
- Children in order:
cSld(required),clrMapOvr,transition,timing,hf,extLst(Annex A.3). python-pptx lists the same sequence (pptx-oxml-slide.py257). - Attributes:
type(ST_SlideLayoutType, defaultcust),matchingName(string, default empty: a name used in place of thecSldname when layouts are matched after a layout change or template application),preserve(default false: the layout is deleted when no slide uses it any more),userDrawn(default false),showMasterSp(default true: the master’s shapes show on slides) andshowMasterPhAnim(default true). ST_SlideLayoutType(19.7.15) has 36 values. The type describes the kind of content, not exact positions, so an application can map one layout to another; each application chooses which layouts to offer. Values: title, tx, twoColTx, tbl, txAndChart, chartAndTx, dgm, chart, txAndClipArt, clipArtAndTx, titleOnly, blank, txAndObj, objAndTx, objOnly, obj, txAndMedia, mediaAndTx, objOverTx, txOverObj, txAndTwoObj, twoObjAndTx, twoObjOverTx, fourObj, vertTx, clipArtAndVertTx, vertTitleAndTx, vertTitleAndTxOverChart, twoObj, objAndTwoObj, twoObjAndObj, cust, secHead, twoTxTwoObj, objTx, picTx. The standard describes each (for exampleobjTx: title, object and caption text;picTx: picture and caption text;secHead: section header title and subtitle;title: centred title and subtitle placeholders;vertTitleAndTx: vertical title on the right, vertical text on the left;cust: custom layout defined by the user).
p:sldMaster (19.3.1.42)
- Children in order:
cSld,clrMap(required: theEG_TopLevelSlidegroup),sldLayoutIdLst,transition,timing,hf,txStyles,extLst. The only attribute ispreserve(default false). python-pptx lists the same order (pptx-oxml-slide.py287-296). p:txStyles(CT_SlideMasterTextStyles):titleStyle,bodyStyle,otherStyle,extLst, in that order, all optional.otherStyleformats text not covered by the other two (19.3.1.35).p:clrMap(19.3.1.6,CT_ColorMapping) has twelve required attributes:bg1,tx1,bg2,tx2,accent1toaccent6,hlink,folHlink, each anST_ColorSchemeIndexthat names a colour of the theme (sobg1="dk1"makes background 1 the theme’s dark colour 1). A slide, layout or notes slide can override it withclrMapOvr(19.3.1.7):masterClrMappingmeans the master’s mapping is used,overrideClrMappinggives a new one.p:hf(CT_HeaderFooter): booleanssldNum,hdr,ftranddt, each default true: whether the slide number, header, footer and date placeholders are shown.p:sldLayoutId(19.3.1.40):r:id(required, resolves through the master’s relationships) andid(optional, ST_SlideLayoutId, 19.7.14: an unsigned int of at least 2147483648). A slide master id (ST_SlideMasterId, 19.7.16) has the same minimum (slide ids are below 2147483648, see presentation.xml). python-pptx reads only ther:idof a layout entry (pptx-oxml-slide.py273-279).
Divergences and PowerPoint behaviour
- A placeholder on a slide inherits from the layout placeholder with the same
idx; the standard does not say ([MS-OI29500] 2.1.1127 b). bgPrin PowerPoint does not accept agrpFillalthough the standard’s fill group has one (2.1.1119 a);bgcarriesbwMode, used when the background is drawn in black and white (2.1.1118 a).- The notes master is the master for notes pages; the standard’s sentence calls it a handout master (2.1.1124 a). PowerPoint draws its shapes in the order written and draws the note text in front (2.1.1124 b).
- A
p:spwithuseBgFill="1"is filled with the part of the slide background behind it; this is not a transparent fill (19.3.1.43).
The handout master
p:handoutMaster sets how handouts print. There is at most one.
Rules (ECMA-376 5th edition Part 1 19.3.1.24 and CT_HandoutMaster in Annex A.3): the element
specifies an instance of a handout master slide, holding the objects and formatting of a handout page. Its content model is
cSld (required, exactly one: the common slide data, where the shapes and their text bodies are, which the standard
says is the majority of the element’s purpose), then the EG_TopLevelSlide group (required, exactly one:
clrMap, the colour mapping of 19.3.1.6, with its twelve required attributes), then the optional
hf (19.3.1.25: booleans hdr, ftr, dt, sldNum, each assumed
true when absent) and extLst. The handout master has no sldLayoutIdLst, txStyles,
transition or timing child, and no attributes: a handout page has no layouts (the sequence in Annex A.3 has only
the four children above). The notes master (CT_NotesMaster) differs by an added notesStyle between
hf and extLst. [MS-OI29500] has no section titled handoutMaster (searched in the saved
text); it names the element only in the cSld note (2.1.1121).