Open williamcroberts opened 1 year ago
what happens if you append --biblatex
to your pandoc options?
what happens if you append
--biblatex
to your pandoc options?
Now I get [foo]
for the reference, but no References section appended to the output.
I found a solution from this post: https://github.com/Wandmalfarbe/pandoc-latex-template/issues/151#issuecomment-687640102
In my case I wanted IEEE-style citations so I downloaded this file: https://github.com/jgm/pandoc-citeproc/blob/master/tests/ieee.csl
I then added link-citations: true
to my YAML. My full make command looks like this:
$ REPORT_DIR="./report/" docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` pandoc/extra `find ${REPORT_DIR} -name "*.md" | sort` -o ${REPORT_OUTPUT} \
--template ./templates/eisvogel.tex \
--table-of-contents \
--number-sections \
--listings \
--highlight-style tango \
--from markdown+yaml_metadata_block+raw_html+implicit_figures+table_captions+citations \
--toc-depth 3 \
--bibliography=references.bib \
--citeproc \
--csl ieee.csl
# --biblatex #removes References page...
With this combination you get linked references with the [1] tags you are looking for:
Test [@knuthwebsite]
@misc{knuthwebsite,
author = "Donald Knuth",
title = "Knuth: Computers and Typesetting",
url = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html"
}
Although the URLs are not visible in the References-list the URL is embedded in the reference title which makes it clickable and hoverable.
Edit: If you use this CSL instead you get URLs in the References output as expected: https://raw.githubusercontent.com/citation-style-language/styles/master/ieee-with-url.csl
I found a solution from this post: #151 (comment)
Thanks, that worked for me too. In case you get an ! LaTeX Error: Something's wrong--perhaps a missing \item.
error, I had to use an older version of the CSLReferences
environment. Here is a diff that works for me now: https://github.com/Wandmalfarbe/pandoc-latex-template/commit/b8fa1c966bc58e3c38157e3b26aeb7a669aac390.
Maybe it is of help to someone else too. I guess there is some version mismatch (pandoc, eisvogel template, etc.).
EDIT: Better make sure your pandoc version matches the version required by this template instead of hacking the template. At the time of writing this comment, I had to manually update to pandoc 3.2 which was not included in Debian's official package sources yet.
@rpoisel I encountered the ! LaTeX Error: Something's wrong--perhaps a missing \item.
error. Thanks for the diff fix, it worked for me :)
Wow! Extremely helpful thread. I'm lucky that I came across this. Perhaps these steps could be part of the installation/usage guidelines.
--biblatex
suggested earlier in the thread does not help when creating pdf output from md.
Hello,
I am using pandoc version 2.19.2 I have enabled option
--citeproc
and filtercitations
, see the command example below.My issue is that references always render as
[@foo]
no matter what CSL is used. I am expecting that the reference be numerical in nature, something like[1]
. However, The generated references section is in the expected format. I am using CSLtransactions-on-computer-systems.csl
as found here:Does anyone know why it's not working or things to try and trouble shoot it?
My YAML meta data block is as follows:
With the following citations.yaml file:
Command Example:
Pandoc Version Info