emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "R. Michael Weylandt" <michael.weylandt@gmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Accessing #+EMAIL in LaTeX Export
Date: Tue, 4 Feb 2014 08:54:50 -0500	[thread overview]
Message-ID: <CAAmySGM6eeTQ60-78faxs5dEewa46iKVx1K8J7CiM=AD=S30iA@mail.gmail.com> (raw)
In-Reply-To: <871tzj4e4c.fsf@gmail.com>

On Tue, Feb 4, 2014 at 12:54 AM, Nick Dokos <ndokos@gmail.com> wrote:
> "R. Michael Weylandt" <michael.weylandt@gmail.com> 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

  reply	other threads:[~2014-02-04 13:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04  4:30 Accessing #+EMAIL in LaTeX Export R. Michael Weylandt
2014-02-04  5:54 ` Nick Dokos
2014-02-04 13:54   ` R. Michael Weylandt [this message]
2014-02-04 14:22     ` Nick Dokos
2014-02-04 17:31       ` Nick Dokos
2014-02-04 21:46         ` R. Michael Weylandt <michael.weylandt@gmail.com>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAmySGM6eeTQ60-78faxs5dEewa46iKVx1K8J7CiM=AD=S30iA@mail.gmail.com' \
    --to=michael.weylandt@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).