Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
caesr-pub
jekyll-scholar
Commits
648f5e98
Commit
648f5e98
authored
Apr 06, 2013
by
Sylvester Keil
Browse files
Merge pull request #21 from ashinkarov/master
Proper fix for issue #16
parents
b68ce049
ee1f6a1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
lib/jekyll/scholar/generators/details.rb
lib/jekyll/scholar/generators/details.rb
+3
-2
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+3
-3
No files found.
lib/jekyll/scholar/generators/details.rb
View file @
648f5e98
...
...
@@ -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 @
648f5e98
...
...
@@ -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,12 +114,11 @@ module Jekyll
end
def
cite
(
key
)
entry
=
bibliography
[
key
]
context
[
'cited'
]
||=
[]
context
[
'cited'
]
<<
key
if
bibliography
.
key?
(
key
)
entry
=
bibliography
[
key
].
convert
(
:latex
)
citation
=
CiteProc
.
process
entry
.
to_citeproc
,
:style
=>
config
[
'style'
],
:locale
=>
config
[
'locale'
],
:format
=>
'html'
,
:mode
=>
:citation
...
...
Write
Preview
Markdown
is supported
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