macにTeXとかdoxygenの環境を構築することにする。
ちょっと調べた感じ、MacPortsには pTeX と texliive と言う二つのportがあるらしい。
馴染みがあるのと、メンテナが日本人っぽかったので、pTeXの方を入れてみる。
そして、doxygenもMacPortsからインストール。
doxygenで適当にドキュメントを出力してみて、latexディレクトリでmakeしてみると、日本語のところでエラーになる。
最近のdoxygenが出力する latex 用のファイルは、昔のpLaTeXでは処理できなかったりするので、pTeXをアンインストールしてtexliveをインストールしてみる。
そしたら、pTeXよりも悪く、sectsty.sty とか tocloft.styが見つからないとかエラーになる。さらにpTeXのときと同じように日本語のところでエラーになるので、とりあえずpTeXに戻した。
そして、DoxyfileのUSE_PDFLATEXをNOにして、LATEX_CMD_NAMEをplatexに変えたら、無事にdviファイルができた。
そのまま、make pdf するとエラーになったけど、dvipdfmxを使えばpdfファイルも作成できた。

ちなみに、以前FreeBSDでdoxygenのlatexを処理したときにどうしたのかのメモを見てみたら、ptexliveと言うのを入れていた。
しかし、このときもUSE_PDFLATEXはNOで試していたっぽいのと、ptexliveのREADMEを読む限りpdflatexコマンドは変わらなそうなので、今のところ日本語でのpdflatexは諦めるしかなさそう。

ついでに、sphinxもインストールしてみた。
portsは使わずに、easy_installでsphinx, blockdiag等をインストール。
blockdiag の概要によると、標準のeasy_installを使っては駄目とあるが、特に問題はないように見える。
んで、sphinx-quickstart して、make latex して、_build/latex の Makefileを見ると、all-pdf-ja と言うターゲットがあったので、こいつを実行してみたら、以下のようなエラーになってしまった。
ebb sptest.pdf
platex -kanji=utf8  'sptest.tex'
This is pTeX, Version 3.141592-p3.1.10 (utf8.euc) (Web2C 7.5.4)
(./sptest.tex
pLaTeX2e <2006/11/10>+0 (based on LaTeX2e <2003/12/01> patch level 0)
(./sphinxmanual.cls
Document Class: sphinxmanual 2009/06/02 Document class (Sphinx manual)
(/opt/local/share/texmf-dist/tex/latex/base/report.cls
Document Class: report 2004/02/16 v1.4f Standard LaTeX document class
(/opt/local/share/texmf-dist/tex/latex/base/size10.clo)))
(/opt/local/share/texmf-dist/tex/latex/base/inputenc.sty
(/opt/local/share/texmf-dist/tex/latex/base/utf8.def
(/opt/local/share/texmf-dist/tex/latex/base/t1enc.dfu)
(/opt/local/share/texmf-dist/tex/latex/base/ot1enc.dfu)
(/opt/local/share/texmf-dist/tex/latex/base/omsenc.dfu)))
(/opt/local/share/texmf-dist/tex/latex/base/fontenc.sty
(/opt/local/share/texmf-dist/tex/latex/base/t1enc.def))
(/opt/local/share/texmf-dist/tex/generic/babel/babel.sty
(/opt/local/share/texmf-dist/tex/generic/babel/english.ldf
(/opt/local/share/texmf-dist/tex/generic/babel/babel.def)))
(/opt/local/share/texmf-dist/tex/latex/psnfss/times.sty) (./fncychap.sty)
(/opt/local/share/texmf-dist/tex/latex/tools/longtable.sty) (./sphinx.sty
(/opt/local/share/texmf-dist/tex/latex/base/textcomp.sty
(/opt/local/share/texmf-dist/tex/latex/base/ts1enc.def
(/opt/local/share/texmf-dist/tex/latex/base/ts1enc.dfu)))
(/opt/local/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/opt/local/share/texmf-dist/tex/latex/fancybox/fancybox.sty
Style option: `fancybox' v1.3 <2000/09/19> (tvz)
) (/opt/local/share/texmf-dist/tex/latex/titlesec/titlesec.sty) (./tabulary.sty
(/opt/local/share/texmf-dist/tex/latex/tools/array.sty))
(/opt/local/share/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/opt/local/share/texmf-dist/tex/latex/amsmath/amstext.sty
(/opt/local/share/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/opt/local/share/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/opt/local/share/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/opt/local/share/texmf-dist/tex/latex/base/makeidx.sty)
(/opt/local/share/texmf-dist/tex/latex/framed/framed.sty)
(/opt/local/share/texmf-dist/tex/latex/base/ifthen.sty)
(/opt/local/share/texmf/tex/latex/graphics/dvipdfmx-contrib-latex/color.sty
(/opt/local/share/texmf-dist/tex/latex/graphics/color.cfg)
(/opt/local/share/texmf-dist/tex/latex/graphics/dvips.def)
(/opt/local/share/texmf-dist/tex/latex/graphics/dvipsnam.def))
(/opt/local/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
(/opt/local/share/texmf-dist/tex/latex/graphics/keyval.sty)
No file fancyvrb.cfg.
) (/opt/local/share/texmf-dist/tex/latex/threeparttable/threeparttable.sty)
(/opt/local/share/texmf-dist/tex/latex/mdwtools/footnote.sty)
(/opt/local/share/texmf-dist/tex/latex/wrapfig/wrapfig.sty)
(/opt/local/share/texmf-dist/tex/latex/parskip/parskip.sty)
(/opt/local/share/texmf-dist/tex/latex/graphics/graphicx.sty
(/opt/local/share/texmf/tex/latex/graphics/dvipdfmx-contrib-latex/graphics.sty
(/opt/local/share/texmf-dist/tex/latex/graphics/trig.sty)
(/opt/local/share/texmf-dist/tex/latex/graphics/graphics.cfg)))
! Undefined control sequence.
l.204 ...n}{0.5em}{\py@TitleColor}{\py@NormalColor
                                                  }
力尽きたので今日はここまで。

【追記】
SphinxとTeXとPDFと日本語 - ぷわぷわのあかしろ・りろーでっどに同じ問題が載っていました。ここに書いてある通り、sphinx.styに以下を追加したら、make all-pdf-ja でpdfファイルが得られました。
\newcount\pdfoutput
\pdfoutput=0

カテゴリ

トラックバック(0)

このブログ記事を参照しているブログ一覧: macのTeX環境

このブログ記事に対するトラックバックURL: https://www.wizard-limit.net/cgi-bin/mt/mt-tb.cgi/2621

コメントする

このブログ記事について

このページは、falseが2011年5月 4日 12:53に書いたブログ記事です。

ひとつ前のブログ記事は「macportsのPortfileを書く」です。

次のブログ記事は「macの小ネタ」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

広告

Powered by Movable Type 6.1.1