vim-pandoc icon indicating copy to clipboard operation
vim-pandoc copied to clipboard

pandoc 2.11 & pandoc-citeproc deprecated : vim-pandoc needs an upgrade ?

Open Ornanovitch opened this issue 5 years ago • 7 comments

As specified here, since the 2.11 version of pandoc, "it is no longer necessary to use the external pandoc-citeproc filter. --citeproc behaves like a filter and can be positioned relative to other filters as they appear on the command line."

Since this upgrade, I can't use citeproc in vim-pandoc anymore. Is there a relation ? Does vim-pandoc need to be upgraded ?

Ornanovitch avatar Oct 27 '20 15:10 Ornanovitch

It is still possible to use citeproc with vim-pandoc even on new versions of pandoc by explicitely calling the "--citeproc" option. So your vim command would look something like Pandoc pdf <other options> --citeproc <other options>. Works for me.

korakinos avatar Feb 18 '21 13:02 korakinos

You're right, thanks for this workaround. But I'm mostly concerned by the lost possibility to get the autocompletion working

Ornanovitch avatar Feb 18 '21 20:02 Ornanovitch

The autocompletion module calls pandoc-citeproc directly, so it shouldn't be affected by this change.

Now, I wonder what the best behavior concerning the --citeproc flag should be. Should we pass it by default or document that it has to be passed by hand?

Another workaround would be to use the g:pandoc#compiler#arguments settings, like this

    let g:pandoc#compiler#arguments = "--citeproc"

fmoralesc avatar Feb 18 '21 20:02 fmoralesc

Thanks @fmoralesc for the tips

The autocompletion module calls pandoc-citeproc directly

I no longer have a pandoc-citeproc module since the pandoc 2.11 update on arch-linux. That's certainly why it doesn't work anymore for me

Ornanovitch avatar Feb 18 '21 21:02 Ornanovitch

@Ornanovitch What do you mean you don't have it? It's still available in the Arch [community] repository as pandoc-citeproc.

alerque avatar Feb 19 '21 06:02 alerque

I think the point is that with the newest pandoc, the citeproc functionality works without pandoc-citeproc being installed (as citeproc is now built-in), but the autocompletions of vim-pandoc don't. That certainly can seem unexpected. (Sorry I didn't notice before that autocompletion was broken – I just never used it, I guess.)

For my use cases, I would benefit from vim-pandoc passing the "--citeproc" option by default, just because I am prone to forgetting it. Also, it is extra typing work. However I am not sure if the options has any possibly unwanted side-effects.

korakinos avatar Feb 19 '21 11:02 korakinos

However I am not sure if the options has any possibly unwanted side-effects.

Found one. Depending on the CSL used, closing quotes and punctuation may switch places: https://github.com/jgm/pandoc/issues/7005

This happens on my system if I don't specify a style file explicitely, so it seems this behaviour is by default. It is certainly unexpected if you just want to render some random text with quotes and pandoc rearranges your punctuation. So I guess "--citeproc" shouldn't be set by default by vim-pandoc (though for my use, I still wish it was).

korakinos avatar Feb 22 '21 17:02 korakinos