summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-02-13 20:50:23 +0000
committerKarl Berry <karl@freefriends.org>2023-02-13 20:50:23 +0000
commitd9aae66cb8b9e21d51b9216d79b462465e57338e (patch)
tree75eea3b2189b3eef309a8809bcf6787191ca25fb
parentb4917a53cb17c6b5ceb787aa6a809807b48cfedd (diff)
bibcop (13feb23)
git-svn-id: svn://tug.org/texlive/trunk@65816 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/bibcop/bibcop.pl29
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/fmtutil.pl17
-rw-r--r--Master/texmf-dist/doc/bibtex/bibcop/README.md1
-rw-r--r--Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdfbin343290 -> 343290 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/bibcop.12
-rw-r--r--Master/texmf-dist/doc/man/man1/bibcop.man1.pdfbin13388 -> 13273 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/bibcop/bibcop.pl29
-rw-r--r--Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx2
-rw-r--r--Master/texmf-dist/tex/latex/bibcop/bibcop.sty2
9 files changed, 54 insertions, 28 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl b/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl
index fd774d90195..eb337fc365e 100755
--- a/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl
+++ b/Build/source/texk/texlive/linked_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/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl b/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
index 0db9ab94d81..a892b12d8cc 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $Id: fmtutil.pl 63934 2022-07-19 01:58:57Z preining $
+# $Id: fmtutil.pl 65770 2023-02-09 21:26:50Z karl $
# fmtutil - utility to maintain format files.
# (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.)
#
-# Copyright 2014-2021 Norbert Preining
+# Copyright 2014-2023 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -24,11 +24,11 @@ BEGIN {
TeX::Update->import();
}
-my $svnid = '$Id: fmtutil.pl 63934 2022-07-19 01:58:57Z preining $';
-my $lastchdate = '$Date: 2022-07-19 03:58:57 +0200 (Tue, 19 Jul 2022) $';
+my $svnid = '$Id: fmtutil.pl 65770 2023-02-09 21:26:50Z karl $';
+my $lastchdate = '$Date: 2023-02-09 22:26:50 +0100 (Thu, 09 Feb 2023) $';
$lastchdate =~ s/^\$Date:\s*//;
$lastchdate =~ s/ \(.*$//;
-my $svnrev = '$Revision: 63934 $';
+my $svnrev = '$Revision: 65770 $';
$svnrev =~ s/^\$Revision:\s*//;
$svnrev =~ s/\s*\$$//;
my $version = "r$svnrev ($lastchdate)";
@@ -709,6 +709,13 @@ sub rebuild_one_format {
# get rid of leading * in inifiles
$inifile =~ s/^\*//;
+ # Add -kanji-internal option for create (e-)p(La)TeX format
+ # with (e-)upTeX's pTeX compatible mode.
+ if ($eng =~ /^e?uptex$/ && $fmt =~ /^e?p/ && $addargs !~ /-kanji-internal=/) {
+ my $kanji = win32() ? "sjis" : "euc";
+ $addargs = "-kanji-internal=$kanji " . $addargs;
+ }
+
if ($fmt eq "metafun") { $prgswitch .= "mpost"; }
elsif ($fmt eq "mptopdf") { $prgswitch .= "context"; }
elsif ($fmt =~ m/^cont-..$/) { $prgswitch .= "context"; }
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
index 29fb6056bbf..09a4e1e5d00 100644
--- a/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf
+++ b/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf
Binary files differ
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
index 7dbcfeb2895..a41f85ad2fc 100644
--- a/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf
Binary files differ
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]