pcooksey/bibtex-js

option to replace 'and'

Closed this issue · 5 comments

Would it be possible to make the "and" between authors customizable, i.e. replace it with another string?

I'm assuming you are referring to the and used when displaying the list of authors, e.g. "Last, F., Last, F., and Last, F.", because the and in the bibtex file, that splits the authors names, is a standard.

Hopefully it is the and for displaying. For that I've added a new attribute for the author span that allows you to customize the conjunction and with any string you would like. Currently you can find it in the develop branch if you would like to check it out. I'll add it to the master branch if it works for you.

Example:

<div class="bibtex_template">
   <div class="if author">
      <span class="author" conjunction="and"></span>
   </div>
</div>

Thank you! But it doesn't work as expected, although this is due to my short report.
I want to use it in a multi language environment, but in many other languages there is no comma before the last item, e.g. in German it's "Last, F., Last, F. und Last, F.", in French it's "Last, F., Last, F. et Last, F.". So it is a bit more complicated than that.

I've updated the commit 22ff2fa in the develop branch so that the user must specify the entire conjunction.

<span class="author" conjunction=", and"></span>
or 
<span class="author" conjunction=" et"></span>
or
<span class="author" conjunction=" und"></span>

I've pushed this feature to master and added it to the wiki.

Closing this issue. If you have issues again with this feature just reopen the issue.

Sorry for the late response. Hadn't had the time to test it.
Works great now, thank you!