diff options
author | Karl Berry <karl@freefriends.org> | 2023-01-08 20:57:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-01-08 20:57:20 +0000 |
commit | 1f7f32b389e54eea4a436928bf9dc90e149584f0 (patch) | |
tree | 3ef0be664cf3e807fef3ad76fedc396268c51f5c | |
parent | 8a0d639c7946c024c29e80af4fcd42c7ad5d274f (diff) |
bibcop (7jan23)
git-svn-id: svn://tug.org/texlive/trunk@65489 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bibcop/DEPENDS.txt | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bibcop/LICENSE.txt | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bibcop/README.md | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bibcop/bibcop.pdf | bin | 342237 -> 342958 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 | 13270 -> 13413 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/bibcop/bibcop.pl | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/bibcop/bibcop.dtx | 36 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/bibcop/bibcop.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bibcop/bibcop.sty | 21 |
11 files changed, 55 insertions, 31 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl b/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl index 9027dd483fa..3deda06e459 100755 --- a/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl +++ b/Build/source/texk/texlive/linked_scripts/bibcop/bibcop.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # (The MIT License) # -# Copyright (c) 2022 Yegor Bugayenko +# Copyright (c) 2022-2023 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal @@ -530,7 +530,7 @@ sub listed_tags { sub error { my ($txt) = @_; if (exists $args{'--latex'}) { - print "\\PackageError{bibcop}{$txt}\n"; + print "\\PackageError{bibcop}{$txt}{}\n"; exit 0; } else { print STDERR $txt . "\n"; @@ -581,7 +581,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.5'); + info('0.0.6'); } else { my ($file) = grep { not($_ =~ /^--.*$/) } @ARGV; if (not $file) { diff --git a/Master/texmf-dist/doc/latex/bibcop/DEPENDS.txt b/Master/texmf-dist/doc/latex/bibcop/DEPENDS.txt index 6767eafad4e..32acfffc047 100644 --- a/Master/texmf-dist/doc/latex/bibcop/DEPENDS.txt +++ b/Master/texmf-dist/doc/latex/bibcop/DEPENDS.txt @@ -1,3 +1,2 @@ hard iexec -hard verbatimcopy hard pgfopts diff --git a/Master/texmf-dist/doc/latex/bibcop/LICENSE.txt b/Master/texmf-dist/doc/latex/bibcop/LICENSE.txt index 463e7d252d4..4351be233c6 100644 --- a/Master/texmf-dist/doc/latex/bibcop/LICENSE.txt +++ b/Master/texmf-dist/doc/latex/bibcop/LICENSE.txt @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2022 Yegor Bugayenko +Copyright (c) 2022-2023 Yegor Bugayenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal diff --git a/Master/texmf-dist/doc/latex/bibcop/README.md b/Master/texmf-dist/doc/latex/bibcop/README.md index f3cf12395b2..471c4dcdcba 100644 --- a/Master/texmf-dist/doc/latex/bibcop/README.md +++ b/Master/texmf-dist/doc/latex/bibcop/README.md @@ -5,10 +5,10 @@ [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/bibcop/blob/master/LICENSE.txt) This LaTeX package checks the quality of your `.bib` file and -emits warning message if any issues found. You may also like +emits warning message if any issues are found. You may also like [biblint](https://github.com/Kingsford-Group/biblint) and [biblatex-check](https://github.com/pezmc/biblatex-check) tools — -they does almost the same but from the command line. +they do _almost_ the same but from the command line. First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages) from [CTAN](https://ctan.org/pkg/bibcop) @@ -23,9 +23,9 @@ and then use in the preamble (if you use BibTeX, for example): \end{document} ``` -Otherwise, you can download [`bibcop.sty`](https://raw.githubusercontent.com/yegor256/bibcop/gh-pages/bibcop/bibcop.sty) and add to your project. +Otherwise, you can download [`bibcop.sty`](https://raw.githubusercontent.com/yegor256/bibcop/gh-pages/bibcop/bibcop.sty) and add to your project (together with [`bibcop.pl`](https://raw.githubusercontent.com/yegor256/bibcop/master/bibcop.pl)!). -You can also download [bibcop.pl](https://raw.githubusercontent.com/yegor256/bibcop/master/bibcop.pl) +You can also download [`bibcop.pl`](https://raw.githubusercontent.com/yegor256/bibcop/master/bibcop.pl) and use it as a command line tool to check your `.bib` files and to auto-fix them (you should have [Perl](https://www.perl.org) installed): diff --git a/Master/texmf-dist/doc/latex/bibcop/bibcop.pdf b/Master/texmf-dist/doc/latex/bibcop/bibcop.pdf Binary files differindex 3acc1c3c705..19716613575 100644 --- a/Master/texmf-dist/doc/latex/bibcop/bibcop.pdf +++ b/Master/texmf-dist/doc/latex/bibcop/bibcop.pdf diff --git a/Master/texmf-dist/doc/man/man1/bibcop.1 b/Master/texmf-dist/doc/man/man1/bibcop.1 index ad76da0bf05..4e45ba6c027 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 "2022-12-18" +.TH bibcop 1 "2023-01-08" .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 6d97bd23e39..7d6a467d54f 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 9027dd483fa..3deda06e459 100755 --- a/Master/texmf-dist/scripts/bibcop/bibcop.pl +++ b/Master/texmf-dist/scripts/bibcop/bibcop.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # (The MIT License) # -# Copyright (c) 2022 Yegor Bugayenko +# Copyright (c) 2022-2023 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal @@ -530,7 +530,7 @@ sub listed_tags { sub error { my ($txt) = @_; if (exists $args{'--latex'}) { - print "\\PackageError{bibcop}{$txt}\n"; + print "\\PackageError{bibcop}{$txt}{}\n"; exit 0; } else { print STDERR $txt . "\n"; @@ -581,7 +581,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.5'); + info('0.0.6'); } else { my ($file) = grep { not($_ =~ /^--.*$/) } @ARGV; if (not $file) { diff --git a/Master/texmf-dist/source/latex/bibcop/bibcop.dtx b/Master/texmf-dist/source/latex/bibcop/bibcop.dtx index ce2e070d3e2..d084f009616 100644 --- a/Master/texmf-dist/source/latex/bibcop/bibcop.dtx +++ b/Master/texmf-dist/source/latex/bibcop/bibcop.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % (The MIT License) % -% Copyright (c) 2022 Yegor Bugayenko +% Copyright (c) 2022-2023 Yegor Bugayenko % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the 'Software'), to deal @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{bibcop} %<*package> -[2022-12-18 0.0.5 Style Checker of Bibliography Files] +[2023-01-08 0.0.6 Style Checker of Bibliography Files] %</package> %<*driver> \documentclass{ltxdoc} @@ -137,6 +137,18 @@ %</verb> %\fi +% \DescribeMacro{script} +% The package depends on the |bibcop.pl| file, which is a Perl script that does all the work. This file is supposed to be located either in the current directory or in the |texmf-dist/scripts/bibcop/| directory. Using the |script| option the location of the script may be explicitly defined (it is not recommended to use this option unless there is a special demand for it): +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\usepackage[script=my-perl-script.pl]{bibcop} +\end{verbatim} +%\iffalse +%</verb> +%\fi + % \section{The Rules} % This is a more or less complete list of rules enforced on a |.bib| file: @@ -375,6 +387,7 @@ booktitle = {{Proceedings of the International % \changes{0.0.4}{2022/12/14}{Extra checks for the typography, together with more extensive Perl testing.} % \changes{0.0.4}{2022/12/14}{The \texttt{--verbose} option introduced, to enable debugging information only on demand.} % \changes{0.0.4}{2022/12/15}{Package options introduced, the \texttt{verbose} option enables detailed logging inside the \TeX{} log.} +% \changes{0.0.6}{2023/01/08}{The \texttt{script} package option introduced, to enable explicit configuration of the location of the \texttt{bibcop.pl} Perl script.} % First, we include a few packages. % We need \href{https://ctan.org/pkg/iexec}{iexec} for executing Perl scripts: @@ -388,17 +401,22 @@ booktitle = {{Proceedings of the International \pgfkeys{ /bibcop/.cd, verbose/.store in=\bibcop@verbose, + script/.store in = \bibcop@script, } \ProcessPgfPackageOptions{/bibcop} % \end{macrocode} % \begin{macro}{bibcop.pl} -% Then, we copy the Perl script using |\VerbatimCopy| from -% \href{https://ctan.org/pkg/verbatimcopy}{verbatimcopy}: +% Then, we find the Perl script: % \begin{macrocode} -\RequirePackage{verbatimcopy} -\VerbatimCopy{bibcop.pl}{bibcop.tmp.pl} -\message{bibcop: File with Perl script 'bibcop.pl' copied^^J}% +\makeatletter +\ifdefined\bibcop@script\else + \IfFileExists{bibcop.pl} + {\gdef\bibcop@script{perl ./bibcop.pl}} + {\gdef\bibcop@script{bibcop}} +\fi +\message{bibcop: The Perl script is at '\bibcop@script'^^J}% +\makeatother % \end{macrocode} % \end{macro} @@ -409,7 +427,7 @@ booktitle = {{Proceedings of the International \ifdefined\bibliography \let\bibcop@oldbibliography\bibliography \renewcommand\bibliography[1]{% - \iexec{perl "./bibcop.tmp.pl"\space + \iexec{\bibcop@script\space \ifdefined\bibcop@verbose--verbose\fi\space --latex '#1.bib'}% \message{bibcop: style checking finished^^J}% @@ -427,7 +445,7 @@ booktitle = {{Proceedings of the International \ifdefined\addbibresource \let\bibcop@oldaddbibresource\addbibresource \renewcommand\addbibresource[1]{% - \iexec{perl "./bibcop.tmp.pl"\space + \iexec{\bibcop@script\space \ifdefined\bibcop@verbose--verbose\fi\space --latex '#1'}% \message{bibcop: style checking finished^^J}% diff --git a/Master/texmf-dist/source/latex/bibcop/bibcop.ins b/Master/texmf-dist/source/latex/bibcop/bibcop.ins index 4c619469dd8..d0ea50f43c0 100644 --- a/Master/texmf-dist/source/latex/bibcop/bibcop.ins +++ b/Master/texmf-dist/source/latex/bibcop/bibcop.ins @@ -1,6 +1,6 @@ %% (The MIT License) %% -%% Copyright (c) 2022 Yegor Bugayenko +%% Copyright (c) 2022-2023 Yegor Bugayenko %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the 'Software'), to deal @@ -26,7 +26,7 @@ \preamble (The MIT License) -Copyright (c) 2022 Yegor Bugayenko +Copyright (c) 2022-2023 Yegor Bugayenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal diff --git a/Master/texmf-dist/tex/latex/bibcop/bibcop.sty b/Master/texmf-dist/tex/latex/bibcop/bibcop.sty index c6561afc0b6..ceab34a3f4c 100644 --- a/Master/texmf-dist/tex/latex/bibcop/bibcop.sty +++ b/Master/texmf-dist/tex/latex/bibcop/bibcop.sty @@ -7,7 +7,7 @@ %% bibcop.dtx (with options: `package') %% (The MIT License) %% -%% Copyright (c) 2022 Yegor Bugayenko +%% Copyright (c) 2022-2023 Yegor Bugayenko %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the 'Software'), to deal @@ -31,7 +31,8 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bibcop} -[2022-12-18 0.0.5 Style Checker of Bibliography Files] +[2023-01-08 0.0.6 Style Checker of Bibliography Files] + @@ -66,18 +67,24 @@ \pgfkeys{ /bibcop/.cd, verbose/.store in=\bibcop@verbose, + script/.store in = \bibcop@script, } \ProcessPgfPackageOptions{/bibcop} -\RequirePackage{verbatimcopy} -\VerbatimCopy{bibcop.pl}{bibcop.tmp.pl} -\message{bibcop: File with Perl script 'bibcop.pl' copied^^J}% +\makeatletter +\ifdefined\bibcop@script\else + \IfFileExists{bibcop.pl} + {\gdef\bibcop@script{perl ./bibcop.pl}} + {\gdef\bibcop@script{bibcop}} +\fi +\message{bibcop: The Perl script is at '\bibcop@script'^^J}% +\makeatother \makeatletter \ifdefined\bibliography \let\bibcop@oldbibliography\bibliography \renewcommand\bibliography[1]{% - \iexec{perl "./bibcop.tmp.pl"\space + \iexec{\bibcop@script\space \ifdefined\bibcop@verbose--verbose\fi\space --latex '#1.bib'}% \message{bibcop: style checking finished^^J}% @@ -90,7 +97,7 @@ \ifdefined\addbibresource \let\bibcop@oldaddbibresource\addbibresource \renewcommand\addbibresource[1]{% - \iexec{perl "./bibcop.tmp.pl"\space + \iexec{\bibcop@script\space \ifdefined\bibcop@verbose--verbose\fi\space --latex '#1'}% \message{bibcop: style checking finished^^J}% |