Skip to content
Permalink
Browse files
publication_list: Should display the bibtex contents in the details p…
…age.
  • Loading branch information
xuhdev committed Mar 8, 2017
1 parent 802714b commit 61a892eb0bdddc6186493934bf6fb15aa0ba511d
Showing with 5 additions and 3 deletions.
  1. +5 −3 v7/publication_list/publication_list.py
@@ -193,6 +193,9 @@ def run(self):
}}
}})(this, '{}');">abstract&#x25BC;</a>] '''.format('abstract-' + label)

bibtex_display='<div id="{}" style="display:none"><pre>{}</pre></div>'.format(
'bibtex-' + label, bib_string)

abstract_text = str(
LaTeXParser(entry.fields['abstract']).parse()) if 'abstract' in entry.fields else ''
if detail_page_dir: # render the details page of a paper
@@ -209,7 +212,7 @@ def run(self):
'lang': self.site.config['DEFAULT_LANG'],
'permalink': self.site.config['SITE_URL'] + page_url,
'reference': pub_html,
'extra_links': extra_links
'extra_links': extra_links + bibtex_display
}

if 'fulltext' in entry.fields and entry.fields['fulltext'].endswith('.pdf'):
@@ -229,8 +232,7 @@ def run(self):
<div id="{}" class="publication-abstract" style="display:none">
<blockquote>{}</blockquote></div>
'''.format('abstract-' + label, abstract_text)
html += '<div id="{}" style="display:none"><pre>{}</pre></div>'.format(
'bibtex-' + label, bib_string)
html += bibtex_display
html += '</li>'

if len(data) != 0: # publication list is nonempty

0 comments on commit 61a892e

Please sign in to comment.