본문 바로가기
C.W.K.
Stream
Lesson 04 of 08 · published

Footnote — 흐름 안 끊는 메모

~10 min · markdown, footnotes, pandoc

Level 0평문
0 XP0/64 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Footnote 가 본문을 깨끗하게 유지한다

Footnote 는 본문 흐름을 끊지 않고 단어 하나에 부연을 달아줘. 참조는 [^id] 로 걸고, 정의는 [^id]: footnote 본문 형태로 파일 아무 데나 두면 돼. 렌더러가 정의를 알아서 모아서 참조된 순서대로 번호를 매기고 footnote 섹션을 뽑아줘.

다중 문단 footnote

Footnote 하나가 여러 문단을 가질 수도 있어. 이어지는 문단을 4 칸 (또는 탭 하나) 들여쓰면 같은 footnote 에 붙어.

Footnote 가 사는 곳 (과 안 사는 곳)

Footnote 는 CommonMark 에는 없어. GFM 은 2021 년부터 지원하고, pandoc 과 MultiMarkdown, 요즘 정적 사이트 생성기 대부분도 받아줘. 순수 CommonMark 만 받는 곳이라면 괄호 부연이나 섹션 끝 메모로 물러서야 해.

원칙: footnote 에는 독자가 건너뛰어도 손해 안 보는 맥락만 넣어. 꼭 알아야 할 건 본문에 둬. footnote 는 불편한 사실을 묻어두는 자리가 아니야.

Code

한 줄 footnote·markdown
Markdown was created in 2004[^gruber] and standardized as CommonMark[^cm].

[^gruber]: By John Gruber and Aaron Swartz.
[^cm]: First spec published 2014, current version 0.31.2.
다중 문단 footnote·markdown
The Norway problem[^norway] is YAML's most famous gotcha.

[^norway]: In YAML 1.1, unquoted `no` parses as boolean false.

    So `country: NO` reads as `country: False`. The fix is to
    quote the string or upgrade to YAML 1.2 where this was removed.
순서 무관 (정의는 어디든 가능)·markdown
[^cm]: First spec published 2014.

# Document title

Markdown is from 2004[^gruber] and standardized as CommonMark[^cm].

[^gruber]: By John Gruber and Aaron Swartz.

External links

Exercise

괄호 부연 ('(see also: ...)' 이나 'NB: ...') 이 들어간 문단 하나를 기존 문서에서 골라. 부연을 하나씩 뜻이 담긴 ID 의 footnote 로 옮겨. 그리고 두 버전을 나란히 읽어봐. 부연이 아래로 내려가면서 본문이 얼마나 숨을 쉬는지 바로 느껴질 거야.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.