pandoc = require 'pandoc' pandoc.mediabag = require 'pandoc.mediabag'
pandoc.MetaMap = pandoc.MetaValue:create_constructor( "MetaMap", function (mm) return mm end )
Greg Tucker-Kellogg writes:
> I posted a similar problem in June (
> https://groups.google.com/forum/#!searchin/pandoc- ). Sincediscuss/stringify%7Csort:date/ pandoc-discuss/gQGVlPV8eZ4/_ dcmRvv9BgAJ
> then, I've updated to Ubuntu 18.04, reinstalled the Haskell platform,
> updated and rebuilt pandoc (with cabal). Still the basic test of pandoc
> scholar fails on pandoc.utils.stringify.
>
> Here's the output of `make`
>
>
> [pandoc-scholar-(git:(v2.0.1))] make
> pandoc \
> --lua-filter=/home/gtk/work/pandoc-scholar/lua-filters/ cito/cito.lua
> --lua-filter=/home/gtk/work/pandoc-scholar/lua-filters/ abstract-to-meta/abstract-to- meta.lua
> --lua-filter=/home/gtk/work/pandoc-scholar/lua-filters/ scholarly-metadata/scholarly- metadata.lua
> \
> --to=json \
> --output=outfile.enriched.json example/article.md
> Error running filter
> /home/gtk/work/pandoc-scholar/lua-filters/scholarly- metadata/scholarly-metadata. lua:
> [string "/home/gtk/work/pandoc-scholar/lua-filters/sch..."]: 115: attempt to
> index a nil value (field 'utils')
> stack traceback:
> [string "/home/gtk/work/pandoc-scholar/lua-filters/sch..."]: 115: in upvalue
> 'resolve_institutes'
> [string "/home/gtk/work/pandoc-scholar/lua-filters/sch..."]: 148: in upvalue
> 'canonicalize'
> [string "/home/gtk/work/pandoc-scholar/lua-filters/sch..."]: 176: in
> function <[string "/home/gtk/work/pandoc-scholar/lua-filters/sch..."]: 175>
> Makefile:26: recipe for target 'outfile.enriched.json' failed
> make: *** [outfile.enriched.json] Error 83
>
>
> My pandoc version, installed today with cabal.
>
> [pandoc-scholar-(git:(v2.0.1))] pandoc --version
> pandoc 2.5
> Compiled with pandoc-types 1.17.5.4, texmath 0.11.1.2, skylighting 0.7.5
> Default user data directory: /home/gtk/.pandoc
> Copyright (C) 2006-2018 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.
>
>
>
> My system:
> [pandoc-scholar-(git:(v2.0.1))] uname -a
> Linux gtkoffice 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC
> 2018 x86_64 x86_64 x86_64 GNU/Linux
>
>
> I am just mystified.
Mystified describes it well for me too.
The pandoc.utils module is hard-baked into pandoc and our Lua
package loader will always use that version. It *is* possible to
circumvent the default loader by re-arranging the entries of the
`package.searchers` Lua table, so that might be it.
Do you use a custom `init.lua` file? What's the content of your
$HOME/.pandoc directory? Those are the main ways with which pandoc Lua can
be customized.
--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124