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

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

Update of BibTool? ressource file for BibTeX files standardization

File size: 1.8 KB
Line 
1## No tab indentation for readability
2pass.comments = on
3print.use.tab = off
4
5## Replace braces by double quotes as delimiter
6rewrite.rule = { "^\{\(.*\)\}$"        "\"\1\"" }
7rewrite.rule = { "^\([^\"].*[^\"]*\)$" "\"\1\"" }
8
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"
15new.entry.type = "manual"
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
25rewrite.rule = { "^{ *}$" }
26
27## Delete 'url' field if 'doi' is present
28print { Removal of redundancies ('doi'='url') }
29rename.field = { url = dbl if doi = ".*" }
30delete.field = { dbl }
31
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}
43
44## Keys
45#key.generation = off
46#preserve.key.case = on
47print { Generate new citation keys: 1stauthor[.2ndauthor[.ea]]_[journal|type]year }
48ignored.word = "of"
49ignored.word = "and"
50ignored.word = "in"
51ignored.word = "on"
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 }
61             # %0s(@phdthesis    ) { phd  } # %0s(@techreport   ) { trpt }
62     }
63  %2d(year)                   
64}
65
66print { Sort entries by key }
67sort = on
Note: See TracBrowser for help on using the repository browser.