citar
citar copied to clipboard
oc: style UI with latex-focused option
I haven't really gotten much feedback on the org-cite style editing UI.
But if, by chance, hard-core latex users have a hard time getting used to the org-cite style names, even with the preview, here's another option; a configurable option to flip the mapping, and instead have the latex commands central in the UI.
I still think dynamic preview is the more important first step, but worth considering?
(defcustom oc-bibtex-actions-style-ui 'oc
"Style select UI; each with a preview."
:type '(choice (const :tag "org-cite styles" 'oc)
(const :tag "biblatex commands" 'biblatex)
(const :tag "natbib commands" 'natbib)))
(defvar oc-bibtex-actions--style-mapping
'(("autocite" . "/")
("textcite" . "/text")))
(defvar oc-bibtex-actions--style-prompt "BibLaTeX citation command: ")
(defun latex-oc-style-choose ()
(let ((choice
(completing-read
oc-bibtex-actions--style-prompt
oc-bibtex-actions--style-mapping)))
(cdr (assoc choice oc-bibtex-actions--style-mapping))))