From 2b3cb66d54221fee36cf2878d997e15864b14b7c Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 12 Mar 2010 15:21:41 +0100 Subject: [PATCH] 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. --- lisp/ChangeLog | 5 +++++ lisp/org-latex.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c2ca4c339..1801ead43 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2010-03-12 Carsten Dominik + * 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. diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 80b69d7a9..ac15ccce7 100644 --- a/lisp/org-latex.el +++ b/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)) ?#))