[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Accessing #+EMAIL in LaTeX Export

From: Nick Dokos
Subject: Re: [O] Accessing #+EMAIL in LaTeX Export
Date: Tue, 04 Feb 2014 09:22:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

"R. Michael Weylandt" <address@hidden> writes:

> On Tue, Feb 4, 2014 at 12:54 AM, Nick Dokos <address@hidden> wrote:
>> "R. Michael Weylandt" <address@hidden> 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: address@hidden
>> * 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".
> (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}")))
> Running this on a document like:
> #+TITLE: Test 1
> #+AUTHOR: Michael Weylandt
> #+EMAIL: address@hidden
> #+LATEX_CLASS: amsart
> * Header 1
> Hello World
> leaves me with "\email{email}" in the resulting LaTeX instead of
> "address@hidden". 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?

Much - thanks. I haven't thought much about it but my knee-jerk reaction
is to use a marker (something like address@hidden@}) when defining the
class and use a filter to replace it at the end. But there are might be
more elegant solutions around.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]