add coauthor annotation (#175)
* add coauthor annotation * fix typo in coauthors.yml * add brief author annotation tutorial in README.md * change to combined data structure Coauthors are grouped by their last names. Within each group, using flat format (array of {firstnames, url}). * Update _layouts/bib.html stylistic changes Co-authored-by: Maruan <alshedivat@users.noreply.github.com> * Update _layouts/bib.html stylistic changes Co-authored-by: Maruan <alshedivat@users.noreply.github.com> * Update _layouts/bib.html stylistic changes Co-authored-by: Maruan <alshedivat@users.noreply.github.com> * Update _layouts/bib.html stylistic changes Co-authored-by: Maruan <alshedivat@users.noreply.github.com> Co-authored-by: Maruan <alshedivat@users.noreply.github.com>
This commit is contained in:
parent
dc254f7280
commit
6b28f901fb
29
README.md
29
README.md
@ -142,7 +142,36 @@ Your publications page is generated automatically from your BibTex bibliography.
|
||||
Simply edit `_bibliography/papers.bib`.
|
||||
You can also add new `*.bib` files and customize the look of your publications however you like by editing `_pages/publications.md`.
|
||||
|
||||
#### Author Annotation
|
||||
In publications, the author entry for your self is identified by string `scholar:last_name` and string array `scholar:first_name` in `_config.yml`. If the entry matches the last name and one form of the first names, it will be underlined.
|
||||
```
|
||||
scholar:
|
||||
last_name: Einstein
|
||||
first_name: [Albert, A.]
|
||||
```
|
||||
Keep meta-information about your co-authors in `_data/coauthors.yml` and Jekyll will insert links to their webpages automatically.
|
||||
The coauthor data format in `_data/coauthors.yml` is as follows,
|
||||
```
|
||||
"Adams":
|
||||
- firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"]
|
||||
url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams
|
||||
|
||||
"Podolsky":
|
||||
- firstname: ["Boris", "B.", "B. Y.", "Boris Yakovlevich"]
|
||||
url: https://en.wikipedia.org/wiki/Boris_Podolsky
|
||||
|
||||
"Rosen":
|
||||
- firstname: ["Nathan", "N."]
|
||||
url: https://en.wikipedia.org/wiki/Nathan_Rosen
|
||||
|
||||
"Bach":
|
||||
- firstname: ["Johann Sebastian", "J. S."]
|
||||
url: https://en.wikipedia.org/wiki/Johann_Sebastian_Bach
|
||||
|
||||
- firstname: ["Carl Philipp Emanuel", "C. P. E."]
|
||||
url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach
|
||||
```
|
||||
If the entry matches one of the combinations of the last names and the first names, it will be highlighted and linked to the url provided.
|
||||
|
||||
<p align="center"><img src="assets/img/publications-screenshot.png" width=800></p>
|
||||
|
||||
|
@ -1,8 +1,18 @@
|
||||
Adams:
|
||||
"Adams":
|
||||
- firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"]
|
||||
url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams
|
||||
|
||||
Podolsky:
|
||||
"Podolsky":
|
||||
- firstname: ["Boris", "B.", "B. Y.", "Boris Yakovlevich"]
|
||||
url: https://en.wikipedia.org/wiki/Boris_Podolsky
|
||||
|
||||
Rosen:
|
||||
"Rosen":
|
||||
- firstname: ["Nathan", "N."]
|
||||
url: https://en.wikipedia.org/wiki/Nathan_Rosen
|
||||
|
||||
"Bach":
|
||||
- firstname: ["Johann Sebastian", "J. S."]
|
||||
url: https://en.wikipedia.org/wiki/Johann_Sebastian_Bach
|
||||
|
||||
- firstname: ["Carl Philipp Emanuel", "C. P. E."]
|
||||
url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach
|
||||
|
@ -25,6 +25,16 @@
|
||||
{% assign author_is_self = true %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% assign coauthor_url = nil %}
|
||||
{% if site.data.coauthors[author.last] %}
|
||||
{% for coauthor in site.data.coauthors[author.last] %}
|
||||
{% if coauthor.firstname contains author.first %}
|
||||
{% assign coauthor_url = coauthor.url %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if forloop.length == 1 %}
|
||||
{% if author_is_self %}
|
||||
<em>{{author.last}}, {{author.first}}</em>
|
||||
@ -36,8 +46,8 @@
|
||||
{% if author_is_self %}
|
||||
<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>,
|
||||
{% if coauthor_url %}
|
||||
<a href="{{coauthor_url}}" target="_blank">{{author.last}}, {{author.first}}</a>,
|
||||
{% else %}
|
||||
{{author.last}}, {{author.first}},
|
||||
{% endif %}
|
||||
@ -46,8 +56,8 @@
|
||||
{% if author_is_self %}
|
||||
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>
|
||||
{% if coauthor_url %}
|
||||
and <a href="{{coauthor_url}}" target="_blank">{{author.last}}, {{author.first}}</a>
|
||||
{% else %}
|
||||
and {{author.last}}, {{author.first}}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user