Browse Source

HTML Export: Fix link creation for hashed LaTeX snippet images

Patch by Eric Schulte, bug reported by Hsiu-Khuern
Carsten Dominik 15 years ago
parent
commit
42a2f2299c
2 changed files with 7 additions and 2 deletions
  1. 5 0
      lisp/ChangeLog
  2. 2 2
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-11-30  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-format-latex): Fix link creation for processed latex
+	snippets.
+
 2009-11-29  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-footnote.el (org-footnote-normalize): Protect replacement

+ 2 - 2
lisp/org.el

@@ -14616,8 +14616,7 @@ Some of the options can be changed using the variable
 				  'org-latex-overlay))))
 	    (setq txt (match-string n)
 		  beg (match-beginning n) end (match-end n)
-		  cnt (1+ cnt)
-		  link (concat block "[[file:" linkfile "]]" block))
+		  cnt (1+ cnt))
 	    (let (print-length print-level) ; make sure full list is printed
 	      (setq hash (sha1 (prin1-to-string
 				(list org-format-latex-header
@@ -14626,6 +14625,7 @@ Some of the options can be changed using the variable
 				      forbuffer txt)))
 		    linkfile (format "%s_%s.png" prefix hash)
 		    movefile (format "%s_%s.png" absprefix hash)))
+            (setq link (concat block "[[file:" linkfile "]]" block))
 	    (if msg (message msg cnt))
 	    (goto-char beg)
 	    (unless checkdir ; make sure the directory exists