# Marp/Marpit Complete Reference ## Overview **Marp** = Markdown Presentation Ecosystem **Marpit** = The core framework ("skinny framework for creating slide deck from Markdown") Built-in themes: `default`, `gaia`, `uncover` --- ## Slide Structure ### Slide Separation Slides are separated by horizontal rulers: ```markdown --- ``` Alternatives: `___`, `***`, `- - -` **Important**: May need empty line before `---` per CommonMark spec. ### Basic Document Structure ```markdown --- marp: true theme: gaia paginate: true --- # First Slide Content here --- # Second Slide More content ``` --- ## Directives ### Syntax Options **HTML Comments:** ```markdown ``` **Front-matter (YAML):** ```markdown --- theme: default paginate: true --- ``` ### Directive Scopes | Scope | Applies to | Syntax | |-------|-----------|--------| | Global | Entire deck | Normal directive | | Local | Current + following slides | Normal directive mid-document | | Spot | Single slide only | Underscore prefix: `_directive` | ### Global Directives - `theme` — Slide deck theme - `style` — Custom CSS - `lang` — Language attribute (accessibility) - `headingDivider` — Auto-split at heading levels (1-6) ### Local Directives - `paginate` — Page numbers (true/false/hold/skip) - `header` — Persistent header text - `footer` — Persistent footer text - `class` — CSS class for slide - `backgroundColor` — Slide background color - `backgroundImage` — Background image URL - `backgroundPosition` — CSS background-position - `backgroundRepeat` — CSS background-repeat - `backgroundSize` — CSS background-size - `color` — Text color ### Spot Directive Example ```markdown ``` Only affects current slide. ### Pagination Values - `true` — Show and increment - `false` — Hide but increment - `hold` — Show without incrementing - `skip` — Hide without incrementing ### Heading Divider ```markdown --- headingDivider: 2 --- # Section 1 Content ## Slide 1.1 Content ## Slide 1.2 Content ``` --- ## Image Syntax ### Basic Resizing ```markdown    ``` Units: px, em, cm, pt, etc. (no viewport units vw/vh) ### Image Filters ```markdown           ``` Combine multiple: ```markdown  ``` ### Background Images ```markdown      ``` ### Split Backgrounds ```markdown     ``` ### Multiple Backgrounds ```markdown    ``` Arranges horizontally by default. ```markdown   ``` Arranges vertically. --- ## Fragmented Lists (Animations) ### Bullet Lists — Use `*` ```markdown * First item * Second item * Third item ``` Regular `-` or `+` bullets don't animate. ### Ordered Lists — Use `)` ```markdown 1) First item 2) Second item 3) Third item ``` Regular `.` numbered lists don't animate. ### Output ```html