Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add multiple last names in bibliography #905

Merged
merged 1 commit into from
Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add multiple last names in bibliography
  • Loading branch information
johanneshoerner committed Sep 23, 2022
commit 4d0f6c2676a32bda75e2a5d6a13838c41808d155
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
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ display_tags: ['formatting', 'images', 'links', 'math', 'code'] # this tags will

scholar:

last_name: Einstein
last_name: [Einstein]
first_name: [Albert, A.]

style: apa
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