texlive[67510] trunk: bibcop (30jun23)
commits+karl at tug.org
commits+karl at tug.org
Fri Jun 30 22:49:44 CEST 2023
Revision: 67510
http://tug.org/svn/texlive?view=revision&revision=67510
Author: karl
Date: 2023-06-30 22:49:44 +0200 (Fri, 30 Jun 2023)
Log Message:
-----------
bibcop (30jun23)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl
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-06-29 23:43:10 UTC (rev 67509)
+++ trunk/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl 2023-06-30 20:49:44 UTC (rev 67510)
@@ -752,11 +752,18 @@
return '(' . join(', ', @sorted) . ')';
}
+# Make sure the text can safely be rendered in TeX.
+sub escape_tex {
+ my ($tex) = @_;
+ $tex =~ s/[^a-zA-Z0-9-.,+)(:;@ '"]/?/g;
+ return $tex;
+}
+
# Print ERROR message to the console and die.
sub error {
my ($txt) = @_;
if (exists $args{'--latex'}) {
- print "\\PackageError{bibcop}{$txt}{}\n";
+ print "\\PackageError{bibcop}{" . escape_tex($txt). "}{}\n";
} else {
print STDERR $txt . "\n";
}
@@ -768,7 +775,7 @@
my ($txt) = @_;
if (exists $args{'--verbose'}) {
if (exists $args{'--latex'}) {
- print "\\message{bibcop: $txt^^J}\n";
+ print "\\message{bibcop: " . escape_tex($txt) . "^^J}\n";
} else {
print $txt . "\n";
}
@@ -788,7 +795,7 @@
sub warning {
my ($txt) = @_;
if (exists $args{'--latex'}) {
- print "\\PackageWarningNoLine{bibcop}{$txt}\n";
+ print "\\PackageWarningNoLine{bibcop}{" . escape_tex($txt) . "}\n";
} else {
print $txt . "\n";
}
@@ -822,7 +829,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.13');
+ info('0.0.14');
} else {
my ($file) = grep { not($_ =~ /^--.*$/) } @ARGV;
if (not $file) {
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-06-29 23:43:10 UTC (rev 67509)
+++ trunk/Master/texmf-dist/doc/man/man1/bibcop.1 2023-06-30 20:49:44 UTC (rev 67510)
@@ -1,4 +1,4 @@
-.TH bibcop 1 "2023-06-04"
+.TH bibcop 1 "2023-06-30"
.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-06-29 23:43:10 UTC (rev 67509)
+++ trunk/Master/texmf-dist/scripts/bibcop/bibcop.pl 2023-06-30 20:49:44 UTC (rev 67510)
@@ -752,11 +752,18 @@
return '(' . join(', ', @sorted) . ')';
}
+# Make sure the text can safely be rendered in TeX.
+sub escape_tex {
+ my ($tex) = @_;
+ $tex =~ s/[^a-zA-Z0-9-.,+)(:;@ '"]/?/g;
+ return $tex;
+}
+
# Print ERROR message to the console and die.
sub error {
my ($txt) = @_;
if (exists $args{'--latex'}) {
- print "\\PackageError{bibcop}{$txt}{}\n";
+ print "\\PackageError{bibcop}{" . escape_tex($txt). "}{}\n";
} else {
print STDERR $txt . "\n";
}
@@ -768,7 +775,7 @@
my ($txt) = @_;
if (exists $args{'--verbose'}) {
if (exists $args{'--latex'}) {
- print "\\message{bibcop: $txt^^J}\n";
+ print "\\message{bibcop: " . escape_tex($txt) . "^^J}\n";
} else {
print $txt . "\n";
}
@@ -788,7 +795,7 @@
sub warning {
my ($txt) = @_;
if (exists $args{'--latex'}) {
- print "\\PackageWarningNoLine{bibcop}{$txt}\n";
+ print "\\PackageWarningNoLine{bibcop}{" . escape_tex($txt) . "}\n";
} else {
print $txt . "\n";
}
@@ -822,7 +829,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.13');
+ info('0.0.14');
} 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-06-29 23:43:10 UTC (rev 67509)
+++ trunk/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx 2023-06-30 20:49:44 UTC (rev 67510)
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{bibcop}
%<*package>
-[2023-06-04 0.0.13 Style Checker of Bibliography Files]
+[2023-06-30 0.0.14 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-06-29 23:43:10 UTC (rev 67509)
+++ trunk/Master/texmf-dist/tex/latex/bibcop/bibcop.sty 2023-06-30 20:49:44 UTC (rev 67510)
@@ -31,7 +31,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bibcop}
-[2023-06-04 0.0.13 Style Checker of Bibliography Files]
+[2023-06-30 0.0.14 Style Checker of Bibliography Files]
More information about the tex-live-commits
mailing list.