Selaa lähdekoodia

Fix Table attribute issue during PDF export

* lisp/org-latex.el (org-export-latex-first-lines): Do not protect meta
lines that have nothing to do with babel.
Carsten Dominik 14 vuotta sitten
vanhempi
commit
796318b215
1 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. 7 3
      lisp/org-latex.el

+ 7 - 3
lisp/org-latex.el

@@ -1257,9 +1257,13 @@ If END is non-nil, it is the end of the region."
 				'(:org-license-to-kill t))
 	   (save-excursion
 	     (goto-char pt)
-	     (while (re-search-forward "^[ \t]*#+.*\n?" limit t)
-	       (remove-text-properties (match-beginning 0) (match-end 0)
-				'(:org-license-to-kill t))))))))))
+	     (while (re-search-forward "^[ \t]*#\\+.*\n?" limit t)
+	       (let ((case-fold-search t))
+		 (unless (org-string-match-p
+			  "^[ \t]*#\\+\\(attr_\\|caption\\>\\|label\\>\\)"
+			  (match-string 0))
+		   (remove-text-properties (match-beginning 0) (match-end 0)
+					   '(:org-license-to-kill t))))))))))))
 	       
 
 (defvar org-export-latex-header-defs nil