texlive[65816] trunk: bibcop (13feb23)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 13 21:50:23 CET 2023


Revision: 65816
          http://tug.org/svn/texlive?view=revision&revision=65816
Author:   karl
Date:     2023-02-13 21:50:23 +0100 (Mon, 13 Feb 2023)
Log Message:
-----------
bibcop (13feb23)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl
    trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
    trunk/Master/texmf-dist/doc/bibtex/bibcop/README.md
    trunk/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf
    trunk/Master/texmf-dist/doc/man/man1/bibcop.1
    trunk/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf
    trunk/Master/texmf-dist/scripts/bibcop/bibcop.pl
    trunk/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx
    trunk/Master/texmf-dist/tex/latex/bibcop/bibcop.sty

Modified: trunk/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl	2023-02-13 18:17:01 UTC (rev 65815)
+++ trunk/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl	2023-02-13 20:50:23 UTC (rev 65816)
@@ -36,7 +36,7 @@
 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 @@
     }
     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 @@
         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 @@
     } 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 @@
     "      --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) {

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl	2023-02-13 18:17:01 UTC (rev 65815)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl	2023-02-13 20:50:23 UTC (rev 65816)
@@ -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 @@
   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 @@
   # 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"; }

Modified: trunk/Master/texmf-dist/doc/bibtex/bibcop/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/bibtex/bibcop/README.md	2023-02-13 18:17:01 UTC (rev 65815)
+++ trunk/Master/texmf-dist/doc/bibtex/bibcop/README.md	2023-02-13 20:50:23 UTC (rev 65816)
@@ -36,6 +36,7 @@
 
 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:

Modified: trunk/Master/texmf-dist/doc/bibtex/bibcop/bibcop.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/bibcop.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/bibcop.1	2023-02-13 18:17:01 UTC (rev 65815)
+++ trunk/Master/texmf-dist/doc/man/man1/bibcop.1	2023-02-13 20:50:23 UTC (rev 65816)
@@ -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

Modified: trunk/Master/texmf-dist/doc/man/man1/bibcop.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/bibcop/bibcop.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/bibcop/bibcop.pl	2023-02-13 18:17:01 UTC (rev 65815)
+++ trunk/Master/texmf-dist/scripts/bibcop/bibcop.pl	2023-02-13 20:50:23 UTC (rev 65816)
@@ -36,7 +36,7 @@
 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 @@
     }
     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 @@
         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 @@
     } 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 @@
     "      --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) {

Modified: trunk/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx
===================================================================
--- trunk/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx	2023-02-13 18:17:01 UTC (rev 65815)
+++ trunk/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx	2023-02-13 20:50:23 UTC (rev 65816)
@@ -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}

Modified: trunk/Master/texmf-dist/tex/latex/bibcop/bibcop.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bibcop/bibcop.sty	2023-02-13 18:17:01 UTC (rev 65815)
+++ trunk/Master/texmf-dist/tex/latex/bibcop/bibcop.sty	2023-02-13 20:50:23 UTC (rev 65816)
@@ -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]
 
 
 



More information about the tex-live-commits mailing list.