You've been handed a conference or corporate .pptx template. Here's how to
get your Marp deck to use its layouts.
Open the template in PowerPoint. On the Home tab, click the Layout dropdown. The names you see there — "Title Slide", "Title and Content", "Section Header", and so on — are the names you'll use in Markdown.
Matching is case-insensitive, but spelling and spacing must match exactly.
In your front matter, layout: picks the layout for normal content slides:
---
marp: true
layout: Title and Content
---Your opening title slide is still auto-detected — you don't need to set it.
Use a spot directive (underscore prefix) at the top of that slide:
---
<!-- _layout: Section Header -->
## Part Two
Deep dive into the details.The underscore means this slide only. The next slide goes back to the default.
Leave the underscore off and the change sticks until you change it again:
---
<!-- layout: Two Content -->
## Comparison A
---
## Comparison B
---
<!-- layout: Title and Content -->
## Back to normalSome templates put the fancy title treatment on slide 1 itself instead of on a reusable layout. In that case, point MarpToPptx at the authored template slide:
<!-- _layout: Template[1] -->That clones template slide 1, keeps its background/artwork, and replaces its text boxes with your content. This is mainly useful for branded title slides.
Use this only when the template's special title slide is not exposed as a real
layout in PowerPoint. If you do see a normal layout name like Title Slide in
the Layout dropdown, prefer that first.
---
marp: true
layout: Title and Content
---
<!-- _layout: Title Slide -->
# My Presentation
Author Name · Conference 2026
---
## First Content Slide
- Point one
- Point two
---
<!-- _layout: Section Header -->
## Part OneIf your template's fancy title page is slide-authored instead of layout-authored, swap that first override for:
<!-- _layout: Template[1] -->Run it with:
marp2pptx deck.md --template conference-template.pptx -o deck.pptxOn a template-bound slide:
| Your Markdown | Goes into |
|---|---|
First heading (#, ##, any level) |
The layout's title area |
| Paragraphs and bullet lists that follow | The layout's body area |
| Images, code blocks, tables | Placed as standalone shapes |
Font, size, and colour come from the template, not your CSS. That's the point — you're asking the template to style things.
Nine times out of ten: the layout name in your Markdown doesn't match what PowerPoint calls it. Open the Layout dropdown again and check character-for-character.
If names match and it still looks the same, the template itself may carry
all its artwork on the master rather than per-layout. See
doc/template-authoring-guidelines.md for diagnosing that case.
MarpToPptx ships a standalone diagnostics tool that can report on a template's layout structure and make recommendations:
dotnet run --project src/MarpToPptx.TemplateDiagnostics -- diagnose conference.pptxThis prints a table of all layouts with their placeholder coverage and semantic
roles, plus recommended layout: / _layout: values for your Markdown.
Real-world conference and corporate templates are often valid PowerPoint files but still produce suboptimal results with MarpToPptx. The template doctor goes beyond diagnostics and can identify — and fix — structural problems.
| Issue code | Severity | What it means |
|---|---|---|
DuplicateLayoutName |
Warning | Two or more layouts share the same name; only the first can be targeted by directive. |
EmptyLayoutName |
Warning | A layout has no name and will be referenced by position only. |
ContentLayoutMissingTitlePlaceholder |
Warning | A content layout lacks a title placeholder; headings won't use the template's title geometry. |
ContentLayoutMissingBodyPlaceholder |
Warning | A content layout lacks a body placeholder; body content won't use the template's body geometry. |
PlaceholderGeometryInherited |
Fixable | A placeholder identity exists on the layout but its position/size is inherited from the slide master instead of being declared on the layout itself. The renderer recovers via master fallback, but materializing the geometry improves portability. |
TypelessIndexedBodyPlaceholder |
Info | Body content is accessible only via a typeless indexed placeholder — this is standard and fully supported. |
UnmappableLayoutRole |
Info | A picture-caption or comparison layout can't yet be auto-selected by the renderer. |
VisuallyRedundantLayouts |
Info | Multiple layouts share the same role and have no distinct shapes; they appear identical at render time. |
Inspect without modifying anything:
dotnet run --project src/MarpToPptx.TemplateDiagnostics -- doctor conference.pptxApply all safe, automatable fixups to a new file (the original is never touched):
dotnet run --project src/MarpToPptx.TemplateDiagnostics -- \
doctor conference.pptx \
--write-fixed-template conference-fixed.pptxThe console output lists every fix that was applied.
Pipe the report into other tools:
dotnet run --project src/MarpToPptx.TemplateDiagnostics -- \
doctor conference.pptx --json