diff --git a/_layouts/person.html b/_layouts/person.html index 54ce24b..3cab203 100644 --- a/_layouts/person.html +++ b/_layouts/person.html @@ -58,11 +58,31 @@

Contact

{{ content }} + {% assign alpha_chars = "abcdefghijklmnopqrstuvwxyzï" | split: "" %} {% assign pubname = last_name | append: " " | append: first_name | downcase %} {% assign ppublication = "" %} {% for publications-year in site.data.publications %} {% for publication in publications-year.papers %} - {% assign authors = publication.authors %} + {% assign authorslist = publication.authors | split: ", " %} + {% assign authors = "" %} + {% for author in authorslist %} + {% assign lcaseauthor = author | downcase %} + {% if lcaseauthor contains pubname %} + {% assign chars = author | split: "" %} + {% for char in chars %} + {% assign lowerchar = char | downcase %} + {% if alpha_chars contains lowerchar %} + {% assign authors = authors | append: "" | append: char | append: "" %} + {% else %} + {% assign authors = authors | append: char %} + {% endif %} + {% endfor %} + {% assign authors = authors | append: ", " %} + {% else %} + {% assign authors = authors | append: author | append: ", " %} + {% endif %} + {% endfor %} + {% assign authors = authors | append: "@" | replace: ", @", "." %} {% assign downcasedauthors = publication.authors | downcase %} {% if downcasedauthors contains pubname %} {% if publication.url %} @@ -82,9 +102,9 @@

Publications

{% for publication in ppublication %} {% assign ppublication_detail = publication | split: "|" %} {% if ppublication_detail.size > 2 %} -
  • {{ ppublication_detail[0] }}, {{ ppublication_detail[1] }}
    {{ ppublication_detail[2] }}
  • +
  • {{ ppublication_detail[0] }}, {{ ppublication_detail[1] }}
    {{ ppublication_detail[2] }}
  • {% else %} -
  • {{ ppublication_detail[0] }}, {{ ppublication_detail[1] }}
    {{ ppublication_detail[2] }}
  • +
  • {{ ppublication_detail[0] }}, {{ ppublication_detail[1] }}
    {{ ppublication_detail[2] }}
  • {% endif %} {% endfor %}