I have a (big) bibtex database like I show below. I need to add the DOI field to every entry. This new field is just a copy of URLDOI, but without URL and "http://dx.doi.org/" (see the second piece of code) . Is there any way (= tool, code, etc) to do automatically (or something similar)? Thanks!
Original database of entries:
@article{xxxAl:2016,
author = {authors},
title = {title},
journal = {journal},
year = 2016,
pages = {19:1--19:69},
publisher = oxford,
urldoi = {http://dx.doi.org/10.1017/S2956796816000162},
volume = 26,
month = sep,
}
@inproceedings{2016,
author = {authors2},
title = {title2},
pages = {298--310},
urldoi = {http://dx.doi.org/10.1145/2951913.2951933},
}
change to:
@article{xxxAl:2016,
author = {authors},
title = {title},
journal = {journal},
year = 2016,
pages = {19:1--19:69},
publisher = oxford,
urldoi = {http://dx.doi.org/10.1017/S2956796816000162},
doi = {10.1017/S2956796816000162},
volume = 26,
month = sep,
}
@inproceedings{2016,
author = {authors2},
title = {title2},
pages = {298--310},
urldoi = {http://dx.doi.org/10.1145/2951913.2951963},
doi = {10.1145/2951913.2951963},
}
:%s/urldoi = {http:\/\/dx.doi.org\/\([^}]*\)}\,$/&^M doi = {\1},/
. (Any existingdoi
entries would be doubled.)^M
with a break line ("intro" key)? Because when I now apply the solution I geturldoi ={http://dx.doi.org/10.1016/j.cl.2003.09.002},^M doi = {10.1016/j.cl.2003.09.002},
. Thanks!^M
with\r
, thanks!^M
is a new line character. You need to input it as<cmd>-V<return>
- or use\r
:)