Open anderflash opened 9 years ago
Could you post a sample site to a gist? It would simplify working on this issue (if it's still an issue).
Yes, it would be useful if you could dump a standalone .zip
or gist so we can easily reproduce it.
I was looking for the same thing. A perhaps somewhat kludgy solution which, however, gives me correct citations, as well as cross-references, is to use the Pandoc program itself as a filter. From my site program:
bibtexCompiler :: String -> Compiler (Item String)
bibtexCompiler lang = do
csl <- load (fromFilePath $ lang ++ ".csl")
bib <- load "static-dust.bib"
getResourceBody
>>= withItemBody (unixFilter "pandoc" [ "-F"
, "pandoc-crossref"
, "-t"
, "markdown"
, "-M"
, "crossrefYaml=pandoc-crossref-"++lang++".yaml"
])
>>= readPandocBiblio pandocReaderOptions csl bib
>>= return . writePandocWith pandocWriterOptions
For pandocCompiler
users here's the code that solved the problem for me:
pandocCompilerWithTransformM defaultHakyllReaderOptions defaultHakyllWriterOptions plantumlFilter
where
plantumlFilter = recompilingUnsafeCompiler
. runIOorExplode
. applyFilters noEngine def
[JSONFilter "/usr/local/lib/python3.9/site-packages/pandoc_plantuml_filter.py"]
[]
Hi, I'm trying to put bibtex and pandoc-crossref to work in a Hakyll wiki config. I have this almost default code:
If the post has a bibtex file attached, process the bibtex, else skip bibtex processing, working only with the pandoc-crossref.
My problem is the bibtexCompiler code. I want to put pandoc-crossref inside it:
I've seen the code for pandocCompilerWithTransformM:
That's why I'm trying to use this code, replacing
readPandocWith ropt
withreadPandocBiblio def csl bib
, which has the same return type. But it doesn't work.It compiles and runs correctly, and it shows the bibliography and the Figure 1, but the citation shows [\@author], even though it shows [1]. The reason I create the issue here is that whether I remove the
traverse transformer ...
, the citation works (it shows [1]), but the pandoc-crossref not.Thanks