* [PATCH] Allow inclusion of author's email in LaTeX export
@ 2011-01-13 14:29 Lawrence Mitchell
2011-01-17 19:18 ` [Accepted] " Bastien Guerry
2011-01-17 19:21 ` [PATCH] " Bastien
0 siblings, 2 replies; 8+ messages in thread
From: Lawrence Mitchell @ 2011-01-13 14:29 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Lawrence Mitchell
* org-latex.el (org-export-latex-make-header): Export email in
author line if `org-export-email-info' is non-nil.
Previously exporting to LaTeX would not include the document author's
email address when org-export-email-info was set. This patch corrects
this oversight using the \thanks command to add a footnote to the
author line.
---
lisp/org-latex.el | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 8a9f9eb..4b36273 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1276,7 +1276,9 @@ TITLE is the current title from the buffer or region.
OPT-PLIST is the options plist for current buffer."
(let ((toc (plist-get opt-plist :table-of-contents))
(author (org-export-apply-macros-in-string
- (plist-get opt-plist :author))))
+ (plist-get opt-plist :author)))
+ (email (org-export-apply-macros-in-string
+ (plist-get opt-plist :email))))
(concat
(if (plist-get opt-plist :time-stamp-file)
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
@@ -1300,8 +1302,12 @@ OPT-PLIST is the options plist for current buffer."
(org-export-latex-fontify-headline title))
;; insert author info
(if (plist-get opt-plist :author-info)
- (format "\\author{%s}\n"
- (org-export-latex-fontify-headline (or author user-full-name)))
+ (format "\\author{%s%s}\n"
+ (org-export-latex-fontify-headline (or author user-full-name))
+ (if (and org-export-email-info email
+ (string-match "\\S-" email))
+ (format "\\thanks{%s}" email)
+ ""))
(format "%%\\author{%s}\n"
(org-export-latex-fontify-headline (or author user-full-name))))
;; insert the date
--
1.7.4.rc1.7.g2cf08
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Accepted] Allow inclusion of author's email in LaTeX export
2011-01-13 14:29 [PATCH] Allow inclusion of author's email in LaTeX export Lawrence Mitchell
@ 2011-01-17 19:18 ` Bastien Guerry
2011-01-17 19:21 ` [PATCH] " Bastien
1 sibling, 0 replies; 8+ messages in thread
From: Bastien Guerry @ 2011-01-17 19:18 UTC (permalink / raw)
To: emacs-orgmode
Patch 536 (http://patchwork.newartisans.com/patch/536/) is now "Accepted".
Maintainer comment: none
This relates to the following submission:
http://mid.gmane.org/%3C1294928979-14439-1-git-send-email-wence%40gmx.li%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Allow inclusion of author's email in LaTeX export
> Date: Thu, 13 Jan 2011 19:29:39 -0000
> From: Lawrence Mitchell <wence@gmx.li>
> X-Patchwork-Id: 536
> Message-Id: <1294928979-14439-1-git-send-email-wence@gmx.li>
> To: emacs-orgmode@gnu.org
> Cc: Lawrence Mitchell <wence@gmx.li>
>
> * org-latex.el (org-export-latex-make-header): Export email in
> author line if `org-export-email-info' is non-nil.
>
> Previously exporting to LaTeX would not include the document author's
> email address when org-export-email-info was set. This patch corrects
> this oversight using the \thanks command to add a footnote to the
> author line.
>
> ---
> lisp/org-latex.el | 12 +++++++++---
> 1 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index 8a9f9eb..4b36273 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -1276,7 +1276,9 @@ TITLE is the current title from the buffer or region.
> OPT-PLIST is the options plist for current buffer."
> (let ((toc (plist-get opt-plist :table-of-contents))
> (author (org-export-apply-macros-in-string
> - (plist-get opt-plist :author))))
> + (plist-get opt-plist :author)))
> + (email (org-export-apply-macros-in-string
> + (plist-get opt-plist :email))))
> (concat
> (if (plist-get opt-plist :time-stamp-file)
> (format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
> @@ -1300,8 +1302,12 @@ OPT-PLIST is the options plist for current buffer."
> (org-export-latex-fontify-headline title))
> ;; insert author info
> (if (plist-get opt-plist :author-info)
> - (format "\\author{%s}\n"
> - (org-export-latex-fontify-headline (or author user-full-name)))
> + (format "\\author{%s%s}\n"
> + (org-export-latex-fontify-headline (or author user-full-name))
> + (if (and org-export-email-info email
> + (string-match "\\S-" email))
> + (format "\\thanks{%s}" email)
> + ""))
> (format "%%\\author{%s}\n"
> (org-export-latex-fontify-headline (or author user-full-name))))
> ;; insert the date
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow inclusion of author's email in LaTeX export
2011-01-13 14:29 [PATCH] Allow inclusion of author's email in LaTeX export Lawrence Mitchell
2011-01-17 19:18 ` [Accepted] " Bastien Guerry
@ 2011-01-17 19:21 ` Bastien
2011-02-22 21:25 ` Hsiu-Khuern Tang
1 sibling, 1 reply; 8+ messages in thread
From: Bastien @ 2011-01-17 19:21 UTC (permalink / raw)
To: Lawrence Mitchell; +Cc: emacs-orgmode
Hi Lawrence,
Lawrence Mitchell <wence@gmx.li> writes:
> * org-latex.el (org-export-latex-make-header): Export email in
> author line if `org-export-email-info' is non-nil.
Thanks a lot - I just applied a slightly modified version of your
patch.
The trick is to use (plist-get opt-plist :email-info) instead of
`org-export-email-info' so that in-buffer options are taken into
account.
Thanks for submitting this!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow inclusion of author's email in LaTeX export
2011-01-17 19:21 ` [PATCH] " Bastien
@ 2011-02-22 21:25 ` Hsiu-Khuern Tang
2011-02-26 16:31 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Hsiu-Khuern Tang @ 2011-02-22 21:25 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I noticed that special characters in the email, such as an underscore,
are not escaped. This causes LaTeX errors.
To reproduce, put this line at the top of an org file and try to
export to PDF via LaTeX:
#+EMAIL: first_last@example.com
Thanks,
Hsiu-Khuern.
On Mon, Jan 17, 2011 at 11:21 AM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Hi Lawrence,
>
> Lawrence Mitchell <wence@gmx.li> writes:
>
>> * org-latex.el (org-export-latex-make-header): Export email in
>> author line if `org-export-email-info' is non-nil.
>
> Thanks a lot - I just applied a slightly modified version of your
> patch.
>
> The trick is to use (plist-get opt-plist :email-info) instead of
> `org-export-email-info' so that in-buffer options are taken into
> account.
>
> Thanks for submitting this!
>
> --
> Bastien
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow inclusion of author's email in LaTeX export
2011-02-22 21:25 ` Hsiu-Khuern Tang
@ 2011-02-26 16:31 ` Bastien
2011-02-28 23:47 ` Hsiu-Khuern Tang
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-02-26 16:31 UTC (permalink / raw)
To: Hsiu-Khuern Tang; +Cc: emacs-orgmode
Hi Hsiu-Khuern,
Hsiu-Khuern Tang <tangoh@gmail.com> writes:
> I noticed that special characters in the email, such as an underscore,
> are not escaped. This causes LaTeX errors.
>
> To reproduce, put this line at the top of an org file and try to
> export to PDF via LaTeX:
>
> #+EMAIL: first_last@example.com
Fixed, thanks.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow inclusion of author's email in LaTeX export
2011-02-26 16:31 ` Bastien
@ 2011-02-28 23:47 ` Hsiu-Khuern Tang
2011-03-01 17:36 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Hsiu-Khuern Tang @ 2011-02-28 23:47 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Hi Bastien,
On Sat, Feb 26, 2011 at 8:31 AM, Bastien <bzg@altern.org> wrote:
> Hsiu-Khuern Tang <tangoh@gmail.com> writes:
>
>> I noticed that special characters in the email, such as an underscore,
>> are not escaped. This causes LaTeX errors.
>>
>> To reproduce, put this line at the top of an org file and try to
>> export to PDF via LaTeX:
>>
>> #+EMAIL: first_last@example.com
>
> Fixed, thanks.
>
> --
> Bastien
I updated to the latest git version, but I'm still getting unescaped
underscores in the \thanks{} argument. From the output of "git log",
I think the change was supposed to be in commit
0c7d8e615a931e6db222cf7667c1a8d6968b2007, but I couldn't find the code
change that affects this.
Best,
Hsiu-Khuern.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: [PATCH] Allow inclusion of author's email in LaTeX export
2011-02-28 23:47 ` Hsiu-Khuern Tang
@ 2011-03-01 17:36 ` Bastien
2011-03-01 18:59 ` Hsiu-Khuern Tang
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-03-01 17:36 UTC (permalink / raw)
To: Hsiu-Khuern Tang; +Cc: emacs-orgmode
Hi Hsiu-Khuern,
Hsiu-Khuern Tang <tangoh@gmail.com> writes:
> I updated to the latest git version, but I'm still getting unescaped
> underscores in the \thanks{} argument.
I pushed another fix, please check again.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: [PATCH] Allow inclusion of author's email in LaTeX export
2011-03-01 17:36 ` Bastien
@ 2011-03-01 18:59 ` Hsiu-Khuern Tang
0 siblings, 0 replies; 8+ messages in thread
From: Hsiu-Khuern Tang @ 2011-03-01 18:59 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
On Tue, Mar 1, 2011 at 9:36 AM, Bastien <bzg@altern.org> wrote:
> Hi Hsiu-Khuern,
>
> Hsiu-Khuern Tang <tangoh@gmail.com> writes:
>
>> I updated to the latest git version, but I'm still getting unescaped
>> underscores in the \thanks{} argument.
>
> I pushed another fix, please check again.
>
> --
> Bastien
>
Yes, works now, thanks!
--
Hsiu-Khuern.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-01 19:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 14:29 [PATCH] Allow inclusion of author's email in LaTeX export Lawrence Mitchell
2011-01-17 19:18 ` [Accepted] " Bastien Guerry
2011-01-17 19:21 ` [PATCH] " Bastien
2011-02-22 21:25 ` Hsiu-Khuern Tang
2011-02-26 16:31 ` Bastien
2011-02-28 23:47 ` Hsiu-Khuern Tang
2011-03-01 17:36 ` Bastien
2011-03-01 18:59 ` Hsiu-Khuern Tang
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.