Pandocで図番号などの追加をやっているんだけど、次のエラーが発生する。
pandoc-crossref: Error in $: mempty
CallStack (from HasCallStack):
error, called at ./Text/Pandoc/JSON.hs:111:48 in pandoc-types-1.17.3.1-1RCpWptP4FaDuZS2HJnhBM:Text.Pandoc.JSON
pandoc: Error running filter pandoc-crossref
Filter returned error status 1
実行コマンドは次のようになっている。
$ pandoc --filter pandoc-crossref -V geometry:margin=20mm --latex-engine=xelatex --template=sample.latex -N --highlight-style=tango --toc -o sample04.pdf sample.md
インスト0−うはUbunut 16.04.3LTSで次のように行った。
$ sudo apt install pandoc
$ sudo apt install cabal-install
$ sudo cabal update
$ sudo cabal install --global pandoc-crossref
下記のコマンドでも同じエラーなのでpandoc-crossrefだなぁ。
$ pandoc --filter pandoc-crossref -V documentclass=ltjarticle -V geometry:margin=20mm --latex-engine=lualatex --template=sample.latex -N --highlight-style=tango --toc -o sample04.pdf sample.md
バージョンはこんな感じです。
$ pandoc --version
pandoc 2.0.6
Compiled with pandoc-types 1.17.3.1, texmath 0.10.1.1, skylighting 0.5.1
Default user data directory: /home/hidemi/.pandoc
Copyright (C) 2006-2017 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
$ pandoc-crossref --version
pandoc-crossref v0.3.0.1 built with Pandoc v2.0.6, pandoc-types v1.17.3.1 and GHC 8.2.2
いいところまで進んだんだが、最後の図番号の追加でひっかかってしまった。
ここが通ればテンプレートを凝るだけなんだけどなぁ。