Hi all,

I know this is an ancient thread, but it seems the problem is still there, in
Emacs 25.

FWIW, this is my quick and dirty fix, that at least produce a readable output,
in Emacs as well as in the PDF output.

    (require 'org-colview)

    ;; Quick&dirty workaround to 
http://article.gmane.org/gmane.emacs.orgmode/25821: replace
    ;; asterisks with some other character in the table automatically built by 
org-colview, because
    ;; when the table is exported to LaTeX they are misinterpreted as emphasis 
markup, resulting in
    ;; an unreadable hierarchy.

    (defun esk/org-replace-section-prefix (s)
      "Replace asterisks in  Org heading with em-dashes."
      (when (string-match org-outline-regexp-bol s)
        (setq s (replace-match
                 (concat (make-string (- (match-end 0) (match-beginning 0) 1) 
?—)
                         " ")
                 t t s)))
      s)

    (defun org-listtable-to-string (tbl)
      "Convert a listtable TBL to a string that contains the Org-mode table.
    The table still need to be aligned.  The resulting string has no leading
    and trailing newline characters."
      (mapconcat
       (lambda (x)
         (cond
          ((listp x)
           (concat "|" (esk/org-replace-section-prefix (mapconcat 'identity x 
"|")) "|"))
          ((eq x 'hline) "|-|")
          (t (error "Garbage in listtable: %s" x))))
       tbl "\n"))

Of course I'll be happy to hear about any better way to do it!

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  |                 -- Fortunato Depero, 1929.


Reply via email to