TITLE DATE

Text Centering use <!-- _class: lead -->

Footer
TITLE DATE

List and Todolist

  • item of list
  • item of list
  • item of todo
  • item of todo
  • item of todo
Footer
TITLE DATE

Marp

Markdown presentation ecosystem
by Marp Team (@marp-team)
Footer
TITLE DATE

Features

  • 📝 Write slide deck with plain Markdown (CommonMark)
  • 🏭 Built on Marpit framework: A brand-new skinny framework for creating slide deck
  • ⚙️ Marp Core: Easy to start using the core engine and built-in themes via npm
  • 📺 Marp CLI: Convert Markdown into HTML, PDF, PPTX, and images
  • 🆚 Marp for VS Code: Live-preview your deck while editting
  • and more...
Footer
TITLE DATE

How to write slides?

Split pages by horizontal ruler (e.g. ---). It's very simple.

# Slide 1

foobar

---

# Slide 2

foobar
Footer
TITLE DATE

Directives

Marp has extended syntax called "Directives" to support creating beautiful slides.

Insert front-matter to the top of Markdown:

---
theme: default
---

or HTML comment to anywhere:

<!-- theme: default -->

https://marpit.marp.app/directives

Footer
TITLE DATE

Global directives

  • theme: Choose theme
  • size: Choose slide size from 16:9 and 4:3 (except Marpit framework)
  • headingDivider: Instruct to divide slide pages at before of specified heading levels
---
theme: gaia
size: 4:3
---

# Content

Marp can use built-in themes in Marp Core: default, gaia, and uncover.

Footer
TITLE DATE

Local directives

These are the setting value per slide pages.

  • paginate: Show pagination by set true
  • header: Specify the contents for header
  • footer: Specify the contents for footer
  • class: Set HTML class for current slide
  • color: Set text color
  • backgroundColor: Set background color
Footer
TITLE DATE

Spot directives

Local directives would apply to defined page and following pages.

They can apply to single page by using underscore prefix such as _class.

Footer
TITLE DATE

Example

This page is using invert color scheme defined in Marp built-in theme.

<!-- _class: invert -->
Footer
TITLE DATE

Image syntax

You can resize image size and apply filters through keywords: width (w), height (h), and filter CSS keywords.

![width:100px height:100px](image.png)
![blur sepia:50%](filters.png)

Please refer resizing image syntax and a list of CSS filters.

Footer
TITLE DATE

Background image

You can set background image for a slide by using bg keyword.

![bg opacity](https://unsplash.it/630/400)
Footer
TITLE DATE

Multiple backgrounds (Marpit's advanced backgrounds)

Marp can use multiple background images.

![bg blur:3px](https://fakeimg.pl/800x600/fff/ccc/?text=A)
![bg blur:3px](https://fakeimg.pl/800x600/eee/ccc/?text=B)
![bg blur:3px](https://fakeimg.pl/800x600/ddd/ccc/?text=C)

Also can change alignment direction by including vertical keyword.

Footer
TITLE DATE

Split background

Marp can use Deckset style split background(s).

Make a space for background by bg + left / right keywords.

![bg right](image.jpg)
TITLE DATE

Fragmented list

Marp will parse a list with asterisk marker as the fragmented list for appearing contents one by one. (Only for exported HTML by Marp CLI / Marp for VS Code)

# Bullet list

- One
- Two
- Three

---

# Fragmented list

- One
- Two
- Three
Footer
TITLE DATE

Math typesetting (only for Marp Core)

KaTeX math typesetting such as can use with Pandoc's math syntax.

$ax^2+bc+c$
$$I_{xx}=\int\int_Ry^2f(x,y)\cdot{}dydx$$
Footer
TITLE DATE

Auto-scaling (only for Marp Core)

Several built-in themes are supported auto-scaling for code blocks and math typesettings.

Too long code block will be scaled-down automatically. ------------>
Too long code block will be scaled-down automatically. ------------------------>
Too long code block will be scaled-down automatically. ------------------------------------------------>
Footer
TITLE DATE
Auto-fitting header (only for Marp Core)
is available by annotating <!--fit--> in headings

##
<!--fit-->
Auto-fitting header (only for Marp Core)
Footer
TITLE DATE

Theme CSS

Marp uses <section> as the container of each slide. And others are same as styling for plain Markdown. The customized theme can use in Marp CLI and Marp for VS Code.

/* @theme your-theme */

@import "default";

section {
  /* Specify slide size */
  width: 960px;
  height: 720px;
}

h1 {
  font-size: 30px;
  color: #c33;
}
Footer
TITLE DATE

Tweak style in Markdown

<style> tag in Markdown will work in the context of theme CSS.

---
theme: default
---

<style>
section {
  background: yellow;
}
</style>

Re-painted yellow background, ha-ha.

You can also add custom styling by class like section.custom-class { ... }.
Apply style through <!-- _class: custom-class -->.

Footer
TITLE DATE

Scoped style

If you want one-shot styling for current page, you can use <style scoped>.

<style scoped>
a {
  color: green;
}
</style>

![Green link!](https://marp.app/)
Footer
TITLE DATE

Enjoy writing slides! ✌️

Marp: Markdown presentation ecosystem — https://marp.app/
by Marp Team (@marp-team)
Footer