[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] latex-export + columnview: misinterpretation of section prefixes
From: |
Lele Gaifax |
Subject: |
Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis |
Date: |
Wed, 22 Jun 2016 20:45:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) |
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.
address@hidden | -- Fortunato Depero, 1929.
- Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis,
Lele Gaifax <=
- Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis, Nicolas Goaziou, 2016/06/22
- Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis, Lele Gaifax, 2016/06/22
- Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis, Nicolas Goaziou, 2016/06/22
- Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis, Lele Gaifax, 2016/06/23
- Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis, Nicolas Goaziou, 2016/06/24
- Re: [O] latex-export + columnview: misinterpretation of section prefixes as emphasis, Lele Gaifax, 2016/06/24
- [O] [PATCH] org-colview.el: Fix typo in function name, Lele Gaifax, 2016/06/24
- Re: [O] [PATCH] org-colview.el: Fix typo in function name, Nicolas Goaziou, 2016/06/24
- Re: [O] [PATCH] org-colview.el: Fix typo in function name, Lele Gaifax, 2016/06/24
- Re: [O] [PATCH] org-colview.el: Fix typo in function name, Nicolas Goaziou, 2016/06/24