blog/content/post/1970-01-01-00000010.md

9.9 KiB

title author date url wordtwit_post_info categories
Snow Leopardでlatexを使えるようにする kazu634 1969-12-31 /1970/01/01/_10/
O:8:"stdClass":13:{s:6:"manual";b:0;s:11:"tweet_times";i:1;s:5:"delay";i:0;s:7:"enabled";i:1;s:10:"separation";s:2:"60";s:7:"version";s:3:"3.7";s:14:"tweet_template";b:0;s:6:"status";i:2;s:6:"result";a:0:{}s:13:"tweet_counter";i:2;s:13:"tweet_log_ids";a:1:{i:0;i:4773;}s:9:"hash_tags";a:0:{}s:8:"accounts";a:1:{i:0;s:7:"kazu634";}}
LaTeX
Mac

結構はまってしまったので、書いておきます。

対象とする人

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 200908月の家計簿.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
200903月の家計簿.pdf        200908月の家計簿.pdf        Git入門.tex
200904月の家計簿.pdf        200908月の家計簿.tex        Picture.bb
200905月の家計簿.pdf        20092月の家計簿.pdf         Picture.png
200906月の家計簿.pdf        20097月の家計簿.pdf         q.log
200908月の家計簿.aux        Account(200902).pdf           test.aux
200908月の家計簿.dvi        Debian Setting.pdf            test.log
200908月の家計簿.log        Emacs Lisp Idioms.pdf         test.tex
200908月の家計簿.out        Git入門.pdf                   詫び状.pdf
~/publish/default/pdf on kazu634 [401] $: dvipdfmx 200908月の家計簿.dvi
200908月の家計簿.dvi -> 200908月の家計簿.pdf
[1]
25317 bytes written

ターミナル上は文字化けしていますが、作成されたdviやpdfは文字化けしていませんでした。

おまけ

alias設定をしておくと簡単です:

alias platex='platex --kanji=utf8'