New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
bibtool.rsc in utils/developer – NEMO

source: utils/developer/bibtool.rsc @ 14115

Last change on this file since 14115 was 14115, checked in by nicolasmartin, 3 years ago

Update of BibTool? ressource file for BibTeX files standardization

File size: 1.8 KB
RevLine 
[11124]1## No tab indentation for readability
[14115]2pass.comments = on
[11058]3print.use.tab = off
4
[14115]5## Replace braces by double quotes as delimiter
[11124]6rewrite.rule = { "^\{\(.*\)\}$"        "\"\1\"" }
7rewrite.rule = { "^\([^\"].*[^\"]*\)$" "\"\1\"" }
[11058]8
[11124]9## Entry types in lowercase
10new.entry.type = "article"
11new.entry.type = "book"
12new.entry.type = "inbook"
13new.entry.type = "incollection"
14new.entry.type = "inproceedings"
[14115]15new.entry.type = "manual"
[11124]16new.entry.type = "phdthesis"
17new.entry.type = "techreport"
18
19## Normalisation of 'pages' field
20rewrite.rule = { pages # "\([0-9]+\),\([0-9]+\)" "\1\2"   }
21rewrite.rule = { pages # "\([0-9]+\)–\([0-9]+\)" "\1--\2" }
22rewrite.rule = { pages # "\([0-9]+\)-\([0-9]+\)" "\1--\2" }
23
24## Removing void fields
[11058]25rewrite.rule = { "^{ *}$" }
26
[11124]27## Delete 'url' field if 'doi' is present
28print { Removal of redundancies ('doi'='url') }
29rename.field = { url = dbl if doi = ".*" }
30delete.field = { dbl }
[11058]31
[11124]32## Definition of fields order
33sort.order =
34{ * =
35      # title     # chapter     # pages
36      # journal   # booktitle   # edition # editor # series
37      # volume    # number     
38      # author    # institution # school
39      # year      # month
40      # publisher # issn        # isbn
41      # doi       # url
42}
[11058]43
[14115]44## Keys
45#key.generation = off
46#preserve.key.case = on
[11124]47print { Generate new citation keys: 1stauthor[.2ndauthor[.ea]]_[journal|type]year }
[11058]48ignored.word = "of"
49ignored.word = "and"
50ignored.word = "in"
[14115]51ignored.word = "on"
[11124]52ignored.word = "du"
53ignored.word = "de"
54key.base = lower
55key.format =
56{ %s(bibkey) # %-2n(author)_
57     {   
58          %+5.1W(journal)
59             # %0s(@book         ) { bk   } # %0s(@inbook       ) { ibk  }
60             # %0s(@incollection ) { icol } # %0s(@inproceedings) { iprc }
[14115]61             # %0s(@phdthesis    ) { phd  } # %0s(@techreport   ) { trpt }
[11124]62     }
63  %2d(year)                   
64}
[11058]65
[11060]66print { Sort entries by key }
67sort = on
Note: See TracBrowser for help on using the repository browser.