m (→Our bibliographic sci/Sci files) |
m (→doi2bib) |
||
Line 60: | Line 60: | ||
\bibliographystyle{naturemag} | \bibliographystyle{naturemag} | ||
\bibliography{sci,Books,arXiv} | \bibliography{sci,Books,arXiv} | ||
+ | </pre> | ||
+ | |||
+ | == bib2wiki & keys2wiki == | ||
+ | |||
+ | '''[[bib2wiki]]''' is a command-line script to generate references for [[laussy.org|this website]]: | ||
+ | |||
+ | <pre>bib2wiki -keys=delvalle12a,delvalle13a</pre> | ||
+ | |||
+ | '''[[keys2wiki]]''' is a hack to automatize the process [[Blog:Hacks/bib2wiki_or_parsing_bibTeX_into_mediawiki_templates described here]]: | ||
+ | |||
+ | <pre> | ||
+ | laussy@covid:~$ ./keys2wiki | ||
+ | Template:Fraser09a (edit) | ||
+ | Template:Lagoudakis08a (edit) | ||
+ | Template:Rahmani19a (edit) + Ctrl-D | ||
</pre> | </pre> | ||
Contents |
BibTeX is the very imperfect but still best way to handle bibliographic databases for $\mathrm{\TeX}$/$\mathrm{\LaTeX}$ users.
If you are working with us, you may want or be called to use our bib files.
The most important one is called sci.bib (all lowercase letters), and each entry follows the following pattern:
@Article{aspect82a, author = {A. Aspect and J. Dalibard and G. Roger}, title = {Experimental Test of {Bell}'s Inequalities Using Time-Varying Analyzers}, journal = prl, year = 1982, volume = 49, pages = 1804, url = {doi:10.1103/PhysRevLett.49.1804}, pdf = {sci/aspect82a} }
That is, entries are Article (if it's, e.g., a book, it goes in a separate file), with a key built as follow:
where ⇿ means concatenation and $\alpha$ runs over the alphabet to discriminate publications from the first author in the same year. If another Aspect's paper of 1982 exists, it will be inserted as aspect82b. The $\alpha$ ordering comes from the order in which it is entered in this database, not from the chronological order along which the authors have published their work.
If you need to add an entry to contribute to this database, please adhere to the following format, providing the following fields (and only those):
The sci.bib is the mother file. We use scripts to process this file into a Sci.bib (Uppercase) which you should not edit directly. It is the one that is fed to the journal (removing url, links to the papers, etc.)
The sci.bib is a huge file, with several thousands of entries. It is a powerful work that facilitates a messy business. If you need a more recent version than is available here, please ask us for one.
The way it works is, we usually provide co-authors with the Sci.bib for use in papers, and we maintain the mother sci.bib. To avoid conflicts, we add ourselves entries that you may contribute to the main file. So we recommend you use a new .bib file, use the format described above (you can read the key from the Sci file to know how to update the $\alpha$ value) and send to us your new (and presumably, small) file. We also have scripts to merge this with the core database.
A convenient bst file is naturemag that provides the title and a decent-looking listing of the authors. In addition to of the sci.bib file, we keep records for books in a separate file as well as arXiv (which are called to eventually migrate to sci):
\bibliographystyle{naturemag} \bibliography{sci,Books,arXiv}
bib2wiki is a command-line script to generate references for this website:
bib2wiki -keys=delvalle12a,delvalle13a
keys2wiki is a hack to automatize the process Blog:Hacks/bib2wiki_or_parsing_bibTeX_into_mediawiki_templates described here:
laussy@covid:~$ ./keys2wiki Template:Fraser09a (edit) Template:Lagoudakis08a (edit) Template:Rahmani19a (edit) + Ctrl-D
doi2bib is a command-line, customizable version of doi2bib.org to generate the sci.bib entry (i.e., according to my conventions) from the doi of an article, e.g.:
doi2bib 10.1103/PhysRev.60.356
I have my own mySQL version of BibTeX, of which you can learn in its own page bibSQL.
BibTeX ultimately produces a bbl file. If you want to provide fine-control tuning, you can edit this file. Of course, any compiling of BibTeX will overwrite your changes, so they should be kept in a separate script file to run anew each time you recompile.
Some examples:
Replace-string \url{doi: → \url{https://doi.org/)
A prettier version is with grep:
cat original.bbl | perl -p -e 's/\\url\{doi:(.*)\}/\\href\{https:\/\/doi.org\/\1\}\{doi:\1\}/g;' > new.bbl