Skip to content

Commit

Permalink
Support corresponding author mark
Browse files Browse the repository at this point in the history
  • Loading branch information
luost26 committed Jul 13, 2024
1 parent 508f508 commit f861359
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
19 changes: 16 additions & 3 deletions _includes/widgets/author_list.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{%- assign authors = include.authors -%}
{%- assign has_eq_contrib = false -%}
{%- assign i = 0 -%}
{%- assign has_corresponding = false -%}

{%- for _key in authors -%}
{%- assign last_char = _key | slice: -1, 1%}
{%- if last_char == "*" -%}
{%- assign key = _key | split: "*" | first -%}
{%- assign mark = "*" -%}
{%- assign has_eq_contrib = true -%}
{%- elsif last_char == "#" -%}
{%- assign key = _key | split: "#" | first -%}
{%- assign mark = '<sup>#</sup>' -%}
{%- assign has_corresponding = true -%}
{%- else -%}
{%- assign key = _key -%}
{%- assign mark = "" -%}
Expand Down Expand Up @@ -36,6 +41,14 @@

{%- endfor -%}

{%- if has_eq_contrib == true -%}
<mark>(* <i> equal contribution</i>)</mark>
{%- if has_eq_contrib or has_corresponding %}
<mark>(
{%- if has_eq_contrib -%}
* <i> equal contribution</i>
{%- endif -%}
{%- if has_corresponding -%}
{%- if has_eq_contrib -%}, {% endif -%}
<sup>#</sup> <i> corresponding author</i>
{%- endif -%}
)</mark>
{%- endif -%}
6 changes: 3 additions & 3 deletions _publications/2023/2023-pub-example-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ abstract: >-
cover: assets/images/covers/cover2.jpg
authors:
- Charles Green (MIT)
- Your Name
- John Doe
- Charles Green (MIT)*
- John Doe*
- Robert White
- James Wang
- Your Name#
links:
Paper: https://www.biorxiv.org
Code: https://github.com
Expand Down

0 comments on commit f861359

Please sign in to comment.