summaryrefslogtreecommitdiff
path: root/biblio
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-16 03:02:08 +0000
committerNorbert Preining <norbert@preining.info>2024-03-16 03:02:08 +0000
commit966f9ba332e49c29e961cb86e08f97d70eda51f6 (patch)
treee111edb864721bb0dac9db16b4e41a8a489ea456 /biblio
parent12679ab7d3c2a210f4123163671b532b8b55d5f9 (diff)
CTAN sync 202403160302
Diffstat (limited to 'biblio')
-rw-r--r--biblio/bibtex/utils/bibcop/bibcop.12
-rw-r--r--biblio/bibtex/utils/bibcop/bibcop.dtx2
-rw-r--r--biblio/bibtex/utils/bibcop/bibcop.pdfbin347804 -> 347801 bytes
-rwxr-xr-xbiblio/bibtex/utils/bibcop/bibcop.pl71
-rw-r--r--biblio/ctan-bibdata/ctan.bib87
5 files changed, 114 insertions, 48 deletions
diff --git a/biblio/bibtex/utils/bibcop/bibcop.1 b/biblio/bibtex/utils/bibcop/bibcop.1
index 725f82cfce..8e8c5cfc0d 100644
--- a/biblio/bibtex/utils/bibcop/bibcop.1
+++ b/biblio/bibtex/utils/bibcop/bibcop.1
@@ -1,4 +1,4 @@
-.TH bibcop 1 "2024-01-17"
+.TH bibcop 1 "2024-03-15"
.SH NAME
bibcop \- Style Checker and Fixer of BibTeX Files (.bib)
.SH SYNOPSIS
diff --git a/biblio/bibtex/utils/bibcop/bibcop.dtx b/biblio/bibtex/utils/bibcop/bibcop.dtx
index 00a162fb81..e1ab46aa8e 100644
--- a/biblio/bibtex/utils/bibcop/bibcop.dtx
+++ b/biblio/bibtex/utils/bibcop/bibcop.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{bibcop}
%<*package>
-[2024-01-17 0.0.19 Style Checker of Bibliography Files]
+[2024-03-15 0.0.20 Style Checker of Bibliography Files]
%</package>
%<*driver>
\documentclass{ltxdoc}
diff --git a/biblio/bibtex/utils/bibcop/bibcop.pdf b/biblio/bibtex/utils/bibcop/bibcop.pdf
index 7181610159..57e80dcc82 100644
--- a/biblio/bibtex/utils/bibcop/bibcop.pdf
+++ b/biblio/bibtex/utils/bibcop/bibcop.pdf
Binary files differ
diff --git a/biblio/bibtex/utils/bibcop/bibcop.pl b/biblio/bibtex/utils/bibcop/bibcop.pl
index 89d101eccf..e35e984962 100755
--- a/biblio/bibtex/utils/bibcop/bibcop.pl
+++ b/biblio/bibtex/utils/bibcop/bibcop.pl
@@ -21,12 +21,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-# 2024-01-17 0.0.19
+# 2024-03-15 0.0.20
package bibcop;
use warnings;
use strict;
use File::Basename;
+use Time::Piece;
# Hash of incoming command line arguments.
my %args = map { $_ => 1 } @ARGV;
@@ -36,10 +37,10 @@ my %args = map { $_ => 1 } @ARGV;
# Only these tags are allowed and only these types of entries.
my %blessed = (
- 'article' => ['doi', 'year', 'title', 'author', 'journal', 'volume', 'number', 'publisher?', 'pages?'],
- 'inproceedings' => ['doi', 'booktitle', 'title', 'author', 'year', 'pages?', 'organization?', 'volume?'],
+ 'article' => ['doi', 'year', 'title', 'author', 'journal', 'volume', 'number', 'month?', 'publisher?', 'pages?'],
+ 'inproceedings' => ['doi', 'booktitle', 'title', 'author', 'year', 'pages?', 'month?', 'organization?', 'volume?'],
'book' => ['title', 'author', 'year', 'publisher', 'doi?'],
- 'misc' => ['title', 'author', 'year', 'eprint?', 'archiveprefix?', 'primaryclass?', 'publisher?', 'organization?', 'doi?', 'url?'],
+ 'misc' => ['title', 'author', 'year', 'eprint?', 'archiveprefix?', 'primaryclass?', 'month?', 'publisher?', 'organization?', 'doi?', 'howpublished?', 'note?'],
);
# See https://research.arizona.edu/faq/what-do-you-mean-when-you-say-use-title-case-proposalproject-titles
@@ -235,7 +236,7 @@ sub check_org_in_booktitle {
return;
}
my (%entry) = @_;
- my @orgs = ( 'ACM', 'IEEE' );
+ my @orgs = qw/ACM IEEE/;
if (exists($entry{'booktitle'})) {
my $title = $entry{'booktitle'};
foreach my $o (@orgs) {
@@ -428,7 +429,7 @@ sub check_month {
my (%entry) = @_;
if (exists $entry{'month'}) {
my $month = $entry{'month'};
- if (not $month =~ /^[1-9]|10|11|12$/) {
+ if (not $month =~ /^[1-9]|10|11|12|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec$/) {
return "The format of the 'month' is wrong"
}
}
@@ -530,14 +531,26 @@ sub entry_fix {
my $tags = $blessed{$type};
my %allowed = map { $_ => 1 } @$tags;
my @lines;
+ if (exists $entry{'booktitle'} and $entry{':type'} eq 'article') {
+ $entry{'journal'} = $entry{'booktitle'};
+ }
+ if (exists $entry{'journal'} and $entry{':type'} eq 'inproceedings') {
+ $entry{'booktitle'} = $entry{'journal'};
+ }
foreach my $tag (keys %entry) {
if ($tag =~ /^:/) {
next;
}
+ my $value = clean_tex($entry{$tag});
+ if ($tag eq 'url') {
+ my $today = localtime->strftime('%d-%m-%Y');
+ push(@lines, " howpublished = {\\url{$value}},");
+ push(@lines, " note = {[Online; accessed $today]},");
+ next;
+ }
if (not exists $allowed{$tag} and not exists $allowed{$tag . '?'}) {
next;
}
- my $value = clean_tex($entry{$tag});
my $fixer = "fix_$tag";
my $fixed = $value;
if (defined &{$fixer}) {
@@ -562,10 +575,22 @@ sub entry_fix {
sub fix_author {
my ($value) = @_;
+ $value =~ s/\s{2,}/ /g;
my @authors = split(/\s+and\s+/, $value);
foreach my $author (@authors) {
$author =~ s/^\s+|\s+$//g;
+ if (index($author, '{') != -1 or index($author, '}') != -1) {
+ next;
+ }
$author =~ s/ ([A-Z])($| )/ $1.$2/g;
+ if (index($author, ',') eq -1) {
+ my @words = split(/\s+/, $author);
+ my $total = @words+0;
+ if ($total gt 1) {
+ $author = $words[$total - 1] . ', ' . join(' ', @words[0 .. $total - 2]);
+ }
+ }
+ $author =~ s/^\s+|\s+$//g;
}
return join(' and ', @authors);
}
@@ -585,11 +610,9 @@ sub fix_capitalization {
if (not $word =~ /^[A-Za-z]/) {
next;
}
- if (exists $minors{$word}) {
- next;
- }
- if (exists $minors{lc($word)} and $pos gt 1) {
- $word = lc($word);
+ my $lc = lc($word);
+ if (exists $minors{$lc} and $pos gt 1 and not $words[$pos - 2] =~ /:$/) {
+ $word = $lc;
next;
}
if ($word =~ /^[a-z].*/) {
@@ -647,6 +670,11 @@ sub fix_booktitle {
if (index($value, 'Proceedings ') != 0) {
$value = 'Proceedings of the ' . $value;
}
+ $value =~ s/ (19|20)[0-9]{2} / /g;
+ my @orgs = qw/ACM IEEE ACM\/IEEE IEEE\/ACM/;
+ foreach my $org (@orgs) {
+ $value =~ s/ \Q$org\E / /g;
+ }
return $value;
}
@@ -656,15 +684,26 @@ sub fix_journal {
return $value;
}
+sub fix_org_name {
+ my ($value) = @_;
+ my @orgs = qw/ACM IEEE/;
+ foreach my $org (@orgs) {
+ $value =~ s/^\Q$org\E($|[^A-Z0-9a-z].*$)/$org/g;
+ }
+ return $value;
+}
+
sub fix_publisher {
my ($value) = @_;
$value = fix_capitalization($value);
+ $value = fix_org_name($value);
return $value;
}
sub fix_organization {
my ($value) = @_;
$value = fix_capitalization($value);
+ $value = fix_org_name($value);
return $value;
}
@@ -919,7 +958,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.19 2024-01-17');
+ info('0.0.20 2024-03-15');
} else {
my ($file) = grep { not($_ =~ /^-.*$/) } @ARGV;
if (not $file) {
@@ -930,9 +969,15 @@ if (@ARGV+0 eq 0 or exists $args{'--help'} or exists $args{'-?'}) {
my @entries = entries($bib);
if (exists $args{'--fix'}) {
my $fixed = '';
+ my %seen;
for my $i (0..(@entries+0 - 1)) {
my %entry = %{ $entries[$i] };
+ my $name = $entry{':name'};
+ if (exists $seen{$name}) {
+ next;
+ }
$fixed = $fixed . entry_fix(%entry);
+ $seen{$name} = 1;
}
if (exists $args{'-i'} or exists $args{'--in-place'}) {
open(my $out, '>', $file) or error('Cannot open file for writing: ' . $file);
diff --git a/biblio/ctan-bibdata/ctan.bib b/biblio/ctan-bibdata/ctan.bib
index 949b182705..893d94190c 100644
--- a/biblio/ctan-bibdata/ctan.bib
+++ b/biblio/ctan-bibdata/ctan.bib
@@ -1,7 +1,7 @@
%% bib file of all CTAN packages
%% (C) Herbert Voß
%%
-%% created at 14-03-2024, 02:00:04
+%% created at 15-03-2024, 02:00:04
%%
%% This file is provided under the terms of the LPPL v1.3 or
@@ -20785,8 +20785,8 @@
title = {The \texttt{easybook} package},
subtitle = {Easily typesetting Chinese theses or books},
author = {Qu Yi},
- date = {2024-02-28},
- version = {2024an},
+ date = {2024-03-14},
+ version = {2024ao},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/easybook},
url = {https://ctan.org/pkg/easybook},
@@ -24364,7 +24364,7 @@
title = {The \texttt{expl3} package},
subtitle = {Wrapper package for experimental \LaTeX{}3},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3kernel},
@@ -34148,8 +34148,8 @@
title = {The \texttt{incgraph} package},
subtitle = {Sophisticated graphics inclusion in a PDF document},
author = {Thomas F. Sturm},
- date = {2021-10-20},
- version = {1.2.0},
+ date = {2024-03-14},
+ version = {1.3.0},
license = {lppl1.3},
mirror = {https://mirror.ctan.org/macros/latex/contrib/incgraph},
url = {https://ctan.org/pkg/incgraph},
@@ -35820,8 +35820,8 @@
title = {The \texttt{jnuexam} package},
subtitle = {Exam class for Jinan University},
author = {Jianrui Lyu},
- date = {2024-02-14},
- version = {2.1.1},
+ date = {2024-03-14},
+ version = {2024E},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/jnuexam},
url = {https://ctan.org/pkg/jnuexam},
@@ -37316,7 +37316,7 @@
title = {The \texttt{l3backend} package},
subtitle = {LaTeX3 backend drivers},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3backend},
@@ -37338,7 +37338,7 @@
title = {The \texttt{l3docstrip} package},
subtitle = {Strip documentation in \LaTeX{}3 source},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3kernel},
@@ -37349,7 +37349,7 @@
title = {The \texttt{l3experimental} package},
subtitle = {Experimental \LaTeX{}3 concepts},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3experimental},
@@ -37360,7 +37360,7 @@
title = {The \texttt{l3kernel} package},
subtitle = {LaTeX3 programming conventions},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3kernel},
@@ -37371,7 +37371,7 @@
title = {The \texttt{l3keys2e} package},
subtitle = {LaTeX2e option processing using \LaTeX{}3 keys},
author = {{The LaTeX Project Team}},
- date = {2024-02-18},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3packages},
@@ -37382,7 +37382,7 @@
title = {The \texttt{l3packages} package},
subtitle = {High-level \LaTeX{}3 concepts},
author = {{The LaTeX Project Team}},
- date = {2024-02-18},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3packages},
@@ -37393,13 +37393,24 @@
title = {The \texttt{l3regex} package},
subtitle = {Regular expression facilities for \LaTeX{}},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3kernel/l3regex.dtx},
url = {https://ctan.org/pkg/l3regex},
}
+@manual{ctan-l3sys-query,
+ title = {The \texttt{l3sys-query} package},
+ subtitle = {System queries for \LaTeX{} using Lua},
+ author = {{The LaTeX Project Team}},
+ date = {2024-03-14},
+ version = {},
+ license = {mit},
+ mirror = {https://mirror.ctan.org/support/l3sys-query},
+ url = {https://ctan.org/pkg/l3sys-query},
+}
+
@manual{ctan-la,
title = {The \texttt{la} package},
subtitle = {School handwriting fonts},
@@ -38998,6 +39009,20 @@
url = {https://ctan.org/pkg/latino-sine-flexione},
}
+@manual{ctan-lato-math,
+ title = {The \texttt{lato-math} package},
+ subtitle = {Lato based OpenType Math font for LuaTeX and XeTeX},
+ author = {Daniel Flipo and Chenjing Bu},
+ date = {2024-03-14},
+ version = {0.36},
+ license = {lppl1.3c,ofl},
+ mirror = {https://mirror.ctan.org/fonts/lato-math},
+ url = {https://ctan.org/pkg/lato-math},
+ annotation = {This package provides a Unicode Math font
+ meant to be used together with Lato sans-serif TrueType
+ Text fonts in LuaLaTeX or \XeLaTeX{} documents.},
+}
+
@manual{ctan-lato,
title = {The \texttt{lato} package},
subtitle = {Lato font family and \LaTeX{} support},
@@ -41154,10 +41179,9 @@
@manual{ctan-lshort-german,
title = {The \texttt{lshort-german} package},
- subtitle = {German version of A Short
- Introduction to \LaTeX{}2e: \LaTeX{}2e-Kurzbeschreibung},
- author = {Walter A. Schmidt and Patrick Gundlach and Marco Daniel},
- date = {2020-06-17},
+ subtitle = {German version of “A Short Introduction to \LaTeX{}2e”: \LaTeX{}2e-Kurzbeschreibung},
+ author = {Walter A. Schmidt and Patrick Gundlach and Marco Daniel and Oliver Kopp},
+ date = {2024-03-14},
version = {3.0c},
license = {opl},
mirror = {https://mirror.ctan.org/info/lshort/german},
@@ -42946,8 +42970,7 @@
title = {The \texttt{mactex-basic} package},
subtitle = {A basic \TeX{} distribution for the Macintosh},
author = {{TUG TWG-MacTeX}},
- date = {2021-08-26},
- version = {},
+ date = {2024-03-14},
license = {other-free},
mirror = {https://mirror.ctan.org/systems/mac/mactex/BasicTeX.pkg},
url = {https://ctan.org/pkg/mactex-basic},
@@ -42957,8 +42980,7 @@
title = {The \texttt{mactex} package},
subtitle = {The \TeX{} Live Mac distribution},
author = {{TUG TWG-MacTeX}},
- date = {2024-02-01},
- version = {},
+ date = {2024-03-14},
license = {other-free},
mirror = {https://mirror.ctan.org/systems/mac/mactex},
url = {https://ctan.org/pkg/mactex},
@@ -42968,8 +42990,7 @@
title = {The \texttt{mactextras} package},
subtitle = {Extras for the MacTeX distribution},
author = {{TUG TWG-MacTeX}},
- date = {2023-03-20},
- version = {},
+ date = {2024-03-14},
license = {other-free},
mirror = {https://mirror.ctan.org/systems/mac/mactex/MacTeXtras.zip},
url = {https://ctan.org/pkg/mactextras},
@@ -69113,8 +69134,8 @@
title = {The \texttt{texlive} package},
subtitle = {A comprehensive distribution of \TeX{} and friends},
author = {{The TeX Live Team}},
- date = {2023-03-20},
- version = {2023},
+ date = {2024-03-14},
+ version = {2024},
license = {other-free},
mirror = {https://mirror.ctan.org/systems/texlive/Images},
url = {https://ctan.org/pkg/texlive},
@@ -73679,7 +73700,7 @@
title = {The \texttt{typstfun} package},
subtitle = {List of equivalent Typst function names of \LaTeX{} commands},
author = {Jianrui Lyu},
- date = {2024-02-28},
+ date = {2024-03-14},
version = {2024A},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/info/typstfun},
@@ -77816,7 +77837,7 @@
title = {The \texttt{xcoffins} package},
subtitle = {Rich boxed material for \LaTeX{} 3},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3experimental},
@@ -78313,7 +78334,7 @@
title = {The \texttt{xfp} package},
subtitle = {Interface to the \LaTeX{}3 floating point unit},
author = {{The LaTeX Project Team}},
- date = {2024-02-18},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3packages},
@@ -78340,7 +78361,7 @@
title = {The \texttt{xgalley} package},
subtitle = {Control text feeding onto the page},
author = {{The LaTeX Project Team}},
- date = {2024-02-20},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3experimental/xgalley.dtx},
@@ -78729,7 +78750,7 @@
title = {The \texttt{xparse} package},
subtitle = {A generic document command parser},
author = {{The LaTeX Project Team}},
- date = {2024-02-18},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3packages},
@@ -78994,7 +79015,7 @@
title = {The \texttt{xtemplate} package},
subtitle = {A high-level interface for declaring document commands},
author = {{The LaTeX Project Team}},
- date = {2024-02-18},
+ date = {2024-03-14},
version = {},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/l3packages},