Typst support for the Citar package in Emacs
  • Emacs Lisp 100%
Find a file
Ashton Wiersdorf 5ce419484e
Some checks failed
CI / test (29.1) (push) Has been cancelled
CI / test (30.1) (push) Has been cancelled
Update install instructions---we're published baby!
2026-03-01 15:47:01 -07:00
.forgejo/workflows Change to a minor-mode to support unloading 2026-02-17 12:47:55 -07:00
test Add tests for finding citation file; only run when str literal 2026-02-23 11:17:33 -07:00
citar-typst.el Update doc string and prompt for citar-typst-insert-citation 2026-02-23 11:31:18 -07:00
LICENSE Initial commit 2025-12-05 16:30:44 -07:00
README.org Update install instructions---we're published baby! 2026-03-01 15:47:01 -07:00

Citar-Typst

Typst support for Citar.

Synopsis

  (use-package citar-typst
    :config
    (citar-typst-mode))

Citar is an Emacs library to make it easy to work with citations in documents of various kinds. (LaTeX, Markdown, Org) This package extends Citar to support Typst files.

Description

Citar is an "Emacs package to quickly find and act on bibliographic references, and edit org, markdown, and latex academic documents."1 Citar supports Markdown, Org-mode, and LaTeX documents.

Typst is an in-development LaTeX competitor. Key features of Typst are near-instant document compile times, sane and friendly syntax, and comprehensible error messages.

Typst has its own citation format that Citar does not support. Fortunately, the brilliant minds who cooked up Citar had the foresight to make Citar extensible—this package leverages that extensibility to make it so Citar can insert citations inside Typst documents.

The key function from Citar is citar-insert-citation. This reads the citation files and pulls up all the citation keys. You can then select a key with whatever completing-read interface you use, and Citar will insert the citation keys with the correct format for you. Citar-Typst adds the necessary backend functions so that citar-insert-citation does The Right Thing™ inside a Typst buffer.

Installation

Citar-Typst is available on MELPA. Once installed, turn on citar-typst-mode to enable the integration:

  (use-package citar-typst
    :config
    (citar-typst-mode))

Issues and contributing

Please submit bugs on the issue tracker hosted on Codeberg. (link)

Pull requests are welcome! Before submitting a PR, please add tests for your submitted code and ensure they all pass.

Generative AI Policy

This policy will evolve.

Low-effort, AI-generated PRs and issues will be closed and submitters will be blocked from further participation. If you are blocked and feel that this was a mistake, you may submit an appeal to me (Ashton) personally via email. You are responsible for 100% of what you submit. If your only reason for including some code is "the AI did it", you will be barred from this project in disgrace. Don't make me denounce you via a Vouch-like system.

Issue descriptions and PR notes MUST be entirely human-written. (Exception: if English is not your native language, I am OK with you writing in your native language and then using an LLM to translate, provided you mention that you did this.) I built this software for humans to use and enjoy. I do not want to interface with robots while working on it.

You can use generative AI to assist in building features, provided you are mindful in its use. AI should reduce grunt work and improve code quality. For example, I used an LLM to generate most of the tests for this package—consequently, this package is much better tested than I would have had the patience for! Another good use is to help get some familiarity with Elisp.

You should seek to learn and write as much of the code yourself as you can.

Be smart, be responsible, and don't let the LLM do the thinking for you.

License

This software is released under the GPLv3.

Footnotes


1

"About" section from the Citar repository on GitHub.