Function: org-latex--get-section-format
org-latex--get-section-format is a byte-compiled function defined in
ox-latex.el.gz.
Signature
(org-latex--get-section-format HEADLINE INFO)
Documentation
Get section format for HEADLINE.
INFO is the communication plist.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-latex.el.gz
;;;; Headline
(defun org-latex--get-section-format (headline info)
"Get section format for HEADLINE.
INFO is the communication plist."
(let* ((class (plist-get info :latex-class))
(level (org-export-get-relative-level headline info))
(numberedp (org-export-numbered-headline-p headline info))
(class-sectioning (assoc class (plist-get info :latex-classes))))
(let ((sec (if (functionp (nth 2 class-sectioning))
(funcall (nth 2 class-sectioning) level numberedp)
(nth (1+ level) class-sectioning))))
(cond
;; No section available for that LEVEL.
((not sec) nil)
;; Section format directly returned by a function. Add
;; placeholder for contents.
((stringp sec) (concat sec "\n%s"))
;; (numbered-section . unnumbered-section)
((not (consp (cdr sec)))
(concat (funcall (if numberedp #'car #'cdr) sec) "\n%s"))
;; (numbered-open numbered-close)
((= (length sec) 2)
(when numberedp (concat (car sec) "\n%s" (nth 1 sec))))
;; (num-in num-out no-num-in no-num-out)
((= (length sec) 4)
(if numberedp (concat (car sec) "\n%s" (nth 1 sec))
(concat (nth 2 sec) "\n%s" (nth 3 sec))))))))