You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
Haskell 로 만들어진 converter 로 markdown, MediaWiki, textile, HTML, ms 워드(.docx), epub, PDF 등으로 변환이 가능한 유틸리티
설치
https://github.com/jgm/pandoc/releases 에 연결후 맨 아래 Downloads에서 사용하는 OS 에 맞는 버전 다운로드
사용
cmd 나 쉘에서 pandoc 명령어로 변환
markdown 변환
test1.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 로 변환됨
Click here to expand...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<h1 id="test">Test!</h1>
<p>This is a test of <em>pandoc</em>.</p>
<ul>
<li>list one</li>
<li>list two</li>
</ul>
</body>
</html>
markdown 을 docx 로 변환
pandoc test1.md -f markdown -t docx -s -o test1.docx
Ref