KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당 › 리눅스에서 pandoc(xelatax)을 이용한 한글 문서 pdf 생성 템플릿

마잇 | 2012.09.04 20:39:47 | 메뉴 건너뛰기 쓰기

우분투 12.04

texlive 2009-15


XeTeX 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
kpathsea version 5.0.0
Copyright 2009 SIL International and Jonathan Kew.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 3.8.1 [with modifications for XeTeX]
Compiled with zlib version 1.2.3.4; using 1.2.3.4
Compiled with FreeType2 version 2.4.8; using 2.4.10
Compiled with fontconfig version 2.8.0; using 2.8.0
Compiled with libpng version 1.2.46; using 1.2.46
Compiled with poppler version 0.18.2


글쓰기를 주로 markdown으로 합니다. 간편하고 좋더군요. 복잡한 구조의 글은 아니고 블로그 글쓰기 정도 입니다.


pandoc이라는 변환툴을 알게 되서 사용해 봤는데 pdf 변환도 되더군요. 텍 문법으로 되어 있는 템플릿을 이용해서 markdown을 텍으로 변환하고 이걸 다시 pdf로 바꿔주는 방식 같습니다. 영문은 잘 변환 되는데 한글로 작성한 글은 다음과 같은 오류가 납니다.



~  pandoc /tmp/sldkfj.md -o sdlkfj.pdf                       
pandoc: Error producing PDF from TeX source.
! Package inputenc Error: Unicode char \u8:전 not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                             
                                                 
l.35 전


텍 엔진을 xetex로 하면 된다고 해서 설치하고 --latex-engine=xelatex 옵션을 주고 해봤더니 pdf 파일은 생성 됩니다. 하지만 열어 보니 글자가 제대로 표현이 안되더군요. 영문과 숫자만 보입니다.


검색을 좀 해보니 템플릿을 만들어서 글꼴이라던지 이런 걸 설정을 해야 하는 것 같더군요. pandoc에서 템플릿을 지정하는 옵션이 있습니다.


제가 쓰는 글들은 서식이 간단 합니다. 이 곳 게시판 글쓰기에서 제공하는 정도의 서식들 입니다.

제목, 목록, 인용, 코드 블럭, 링크, 글꼴, 줄간격, 그림 삽입 정도 입니다.


xetex 설정을 배우는 것이 정도이겠으나 혹시 제가 가져다 쓸만한 간단한 템플릿이 있을까 해서 질문 드립니다.


댓글 [3]

댓글 쓰기

목록 삭제

KTUG 한국 텍 사용자 그룹