Commit 10701e28 authored by Artem Shinkarov's avatar Artem Shinkarov
Browse files

A proper fix for issue #16

In essence we withold application of the :latex filter until we
do html generation.
parent a31b5839
...@@ -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,7 +114,7 @@ module Jekyll ...@@ -113,7 +114,7 @@ module Jekyll
end end
def cite(key) def cite(key)
entry = bibliography[key] entry = bibliography[key].convert(:latex)
context['cited'] ||= [] context['cited'] ||= []
context['cited'] << key context['cited'] << key
......
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