davidagraf / doi2bib

give us a DOI and we'll do our best to get you the BibTeX entry
www.doi2bib.org
118 stars 15 forks source link

Escape percent symbol #30

Closed SG-phimeca closed 7 years ago

SG-phimeca commented 7 years ago

Doi url often contain a percent symbol which is interpreted by the LaTeX compiler as the beginning of a comment. Maybe it should be escaped, that is https://doi.org/10.1080%123456.2014.123456 should be https://doi.org/10.1080\%123456.2014.123456 ? I do it manually.

thurnherr commented 7 years ago

Can you provide an example DOI.

SG-phimeca commented 7 years ago

Doi2bib generates the following bibtex entry from the doi 10.1214/13-sts434

@article{Broderick2013, doi = {10.1214/13-sts434}, url = {https://doi.org/10.1214%2F13-sts434}, year = {2013}, month = {aug}, publisher = {Institute of Mathematical Statistics}, volume = {28}, number = {3}, pages = {289--312}, author = {Tamara Broderick and Michael I. Jordan and Jim Pitman}, title = {Cluster and Feature Modeling from Combinatorial Stochastic Processes}, journal = {Statistical Science} }

The problematic % is in the url entry.

thurnherr commented 7 years ago

Thanks for that. We fixed this now by decoding the url. Let us know if you see any other issues.

@article{Broderick2013, doi = {10.1214/13-sts434}, url = {https://doi.org/10.1214/13-sts434}, year = {2013}, month = {aug}, publisher = {Institute of Mathematical Statistics}, volume = {28}, number = {3}, pages = {289--312}, author = {Tamara Broderick and Michael I. Jordan and Jim Pitman}, title = {Cluster and Feature Modeling from Combinatorial Stochastic Processes}, journal = {Statistical Science} }