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:  t...@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



Reply via email to