Never mind, I installed the latest pandoc and got it to work.

So thanks for all your help. Now I just need to figure out how to another filter which removes the colon in this bibkey title

[@organization_endreport:_2016]

since the colon (which is part of the title) creates a syntax error with the following underscore.

Den fredag 3 november 2017 kl. 10:37:42 UTC+1 skrev Björn Ekström:
Hm, okay. Thanks. Although, both --lua-script and -lua-filter= gives

pandoc.exe: unrecognized option `--lua-[...]'

Den torsdag 2 november 2017 kl. 23:19:29 UTC+1 skrev John MacFarlane:
Nice!  I hadn't even thought of having the lua filter
do the whole job.

+++ Albert Krewinkel [Nov 02 17 22:22 ]:
>This is such a beautiful solution that I couldn't resist to code up a
>proof-of-concept.  The path to the bibtex file must be stored in the
>*bibliography* yaml field:
>
>    ```
>    bibliography: path/to/bibliography.bib
>    ...
>
>fix-bibkeys.lua:
>
>    function references_from_bibfile (filename)
>      local yaml = io.popen('pandoc-citeproc -y ' .. filename):read("*a")
>      return pandoc.read(yaml).meta.references
>    end
>
>    function Meta(meta)
>      local bibfile = meta.bibliography[1].text
>      local references = references_from_bibfile(bibfile)
>      -- modify keys, replace ???? with 0000
>      for k, v in pairs(references) do
>        references[k].id = v.id[1].text:gsub("%?%?%?%?", "0000")
>      end
>      meta.references = references
>      return meta
>   end
>
>Run with
>
>    pandoc --lua-filter=fix-bibkeys.lua --filter=pandoc-citeproc …

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/219efc35-d812-4b40-addd-adaed55955d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.