Skip to content

Commit

Permalink
add multiple last names in bibliography (alshedivat#905)
Browse files Browse the repository at this point in the history
Multiple last names can be defined to be highlighted in the bibliography
(alshedivat#904)
  • Loading branch information
johanneshoerner authored and GeorgeVern committed Feb 1, 2023
1 parent c85785f commit 7450a72
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,13 @@ You can also add new `*.bib` files and customize the look of your publications h

<details><summary>(click to expand) <strong>Author annotation:</strong></summary>

In publications, the author entry for yourself is identified by string `scholar:last_name` and string array `scholar:first_name` in `_config.yml`:
In publications, the author entry for yourself is identified by string array `scholar:last_name` and string array `scholar:first_name` in `_config.yml`:
```
scholar:
last_name: Einstein
last_name: [Einstein]
first_name: [Albert, A.]
```
If the entry matches the last name and one form of the first names, it will be underlined.
If the entry matches one form of the last names and the first names, it will be underlined.
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,
```
Expand Down
14 changes: 6 additions & 8 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,9 @@ og_image: # The site-wide (default for all links) Open Graph preview image

github_username: GeorgeVern # your GitHub user name
gitlab_username: # your GitLab user name
<<<<<<< HEAD
twitter_username: gvernikos # your Twitter handle
linkedin_username: giorgos-vernikos-771200151 # your LinkedIn user name
scholar_userid: 1AgA0_YAAAAJ&hl # your Google Scholar ID
=======
twitter_username: # your Twitter handle
linkedin_username: # your LinkedIn user name
scholar_userid: # your Google Scholar ID
semanticscholar_id: # your Semantic Scholar ID
>>>>>>> 7410772 (Add Semantic Scholar social integration (#879))
semanticscholar_id: 1972392392 # your Semantic Scholar ID
orcid_id: # your ORCID ID
medium_username: # your Medium username
quora_username: # your Quora username
Expand Down Expand Up @@ -234,8 +227,13 @@ display_tags: ['formatting', 'images', 'links', 'math', 'code'] # this tags will

scholar:

<<<<<<< HEAD
last_name: Vernikos
first_name: [Giorgos, G.]
=======
last_name: [Einstein]
first_name: [Albert, A.]
>>>>>>> bfc4725 (add multiple last names in bibliography (#905))

style: chicago-fullnote-bibliography
locale: en
Expand Down
2 changes: 1 addition & 1 deletion _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{%- for author in entry.author_array limit: author_array_limit -%}
{%- assign author_is_self = false -%}
{%- assign author_last_name = author.last | remove: "¶" | remove: "&" | remove: "*" | remove: "†" | remove: "^" -%}
{%- if author_last_name == site.scholar.last_name -%}
{%- if site.scholar.last_name contains author_last_name -%}
{%- if site.scholar.first_name contains author.first -%}
{%- assign author_is_self = true -%}
{%- endif -%}
Expand Down

0 comments on commit 7450a72

Please sign in to comment.