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
c12e794b
Commit
c12e794b
authored
May 24, 2013
by
Sylvester Keil
Browse files
Merge pull request #28 from cperezpenichet/master
Option to select style from bibliography tab
parents
c03334bc
119587ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+10
-2
No files found.
lib/jekyll/scholar/utilities.rb
View file @
c12e794b
...
@@ -32,9 +32,13 @@ module Jekyll
...
@@ -32,9 +32,13 @@ module Jekyll
opts
.
on
(
'-t'
,
'--text TEXT'
)
do
|
text
|
opts
.
on
(
'-t'
,
'--text TEXT'
)
do
|
text
|
@text
=
text
@text
=
text
end
end
opts
.
on
(
'-s'
,
'--style STYLE'
)
do
|
style
|
@style
=
style
end
end
end
argv
=
arguments
.
split
(
/(\B-[cfqpt]|\B--(?:cited|file|query|prefix|text))/
)
argv
=
arguments
.
split
(
/(\B-[cfqpt
s
]|\B--(?:cited|file|query|prefix|text
|style|
))/
)
parser
.
parse
argv
.
map
(
&
:strip
).
reject
(
&
:empty?
)
parser
.
parse
argv
.
map
(
&
:strip
).
reject
(
&
:empty?
)
end
end
...
@@ -88,12 +92,16 @@ module Jekyll
...
@@ -88,12 +92,16 @@ module Jekyll
entry
=
entry
.
convert
(
*
bibtex_filters
)
unless
bibtex_filters
.
empty?
entry
=
entry
.
convert
(
*
bibtex_filters
)
unless
bibtex_filters
.
empty?
reference
=
CiteProc
.
process
entry
.
to_citeproc
,
reference
=
CiteProc
.
process
entry
.
to_citeproc
,
:style
=>
config
[
'
style
'
]
,
:locale
=>
config
[
'locale'
],
:format
=>
'html'
:style
=>
style
,
:locale
=>
config
[
'locale'
],
:format
=>
'html'
content_tag
reference_tagname
,
reference
,
content_tag
reference_tagname
,
reference
,
:id
=>
[
prefix
,
entry
.
key
].
compact
.
join
(
'-'
)
:id
=>
[
prefix
,
entry
.
key
].
compact
.
join
(
'-'
)
end
end
def
style
@style
||
config
[
'style'
]
end
def
missing_reference
def
missing_reference
config
[
'missing_reference'
]
config
[
'missing_reference'
]
end
end
...
...
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