diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-13 20:50:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-13 20:50:23 +0000 |
commit | d9aae66cb8b9e21d51b9216d79b462465e57338e (patch) | |
tree | 75eea3b2189b3eef309a8809bcf6787191ca25fb /Master/texmf-dist | |
parent | b4917a53cb17c6b5ceb787aa6a809807b48cfedd (diff) |
bibcop (13feb23)
git-svn-id: svn://tug.org/texlive/trunk@65816 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/bibtex/bibcop/README.md | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf | bin | 343290 -> 343290 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/bibcop.1 | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/bibcop.man1.pdf | bin | 13388 -> 13273 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/bibcop/bibcop.pl | 29 | ||||
-rw-r--r-- | Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bibcop/bibcop.sty | 2 |
7 files changed, 23 insertions, 13 deletions
diff --git a/Master/texmf-dist/doc/bibtex/bibcop/README.md b/Master/texmf-dist/doc/bibtex/bibcop/README.md index 471c4dcdcba..cda41a8ddd9 100644 --- a/Master/texmf-dist/doc/bibtex/bibcop/README.md +++ b/Master/texmf-dist/doc/bibtex/bibcop/README.md @@ -36,6 +36,7 @@ $ perl bibcop.pl --fix main.bib > fixed.bib This command will read the `main.bib` file and create `fixed.bib`, which will have the fixed and properly formatted content (well, to some extent). +Be careful, all comments will be removed. If you install the package using [`tlmgr`](https://www.tug.org/texlive/tlmgr.html), you should be able to use `bibcop` directly, without the necessity to mention Perl: diff --git a/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf b/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf Binary files differindex 29fb6056bbf..09a4e1e5d00 100644 --- a/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf +++ b/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf diff --git a/Master/texmf-dist/doc/man/man1/bibcop.1 b/Master/texmf-dist/doc/man/man1/bibcop.1 index 48f55428edf..19bb874117e 100644 --- a/Master/texmf-dist/doc/man/man1/bibcop.1 +++ b/Master/texmf-dist/doc/man/man1/bibcop.1 @@ -1,4 +1,4 @@ -.TH bibcop 1 "2023-01-29" +.TH bibcop 1 "2023-02-13" .SH NAME bibcop \- Style Checker and Fixer of BibTeX Files (.bib) .SH SYNOPSIS diff --git a/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf b/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf Binary files differindex 7dbcfeb2895..a41f85ad2fc 100644 --- a/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf diff --git a/Master/texmf-dist/scripts/bibcop/bibcop.pl b/Master/texmf-dist/scripts/bibcop/bibcop.pl index fd774d90195..eb337fc365e 100755 --- a/Master/texmf-dist/scripts/bibcop/bibcop.pl +++ b/Master/texmf-dist/scripts/bibcop/bibcop.pl @@ -36,7 +36,7 @@ my %args = map { $_ => 1 } @ARGV; my %blessed = ( 'article' => ['doi', 'year', 'title', 'author', 'journal', 'volume', 'number', 'publisher?', 'pages?'], 'inproceedings' => ['doi', 'booktitle', 'title', 'author', 'year', 'pages?', 'organization?', 'volume?'], - 'book' => ['doi', 'title', 'author', 'year', 'publisher'], + 'book' => ['title', 'author', 'year', 'publisher', 'doi?'], 'misc' => ['title', 'author', 'year', 'eprint?', 'archiveprefix?', 'primaryclass?', 'publisher?', 'organization?', 'doi?', 'url?'], ); @@ -232,38 +232,47 @@ sub check_typography { } foreach my $s (@no_space_before) { if ($value =~ /^.*\s\Q$s\E.*$/) { - return "In the '$tag', do not put a space before a $symbols{$s}" + return "In the '$tag', do not put a space before the $symbols{$s}" } } foreach my $s (@no_space_after) { if ($value =~ /^.*\Q$s\E\s.*$/) { - return "In the '$tag', do not put a space after a $symbols{$s}" + return "In the '$tag', do not put a space after the $symbols{$s}" } } foreach my $s (@space_before) { if ($value =~ /^.*[^\s]\Q$s\E.*$/) { - return "In the '$tag', put a space before a $symbols{$s}" + return "In the '$tag', put a space before the $symbols{$s}" } } foreach my $s (@space_after) { my $p = join('', @no_space_before); if ($value =~ /^.*\Q$s\E[^\s\Q$p\E].*$/) { - return "In the '$tag', put a space after a $symbols{$s}" + return "In the '$tag', put a space after the $symbols{$s}" } } foreach my $s (@spaces_around) { if ($value =~ /^.*[^\s]\Q$s\E.*$/ or $value =~ /^.*\Q$s\E[^\s].*$/) { - return "In the '$tag', put spaces around a $symbols{$s}" + return "In the '$tag', put spaces around the $symbols{$s}" } } foreach my $s (@no_spaces_around) { if ($value =~ /^.*\s\Q$s\E\s.*$/) { - return "In the '$tag', don't put spaces around a $symbols{$s}" + return "In the '$tag', don't put spaces around the $symbols{$s}" } } } } +# Check that the type is small letters. +sub check_type_capitalization { + my (%entry) = @_; + my $type = $entry{':type'}; + if (not $type =~ /^[a-z]+$/) { + return "The type '$type' must be lower-cased" + } +} + # Check that no values have non-ASCII symbols. sub check_ascii { my (%entry) = @_; @@ -463,7 +472,7 @@ sub entries { warning("Each BibTeX entry must start with '\@', what is '$char'?"); last; } - } elsif ($char =~ /[a-z]/ and $s eq 'start') { + } elsif ($char =~ /[a-zA-Z]/ and $s eq 'start') { # @article } elsif ($char eq '{' and $s eq 'start') { $entry{':type'} = substr($acc, 1); @@ -472,7 +481,7 @@ sub entries { } elsif ($char =~ /[a-zA-Z0-9]/ and $s eq 'body') { $acc = ''; $s = 'tag'; - } elsif ($char =~ /[a-zA-Z0-9_\.\-\/]/ and $s eq 'tag') { + } elsif ($char =~ /[a-zA-Z0-9_\.\-\/:]/ and $s eq 'tag') { # reading the tag } elsif ($char =~ /[a-zA-Z0-9]/ and $s eq 'value') { # reading the value without quotes or brackets @@ -631,7 +640,7 @@ if (@ARGV+0 eq 0 or exists $args{'--help'} or exists $args{'-?'}) { " --latex Report errors in LaTeX format using \\PackageWarningNoLine command\n\n" . "If any issues, report to GitHub: https://github.com/yegor256/bibcop"); } elsif (exists $args{'--version'} or exists $args{'-v'}) { - info('0.0.8'); + info('0.0.9'); } else { my ($file) = grep { not($_ =~ /^--.*$/) } @ARGV; if (not $file) { diff --git a/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx b/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx index d3b34027c7f..e688e2379e4 100644 --- a/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx +++ b/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{bibcop} %<*package> -[2023-01-29 0.0.8 Style Checker of Bibliography Files] +[2023-02-13 0.0.9 Style Checker of Bibliography Files] %</package> %<*driver> \documentclass{ltxdoc} diff --git a/Master/texmf-dist/tex/latex/bibcop/bibcop.sty b/Master/texmf-dist/tex/latex/bibcop/bibcop.sty index 41d57b62823..d3c5a1287f3 100644 --- a/Master/texmf-dist/tex/latex/bibcop/bibcop.sty +++ b/Master/texmf-dist/tex/latex/bibcop/bibcop.sty @@ -31,7 +31,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bibcop} -[2023-01-29 0.0.8 Style Checker of Bibliography Files] +[2023-02-13 0.0.9 Style Checker of Bibliography Files] |