I would like to clean up BibTeX entries so that fields always appear in the same order.
For example, I would like the order of fields to always be: author, year, title, journal. So, pressing C-c C-q
on:
@Article{Smit90,
title = {The Title},
year = 1990,
author = {Smith, J.},
journal = {The Journal}
}
Should produce:
@Article{Smit90,
author = {Smith, J.},
year = 1990,
title = {The Title},
journal = {The Journal}
}
bibtex-mode
has many options to reformat and clean up fields (see http://www.jonathanleroux.org/bibtex-mode.html#0620), but does not seem to have a way to reorder fields. Ideally, the order of fields should be controlled from bibtex-entry-format
and follow the order of fields that is defined in bibtex-BibTeX-entry-alist
.
How could this be done?
C-c C-c
(bibtex-clean-entry) and notC-c C-q
(bibtex-fill-entry). – jagrg Feb 9 at 13:06