papercite icon indicating copy to clipboard operation
papercite copied to clipboard

Properly shortcode for bibfilter

Open nanowiedzma opened this issue 5 years ago • 2 comments

I would like to ask how should be seems filter shortcode. [bibfilter author=all] - I would like to show all authors in dropdown list but something in this code is wrong. I read documentation but it's not help.

nanowiedzma avatar Mar 12 '19 16:03 nanowiedzma

Hum, filling the dropdown with all the publication authors it's not implemented in the way you suggest. The author parameter in the shortcode just allow you to specify the names of the authors literally, by what I understand from the documentation in this way: [bibfilter author=authorname1|authorname2|...]. I don't see in the code any way to do this. There is the class PaperciteAuthorMatcher with the following phpdoc above:

* Get string with author name(s) and make regex of it.
 * String with author or a list of authors (passed as parameter to papercite) in the following format:
 * -a1|a2|..|an   - publications including at least one of these authors
 * -a1&a2&..&an   - publications including all of these authors
 *
 * @param unknown $authors - string parsed from papercite after tag: "author="

So, according with this piece of documentation, it says that after author you'll have to specify the author names, separated by | or & EXCLUSIVELY (you can't mix the & and | in the same expression!) So unfortunately at this time the feature you are requesting is not implemented !

digfish avatar Mar 12 '19 19:03 digfish

I suspected that was the reason, but I was not sure, so thanks for a comprehensive response. :) I will try to find another plugin.

nanowiedzma avatar Mar 12 '19 19:03 nanowiedzma