Open futureneer opened 10 years ago
It's not your fault. It didn't work for me either, so I looked into it. Basically, the
CiteProc.process b.to_citeproc, :style => @config['citation_style'], :locale => @config['citation_locale'], :format => 'html'
part doesn't work. I presume there were some breaking changes in the CiteProc gem.
I will probably try to fix it tomorrow.
So just in case you wanted to dig deeper into this, the following works
def render(context)
# get the content of the {% bibtex %} block
content = super
cp = CiteProc::Processor.new style: 'apa', format: 'html'
bibtex = BibTeX.parse(content, :include => [:meta_content]).to_citeproc
cp.import bibtex
# so apparently we need to render them one by one
bibtex.map {|item| cp.render(:bibliography, id: item['id']).pop}.join
end
but it obviously doesn't forward the settings and the output is not very pretty... The citeproc gem could use some docs. I'm afraid I currently don't have time to make this really work, so I can only wish you the best of luck.
citeproc-ruby
and csl-styles
in your gemfile.Thanks, your update works but additional one must add require 'csl/styles'
to the top of the file.
Hello,
I followed the instructions in the readme.md file, and successfully installed all the dependencies, as well as making changes to my files and adding the liquid tag in my .md file. However, after building with Jekyll and serving, I don't see any rendered text from the bibtex item. I have copied the citation.rb to my
_plugins
folder. Do I need to do anything else?Thanks!