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 @ 11781

Last change on this file since 11781 was 11204, checked in by smueller, 5 years ago

Merge of changeset [11175] into the trunk (ticket #2295)

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