diff options
author | Karl Berry <karl@freefriends.org> | 2023-05-18 20:06:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-05-18 20:06:03 +0000 |
commit | 31d1704511cf500f7d821eb1ad7e60c22ac54e03 (patch) | |
tree | 9eeaee8b3ee51fc7768088be4a2b90273740138a /Master/texmf-dist/source/bibtex | |
parent | 0ec4c76b6a8aad7050a93428c92b372d37e59436 (diff) |
bibcop (18may23)
git-svn-id: svn://tug.org/texlive/trunk@67145 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/bibtex')
-rw-r--r-- | Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx | 60 |
1 files changed, 51 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx b/Master/texmf-dist/source/bibtex/bibcop/bibcop.dtx index a1a5a08c99f..d29137b21bc 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-05-16 0.0.10 Style Checker of Bibliography Files] +[2023-05-18 0.0.11 Style Checker of Bibliography Files] %</package> %<*driver> \documentclass{ltxdoc} @@ -149,6 +149,27 @@ %</verb> %\fi +% \DescribeMacro{no*} +% It's possible to suppress certain rules, by using one of the |no*| package options: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\usepackage[nodoi,nowraps]{bibcop} +\end{verbatim} +%\iffalse +%</verb> +%\fi +% The following options are available: +% \begin{itemize}\setlength\itemsep{0pt} +% \item |nocaps| allows arbitrary capitalization in titles; +% \item |nowraps| allows titles to have no double curly braces; +% \item |nodoi| allows the absence of the |doi| tag in all entries; +% \item |noinproc| allows the |booktitle| tag in |@inproceedings| entries to not start with ``Proceedings of the''; +% \item |noorg| allows mentioning of ACM/IEEE in the |booktitle| tag; +% \item |notags| allows any tags and allow to miss important tags. +% \end{itemize} + % \section{The Rules} % This is a more or less complete list of rules enforced on a |.bib| file: @@ -197,6 +218,7 @@ title = {Structured Programming {with} Go {To} Statements} %\iffalse %</verb> %\fi +% This rule may be disabled by the |nocaps| package option. % \DescribeMacro{author} % The |author| must contain a list of authors separated by ``|and|''. Each author @@ -354,6 +376,7 @@ booktitle = {{Proceedings of the International %\iffalse %</verb> %\fi +% This rule may be disabled by the |noinproc| package option. % \DescribeMacro{arXiv} % If the |archivePrefix| is present, the |eprint| and the |primaryClass| must also be present and must adhere to the formatting principles of \href{https://arxiv.org/help/arxiv_identifier}{arXiv identifiers}: @@ -403,6 +426,12 @@ booktitle = {{Proceedings of the International \RequirePackage{pgfopts} \pgfkeys{ /bibcop/.cd, + notags/.store in=\bibcop@notags, + noorg/.store in=\bibcop@noorg, + noinproc/.store in=\bibcop@noinproc, + nocaps/.store in=\bibcop@nocaps, + nodoi/.store in=\bibcop@nodoi, + nowraps/.store in=\bibcop@nowraps, verbose/.store in=\bibcop@verbose, script/.store in = \bibcop@script, } @@ -423,6 +452,25 @@ booktitle = {{Proceedings of the International % \end{macrocode} % \end{macro} +% \begin{macro}{\bibcop@exec} +% Then, we define a supplementary command to execute the Perl script: +% \begin{macrocode} +\makeatletter +\newcommand\bibcop@exec[1]{ + \iexec{\bibcop@script\space + \ifdefined\bibcop@verbose--verbose\fi\space + \ifdefined\bibcop@notags--no:tags\fi\space + \ifdefined\bibcop@noinproc--no:org\fi\space + \ifdefined\bibcop@noinproc--no:inproc\fi\space + \ifdefined\bibcop@nodoi--no:doi\fi\space + \ifdefined\bibcop@nocaps--no:caps\fi\space + \ifdefined\bibcop@nowraps--no:wraps\fi\space + --latex '#1'}% + \message{bibcop: style checking finished for #1^^J}% +} +\makeatother + + % \begin{macro}{\bibliography} % Then, we re-define the |\bibliography| command: % \begin{macrocode} @@ -430,10 +478,7 @@ booktitle = {{Proceedings of the International \ifdefined\bibliography \let\bibcop@oldbibliography\bibliography \renewcommand\bibliography[1]{% - \iexec{\bibcop@script\space - \ifdefined\bibcop@verbose--verbose\fi\space - --latex '#1.bib'}% - \message{bibcop: style checking finished^^J}% + \bibcop@exec{#1.bib}% \bibcop@oldbibliography{#1}% } \fi @@ -448,10 +493,7 @@ booktitle = {{Proceedings of the International \ifdefined\addbibresource \let\bibcop@oldaddbibresource\addbibresource \renewcommand\addbibresource[1]{% - \iexec{\bibcop@script\space - \ifdefined\bibcop@verbose--verbose\fi\space - --latex '#1'}% - \message{bibcop: style checking finished^^J}% + \bibcop@exec{#1}% \bibcop@oldaddbibresource{#1}% } \fi |