Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
jekyll-scholar
Commits
10701e28
Commit
10701e28
authored
Apr 05, 2013
by
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
Changes
2
Show whitespace changes
Inline
Side-by-side
lib/jekyll/scholar/generators/details.rb
View file @
10701e28
...
...
@@ -25,11 +25,12 @@ module Jekyll
data
[
'entry'
][
'key'
]
=
entry
.
key
data
[
'entry'
][
'type'
]
=
entry
.
type
data
[
'entry'
][
'bibtex'
]
=
entry
.
to_s
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
data
[
'entry'
][
'bibtex'
]
=
entry
.
to_s
end
end
...
...
lib/jekyll/scholar/utilities.rb
View file @
10701e28
...
...
@@ -40,7 +40,7 @@ module Jekyll
end
def
bibtex_options
@bibtex_options
||=
{
:
filter
=>
:latex
}
@bibtex_options
||=
{
:
strip
=>
false
}
end
def
bibtex_path
...
...
@@ -82,6 +82,7 @@ module Jekyll
def
reference_tag
(
entry
)
return
'(missing reference)'
unless
entry
entry
=
entry
.
convert
(
:latex
)
reference
=
CiteProc
.
process
entry
.
to_citeproc
,
:style
=>
config
[
'style'
],
:locale
=>
config
[
'locale'
],
:format
=>
'html'
...
...
@@ -113,7 +114,7 @@ module Jekyll
end
def
cite
(
key
)
entry
=
bibliography
[
key
]
entry
=
bibliography
[
key
]
.
convert
(
:latex
)
context
[
'cited'
]
||=
[]
context
[
'cited'
]
<<
key
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment