Carsten Dominik 16 vuotta sitten
vanhempi
commit
1e3198b821
2 muutettua tiedostoa jossa 35 lisäystä ja 17 poistoa
  1. 31 15
      lisp/org-exp.el
  2. 4 2
      lisp/org-export-latex.el

+ 31 - 15
lisp/org-exp.el

@@ -1456,25 +1456,10 @@ on this string to produce the exported version."
       ;; Remove comment environment and comment subtrees
       (org-export-remove-comment-blocks-and-subtrees)
 
-      ;; Remove special table lines
-      (when org-export-table-remove-special-lines
-	(org-export-remove-special-table-lines))
 
-      ;; Specific LaTeX stuff
-      (when latexp
-	(require 'org-export-latex nil)
-	(org-export-latex-preprocess))
 
-      ;; Specific ASCII stuff
-      (when asciip
-	(org-export-ascii-preprocess))
 
-      ;; Specific HTML stuff
-      (when htmlp
-	(org-export-html-preprocess parameters))
 
-      ;; Remove or replace comments
-      (org-export-handle-comments (plist-get parameters :comments))
 
       ;; Find matches for radio targets and turn them into internal links
       (org-export-mark-radio-links)
@@ -1495,6 +1480,37 @@ on this string to produce the exported version."
       (when (plist-get parameters :emph-multiline)
 	(org-export-concatenate-multiline-emphasis))
 
+
+
+
+
+
+
+
+
+
+
+      ;; Remove special table lines
+      (when org-export-table-remove-special-lines
+	(org-export-remove-special-table-lines))
+
+      ;; Specific LaTeX stuff
+      (when latexp
+	(require 'org-export-latex nil)
+	(org-export-latex-preprocess))
+
+      ;; Specific ASCII stuff
+      (when asciip
+	(org-export-ascii-preprocess))
+
+      ;; Specific HTML stuff
+      (when htmlp
+	(org-export-html-preprocess parameters))
+
+      ;; Remove or replace comments
+      (org-export-handle-comments (plist-get parameters :comments))
+
+
       (setq rtn (buffer-string)))
     (kill-buffer " org-mode-tmp")
     rtn))

+ 4 - 2
lisp/org-export-latex.el

@@ -1069,7 +1069,8 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
 			      ;; image option should be set be a comment line
 			      org-export-latex-image-default-option
 			      (expand-file-name raw-path))))
-	     (radiop (insert (format "\\hyperref[%s]{%s}" raw-path desc)))
+	     (radiop (insert (format "\\hyperref[%s]{%s}"
+				     (org-solidify-link-text raw-path) desc)))
 	     (path (insert (format "\\href{%s}{%s}" path desc)))
 	     (t (insert "\\texttt{" desc "}")))))))
 
@@ -1140,7 +1141,8 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
 		  ">>>?\\((INVISIBLE)\\)?") nil t)
     (replace-match
      (org-export-latex-protect-string
-      (format "\\label{%s}%s"(match-string 1)
+      (format "\\label{%s}%s" (save-match-data (org-solidify-link-text
+						(match-string 1)))
 	      (if (match-string 2) "" (match-string 1)))) t t))
 
   ;; Delete @<...> constructs