9.9 KiB
9.9 KiB
title | author | date | wordtwit_post_info | categories | |||
---|---|---|---|---|---|---|---|
Snow Leopardでlatexを使えるようにする | kazu634 | 1969-12-31 |
|
|
結構はまってしまったので、書いておきます。
対象とする人
Snow Leopardを用いてLatexを使いたい人。texソースはUTF8な人。
Latexのダウンロード
JIS X0212 for pTeXから「Drag & Drop pTeX」をダウンロードしてきます。ダウンロードしたら、
from kazu634
pTexをアップリケーションフォルダにコピーします。コピー後、pTexをダブルクリックし、起動してください。
実行
platexコマンドを実行します。ここで注意が必要なのは、texのソースがutf8の場合、オプションをきちんと使用しないと文字化けするということです。
~/publish/default/pdf on kazu634 [399] $: platex --kanji=utf8 2009年08月の家計簿.tex This is pTeX, Version 3.141592-p3.1.10 (utf8.sjis) (Web2C 7.5.4) (./2009蟷#08譛医螳#險育##.tex pLaTeX2e <2006/11/10>+ (based on LaTeX2e <2003/12/01> patch level ) (/Applications/pTeX.app/teTeX/share/texmf/ptex/platex/jsclasses/jsarticle.cls Document Class: jsarticle 2009/02/22 okumura ) (/Applications/pTeX.app/teTeX/share/texmf/ptex/platex/misc/otf/otf.sty (/Applications/pTeX.app/teTeX/share/texmf/ptex/platex/misc/otf/ajmacros.sty)) (/Applications/pTeX.app/teTeX/share/texmf/ptex/platex/misc/otf/mlutf.sty) (/Applications/pTeX.app/teTeX/share/texmf/ptex/platex/misc/otf/mlcid.sty) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/graphics/graphicx.sty (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/graphics/keyval.sty) (/Applications/pTeX.app/teTeX/share/texmf/tex/latex/graphics/dvipdfmx-contrib-l atex/graphics.sty (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/graphics/trig.sty) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/graphics/graphics.cfg) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/dvipdfm/dvipdfm.def))) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/hyperref/hyperref.sty (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/hyperref/pd1enc.def) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/hyperref/hyperref.cfg) Implicit mode ON; LaTeX internals redefined (/Applications/pTeX.app/teTeX/share/texmf/ptex/latex/url/url.sty)) *hyperref using driver hdvipdfm* (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/hyperref/hdvipdfm.def) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/tools/tabularx.sty (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/tools/array.sty)) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/float/float.sty) (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty) No file 2009蟷#08譛医螳#險育##.aux. (/Applications/pTeX.app/teTeX/share/texmf-dist/tex/latex/hyperref/nameref.sty) [1] (./2009蟷#08譛医螳#險育##.aux) ) Output written on 2009蟷#08譛医螳#險育##.dvi (1 page, 4372 bytes). Transcript written on 2009蟷#08譛医螳#險育##.log. ~/publish/default/pdf on kazu634 [400] $: ls 2009年03月の家計簿.pdf 2009年08月の家計簿.pdf Git入門.tex 2009年04月の家計簿.pdf 2009年08月の家計簿.tex Picture.bb 2009年05月の家計簿.pdf 2009年2月の家計簿.pdf Picture.png 2009年06月の家計簿.pdf 2009年7月の家計簿.pdf q.log 2009年08月の家計簿.aux Account(200902).pdf test.aux 2009年08月の家計簿.dvi Debian Setting.pdf test.log 2009年08月の家計簿.log Emacs Lisp Idioms.pdf test.tex 2009年08月の家計簿.out Git入門.pdf 詫び状.pdf ~/publish/default/pdf on kazu634 [401] $: dvipdfmx 2009年08月の家計簿.dvi 2009年08月の家計簿.dvi -> 2009年08月の家計簿.pdf [1] 25317 bytes written
ターミナル上は文字化けしていますが、作成されたdviやpdfは文字化けしていませんでした。
おまけ
alias設定をしておくと簡単です:
alias platex='platex --kanji=utf8'