Haskell 로 만들어진 converter 로 markdown, MediaWiki, textile, HTML, ms 워드(.docx), epub, PDF 등으로 변환이 가능한 유틸리티
설치
수동으로 설치
https://github.com/jgm/pandoc/releases 에 연결후 맨 아래 Downloads에서 사용하는 OS 에 맞는 버전 다운로드
- Windows - https://github.com/jgm/pandoc/releases/download/2.2.3.2/pandoc-2.2.3.2-windows-x86_64.msi
- Mac OS X - https://github.com/jgm/pandoc/releases/download/2.2.3.2/pandoc-2.2.3.2-macOS.pkg
Package manager 로 설치
h4. CentOS
yum install pandoc
Ubuntu
sudo apt install pandoc
OS X
brew install pandoc
Windows
choco install pandoc
scoop install pandoc
PDF 출력
pdf로 만들려면 Latex 패키지를 설치해야 하며 권장하는 패키지는 OS 마다 다름
Windows 에서는 https://miktex.org/ 를 OS X 는 http://www.tug.org/mactex/morepackages.html 를 설치하고 필요한 패키지는 tex의 패키지 매니저 사용
사용
cmd 나 쉘에서 pandoc 명령어로 원하는 포맷으로 변환
markdown 변환
test1.md 파일로 저장
test.md
# Test! This is a test of *pandoc*. - list one - list two
cmd 나 쉘에서 다음 명령어 실행
pandoc test1.md -f markdown -t html -s -o test1.html
- -f : from 원본 소스의 포맷(html, json, markdown, docx 등)
- -t : to 변환할 포맷(html, json, markdown, docx 등)
- -s : standalone
- -o : output 출력 파일 이름
test1.md 가 다음 html 로 변환됨
markdown 을 MS WORD(docx) 로 변환
pandoc test1.md -f markdown -t docx -s -o test1.docx