From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bing Sun Subject: org-create-formula--latex-header does not respect latex_header in included file Date: Thu, 04 Jul 2013 00:38:49 +0800 Message-ID: <87d2qzzjhi.fsf@pku.edu.cn> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuQ2W-0002Z0-LO for emacs-orgmode@gnu.org; Wed, 03 Jul 2013 12:36:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuQ2T-000774-T5 for emacs-orgmode@gnu.org; Wed, 03 Jul 2013 12:36:20 -0400 Received: from mail-pb0-x22a.google.com ([2607:f8b0:400e:c01::22a]:56380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuQ2T-00076T-MS for emacs-orgmode@gnu.org; Wed, 03 Jul 2013 12:36:17 -0400 Received: by mail-pb0-f42.google.com with SMTP id un1so298268pbc.1 for ; Wed, 03 Jul 2013 09:36:16 -0700 (PDT) Received: from localhost ([2001:da8:201:1071:21f:3cff:fec2:ecc4]) by mx.google.com with ESMTPSA id re16sm34389862pac.16.2013.07.03.09.36.14 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Jul 2013 09:36:15 -0700 (PDT) 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 hello list, I have a separate org file for a rather complicated latex preamble and then include it when needed. It works well for latex exporting but it appears that org-create-formula--latex-header just ignores the latex_header properties in the included org file when previewing latex fragments. Is this intended or am I missing anything? BTW, I find it painful to maintain the latex preamble as the latex_header properties, say #+LATEX_HEADER: \newcommand{\mathd}{\mathrm{d}} #+LATEX_HEADER: \newcommand{\mathbf}[1]{\ensuremath{\boldsymbol{#1}}} #+LATEX_HEADER: \newcommand{\op}[1]{\ensuremath{\operatorname{#1}}} I'd like something like this, #+BEGIN_SRC latex :preamble \newcommand{\mathd}{\mathrm{d}} \newcommand{\mathbf}[1]{\ensuremath{\boldsymbol{#1}}} \newcommand{\op}[1]{\ensuremath{\operatorname{#1}}} #+END_SRC Does that make any sense? Regards.