source:
utils/dev/bibtool.rsc
@
11125
Last change on this file since 11125 was 11125, checked in by nicolasmartin, 5 years ago | |
---|---|
File size: 1.7 KB |
Rev | Line | |
---|---|---|
[11124] | 1 | ## No tab indentation for readability |
[11058] | 2 | print.use.tab = off |
3 | ||
[11124] | 4 | ## Braces as delimiter |
5 | rewrite.rule = { "^\{\(.*\)\}$" "\"\1\"" } | |
6 | rewrite.rule = { "^\([^\"].*[^\"]*\)$" "\"\1\"" } | |
[11058] | 7 | |
[11124] | 8 | ## Entry types in lowercase |
9 | new.entry.type = "article" | |
10 | new.entry.type = "book" | |
11 | new.entry.type = "inbook" | |
12 | new.entry.type = "incollection" | |
13 | new.entry.type = "inproceedings" | |
14 | new.entry.type = "phdthesis" | |
15 | new.entry.type = "techreport" | |
16 | ||
17 | ## Normalisation of 'pages' field | |
18 | rewrite.rule = { pages # "\([0-9]+\),\([0-9]+\)" "\1\2" } | |
19 | rewrite.rule = { pages # "\([0-9]+\)–\([0-9]+\)" "\1--\2" } | |
20 | rewrite.rule = { pages # "\([0-9]+\)-\([0-9]+\)" "\1--\2" } | |
21 | ||
22 | ## Removing void fields | |
[11058] | 23 | rewrite.rule = { "^{ *}$" } |
24 | ||
[11124] | 25 | ## Delete 'url' field if 'doi' is present |
26 | print { Removal of redundancies ('doi'='url') } | |
27 | rename.field = { url = dbl if doi = ".*" } | |
28 | delete.field = { dbl } | |
[11058] | 29 | |
[11124] | 30 | ## Definition of fields order |
31 | sort.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 | } | |
[11058] | 41 | |
[11124] | 42 | ## Keys |
43 | print { Generate new citation keys: 1stauthor[.2ndauthor[.ea]]_[journal|type]year } | |
[11058] | 44 | ignored.word = "of" |
45 | ignored.word = "and" | |
46 | ignored.word = "in" | |
[11124] | 47 | ignored.word = "du" |
48 | ignored.word = "de" | |
49 | key.base = lower | |
50 | key.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 | } | |
[11058] | 60 | |
[11060] | 61 | print { Sort entries by key } |
62 | sort = on |
Note: See TracBrowser
for help on using the repository browser.