From mboxrd@z Thu Jan 1 00:00:00 1970 From: "R. Michael Weylandt" Subject: Re: Accessing #+EMAIL in LaTeX Export Date: Tue, 4 Feb 2014 08:54:50 -0500 Message-ID: References: <871tzj4e4c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAgT3-0005zh-Di for emacs-orgmode@gnu.org; Tue, 04 Feb 2014 08:55:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAgT2-0006LH-GB for emacs-orgmode@gnu.org; Tue, 04 Feb 2014 08:55:13 -0500 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:58652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAgT2-0006J7-5B for emacs-orgmode@gnu.org; Tue, 04 Feb 2014 08:55:12 -0500 Received: by mail-la0-f42.google.com with SMTP id hr13so6624852lab.29 for ; Tue, 04 Feb 2014 05:55:11 -0800 (PST) In-Reply-To: <871tzj4e4c.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" On Tue, Feb 4, 2014 at 12:54 AM, Nick Dokos wrote: > "R. Michael Weylandt" writes: > >> HI, >> >> I'm writing a latex export class which has an \email macro. >> >> Is it possible to autofill this macro using the #+EMAIL: property? >> Looking at ox-latex.el, it seems that email is hardcoded to be placed >> in \thanks{} but there might be a hook I'm missing. >> >> I thought that using a {{{ email }}} macro might work, but I keep >> winding up with >> \email{ {{{email}}} } in the produced LaTeX. >> > > Not sure what your \email macro is supposed to look like or what > it is supposed to do, but the {{{email}}} works for me, e.g. the > following produces my italicized email in the output: > > --8<---------------cut here---------------start------------->8--- > #+EMAIL: ndokos@gmail.com > > * foo > > This is my email: \emph{ {{{email}}} }. > --8<---------------cut here---------------end--------------->8--- > Hi Nick, Thanks for taking a look at this. Let me say a bit more about what I'm trying to do: I want org-mode to export to the "amsart" class by default. In addition to the regular \title, \author, \date macros, amsart also allows for "email". --8<---------------cut here-------------start--------------->8--- (add-to-list 'org-latex-classes '("amsart" "\\documentclass{amsart} [DEFAULT-PACKAGES] [PACKAGES] [EXTRA] \\email{ {{{email}}} }" ("\\section{%s}" . "\\section{%s}") ("\\subsection{%s}" . "\\subsection{%s}") ("\\subsubsection{%s}" . "\\subsubsection{%s}"))) --8<---------------cut here---------------end--------------->8--- Running this on a document like: --8<---------------cut here-------------start--------------->8--- #+TITLE: Test 1 #+AUTHOR: Michael Weylandt #+EMAIL: Michael.Weylandt@gmail.com #+LATEX_CLASS: amsart * Header 1 Hello World --8<---------------cut here---------------end--------------->8--- leaves me with "\email{email}" in the resulting LaTeX instead of "\email{Michael.Weylandt@mail.com}". Since this is used as part of \maketitle, doing something in the body (like your example) is too late. The #+EMAIL: value is handled by ox-latex.el, but it's only placed inside the \author{} macro instead of in a stand alone \email{}. That's the behavior I'm hoping to tweak. Is that clearer? Thanks again, Michael