Zegnat / php-greg-cites

BSD Zero Clause License
2 stars 1 forks source link

Add text transformation for and to ampersand #3

Open jgmac1106 opened 6 years ago

jgmac1106 commented 6 years ago

If an and is present in {author} it should be transformed to &

Zegnat commented 6 years ago

Is  and  (and surrounded by spaces) always the author separator? In that case it would be best to break the author string on it so every author can be marked up as its own microformats2 author property.

jgmac1106 commented 6 years ago

If that is possible it would be great.

We could even try to do something to help out #2 where it recognizes family name before comma, and then grabs first letter of the string following the comma. The AND is always the separator of the last author. I will go and take a look at a few bibTex files.

On Mon, Jun 4, 2018 at 9:37 AM Martijn van der Ven notifications@github.com wrote:

Is and (and surrounded by spaces) always the author separator? In that case it would be best to break the author string on it so every author can be marked up as its own microformats2 author property.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zegnat/php-greg-cites/issues/3#issuecomment-394357361, or mute the thread https://github.com/notifications/unsubscribe-auth/AKC-ppuNOM9J1TDH590mjxr6hs5O7Hmcks5t5TgbgaJpZM4UYSGD .

Zegnat commented 6 years ago

According to Wikipedia, multiple authors are always “separated by and”. But it all seems bit vague.

I have also seen documents that describe the author field as being written “in the format described in the LaTeX book.” OpenOffice even goes as far as to give Helpful (albeit vague) Hints on how every “name consists of four parts: First, von, Last, and Jr; each part consists of a (possibly empty) list of name-tokens.” Sadly no algorithm for it.

The feeling that BibTeX is a garbage-in-garbage-out way of marking up data is now growing with me. But I will simply work off of any examples you (or others) can dig up and behaviour you can describe. I don’t use it enough to comment.

And if it turns out Google Scholar has a specific way of putting the names in the BibTeX: lets follow them!