Hi Xavier, Xavier Garrido <xavier.garr...@gmail.com> writes:
But you have to be certain that this command is present. You could use etoolbox to test it. That brings in another dependency, tho. > The only point is that I do not know how to translate =#+EMAIL= org > keyword into =\email= LaTeX command. Can a export filter do it ? Of course. Should it? Up to you. . . Here's an example that you can work on. It's not well-tested and it has limitations and evident from the example. E.g. you disable it by setting #+EMAIL: . Hope it helps, Rasmus #+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 -- Enough with the bla bla!