# HG changeset patch # User Chris Cannam # Date 1502899071 -3600 # Node ID 8b1dc5e31dbcb7d630c1eeaee6ee0ebf3fe3ecb0 # Parent 0dcd4f8c2b8a31b084e9dec7071c12d8d46e9c4d Fix citeproc rendering diff -r 0dcd4f8c2b8a -r 8b1dc5e31dbc plugins/redmine_bibliography/app/models/publication.rb --- a/plugins/redmine_bibliography/app/models/publication.rb Wed Aug 16 12:29:01 2017 +0100 +++ b/plugins/redmine_bibliography/app/models/publication.rb Wed Aug 16 16:57:51 2017 +0100 @@ -101,17 +101,12 @@ end if style == :ieee - citeproc = bib.to_citeproc - cite_id = citeproc["id"] - #!!! These warns should go once I've figured out why it's not rendering! - logger.warn { "rendering citation #{citeproc} with id #{ cite_id }" } + cite = bib.to_citeproc + cite_id = cite["id"] cp = CiteProc::Processor.new style: 'ieee', format: 'html' - cp.import citeproc - cp.render :bibliography, id: cite_id - logger.warn { "rendered" } - result - -# CiteProc.process(bib.to_citeproc, :style => :ieee, :format => :html) + cp.import [cite] + texts = cp.render :bibliography, id: cite_id + texts[0] else bibtex = bib.to_s :include => :meta_content bibtex.strip!