Function: org-cite-natbib--style-to-command

org-cite-natbib--style-to-command is a byte-compiled function defined in oc-natbib.el.gz.

Signature

(org-cite-natbib--style-to-command STYLE)

Documentation

Return command name to use according to STYLE pair.

Source Code

;; Defined in /usr/src/emacs/lisp/org/oc-natbib.el.gz
;;; Internal functions
(defun org-cite-natbib--style-to-command (style)
  "Return command name to use according to STYLE pair."
  (pcase style
    ;; "author" style.
    (`(,(or "author" "a") . ,variant)
     (pcase variant
       ((or "caps" "c")             "\\Citeauthor")
       ((or "full" "f")             "\\citeauthor*")
       (_                           "\\citeauthor")))
    ;; "noauthor" style.
    (`(,(or "noauthor" "na") . ,variant)
     (pcase variant
       ((or "bare" "b")             "\\citeyear")
       (_                           "\\citeyearpar")))
    ;; "nocite" style.
    (`(,(or "nocite" "n") . ,_)     "\\nocite")
    ;; "text" style.
    (`(,(or "text" "t") . ,variant)
     (pcase variant
       ((or "bare" "b")             "\\citealt")
       ((or "caps" "c")             "\\Citet")
       ((or "full" "f")             "\\citet*")
       ((or "bare-caps" "bc")       "\\Citealt")
       ((or "bare-full" "bf")       "\\citealt*")
       ((or "caps-full" "cf")       "\\Citet*")
       ((or "bare-caps-full" "bcf") "\\Citealt*")
       (_ "\\citet")))
    ;; Default ("nil") style.
    (`(,_ . ,variant)
     (pcase variant
       ((or "bare" "b")             "\\citealp")
       ((or "caps" "c")             "\\Citep")
       ((or "full" "f")             "\\citep*")
       ((or "bare-caps" "bc")       "\\Citealp")
       ((or "bare-full" "bf")       "\\citealp*")
       ((or "caps-full" "cf")       "\\Citep*")
       ((or "bare-caps-full" "bcf") "\\Citealp*")
       (_                           "\\citep")))
    ;; This should not happen.
    (_ (error "Invalid style: %S" style))))