Function: org-cite-csl--style-file

org-cite-csl--style-file is a byte-compiled function defined in oc-csl.el.gz.

Signature

(org-cite-csl--style-file INFO)

Documentation

Return style file associated to current export process.

INFO is the export state, as a property list.

When file name is relative, look for it in buffer's default directory, failing that in org-cite-csl-styles-dir if non-nil. Raise an error if no style file can be found.

Source Code

;; Defined in /usr/src/emacs/lisp/org/oc-csl.el.gz
(defun org-cite-csl--style-file (info)
  "Return style file associated to current export process.

INFO is the export state, as a property list.

When file name is relative, look for it in buffer's default
directory, failing that in `org-cite-csl-styles-dir' if non-nil.
Raise an error if no style file can be found."
  (pcase (org-cite-bibliography-style info)
    ('nil org-cite-csl--fallback-style-file)
    ((and (pred file-name-absolute-p) file) file)
    ((and (pred file-exists-p) file) (expand-file-name file))
    ((and (guard org-cite-csl-styles-dir)
          (pred (lambda (f)
                  (file-exists-p
                   (expand-file-name f org-cite-csl-styles-dir))))
          file)
     (expand-file-name file org-cite-csl-styles-dir))
    (other
     (user-error "CSL style file not found: %S" other))))