Skip to content

Commit

Permalink
Display booktitle for publications of type incollection (alshedivat#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
beauby authored and Yuan committed Jan 13, 2023
1 parent 017585a commit 6384271
Showing 1 changed file with 20 additions and 27 deletions.
47 changes: 20 additions & 27 deletions _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,33 +102,26 @@

</div>

<!-- Journal/Book title and date -->
{% assign proceedings = "inproceedings,incollection" | split: ','%}
{% assign thesis = "thesis,mastersthesis,phdthesis" | split: ','%}
{% if entry.type == "article" -%}
{%- capture entrytype -%}<em>{{entry.journal}}</em>{%- endcapture -%}
{%- elsif proceedings contains entry.type -%}
{%- capture entrytype -%}<em>In {{entry.booktitle}}</em> {%- endcapture -%}
{%- elsif thesis contains entry.type -%}
{%- capture entrytype -%}<em>{{entry.school}}</em> {%- endcapture -%}
{%- else -%}
{%- capture entrytype -%}{%- endcapture -%}
{%- endif -%}
{%- if entry.month -%}
{%- capture entrymonth -%}{{ " " }}{{ entry.month | capitalize }}{%- endcapture -%}
{%- endif -%}
{%- if entry.year -%}
{%- capture entryyear -%}{{ " " }}{{entry.year}}{%- endcapture -%}
{%- endif -%}
{% assign entrytype_text = entrytype | strip_html | strip %}
{%- capture periodical -%}{{ entrytype }}{%- if entrytype_text != "" and entryyear != "" -%}, {%- endif -%}{{ entrymonth }}{{ entryyear }}{%- endcapture -%}
<div class="periodical">
{{ periodical | strip }}
</div>
<div class="periodical">
{{ entry.note | strip }}
</div>

<!-- Journal/Book title and date -->
{% if entry.type == "article" -%}
{%- capture entrytype -%}<em>{{entry.journal}}</em>{%- endcapture -%}
{%- elsif ["inproceedings", "incollection"] contains entry.type -%}
{%- capture entrytype -%}<em>In {{entry.booktitle}}</em> {%- endcapture -%}
{%- else -%}
{%- capture entrytype -%}{%- endcapture -%}
{%- endif -%}
{%- if entry.month -%}
{%- capture entrymonth -%}{{ " " }}{{ entry.month | capitalize }}{%- endcapture -%}
{%- endif -%}
{%- if entry.year -%}
{%- capture entryyear -%}{{ " " }}{{entry.year}}{%- endcapture -%}
{%- endif -%}
{%- capture periodical -%}{{ entrytype }}{{ entrymonth }}{{ entryyear }}{%- endcapture -%}
<div class="periodical">
{{ periodical | strip }}
</div>
{%- endif %}

<!-- Links/Buttons -->
<div class="links">
{%- if entry.abstract %}
Expand Down

0 comments on commit 6384271

Please sign in to comment.