pcooksey/bibtex-js

Option to filter by author

Closed this issue · 5 comments

Is it possible to only display publications on a page for a particular author, without using search?

No, right now that isn't possible.

So what you would like is to select bibtex entries link but for a particular author, correct?

An example of what it could look like:

<div class="bibtex_display" author="FirstName LastName"></div>

Yes, that's correct - I'd like to use one bibtex file, but have dedicated pages on a website for members of staff. Your example looks good, although sometimes first names are only represented by an initial, so it might be useful to be able to search by first initial and last name.

Yeah that makes sense. So, the way I was tackling this was to expand the generality of the code that handled bibtexkeys and allow it to work with other bibtex types like author. That would make the value of the author attribute a regex value which is used in the javascript match function.

Example for searching for multiple variations of Tim Smith:

<div class="bibtex_display" author="Tim Smith"></div>
or
<div class="bibtex_display" author="Smith, T."></div>
or uses regex or `|` search for all types
<div class="bibtex_display" author="Tim Smith|Smith, T.|Smith, Tim"></div>

I've add this ability in the develop branch (specifically 5ccf967).

I've pushed this to master and added an explanation to the wiki

Closing this issue for now. Reopen the issue if you have any problems with this feature.