pages/_layouts/bib.html
Tiago Tresoldi 488cb39f9c Fixes bug when generating publications from single authors. (#27)
* Fixes bug when generating publications from single authors.

* Fixes generation of author string for multiple authors

* Fixed number of spaces in indentation
2018-09-30 15:08:54 -04:00

97 lines
3.2 KiB
HTML

---
---
{% if entry.abbr %}
{% if site.data.venues[entry.abbr] %}
<abbr>[<a href="{{site.data.venues[entry.abbr].url}}" target="_blank">{{entry.abbr}}</a>]</abbr>
{% else %}
<abbr>[{{entry.abbr}}]</abbr>
{% endif %}
{% endif %}
<div id="{{entry.key}}">
{% if entry.type == "thesis" %}
{{reference}}
{% else %}
<span class="title">{{entry.title}}</span>
<span class="author">
{% for author in entry.author_array %}
{% if forloop.length == 1 %}
{% if author.last == site.scholar.last_name %}
<em>{{author.last}}, {{author.first}}</em>
{% else %}
{{author.last}}, {{author.first}}
{% endif %}
{% else %}
{% unless forloop.last %}
{% if author.last == site.scholar.last_name %}
<em>{{author.last}}, {{author.first}}</em>,
{% else %}
{% if site.data.coauthors[author.last] %}
<a href="{{site.data.coauthors[author.last].url}}" target="_blank">{{author.last}}, {{author.first}}</a>,
{% else %}
{{author.last}}, {{author.first}},
{% endif %}
{% endif %}
{% else %}
{% if author.last == site.scholar.last_name %}
and <em>{{author.last}}, {{author.first}}</em>
{% else %}
{% if site.data.coauthors[author.last] %}
and <a href="{{site.data.coauthors[author.last].url}}" target="_blank">{{author.last}}, {{author.first}}</a>
{% else %}
and {{author.last}}, {{author.first}}
{% endif %}
{% endif %}
{% endunless %}
{% endif %}
{% endfor %}
</span>
<span class="periodical">
{% if entry.type == "article" %}
<em>{{entry.journal}}</em>
{% elsif entry.type == "inproceedings" %}
<em>In {{entry.booktitle}}</em>
{% endif %}
{% if entry.year %}
{{entry.year}}
{% endif %}
</span>
{% endif %}
<span class="links">
{% if entry.abstract %}
[<a class="abstract">Abs</a>]
{% endif %}
{% if entry.arxiv %}
[<a href="http://arxiv.org/abs/{{ entry.arxiv }}" target="_blank">arXiv</a>]
{% endif %}
{% if entry.html %}
[<a href="{{ entry.html }}" target="_blank">HTML</a>]
{% endif %}
{% if entry.pdf %}
[<a href="{{ entry.pdf | prepend: '/assets/pdf/' | prepend: site.baseurl | prepend: site.url }}" target="_blank">PDF</a>]
{% endif %}
{% if entry.supp %}
[<a href="{{ entry.supp | prepend: '/assets/pdf/' | prepend: site.baseurl | prepend: site.url }}" target="_blank">Supp</a>]
{% endif %}
{% if entry.poster %}
[<a href="{{ entry.poster | prepend: '/assets/pdf/' | prepend: site.baseurl | prepend: site.url }}" target="_blank">Poster</a>]
{% endif %}
{% if entry.slides %}
[<a href="{{ entry.slides | prepend: '/assets/pdf/' | prepend: site.baseurl | prepend: site.url }}" target="_blank">Slides</a>]
{% endif %}
{% if entry.code %}
[<a href="{{ entry.code }}" target="_blank">Code</a>]
{% endif %}
</span>
<!-- Hidden abstract block -->
{% if entry.abstract %}
<span class="abstract hidden">
<p>{{ entry.abstract }}</p>
</span>
{% endif %}
</div>