Commit 648f5e98 authored by Sylvester Keil's avatar Sylvester Keil
Browse files

Merge pull request #21 from ashinkarov/master

Proper fix for issue #16
parents b68ce049 ee1f6a1d
...@@ -25,11 +25,12 @@ module Jekyll ...@@ -25,11 +25,12 @@ module Jekyll
data['entry']['key'] = entry.key data['entry']['key'] = entry.key
data['entry']['type'] = entry.type data['entry']['type'] = entry.type
data['entry']['bibtex'] = entry.to_s
entry.fields.each do |key, value| entry.fields.each do |key, value|
data['entry'][key.to_s] = value.to_s data['entry'][key.to_s] = value.convert(:latex).to_s
end end
data['entry']['bibtex'] = entry.to_s
end end
end end
......
...@@ -40,7 +40,7 @@ module Jekyll ...@@ -40,7 +40,7 @@ module Jekyll
end end
def bibtex_options def bibtex_options
@bibtex_options ||= { :filter => :latex } @bibtex_options ||= { :strip => false }
end end
def bibtex_path def bibtex_path
...@@ -82,6 +82,7 @@ module Jekyll ...@@ -82,6 +82,7 @@ module Jekyll
def reference_tag(entry) def reference_tag(entry)
return '(missing reference)' unless entry return '(missing reference)' unless entry
entry = entry.convert(:latex)
reference = CiteProc.process entry.to_citeproc, reference = CiteProc.process entry.to_citeproc,
:style => config['style'], :locale => config['locale'], :format => 'html' :style => config['style'], :locale => config['locale'], :format => 'html'
...@@ -113,12 +114,11 @@ module Jekyll ...@@ -113,12 +114,11 @@ module Jekyll
end end
def cite(key) def cite(key)
entry = bibliography[key]
context['cited'] ||= [] context['cited'] ||= []
context['cited'] << key context['cited'] << key
if bibliography.key?(key) if bibliography.key?(key)
entry = bibliography[key].convert(:latex)
citation = CiteProc.process entry.to_citeproc, :style => config['style'], citation = CiteProc.process entry.to_citeproc, :style => config['style'],
:locale => config['locale'], :format => 'html', :mode => :citation :locale => config['locale'], :format => 'html', :mode => :citation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment