From 6c047072d8cb22dce51d9a4756f6ddeb62dc1fce Mon Sep 17 00:00:00 2001 From: Jannik Dunkelau <jannik.dunkelau@hhu.de> Date: Thu, 3 Oct 2019 17:10:36 +0200 Subject: [PATCH] Enhance bibtoolrsc and bibtool call in Makefile --- .bibtoolrsc | 21 ++++++++++++++++++--- Makefile | 2 +- references.bib | 34 ++++++++++++++++++++-------------- 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/.bibtoolrsc b/.bibtoolrsc index 231246c..f85337b 100644 --- a/.bibtoolrsc +++ b/.bibtoolrsc @@ -5,6 +5,21 @@ suppress.initial.newline = true sort.format = {%N(author)} print.parentheses = true -rewrite.rule { "^\"\([^#]*\)\"$" # "{\1}" } -rewrite.rule { pages # "\([0-9]+\)␣*-␣*\([0-9]+\)" # "\1--\2" } -rewrite.rule { title # "^\{\([^\{][^#]*[^\}]\)\}$" # "{{\1}}" } + +% sort order for fields +sort.order {* = author # title # school # type # year # month # day # journal # booktitle # volume # pages # publisher # adress # url # urlaccessdate} + + +% Remove double braces around titles. +rewrite.rule { title # "^\{[\{]\([^#]*\)[\}]\}$" # "{\1}" } + + +% Correct page ranges. +rewrite.rule {pages # "\([0-9]+\) *\(-\|---\) *\([0-9]+\)" = "\1--\3"} + + +% Translate double quotes as delimiters "" by braces {} +rewrite.rule { "^\"\([^#]*\)\"$" = "{\1}" } +rewrite.rule { "# \"\([^#]*\)\"$" = "# {\1}" } +rewrite.rule { "^\"\([^#]*\)\" #" = "{\1} #" } +rewrite.rule { "# \"\([^#]*\)\" #" = "# {\1} #" } diff --git a/Makefile b/Makefile index cef462d..bf0c82c 100644 --- a/Makefile +++ b/Makefile @@ -9,4 +9,4 @@ clean: latexmk -C thesis.tex bibtool: - bibtool -R -r keep_bibtex -r field -r improve -r sort_fld -s references.bib -o references.bib + bibtool -R -r keep_bibtex -r field -r improve -r month -s references.bib -o references.bib diff --git a/references.bib b/references.bib index ff276f3..3d2a193 100644 --- a/references.bib +++ b/references.bib @@ -1,42 +1,48 @@ @Book(abrial1996b, Author = {Abrial, Jean-Raymond}, - Title = {{The B-book: assigning programs to meanings}}, + Title = {The {B}-Book: Assigning Programs to Meanings}, + Year = 1996, Publisher = {Cambridge University Press}, - Year = 1996 + Address = {New York, NY, USA} ) @Book(abrial2010modeling, Author = {Abrial, Jean-Raymond}, - Title = {{Modeling in Event-B: system and software engineering}}, + Title = {Modeling in {E}vent-{B}: System and Software Engineering}, + Year = 2010, Publisher = {Cambridge University Press}, - Year = 2010 + Address = {New York, NY, USA} ) @Book(carlsson1988sicstus, Author = {Carlsson, Mats and Widen, Johan and Andersson, Johan and Andersson, Stefan and Boortz, Kent and Nilsson, Hans and Sj{\"o}land, Thomas}, - Title = {{SICStus Prolog user's manual}}, - Publisher = {Swedish Institute of Computer Science Kista, Sweden}, + Title = {{SICS}tus Prolog User's Manual}, Year = 1988, Volume = 3, + Publisher = {Swedish Institute of Computer Science}, + Address = {Kista, Sweden}, Number = 1 ) @Article(leuschel2008prob, Author = {Leuschel, Michael and Butler, Michael}, - Title = {{ProB: an automated analysis toolset for the B method}}, - Journal = {International Journal on Software Tools for Technology Transfer}, + Title = {{ProB}: An Automated Analysis Toolset for the {B} Method}, Year = 2008, + Month = mar, + Journal = {International Journal on Software Tools for Technology Transfer}, Volume = 10, - Number = 2, - Pages = {185--203} + Pages = {185--203}, + Number = 2 ) @InProceedings(leuschel2003prob, - Author = {Leuschel, Michael and Butler, Michael and others}, - Title = {{ProB: A model checker for B}}, - Booktitle = {FME}, + Author = {Leuschel, Michael and Butler, Michael}, + Title = {ProB}, Year = 2003, + Month = sep, + Booktitle = {{FME} 2003: Formal Methods}, Volume = 2805, Pages = {855--874}, - Organization = {Springer} + Publisher = {Springer Berlin Heidelberg}, + Address = {Berlin, Heidelberg} ) -- GitLab