๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ป DEV/Markdown

[Marp] marp, markdown์œผ๋กœ ppt ๋งŒ๋“ค๊ธฐ

by Rising Oneโ˜… 2023. 2. 14.
728x90
๋ฐ˜์‘ํ˜•
SMALL

Marp ๋Œ€ํ‘œ์ด๋ฏธ์ง€

 

 

ํ•„์š”์„ฑ

 ์‚ฌ๋‚ด์—์„œ ์„ธ๋ฏธ๋‚˜๋ฅผ ์ค€๋น„ํ•ด์•ผํ•˜๋Š” ์ƒํ™ฉ์ด ์žˆ์—ˆ๊ณ , ๋งค๋ฒˆ PPT(.pptx)๋กœ ์ž‘์—…ํ•˜๋˜ ๋ฐœํ‘œ์ž๋ฃŒ ๋ฐฉ์‹์— ๋ณ€ํ™”๋ฅผ ์ฃผ๊ณ  ์‹ถ์—ˆ์Šต๋‹ˆ๋‹ค. ๋•Œ๋งˆ์นจ Markdown์„ ํ™œ์šฉํ•œ Marp(Markdown Presentation Ecosystem)๋ฅผ ์‚ฌ์šฉํ•ด ๋ฐœํ‘œ์ž๋ฃŒ๋ฅผ ๋งŒ๋“ค๊ณ ์ž ๋ชฉํ‘œ๋ฅผ ์„ธ์› ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜ ๋‚ด์šฉ์œผ๋กœ๋Š” Marp๋ฅผ ์ดํ•ดํ•˜์‹œ๋Š” ๋ฐ์— ๋„์›€์ด ๋  ์ˆ˜ ์žˆ๋„๋ก ๊ธฐ๋ณธ ์ฝ”๋“œ ๊ตฌ์„ฑ์„ ๋‹ค๋ค„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.   

 

 


์ ‘๊ทผ

 

  1. VsCode ๋‚ด Markdown ํŒŒ์ผ(.md) ์ƒ์„ฑ
  2. Marp Extension 'Marp for VS code' ์„ค์น˜

  3. Marp ๊ธฐ๋ณธ ์ฝ”๋“œ ๋‹ค๋ฃจ๊ธฐ

 


๋ฐฉ๋ฒ•

 

  1. VsCode ๋‚ด Markdown ํŒŒ์ผ(.md) ์ƒ์„ฑ

 

(1) Vscode (Visual Studio Code) ์„ค์น˜

 

 

Vscode (Visual Studio Code)๋ฅผ ์„ค์น˜ํ•ด์ค๋‹ˆ๋‹ค. 

(์„ค์น˜๋ฒ„์ „์€ ์ตœ์‹ ๋ฒ„์ „๋„ ์ข‹๊ฒ ์ง€๋งŒ, LTS๋ฒ„์ „์„ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค.)

 

 

(2) ํด๋” & Markdown ํŒŒ์ผ (.md) ์ƒ์„ฑ

 

- (์ขŒ์ธก ์‚ฌ์ง„๊ณผ ๊ฐ™์ด) ํƒ์ƒ‰๊ธฐ๋ฅผ ์—ด๊ณ , markdown ํŒŒ์ผ์„ ๋งŒ๋“ค ํด๋”๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

(ํด๋”๋ฅผ ์ƒ์„ฑํ•จ์€ ์ถ”ํ›„ marp ๋‚ด์— ์‚ฌ์šฉ๋  resources ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•จ์ด ์žˆ์Šต๋‹ˆ๋‹ค.)

 

- ํด๋” ๋‚ด ํฌ๋ง ์œ„์น˜ ์šฐํด๋ฆญ > "์ƒˆํŒŒ์ผ"์„ ๋ˆŒ๋Ÿฌ ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

 

- ํŒŒ์ผ๋ช…์„ ์ž์œ ๋กญ๊ฒŒ ์ ๋˜, ํ™•์žฅ์ž๋ฅผ "md" ํ˜•์‹์œผ๋กœ ์ง€์ •ํ•ด์ค๋‹ˆ๋‹ค.

 

- ์ƒ์„ฑ๋œ ํŒŒ์ผ์€ "seminar.md"์™€ ๊ฐ™์ด markdown์–ธ์–ด๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

(์œ„์˜ ๋ฐฉ๋ฒ• ์™ธ์—๋„ ๊ฐœ์ธ์ด ํŽธํ•œ ๋ฐฉ์‹์„ ์ด์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.)

 

 


  2. Marp Extension 'Marp for VS code' ์„ค์น˜

 

 

- (์ขŒ์ธก ์‚ฌ์ง„๊ณผ ๊ฐ™์ด) ํ™•์žฅ(Extension) ํƒญ์„ ํด๋ฆญํ•ด์ค๋‹ˆ๋‹ค.

 

- "marp" ๋ฅผ ๊ฒ€์ƒ‰ํ•˜๋ฉด, "Marp for VS Code" ํ™•์žฅ์ด ์กฐํšŒ๋ฉ๋‹ˆ๋‹ค.

 

- ์กฐํšŒ๋œ ํ™•์žฅ(Extension)์„ ์„ค์น˜ํ•ด์ค๋‹ˆ๋‹ค.

 

 

Marp for VS Code ํ™•์žฅ
ํ™•์žฅ(Extension) ์„ค์ • ๋‚ด "Enable HTML"

 

 

 

 

- ์ดํ›„, markdown HTML ์ž‘์„ฑ์ด ๊ฐ€๋Šฅํ•ด์งˆ ์ˆ˜ ์žˆ๋„๋ก ์„ค์ •์„ ํ•ฉ๋‹ˆ๋‹ค.

 

- "Marp: Enable HTML" ์„ค์ •์„ ํ™œ์„ฑํ™” ์‹œ์ผœ์ค๋‹ˆ๋‹ค.

(ํ›„์— ์ž‘์„ฑํ•˜๊ฒŒ ๋  md ํŒŒ์ผ์—์„œ <HTML> ์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ•  ์˜ˆ์ •) 

 

 

 

 

 


  3. Marp ๊ธฐ๋ณธ ์ฝ”๋“œ ๋‹ค๋ฃจ๊ธฐ

 

(1) marp ํ™œ์„ฑํ™”

---
marp: true
---

์œ„ ์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ•จ์œผ๋กœ์จ, marp๋ฅผ ํ™œ์„ฑํ™”ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. 

๋”๋ถˆ์–ด, ์Šฌ๋ผ์ด๋“œ ์ƒ์„ฑ์€ "---" ์œผ๋กœ ์ด๋ค„์ง‘๋‹ˆ๋‹ค.

 

(2) ์ „์—ญ์„ค์ • (theme, paginate, header, footer...)

---
marp: true
theme: gaia
class: invert
paginate: true
header: header ์ž‘์„ฑ์„ ์—ฌ๊ธฐ์— ํ•ด์ฃผ์„ธ์š”.
footer: footer ์ž‘์„ฑ์„ ์—ฌ๊ธฐ์— ํ•ด์ฃผ์„ธ์š”.
---

 

-  theme(ํ…Œ๋งˆ)์—๋Š” uncover, gaia, default๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

-  class์—๋Š” invert(dark mode) ๋ฅผ ์„ค์ •ํ•ด์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

-  paginate๋กœ๋Š” ์Šฌ๋ผ์ด๋“œ๋ณ„ ์šฐ์ธก ํ•˜๋‹จ์— paging ์ฒ˜๋ฆฌ๊ฐ€ ๋  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ค๋‹ˆ๋‹ค.

- header/footer๋Š” ์Šฌ๋ผ์ด๋“œ๋ณ„ ์ƒ,ํ•˜๋‹จ์— ์œ„์น˜ํ•  ๋ฌธ๊ตฌ๋ฅผ ์„ค์ •ํ•ด์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

(3) ๊ธฐํƒ€ (๊ฐ•์กฐ, ๊ธฐ์šธ์ด๊ธฐ, ์ทจ์†Œ์„ , ํ‘œ)

---
# ๊ฐ•์กฐ
์ˆซ์ž ๋ฆฌ์ŠคํŠธ ๊ฐ•์กฐ : **๊ธ€**

# ๊ธฐ์šธ์ด๊ธฐ
_๊ธฐ์šธ์ด๊ธฐ_

# ์ทจ์†Œ์„ 
~~์ทจ์†Œ์„ ~~

# ํ‘œ ์ž‘์—…
|์ด๋Ÿฐ์‹์˜|ํ‘œ๋„|๋งŒ๋“ค ์ˆ˜ ์žˆ์Œ|
| ------|----|-----------|
| ๊ฐ’1   | ๊ฐ’2| ๊ฐ’3       |

# ์ด๋ชจ์ง€
:rocket: (์ด๋ชจ์ง€)
---

(4) ์Šฌ๋ผ์ด๋“œ๋ณ„ ๊ฐœ๋ณ„ ์ฝ”๋“œ ์ž‘์—…

---
# ์ „์—ญ ์„ค์ • ๋ถ€๋ถ„
marp: true
theme: gaia
class: invert
paginate: true
header: header ์ž‘์„ฑ์„ ์—ฌ๊ธฐ์— ํ•ด์ฃผ์„ธ์š”.
footer: footer ์ž‘์„ฑ์„ ์—ฌ๊ธฐ์— ํ•ด์ฃผ์„ธ์š”.

---
# ์Šฌ๋ผ์ด๋“œ๋ณ„ ๊ฐœ๋ณ„ ์„ค์ • ๊ฐ€๋Šฅ : <!-- --> ์ฃผ์„ ์‚ฌ์ด ์ž‘์„ฑ

<!--
_backgroundColor: "red"
_color: white
_paginate: false
_header: _Seminar For
_footer: "Copyright 2023"
 -->

๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.
---

(5) ์ถ”๊ฐ€ TIP (์Šฌ๋ผ์ด๋“œ ๋‚ด 2๊ฐœ์˜ Column ๊ตฌ๋ถ„)

---
# ์ „์—ญ ์„ค์ •
# "Enable HTML" ์„ ํ™œ์„ฑํ™” ํ•ด์คฌ๊ธฐ์— ๊ฐ€๋Šฅ 

style: |
  .columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  ---
  
<div class="columns">
<div>

- a
- b
- c

</div>
<div>

- d
- e
- f

</div>
</div>

---

(5) ์ถ”๊ฐ€ TIP (2 Column ์„ค์ •) ๊ฒฐ๊ณผ


์ด์™ธ์—๋„ ์Šฌ๋ผ์ด๋“œ๋ฅผ ๊พธ๋ฐ€ ์ˆ˜ ์žˆ๋Š” ์ˆ˜๋งŽ์€ ๋ฐฉ๋ฒ•๋“ค์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.

์ถ”๊ฐ€์ ์ธ ๋‚ด์šฉ์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์…”๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

https://github.com/marp-team

 

๋„์›€์ด ๋˜์…จ๋‹ค๋ฉด ๊ณต๊ฐ๋ฒ„ํŠผ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค!

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค^^

728x90
๋ฐ˜์‘ํ˜•
LIST

๋Œ“๊ธ€