Просмотр исходного кода

LaTeX export: Fix another problem with #+AUTHOR export

Jambunathan K. writes:

> I would like to add the following observation as well -
>
> ---> org input <---
> #+AUTHOR: Jambunathan K\cr\href{mailto:{{{EMAIL}}}}{{{{EMAIL}}}}
>
> ---> actual tex output <---
> \author{Jambunathan K\cr\href{mailto:kjambunathan@gmail.com}\{kjambunathan@gmail.com\}}
>
> The above tex snippet has the effect of getting the "Url Box" wrong.
>
> I was hoping to produce the following line -
> \author{Jambunathan K\cr\href{mailto:kjambunathan@gmail.com}{kjambunathan@gmail.com}}
>
> Generally speaking, macro expansion in author string behaves strangely.
Carsten Dominik 15 лет назад
Родитель
Сommit
2b3cb66d54
2 измененных файлов с 9 добавлено и 2 удалено
  1. 5 0
      lisp/ChangeLog
  2. 4 2
      lisp/org-latex.el

+ 5 - 0
lisp/ChangeLog

@@ -1,5 +1,10 @@
 2010-03-12  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-latex.el (org-export-latex-make-header): Fully process
+	author line.
+	(org-export-latex-fontify-headline): Allow several arguments, not
+	just one.
+
 	* org-agenda.el (org-agenda-skip-if-todo): New function.
 	(org-agenda-skip-if): Add conditions for TODO keywords.
 	(org-agenda-skip-if): Document the new todo conditions.

+ 4 - 2
lisp/org-latex.el

@@ -1177,7 +1177,7 @@ OPT-PLIST is the options plist for current buffer."
 	 (format "\\author{%s}\n"
 		 (org-export-latex-fontify-headline (or author user-full-name)))
        (format "%%\\author{%s}\n"
-	       (or author user-full-name)))
+	       (org-export-latex-fontify-headline (or author user-full-name))))
      ;; insert the date
      (format "\\date{%s}\n"
 	     (format-time-string
@@ -1331,7 +1331,9 @@ links, keywords, lists, tables, fixed-width"
 		      "\\(?:<[^<>\n]*>\\)*"
 		      "\\(?:\\[[^][\n]*?\\]\\)*"
 		      "\\(?:<[^<>\n]*>\\)*"
-		      (org-create-multibrace-regexp "{" "}" 3))))
+		      "\\("
+		      (org-create-multibrace-regexp "{" "}" 3)
+		      "\\)\\{1,3\\}")))
       (while (re-search-forward re nil t)
 	(unless (save-excursion (goto-char (match-beginning 0))
 				(equal (char-after (point-at-bol)) ?#))