source: NEMO/trunk/doc/latex/NEMO/main/bibtool.rsc @ 11124

Last change on this file since 11124 was 11124, checked in by nicolasmartin, 18 months ago

Editing of ametsoc.bst to generate hyperlinks for DOIs or URLs
New version of bibtool resource file:

  • Braces as entries delimiter
  • All entry types in lowercase (^@...)
  • Normalisation of pages field ([0-9]+--[0-9])
  • Deletion of url field if doi is here
  • Definition of fields order
    sort.order =
    { * =
          # title     # chapter     # pages
          # journal   # booktitle   # edition # editor # series
          # volume    # number
          # author    # institution # school
          # year      # month
          # publisher # issn        # isbn
          # doi       # url
    }
    
  • coding the format of citations keys
    key.format =
    { %s(bibkey) # %-2n(author)_
         {
              %+5.1W(journal)
                 # %0s(@book         ) { bk   } # %0s(@inbook       ) { ibk  }
                 # %0s(@incollection ) { icol } # %0s(@inproceedings) { iprc }
                 # %0s(@phdthesis    ) { phd  } # %0s(@techreport   ) { rpt  }
         }
      %2d(year)
    }
    
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.