htdebeer / pandocomatic

Automate the use of pandoc

Home Page:https://heerdebeer.org/Software/markdown/pandocomatic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update pandocomatic after update pandoc (and paru)

htdebeer opened this issue · comments

A new version of pandoc (2.11) has been released last Sunday. There have been changes to the CLI options, various writers, and the Pandoc Types API, so these changes need to be checked against pandocomatic and the integration tests needs to be updated to take into account the new CSS in the default HTML template.

I was concerned about citations, and rightly so:

# pandoc -v
pandoc 2.11
Compiled with pandoc-types 1.22, texmath 0.12.0.3, skylighting 0.10.0.2
[...]
# pandocomatic --data-dir=res -b -i src/bibliografia.md -o build/bibliografia.docx
pandoc  --reference-doc=/source/res/templates/doc-pandoc-reference-2019.docx \
        --standalone \
        --filter=/source/res/pandoc-citeproc \
        --to=docx \
        --toc \
        --csl=/source/res/csl/association-for-computing-machinery.csl \
        --output=/source/build/bibliografia.docx
[WARNING] Deprecated: pandoc-citeproc filter. Use --citeproc instead.
Error running filter /source/res/pandoc-citeproc:
Could not find executable /source/res/pandoc-citeproc
Error running pandoc => error while running:

pandoc  --reference-doc=/source/res/templates/doc-pandoc-reference-2019.docx \
        --standalone \
        --filter=/source/res/pandoc-citeproc \
        --to=docx \
        --toc \
        --csl=/source/res/csl/association-for-computing-machinery.csl \
        --output=/source/build/bibliografia.docx

Pandoc responded with:

[WARNING] Deprecated: pandoc-citeproc filter. Use --citeproc instead.
Error running filter /source/res/pandoc-citeproc:
Could not find executable /source/res/pandoc-citeproc

And if I change pandocomatic configuration removing the filter and adding the --citeproc option, paru does not recognize it:

The pandoc option 'citeproc' (with value 'true') is not recognized by paru. This option is skipped.

Did you update paru to version 0.4.2? Because I updated it yesterday and I tried to add the new citeproc command-line option. Or did I make a mistake doing so?

Ah, no, I only updated pandoc, with a previous pandocomatic 0.2.7.2 install that I had from a few weeks ago, let me try and see how to update only paru...

Ok, after updating paru, it seems to work (I get the citations, I haven't done an in-depth revision):

# pandocomatic --data-dir=res -b -i src/bibliografia.md -o build/bibliografia.docx
pandoc  --reference-doc=/source/res/templates/doc-pandoc-reference-2019.docx \
        --standalone \
        --citeproc \
        --to=docx \
        --toc \
        --csl=/source/res/csl/association-for-computing-machinery.csl \
        --output=/source/build/bibliografia.docx
Pandocomatic needed 0.5 seconds to convert '/source/src/bibliografia.md' to 'build/bibliografia.docx'.

Citations working fine so far for me:

➜ pandoc -v
pandoc 2.11.0.1
Compiled with pandoc-types 1.22, texmath 0.12.0.3, skylighting 0.10.0.2
Default user data directory: /Users/ian/.local/share/pandoc or /Users/ian/.pandoc
➜ gem list | grep -E 'paru|pandoc'
pandocomatic (0.2.7.2)
paru (0.4.2)
➜ pandocomatic -b HumanEthics.md
pandoc	--csl=/Users/ian/.local/share/pandoc/csl/apa.csl \
	--standalone \
	--verbose \
	--citeproc \
	--lua-filter=/Users/ian/.local/share/pandoc/filters/pagebreak.lua \
	--bibliography=/Users/ian/.local/share/pandoc/Core.json \
	--citation-abbreviations=/Users/ian/.local/share/pandoc/cite-abbr.json \
	--reference-links \
	--from=markdown \
	--to=docx \
	--filter=/Users/ian/.local/share/pandoc/filters/prependAll.rb \
	--filter=/Users/ian/.local/share/pandoc/filters/simplifyMetadata.rb \
	--reference-doc=/Users/ian/.local/share/pandoc/templates/custom.docx \
	--output=/Users/ian/Desktop/Compile-mmd/HumanEthics.docx
[INFO] Running filter /Users/ian/.local/share/pandoc/filters/pagebreak.lua
[INFO] Completed filter /Users/ian/.local/share/pandoc/filters/pagebreak.lua in 15 ms
[INFO] Running filter /Users/ian/.local/share/pandoc/filters/prependAll.rb
[INFO] Completed filter /Users/ian/.local/share/pandoc/filters/prependAll.rb in 9 ms
[INFO] Running filter /Users/ian/.local/share/pandoc/filters/simplifyMetadata.rb
[INFO] Completed filter /Users/ian/.local/share/pandoc/filters/simplifyMetadata.rb in 8 ms
Pandocomatic needed 1.7 seconds to convert '/Users/ian/Desktop/Compile-mmd/HumanEthics.md' to 'HumanEthics.docx'.

Yes, there do not seem to be many issues at all. There was one test that broke due to the change of default CSS in HTML output.

I will update pandocomatic to version 0.2.7.3 to update the paru version to 0.4.2 to support the latest pandoc version by default.

Thanks Huub as always!!!