Function: org-man-template
org-man-template is a byte-compiled function defined in ox-man.el.gz.
Signature
(org-man-template CONTENTS INFO)
Documentation
Return complete document string after Man conversion.
CONTENTS is the transcoded contents string. INFO is a plist holding export options.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-man.el.gz
;;; Template
(defun org-man-template (contents info)
"Return complete document string after Man conversion.
CONTENTS is the transcoded contents string. INFO is a plist
holding export options."
(let* ((title (when (plist-get info :with-title)
(org-export-data (plist-get info :title) info)))
(attr (read (format "(%s)"
(mapconcat
#'identity
(list (plist-get info :man-class-options))
" "))))
(section-item (plist-get attr :section-id)))
(concat
(cond
((and title (stringp section-item))
(format ".TH \"%s\" \"%s\" \n" title section-item))
((and (string= "" title) (stringp section-item))
(format ".TH \"%s\" \"%s\" \n" " " section-item))
(title
(format ".TH \"%s\" \"1\" \n" title))
(t
".TH \" \" \"1\" "))
contents)))