From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: #+LATEX_HEADER:\newcommand{\orgtitle}{{{{TITLE}}}} Date: Thu, 20 Mar 2014 00:25:33 +0100 Message-ID: <8761n9n53m.fsf@gmx.us> References: <87y507fs5b.fsf@bzg.ath.cx> <87ppli4mdt.fsf@ucl.ac.uk> <878us6lbv2.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQPpt-0002jA-Cf for emacs-orgmode@gnu.org; Wed, 19 Mar 2014 19:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQPpn-0001xV-NC for emacs-orgmode@gnu.org; Wed, 19 Mar 2014 19:23:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:44801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQPpn-0001xR-Ge for emacs-orgmode@gnu.org; Wed, 19 Mar 2014 19:23:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WQPpm-000348-Kc for emacs-orgmode@gnu.org; Thu, 20 Mar 2014 00:23:42 +0100 Received: from dynamic-adsl-94-34-191-91.clienti.tiscali.it ([94.34.191.91]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Mar 2014 00:23:42 +0100 Received: from rasmus by dynamic-adsl-94-34-191-91.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Mar 2014 00:23:42 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Luke Crook writes: > Rasmus gmx.us> writes: > >> >> I've used this snip to recover such fields >> >> \makeatletter >> \let\Title\ title >> \let\Author\ author >> \let\Date\ date >> \makeatother >> >> Obviously, this is only good for LaTeX. >> > > How would I implement this? Is including in the .tex file sufficient? > Having these in the Org-mode file itself? When I try in the .tex file, it > appears almost verbatim as; For some reason your "@" (the sign from email address) becomes "". It needs to be "@". See the gmane version if you are in doubt. Here's a working example. #+TITLE: title #+AUTHOR: name #+LATEX: \newcommand{\myname}{\Author} Remember to escape latex macros like ~\myname~ as ~@@latex:\myname@@~ in Org to get "\myname" * make some latex commands :noexport: # Local Variables: # org-latex-title-command: "\\makeatletter\n \ # \\let\\Title\\@title\n \ # \\let\\Author\\@author\n \ # \\let\\Date\\@date\\makeatother\n \ # \\maketitle" # End: -- In theory, practice and theory are the same. In practice they are not