From: Xavier Garrido <xavier.garrido@gmail.com>
To: Rasmus <rasmus@gmx.us>, emacs-orgmode@gnu.org
Subject: Re: Replace EMAIL keyword by some LaTeX command
Date: Tue, 15 Oct 2013 08:08:12 +0200 [thread overview]
Message-ID: <525CDBCC.2070608@gmail.com> (raw)
In-Reply-To: <87hacj2y0m.fsf@gmx.us>
Hi Rasmus,
It works like a charm ! Thanks a lot for the trick and for your help.
Xavier
Le 15/10/2013 02:11, Rasmus a écrit :
>
> #+BEGIN_SRC Org
> #+TITLE: LaTeX test
> #+AUTHOR: toto
> #+EMAIL: toto@toto.org
> #+LATEX_HEADER: \usepackage{nopkg}
> #+OPTIONS: with-email: t
> Note that
> 1. email is inserted after other =latex_headers=
> 2. with-email is ignored and only the presence of email matters.
> - You could add a check to =(plist-get options :with-email)= in
> the =(and ...)= statement below and remove the =\thanks{.}= in
> a final output filter.
>
> #+begin_src emacs-lisp
> (defun rasmus/force-insert-email (options backend)
> "Insert EMAIL as \email{EMAIL} in the latex backend when EMAIL is present."
> (when (and (org-export-derived-backend-p backend 'latex)
> (plist-get options :email))
> (plist-put options :latex-header
> (mapconcat 'identity
> (remove nil
> (list
> (plist-get options :latex-header)
> (format "\\email{%s}"
> (plist-get options :email))))
> "\n"))
> ;; don't insert email in \thanks{.}
> (plist-put options :with-email nil))
> options)
>
> (add-to-list 'org-export-filter-options-functions 'rasmus/force-insert-email)
> #+end_src
> #+END_SRC
>
>
next prev parent reply other threads:[~2013-10-15 6:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 8:20 Replace EMAIL keyword by some LaTeX command Xavier Garrido
2013-10-15 0:11 ` Rasmus
2013-10-15 6:08 ` Xavier Garrido [this message]
2013-10-15 19:19 ` Marcin Borkowski
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=525CDBCC.2070608@gmail.com \
--to=xavier.garrido@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rasmus@gmx.us \
/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).