Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

LaTeX Package, a Style Checker of .bib Files: it emits warnings in the TeX log if any issues are found

License

NotificationsYou must be signed in to change notification settings

yegor256/bibcop

Repository files navigation

bibcop logo

l3buildCTANLicense

This LaTeX package checks the quality of your.bib file andemits warning message if any issues are found. You may also likebiblint andbiblatex-check tools —they doalmost the same but from the command line.

Readthis blog post, in order to understandthe motivation behind this package.

First,install it fromCTANand then use in the preamble(if you useBibTeX, for example):

\documentclass{article}\usepackage{bibcop}\begin{document}\bibliographystyle{plain}\bibliography{main}\end{document}

You can also add it as a GitHub Action to yourGitHub repository, with the help ofbibcop-action.

Otherwise, you can downloadbibcop.styand add to your project (together withbibcop.pl!).

You can also downloadbibcop.pland use it as a command line toolto check your.bib files and to auto-fix them(you should havePerl installed):

perl bibcop.pl --fix main.bib> fixed.bib

This command will read themain.bib file andcreatefixed.bib, which will have the fixed and properlyformatted 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 usingtlmgr,you should be able to usebibcop directly, without thenecessity to mention Perl:

tlmgr install bibcopbibcop --help

How to use as pre-commit hook

If you usepre-commit, simply add this to your config:

-repo:https://github.com/yegor256/bibcoprev:0.0.31hooks:    -id:bibcopargs:[]

How to Contribute

If you want to contribute yourself, make a fork, then create a branch,then runl3build ctan in the root directory. It should compileeverything without errors. If not, submit an issue and wait.Otherwise, make your changes and then runl3build 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 subroutineto thebibcop.pl file. Don't forget to add a test to one of the testfiles that stay in theperl-tests/ directory.When ready, run this, in order to check that all tests pass:

perl tests.pl

You should see theGREAT! message.

Copyright (c) 2022-2025 Yegor Bugayenko, MIT License


[8]ページ先頭

©2009-2025 Movatter.jp