SphinxでTex
Sphinxのバージョンを1.0にアップデートしてから、Sphinxで数式が使えなくなっていたので、それのFix。
エラーメッセージは以下のとおり。
WARNING: inline latex u'\\frac{\\partial}{\\partial t} \\int\\!\\!\\!\\!\\int_{A} \\mu\\vec{H} \\cdot d\\vec{A} = - \\oint_{\\partial A} \\vec{E} \\cdot d\\vec{s}': latex exited with error:
[stderr][stdout]
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live/MacPorts 2009_6)
entering extended mode
(./math.tex
LaTeX2e <2009/09/24>
Babeland hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/opt/local/share/texmf-texlive-dist/tex/latex/base/size12.clo))
(/opt/local/share/texmf-texlive-dist/tex/latex/base/inputenc.sty! LaTeX Error: File `utf8x.def' not found.
Type X to quit or
to proceed,
or enter new name. (Default extension: def)Enter file name:
! Emergency stop.
l.131 \endinput
^^M
No pages of output.
Transcript written on math.log.
どう見ても、utf8x.defがないのが原因らしいので、ネットで検索したところ、Tex関係のライブラリはCTANと言うところからダウンロードできるらしい。
http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/
ここから、unicode.zipをダウンロードして解凍。INSTALLにあるように、ucs.sty,
utf8x.def, ucsencs.def, data/* を自分のTex環境にコピー。
私の場合は、
/opt/local/share/texmf-texlive-dist/tex/latex/base
にコピー。
さて、ここからがはまった。何度
% make html
としても、同じエラーメッセージが出てしまう。そして、Texの環境等をほとんど知らないため、全然解決法がわからんかった。
たまたま、このページを見たところ、texhashなどという気になるコマンドを発見。
http://forums.gentoo.org/viewtopic-t-335528-start-0.html
早速、
% sudo texhash
としたところ、make htmlが通るようになりました。めでたしめでたし。
ちょうどいい機会なので、Texをちゃんと勉強してみようかと検討中。
- 作者: 奥村晴彦
- 出版社/メーカー: 技術評論社
- 発売日: 2010/07/07
- メディア: 大型本
- 購入: 9人 クリック: 265回
- この商品を含むブログ (30件) を見る