Browse Source

on HTML export, latex source code added as alternative text to latex images

Eric Schulte 15 years ago
parent
commit
18a1f8e98a
2 changed files with 5 additions and 2 deletions
  1. 2 1
      lisp/org-html.el
  2. 3 1
      lisp/org.el

+ 2 - 1
lisp/org-html.el

@@ -1529,7 +1529,8 @@ lang=\"%s\" xml:lang=\"%s\">
   "Create image tag with source and attributes."
   (save-match-data
     (if (string-match "^ltxpng/" src)
-	(format "<img src=\"%s\"/>" src)
+	(format "<img src=\"%s\" alt=\"%s\"/>"
+                src (org-find-text-property-in-string 'org-latex-src src))
       (let* ((caption (org-find-text-property-in-string 'org-caption src))
 	     (attr (org-find-text-property-in-string 'org-attributes src))
 	     (label (org-find-text-property-in-string 'org-label src)))

+ 3 - 1
lisp/org.el

@@ -15183,7 +15183,9 @@ Some of the options can be changed using the variable
 		  (push ov org-latex-fragment-image-overlays)
 		  (goto-char end))
 	      (delete-region beg end)
-	      (insert link))))))))
+              (insert (org-add-props link
+                          (list 'org-latex-src
+                                (replace-regexp-in-string "\"" "" txt)))))))))))
 
 ;; This function borrows from Ganesh Swami's latex2png.el
 (defun org-create-formula-image (string tofile options buffer)