Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider providing bibtex-tidy #742

Open
sbrugman opened this issue Jun 29, 2022 · 2 comments
Open

Consider providing bibtex-tidy #742

sbrugman opened this issue Jun 29, 2022 · 2 comments

Comments

@sbrugman
Copy link

sbrugman commented Jun 29, 2022

There is this tool bibtex-tidy that helps formatting and checking bib files, improving the overal quality (e.g. prevent duplicates in DOI and keys, consistent ordering of keys). We could consider providing this tool as a utility to authors.

The author instructions contain pointers on using bib, namely:

All citations that have DOIs should include those DOIs in the paper's references section, see mybib.bib.

Moreover, scoobies provides a check references command. This feature would be complementary.

One additional sentence could point towards this utility.

Possible implementation

Alternatively, the pre-commit hook seems like a way to help authors even further, without having tight integration (pre-commit points to the repository).

.pre-commit-config.yaml:

repos:
-   repo: https://github.com/FlamingTempura/bibtex-tidy
    rev: v1.8.5
    hooks:
    - id: bibtex-tidy
      args:
      - '--curly'
      - '--numeric'
      - '--tab'
      - '--align=13'
      - '--duplicates=key,doi'
      - '--no-escape'
      - '--sort-fields=title,shorttitle,author,year,month,day,journal,booktitle,location,on,publisher,address,series,volume,number,pages,doi,isbn,issn,url,urldate,copyright,category,note,metadata'
      - '--no-remove-dupe-fields'

Format and check .bib files in the repository:
pre-commit run --all-files

Happy to contribute a PR if this feature is deemed desirable.

@deniederhut
Copy link
Member

Ooh thanks for the suggestion! We're all pretty swamped right now getting everything reviewed in time for the conference -- is it okay if we revisit this after the conference?

@sbrugman
Copy link
Author

sbrugman commented Jul 1, 2022

No problem, looking forward to the conference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants