Skip to content

Commit

Permalink
#30 --no:inproc
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 18, 2023
1 parent 22e51e0 commit 004b9a0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions bibcop.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
% \item |nocaps| disables the major words capitalization requirement for all titles and book titles;
% \item |nowraps| disables the requirement for double curly braces in all titles and book titles;
% \item |nodoi| disables the requirement for the |doi| tag in all entries.
% \item |inproc| disables the requirement for the |booktitle| tag in |@inproceedings| entries to start with ``Proceedings of the''.
% \end{itemize}

% \section{The Rules}
Expand Down Expand Up @@ -215,6 +216,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
Expand Down Expand Up @@ -372,6 +374,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}:
Expand Down Expand Up @@ -421,6 +424,7 @@ booktitle = {{Proceedings of the International
\RequirePackage{pgfopts}
\pgfkeys{
/bibcop/.cd,
noinproc/.store in=\bibcop@noinproc,
nocaps/.store in=\bibcop@nocaps,
nodoi/.store in=\bibcop@nodoi,
nowraps/.store in=\bibcop@nowraps,
Expand Down Expand Up @@ -451,6 +455,7 @@ booktitle = {{Proceedings of the International
\newcommand\bibcop@exec[1]{
\iexec{\bibcop@script\space
\ifdefined\bibcop@verbose--verbose\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
Expand Down
8 changes: 6 additions & 2 deletions bibcop.pl
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ sub check_year_in_titles {

# Check the right format of the 'booktitle' in the 'inproceedings' entry.
sub check_booktile_of_inproceedings {
if (exists $args{'--no:inproc'}) {
return;
}
my (%entry) = @_;
my $tag = 'inproceedings';
if ($entry{':type'} eq $tag) {
Expand Down Expand Up @@ -747,9 +750,10 @@ sub warning {
" --fix Fix the errors and print a new version of the .bib file to the console\n" .
" --verbose Print supplementary debugging information\n" .
" --no:XXX Disable one of the following checks (e.g. --no:wraps):\n" .
" caps All major words in titles and book titles must be capitalized\n" .
" wraps Double curly braces are required around titles and book titles\n" .
" caps All major words in titles and booktitles must be capitalized\n" .
" wraps Double curly braces are required around titles and booktitles\n" .
" doi The presence of the 'doi' tag is mandatory in all entries\n" .
" inproc The booktitle of \@inproceedings must start with 'Proceedings of the'\n" .
" --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'}) {
Expand Down
2 changes: 1 addition & 1 deletion testfiles/bibtex.luatex.tlg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
LaTeX Warning: Citation `dijkstra1968letters' on page 1 undefined on input line ....
runsystem((perl ./bibcop.pl --verbose --latex 'main.bib') > iexec.tmp 2>&1; /bin/echo -n $?% >iexec.ret)...executed
runsystem((perl ./bibcop.pl --verbose --latex 'main.bib') > iexec.tmp 2>&1; /bin/echo -n $?% >iexec.ret)...executed
(iexec.tmp bibcop: 1 entries found in main.bib
bibcop: Checking dijkstra1968letters (no.0)...
Package bibcop Warning: All minor words in the 'title' must be lower-cased, while 'To' (no.6) is not, in the 'dijkstra1968letters' entry.
Expand Down
2 changes: 1 addition & 1 deletion testfiles/bibtex.tlg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
LaTeX Warning: Citation `dijkstra1968letters' on page 1 undefined on input line ....
runsystem((perl ./bibcop.pl --verbose --latex 'main.bib') > iexec.tmp 2>&1; /bin/echo -n $?% >iexec.ret)...executed.
runsystem((perl ./bibcop.pl --verbose --latex 'main.bib') > iexec.tmp 2>&1; /bin/echo -n $?% >iexec.ret)...executed.
(iexec.tmp bibcop: 1 entries found in main.bib
bibcop: Checking dijkstra1968letters (no.0)...
Package bibcop Warning: All minor words in the 'title' must be lower-cased, while 'To' (no.6) is not, in the 'dijkstra1968letters' entry.
Expand Down
2 changes: 1 addition & 1 deletion testfiles/bibtex.xetex.tlg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
LaTeX Warning: Citation `dijkstra1968letters' on page 1 undefined on input line ....
runsystem((perl ./bibcop.pl --verbose --latex 'main.bib') > iexec.tmp 2>&1; /bin/echo -n $?% >iexec.ret)...executed.
runsystem((perl ./bibcop.pl --verbose --latex 'main.bib') > iexec.tmp 2>&1; /bin/echo -n $?% >iexec.ret)...executed.
(iexec.tmp bibcop: 1 entries found in main.bib
bibcop: Checking dijkstra1968letters (no.0)...
Package bibcop Warning: All minor words in the 'title' must be lower-cased, while 'To' (no.6) is not, in the 'dijkstra1968letters' entry.
Expand Down

0 comments on commit 004b9a0

Please sign in to comment.