| name | beautiful-pdf |
| description | Convert markdown to a beautifully designed editorial-style PDF report. Uses Pretendard variable font, Swiss-Coffee + Cool-Blue palette, minimalist-maximalism layout, cover page, table of contents, section dividers, page numbers. Optimized for Korean+English mixed reports. Use when user asks for "report PDF", "๋ณด๊ณ ์ PDF", "์๋ฆ๋ค์ด PDF", "์์ PDF", or wants to publish a markdown document as a polished document. |
beautiful-pdf โ ์๋ฆ๋ค์ด ๋ณด๊ณ ์ PDF ์คํฌ
์๋
Markdown ์๊ณ ๋ฅผ ์๋ํ ๋ฆฌ์ผ ํค์ ์ฐ์ํ PDF๋ก ๋ณํํ๋ค. ๋จ์ ๋ณํ์ด ์๋๋ผ ํ์ง / ๋ชฉ์ฐจ / ๋ณธ๋ฌธ / ํธํฐ 4-layer ๋ ์ด์์ + Pretendard ๋ณ๋ ํฐํธ + Swiss Coffee ๋ฒ ์ด์ค ํ๋ ํธ ์ ์ฉ.
์ ์ (verify before run)
~/2lab.ai/.venv/bin/python3 -c "import weasyprint, markdown_it; print(weasyprint.__version__)"
ls ~/2lab.ai/skills/beautiful-pdf/assets/fonts/PretendardVariable.woff2
ls ~/2lab.ai/skills/beautiful-pdf/templates/default.css
ls ~/2lab.ai/skills/beautiful-pdf/scripts/render.py
์์ผ๋ฉด:
- pip โ
~/2lab.ai/.venv/bin/python3 -m pip install weasyprint markdown-it-py
- ํฐํธ โ
curl -L -o PretendardVariable.woff2 https://github.com/orioncactus/pretendard/raw/main/packages/pretendard/dist/web/variable/woff2/PretendardVariable.woff2
์ฌ์ฉ๋ฒ
~/2lab.ai/.venv/bin/python3 ~/2lab.ai/skills/beautiful-pdf/scripts/render.py \
--input /path/to/report.md \
--output /path/to/report.pdf \
--title "๋ฆฌํฌํธ ์ ๋ชฉ" \
--subtitle "๋ถ์ / ํ ์ค ์์ฝ" \
--author "๋ฐํ์ (์ ํ)" \
--date "2026-05-07"
์ต์
:
--theme editorial (default) โ ์ ๋ฌธ / ์ก์ง ํค
--theme minimal โ ๋ ๊ธฐ๋ณธ์ ์ธ white space ์์ฃผ
--theme dark โ ๋คํฌ ๋ชจ๋ (์ธ์๋ณด๋จ ํ๋ฉด์ฉ)
--toc โ ๋ชฉ์ฐจ ์๋ ์์ฑ (H2 ๊ธฐ์ค)
--no-cover โ ํ์ง ์๋ต
Markdown ์๊ณ ๊ฐ์ด๋
์คํฌ์ด ๋ ์ ๋ฐ์์ฃผ๋ ๋งํฌ์
:
์ผ๋ฐ (์๋ ์ฒ๋ฆฌ)
# H1 โ ๋ณธ๋ฌธ ์์์ ์น์
ํ์ดํ๋ก
## H2 โ ์ฑํฐ, ์๋์ผ๋ก page-break ๊ฐ๋ฅ
### H3 / #### H4 โ ์๋ธํค๋ฉ
- ํ, ์ฝ๋ ๋ธ๋ก, ์ธ์ฉ, ์ด๋ฏธ์ง ๋ชจ๋ ์ง์
--- (hr) โ ์๊ฐ์ ๋๋ฐ์ด๋ (์ 3๊ฐ๋ก ๋ณํ)
๊ฐ์กฐ ๋ฐ์ค (ํ์ฅ ๋งํฌ์
)
์๊ณ ์์ ๋ค์ ํจํด ์ฐ๋ฉด ์นด๋ ๋ฐ์ค๋ก ์ฒ๋ฆฌ:
> [!key] ํต์ฌ ์์ฝ
> ํ ๋ฌธ์ฅ ๋๋ ์งง์ ๋จ๋ฝ. ๋ณธ๋ฌธ์์ ๊ฐ์กฐํ๊ณ ์ถ์ ๋ถ๋ถ.
> [!warn] ๋ฆฌ์คํฌ
> ๊ฒฝ๊ณ / ์ํ / ์ฃผ์ ์ฌํญ
> [!stat] ์์น ํ์ด๋ผ์ดํธ
> $1.85 โ +23% (2026-05-06)
Drop cap
H2 ์งํ ์ฒซ ๋ฌธ๋จ ์ฒซ ๊ธ์๊ฐ ์๋์ผ๋ก drop cap.
๋์์ธ ํ ํฐ (default ํ
๋ง)
| ํ ํฐ | ๊ฐ | ์๋ |
|---|
| Primary | #1A1A1A | ๋ณธ๋ฌธ |
| Background | #FAF7F2 (Swiss Coffee) | ํ์ด์ง |
| Accent | #1B4965 (Cool Blue) | ํค๋ฉ / ๋งํฌ |
| Muted | #6B6B6B | ๋ฉํ ์ ๋ณด |
| Highlight | #F4A261 | ๊ฐ์กฐ ๋ฐ์ค ๋ณด๋ |
| Border | #D9D2C5 | ํ / ๋๋ฐ์ด๋ |
ํฐํธ:
- Pretendard Variable โ ๋ณธ๋ฌธ / ํค๋ฉ (ํ๊ธ + ๋ผํด)
- JetBrains Mono / Monospace โ ์ฝ๋
์ถ๋ ฅ ์ฌ์
- A4 (210ร297mm)
- ๋ง์ง: 22mm 18mm 25mm 18mm
- ๋ณธ๋ฌธ 10.5pt / 1.65 line-height
- H1 30pt / H2 18pt / H3 13pt
- ํธํฐ: ํ์ด์ง ๋ฒํธ (n / total)
- ํ์ง: ํฐ ํ์ดํ + ์์ ๋๋ฐ์ด๋ ๋ผ์ธ + ๋ถ์ + ๋ ์ง + ๋ฐํ์
์ฌํ ๊ฒ์ฆ
file /path/to/report.pdf
ls -la /path/to/report.pdf
ํ์ด์ง ์ ๋๋ฌด ์ ์ผ๋ฉด (์์ < 5p) layout ๊นจ์ง ์์ฌ. CSS / ํฐํธ ๊ฒฝ๋ก ํ์ธ.
ํ๊ณ
- ๋งค์ฐ ๋ณต์กํ LaTeX ์์ ๋ฏธ์ง์ (๋จ์ inline์ ๊ฐ๋ฅ)
- ๋๋ ์ด๋ฏธ์ง (>20์ฅ) ์ weasyprint ๋๋ ค์ง ์ ์์
- ์ธ๋ถ ํฐํธ ์ถ๊ฐ ์ assets/fonts์ .woff2 ๋ฃ๊ณ default.css
@font-face ์ถ๊ฐ ํ์
ํ์ฅ ์์ด๋์ด
--theme magazine โ 2๋จ ๊ตฌ์ฑ
--theme academic โ ์ธ์ฉ / ๊ฐ์ฃผ / ์ฐธ๊ณ ๋ฌธํ ์๋ ํฌ๋งท
- ์๋ ์ฐจํธ ์ฝ์
(matplotlib/plotly png) โ ์
๋ ฅ frontmatter์ ๋ฐ์ดํฐ ๋๊ฒจ์ฃผ๋ฉด ์ฐจํธ ๊ทธ๋ ค์ ์ฝ์