Function: org-cite-csl--generate-html-head

org-cite-csl--generate-html-head is a byte-compiled function defined in oc-csl.el.gz.

Signature

(org-cite-csl--generate-html-head INFO)

Documentation

Generate the CSL-related part of the HTML head.

INFO is the export state, as a property list. Return the generated head fragment or nil if no fragment should be inserted.

Source Code

;; Defined in /usr/src/emacs/lisp/org/oc-csl.el.gz
(defun org-cite-csl--generate-html-head (info)
  "Generate the CSL-related part of the HTML head.
INFO is the export state, as a property list.  Return the generated head
fragment or nil if no fragment should be inserted."
  (let* ((parameters (cadr (org-cite-csl--rendered-bibliographies info)))
	 (head-part
	  (concat
	   (and (cdr (assq 'second-field-align parameters))
		(let* ((max-offset (cdr (assq 'max-offset parameters)))
		       (char-width
			(string-to-number org-cite-csl-html-label-width-per-char))
		       (char-width-unit
			(progn
			  (string-match (number-to-string char-width)
					org-cite-csl-html-label-width-per-char)
			  (substring org-cite-csl-html-label-width-per-char
				     (match-end 0)))))
		  (format
		   "<style>.csl-left-margin{float: left; padding-right: 0em;}
 .csl-right-inline{margin: 0 0 0 %d%s;}</style>"
		   (* max-offset char-width)
		   char-width-unit)))
	   (and (cdr (assq 'hanging-indent parameters))
		(format
		 "<style>.csl-entry{text-indent: -%s; margin-left: %s;}</style>"
		 org-cite-csl-html-hanging-indent
		 org-cite-csl-html-hanging-indent)))))
    (and (not (string= "" head-part)) head-part)))