Hello everyone,
I’ve just released plain.csl, a faithful reproduction of BibTeX’s classic plain.bst style. This means that you can now use the plain style directly in Typst and other CSL-compatible tools like Zotero or Mendeley. In Typst, simply add a #set bibliography(style: "plain.csl") rule and you’re good to go!
You can access the code on this GitHub repo.
I initially developed this for para-lipics, my Typst reproduction of the Dagstuhl LIPIcs template. However, since plain.bst is one of the most widely used bibliography styles of BibTeX (and therefore the world!), I hope that this work can benefit other projects and journal/conference templates!
1. Current limitations
I’ve tested plain.csl extensively against the original plain.bst. While the reproduction is quite faithful, there are some remaining discrepancies:
- Some features aren’t yet implemented in the CSL (e.g., right-aligned reference numbers)
- Some discrepancies arise from BibTeX → CSL conversion issues (e.g.,
@phdthesisand@masterthesisboth map to CSL’sthesistype;@conferencehas no CSL equivalent) - Some Typst/Hayagriva-specific quirks remain (e.g.,
@inbookconversion issues, which should be fixed in the next Typst release, see typst/hayagriva#361)
I’ve documented all known issues in detail in TODO.md with testing resources available in the /test directory.
2. A small licensing question
Before submitting this style to the official CSL database (and eventually to Typst’s default bibliography styles, hopefully), I wanted to confirm the licensing approach with the community. BibTeX and its styles (including plain.bst) use the Knuth license:
This software is copyrighted. Unlimited copying and redistribution of this package and/or its individual files are permitted as long as there are no modifications. Modifications, and redistribution of modifications, are also permitted, but only if the resulting package and/or files are renamed.
Since I’m:
- Renaming the file
plain.bst→plain.csl - Crediting the original authors (Howard Trickey and Oren Patashnik)
- Creating a different format (BST vs. CSL) rather than modifying the original
I believe it’s appropriate to license my project under the MIT License. Does this seem correct to you?
3. Future work
Contributions are welcome! I am also open to reimplementing other classic BibTeX styles that lack a CSL reproduction (AFAIK, abbrv.bst, siam.bst, unsrt.bst), if people have specific needs or want to lend a hand!
Happy Typsting!