From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lele Gaifax Subject: Re: latex-export + columnview: misinterpretation of section prefixes as emphasis Date: Wed, 22 Jun 2016 20:45:22 +0200 Message-ID: <87y45xgj0d.fsf@metapensiero.it> References: <20100531033853.GD27574@soloJazz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFn9e-0004NZ-99 for emacs-orgmode@gnu.org; Wed, 22 Jun 2016 14:45:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFn9Y-00041B-5h for emacs-orgmode@gnu.org; Wed, 22 Jun 2016 14:45:37 -0400 Received: from plane.gmane.org ([80.91.229.3]:50862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFn9X-000413-QX for emacs-orgmode@gnu.org; Wed, 22 Jun 2016 14:45:32 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bFn9V-0001YP-TU for emacs-orgmode@gnu.org; Wed, 22 Jun 2016 20:45:30 +0200 Received: from 151.62.3.59 ([151.62.3.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jun 2016 20:45:29 +0200 Received: from lele by 151.62.3.59 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jun 2016 20:45:29 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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. lele@metapensiero.it | -- Fortunato Depero, 1929.