♡を含んだrstファイルをSphinxでビルドするとエラー
♡は環境依存文字
トランプのスートを表現したい
以下のようなrstファイル
code:rst
ヘッダー
==================
ほげほげ
はあと ♡
ふがふが
make html はできる(ビルド時にエラーにならず、ブラウザで表示される)
この挙動でやや混乱させられる
make latexpdfでエラーになる
環境構築が容易なため、Dockerイメージ sphinxdoc/sphinx-latexpdf を使っている
docker run --rm -v /path/to/document:/docs sphinxdoc/sphinx-latexpdf
イメージをrunするとmake latexpdfが実行される(See the Dockerfile)
code:txt
! Package inputenc Error: Unicode character �^^99� (U+2661)
(inputenc) not set up for use with LaTeX.
l.63 はあと ^^e2^^99^^a1
code:python
>> ord("♡")
9825
>> hex(ord("♡"))
'0x2661'