Function: org-man-table--align-string
org-man-table--align-string is a byte-compiled function defined in
ox-man.el.gz.
Signature
(org-man-table--align-string DIVIDER TABLE INFO)
Documentation
Return an appropriate Man alignment string.
TABLE is the considered table. INFO is a plist used as a communication channel.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-man.el.gz
(defun org-man-table--align-string (divider table info)
"Return an appropriate Man alignment string.
TABLE is the considered table. INFO is a plist used as
a communication channel."
(let (alignment)
;; Extract column groups and alignment from first (non-rule) row.
(org-element-map
(org-element-map table 'table-row
(lambda (row)
(and (eq (org-element-property :type row) 'standard) row))
info 'first-match)
'table-cell
(lambda (cell)
(let* ((borders (org-export-table-cell-borders cell info))
(raw-width (org-export-table-cell-width cell info))
(width-cm (when raw-width (/ raw-width 5)))
(width (if raw-width (format "w(%dc)"
(if (< width-cm 1) 1 width-cm)) "")))
;; Check left border for the first cell only.
(when (and (memq 'left borders) (not alignment))
(push "|" alignment))
(push
(concat (pcase (org-export-table-cell-alignment cell info)
(`left "l") (`right "r") (`center "c"))
width
divider)
alignment)
(when (memq 'right borders) (push "|" alignment))))
info)
(apply #'concat (reverse alignment))))