Directory biblio/bibtex/utils/bibcop
Bibcop: Style Checker of BibTeX .bib files
This LaTeX package checks the quality of your .bib
file and emits warning message if any issues are found. You may also like biblint and biblatex-check tools — they do almost the same but from the command line.
Read this blog post,in order to understand the motivation behind this package.
First, install it from CTAN and then use in the preamble (if you use BibTeX, for example):
\documentclass{article} \usepackage{bibcop} \begin{document} \bibliographystyle{plain} \bibliography{main} \end{document}
You can also add it as a GitHub Action to your GitHub repository, with the help of bibcop-action.
Otherwise, you can download bibcop.sty
and add to your project (together with bibcop.pl
!).
You can also download bibcop.pl
and use it as a command line tool to check your .bib
files and to auto-fix them (you should have Perl installed):
perl bibcop.pl --fix main.bib > fixed.bib
This command will read the main.bib
file and create fixed.bib
, which will have the fixed and properly formatted content (well, to some extent). Be careful, all comments will be removed.
You can also make changes inline, not creating a new file:
perl bibcop.pl --fix --in-place main.bib
If you install the package using tlmgr
, you should be able to use bibcop
directly, without the necessity to mention Perl:
tlgmr install bibcop bibcop --help
How to Contribute
If you want to contribute yourself, make a fork, then create a branch, then run l3build ctan
in the root directory. It should compile everything without errors. If not, submit an issue and wait. Otherwise, make your changes and then run l3build ctan
again. If the build is still clean, submit a pull request.
If you want to add a new check, add it as a Perl subroutine to the bibcop.pl
file. Don't forget to add a test to one of the test files that stay in the perl-tests/
directory. When ready, run this, in order to check that all tests pass:
perl tests.pl
You should see the GREAT!
message.
Copyright (c) 2022-2024 Yegor Bugayenko, MIT License
Download the contents of this package in one zip archive (269.5k).
bibcop – Style checker for .bib files
This LaTeX package checks the quality of your .bib file and emits warning messages if any issues are found. For this, the TeX processor must be run with the --shell-escape option, and Perl must be installed.
bibcop.pl can also be used as a standalone command line tool.
The package does not work on Windows.
Package | bibcop |
Repository | https://github.com/yegor256/bibcop |
Version | 0.0.23 2024-11-13 |
Licenses | MIT License |
Copyright | 2022–2024 Yegor Bugayenko |
Maintainer | Yegor Bugayenko |
Contained in | TeX Live as bibcop MiKTeX as bibcop |
Topics | Biblio support External code |