Expand description
Native bibliography formatting — APA and IEEE styles.
§Why native?
The full CSL (Citation Style Language) spec supports 9000+ styles, but we only use 2-3 regularly. Implementing those natively eliminates the last BBT dependency for common usage. BBT remains as fallback for exotic styles.
§Reference implementation
These formatters were built from the official CSL style definitions:
- APA 7th edition: https://www.zotero.org/styles/apa
- IEEE: https://www.zotero.org/styles/ieee
The Python MCP server delegated this to BBT’s CSL engine via JSON-RPC
(item.bibliography method at bbt_client.py:99). That engine uses
citeproc-js internally. Our native implementation handles the common
cases; edge cases (non-Latin scripts, legal citations, etc.) fall back
to BBT.
§Verification
To verify output matches BBT’s CSL engine, compare:
# Native (Rust):
echo '...tools/call zotero_get_bibliography...' | biblion-rs
# BBT reference (Python, requires Zotero running):
curl -X POST http://localhost:23119/better-bibtex/json-rpc \
-d '{"jsonrpc":"2.0","id":1,"method":"item.bibliography",
"params":[["citekey"],{"id":"http://www.zotero.org/styles/apa"}]}'Functions§
- format_
apa 🔒 - format_
apa_ 🔒authors - Format authors in APA style: “Last, F. I., Last2, F. I., & Last3, F. I.”
- format_
bibliography - Format a bibliography entry in the requested style.
- format_
bibliography_ list - Format multiple items as a numbered bibliography.
- format_
ieee 🔒 - format_
ieee_ 🔒authors - Format authors in IEEE style: “F. I. Last, F. I. Last, and F. I. Last”
- is_
native_ style - Supported native styles. Anything else falls back to BBT.