summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-11-21 17:31:32 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2012-11-21 17:31:32 +0100
commitb5bfebb568d75cdf72332888e0fe8fa594d72dc5 (patch)
treea9a5a1f014db5ae53ed43e5c711249f93d940605
parent984ef56e651fe218067de30293a001a8a1188932 (diff)
downloadorg-mode-b5bfebb568d75cdf72332888e0fe8fa594d72dc5.tar.gz
org-e-latex: Fix small bug
* contrib/lisp/org-e-latex.el (org-e-latex--table.el-table): Fix small bug.
-rw-r--r--contrib/lisp/org-e-latex.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 77fdd7e..9fa5f30 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -2393,18 +2393,19 @@ property."
;; Remove left out comments.
(while (string-match "^%.*\n" output)
(setq output (replace-match "" t t output)))
- ;; When the "rmlines" attribute is provided, remove all hlines but
- ;; the the one separating heading from the table body.
- (when (org-export-read-attribute :attr_latex table :rmlines)
- (let ((n 0) (pos 0))
- (while (and (< (length output) pos)
- (setq pos (string-match "^\\\\hline\n?" output pos)))
- (incf n)
- (unless (= n 2) (setq output (replace-match "" nil nil output))))))
- (let ((centerp (if (plist-member attr :center) (plist-get attr :center)
- org-e-latex-tables-centered)))
- (if (not centerp) output
- (format "\\begin{center}\n%s\n\\end{center}" output)))))
+ (let ((attr (org-export-read-attribute :attr_latex table)))
+ (when (plist-get attr :rmlines)
+ ;; When the "rmlines" attribute is provided, remove all hlines
+ ;; but the the one separating heading from the table body.
+ (let ((n 0) (pos 0))
+ (while (and (< (length output) pos)
+ (setq pos (string-match "^\\\\hline\n?" output pos)))
+ (incf n)
+ (unless (= n 2) (setq output (replace-match "" nil nil output))))))
+ (let ((centerp (if (plist-member attr :center) (plist-get attr :center)
+ org-e-latex-tables-centered)))
+ (if (not centerp) output
+ (format "\\begin{center}\n%s\n\\end{center}" output))))))
(defun org-e-latex--math-table (table info)
"Return appropriate LaTeX code for a matrix.