Function: org-man-table

org-man-table is a byte-compiled function defined in ox-man.el.gz.

Signature

(org-man-table TABLE CONTENTS INFO)

Documentation

Transcode a TABLE element from Org to Man.

CONTENTS is the contents of the table. INFO is a plist holding contextual information.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-man.el.gz
;;; Table
;;
;; `org-man-table' is the entry point for table transcoding.  It
;; takes care of tables with a "verbatim" attribute.  Otherwise, it
;; delegates the job to either `org-man-table--table.el-table' or
;; `org-man-table--org-table' functions, depending of the type of
;; the table.
;;
;; `org-man-table--align-string' is a subroutine used to build
;; alignment string for Org tables.

(defun org-man-table (table contents info)
  "Transcode a TABLE element from Org to Man.
CONTENTS is the contents of the table.  INFO is a plist holding
contextual information."
  (cond
   ;; Case 1: verbatim table.
   ((or (plist-get info :man-tables-verbatim)
        (let ((attr (read (format "(%s)"
                                  (mapconcat
                                   #'identity
                                   (org-element-property :attr_man table)
                                   " ")))))

          (and attr (plist-get attr :verbatim))))

    (format ".nf\n\\fC%s\\fP\n.fi"
            ;; Re-create table, without affiliated keywords.
            (org-trim
             (org-element-interpret-data
              `(table nil ,@(org-element-contents table))))))
   ;; Case 2: Standard table.
   (t (org-man-table--org-table table contents info))))