2012-11-04 3 views
8

이후, 나는 PDF에 마크 다운 변환이 Pandoc 명령을 사용하는 데 사용 : 더 이상 작동마크 다운 내 맥북 (OSX 마운틴 라이온)에 Xetex 중단

$ markdown2pdf -N -o pandoc_output.pdf --xetex --toc --template=mytemplate.tex myfile.md 

그러나 markdown2pdf--xetex 옵션 markdown2pdf -N -o ../../Desktop/pandoc_output.pdf --xetex --toc --template=mytemplate-headers-garamond_date.tex은 더 이상 사용되지 않습니다.

나는이 할 경우

$ pandoc -N -o Desktop/pandoc_output.pdf --xetex --toc --template=mytemplate.tex myfile.md 

내가 얻을이 :

pandoc: unrecognized option `--xetex' 

하지만 --xetex을 꺼내이 작업을 수행 할 경우 :

$ pandoc -N -o Desktop/pandoc_output.pdf --toc --template=mytemplate.tex myfile.md 

을 나는이 얻을 :

pandoc: Error producing PDF from TeX source. 
! Package hyperref Error: Wrong driver option `xetex', 
(hyperref)    because XeTeX is not detected. 

See the hyperref package documentation for explanation. 
Type H <return> for immediate help. 
...            

l.3925 \ProcessKeyvalOptions{Hyp} 

해결책은 무엇입니까?

답변

16

내가 몇 년 전에 pandoc을 설치 한대로, --latex-engine=xelatex 대신이 질문에 대한 이전 답변 내게 도움이되었다

0

--latex-engine 옵션의 경우 pandoc User's Guide (또는 매뉴얼 페이지)을 참조하십시오.

6

--xetex 시도,하지만 결코 텍사스 라이브. 다음과 같이 그 결과, 나는 제대로 설치 한 경우 몰랐다, 그래서 전체 경로에 넣어은 일하는 것을보고 저를 도와 : 기본이 BasicTex 설치를위한 설치 위치한다

pandoc --latex-engine=/usr/local/texlive/2012basic/bin/universal-darwin/xelatex

하는 Pandoc 설치 페이지에서 다운로드하십시오.

pandoc -D Latex >my-latex-template.tex을 사용하여 템플릿을 생성하는 것을 잊었습니다. 내 .html 대신 .tex 템플릿을 제공 한 후 (즉, 'BEGIN {'오류가 발생하지 않았습니다.) .PDF가 있습니다. 즉, 기본 템플릿이 작동했습니다.

또한 출력 형식으로 pdf를 설정하는 데 부정확하게 -t pdf을 입력했지만 올바르지 않습니다. 출력 형식은 라텍스 (Latex)이며 PDF로 변환됩니다. 대시 -t 옵션을 사용하여 출력 형식을 지정할 필요는 없습니다.

내 사소한 실수에 대한이 기록으로 누군가를 살릴 수 있기를 바랍니다.