Closed iandol closed 7 years ago
The issue with "reference-docx" seems to be another issue with the documentation: it should be "referencedocx". All words in multi-word options to pandoc are separated by an underscore ("") instead of a dash ("-").
However, now that you pointed this issue out to me, I do start wondering: would using dashes make more sense? Or maybe pandocomatic should support both underscores and dashes?
Thanks for letting me know about the issues with the documentation! I will update the documentation today.
@htdebeer : well I naively assumed I could use the same pandoc options in pandocomatic, and pandoc uses hyphens (latex-engine
, citation-abbreviations
, epub-cover-image
etc.), so unless there is a technical reason to convert the hypen to underscores it makes sense to use the option names chosen by pandoc as the documented default (though keeping underscore for backwards compatibility seems perfectly reasonable).
Regarding the documentation, I also wonder why you specify a bibliography
and csl
but you don't specify filter: pandoc-citeproc
in the examples? These examples will not use bibliography
and csl
unless pandoc-citeproc is called?
Thanks for such a quick reply, and double thanks for an excellent tool. I also added pandocomatic to the workflow section of https://github.com/jgm/pandoc/wiki/Pandoc-Extras#workflow as I didn't see it on that page which is how most people will come across such tools 👍
You're right, it makes sense to allow dashes as well. As you mentioned, it is consistent with pandoc's options, but also with pandocomatic's configuration properties like "use-template". I'll add it this weekend.
With respect to the "pandoc-citeproc" filter, I am not sure it is an undocumented feature, but it is run by pandoc automatically. There is no need to specify this filter explicitly: when I run:
echo "the program pandoc [@pandoc]" | pandoc -f markdown -t html5 --bibliography bib.bib
with bib.bib containing an entry on pandoc, I get as output:
<p>the program pandoc <span class="citation" data-cites="pandoc">(MacFarlane 2006)</span>
</p>
<div id="refs" class="references">
<div id="ref-pandoc">
<p>MacFarlane. 2006. <em>Pandoc</em>.</p>
</div>
</div>
OK, so there is an implicit command line argument added by pandoc (I just assumed it needed to be explicitly made). I suppose for the documentation examples it would still be nice to add it explicitly as an example of filter specification (once the path fixes are made from #9 )
EDIT: if you specify bibliography
in the metadata, then pandoc-citeproc is not called, and must be called explicitly if you want a bibliography:
---
bibliography: /Users/ian/.pandoc/core.bib
citation-style: /Users/ian/.pandoc/apa.csl
---
# Summary #
The background question is sound [@usrey2000], and of substantial importance for systems neuroscience.
👉 pandoc -s -f markdown -t plain min.md
SUMMARY
The background question is sound [@shipp2013], and of substantial
importance for systems neuroscience.
👉 pandoc -s --filter pandoc-citeproc -f markdown -t plain min.md
SUMMARY
The background question is sound (Shipp, Adams, & Friston, 2013), and of
substantial importance for systems neuroscience.
Shipp, S., Adams, R., & Friston, K. J. (2013). Reflections on agranular
architecture: Predictive coding in the motor cortex. _Trends in
Neuroscience_, _36_(12), 706–716.
https://doi.org/10.1016/j.tins.2013.09.004
Added to version 0.1.3: Words in multi-word pandoc options specified in a YAML block can now be separated by dash (-
) or underscore (_
).
Hi, I'm using Pandoc 1.19.2.1 and Pandocomatic 0.1.2 on macOS 10.12.4 and ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
I'm using the following YAML and I get a
undefined method 'reference-docx' for #<Paru::Pandoc:0x007fea7b05ba78> (NoMethodError)
Here's the ruby error
Also while I'm here there is an error on your pandoc option documentation examples, you always say
cls
when it should becsl