瀏覽代碼

Merge branch 'maint'

Nicolas Goaziou 11 年之前
父節點
當前提交
9665f83f7b
共有 2 個文件被更改,包括 14 次插入5 次删除
  1. 0 1
      lisp/org.el
  2. 14 4
      lisp/ox-latex.el

+ 0 - 1
lisp/org.el

@@ -3973,7 +3973,6 @@ header, or they will be appended."
     (""     "wrapfig"   nil)
     (""     "rotating"  nil)
     ("normalem" "ulem"  t)
-    (""     "soul"      t)
     (""     "amsmath"   t)
     (""     "textcomp"  t)
     (""     "marvosym"  t)

+ 14 - 4
lisp/ox-latex.el

@@ -605,7 +605,7 @@ When nil, no transformation is made."
 					 (code . verb)
 					 (italic . "\\emph{%s}")
 					 (strike-through . "\\sout{%s}")
-					 (underline . "\\ul{%s}")
+					 (underline . "\\uline{%s}")
 					 (verbatim . protectedtexttt))
   "Alist of LaTeX expressions to convert text markup.
 
@@ -1422,7 +1422,16 @@ holding contextual information."
 	       ((= (length sec) 4)
 		(if numberedp (concat (car sec) "\n%s" (nth 1 sec))
 		  (concat (nth 2 sec) "\n%s" (nth 3 sec)))))))
-	   (text (org-export-data (org-element-property :title headline) info))
+	   ;; Create a temporary export back-end that hard-codes
+	   ;; "\underline" within "\section" and alike.
+	   (section-back-end
+	    (org-export-create-backend
+	     :parent 'latex
+	     :transcoders
+	     '((underline . (lambda (o c i) (format "\\underline{%s}" c))))))
+	   (text
+	    (org-export-data-with-backend
+	     (org-element-property :title headline) section-back-end info))
 	   (todo
 	    (and (plist-get info :with-todo-keywords)
 		 (let ((todo (org-element-property :todo-keyword headline)))
@@ -1480,8 +1489,9 @@ holding contextual information."
 	(let ((opt-title
 	       (funcall org-latex-format-headline-function
 			todo todo-type priority
-			(org-export-data
-			 (org-export-get-alt-title headline info) info)
+			(org-export-data-with-backend
+			 (org-export-get-alt-title headline info)
+			 section-back-end info)
 			(and (eq (plist-get info :with-tags) t) tags))))
 	  (if (and numberedp opt-title
 		   (not (equal opt-title full-text))