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