Publisher names separated by commas
Issue #114
new
Hi
I cant create branche or fork
But I fixed a problem
In the Scopus library, the publisher names are separated by commas
e.g.
editor={Elgammal A., Chalidabhongse T.H., Aramvith S., Ho Y.-S., Schoeffmann K., Ngo C.W., O'Connor N.E., Gabbouj M.},
What I do is, after split name, I count names and commas number.
If count name equals 1 and count commas > 1, I replace commas for "and"s
File: \GitHub\pybtex\pybtex\bibtex\utils.py
Function: def split_tex_string(string, sep=None, strip=True, filter_empty=False):
if filter_empty:
result = [part for part in result if part]
# publisher names separated by commas - kabrau 2018-05-03
# e.g: "Elgammal A., Chalidabhongse T.H., Aramvith S., Ho Y.-S., Schoeffmann K., Ngo C.W., O'Connor N.E., Gabbouj M."
if (len(result)==1 and len(result[0].split(','))>1):
return split_name_list(result[0].replace(',',' and '))
return result
In the general case a name can contain a comma. This makes the simple comma split ambiguous. I had to read my input file to identify instances of comma overload and fix by hand.