[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Export with verbatim LaTeX removes spaces
From: |
Michaël Cadilhac |
Subject: |
[O] [PATCH] Export with verbatim LaTeX removes spaces |
Date: |
Mon, 8 Jul 2019 15:47:43 +0200 |
Hi,
When LaTeX is exported verbatim, some spaces are lost. Try for instance:
M-: (let ((org-html-with-latex 'verbatim)) (org-html-export-as-html)) RET
on a buffer containing "$a$ $b$". Post-blanks were simply not added
back, see below.
Thanks!
Cheers,
Michaël
ox.el: Add post-blanks when latex is verbatim
* lisp/ox.el (org-export--remove-uninterpreted-data): Add post-blanks
when latex is verbatim.
TINYCHANGE
---
lisp/ox.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/ox.el b/lisp/ox.el
index 078efaffc..395ce7feb 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2950,7 +2950,12 @@ returned by the function."
;; ... LaTeX environments and fragments...
((latex-environment latex-fragment)
(and (eq (plist-get info :with-latex) 'verbatim)
- (list (org-export-expand datum nil))))
+ (list (concat
+ (org-export-expand datum nil)
+ (make-string
+ (or (org-element-property :post-blank datum)
+ 0)
+ ?\s)))))
;; ... sub/superscripts...
((subscript superscript)
(let ((sub/super-p (plist-get info :with-sub-superscript))
- [O] [PATCH] Export with verbatim LaTeX removes spaces,
Michaël Cadilhac <=