From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: macro expansion not working in #+ATTR_LATEX Date: Thu, 05 Sep 2013 21:55:31 +0200 Message-ID: <87vc2fyrf0.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHfeI-0001Ma-Kd for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 15:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHfeA-000479-6L for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 15:55:26 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:55136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHfeA-000474-09 for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 15:55:18 -0400 Received: by mail-wg0-f47.google.com with SMTP id f12so2105240wgh.2 for ; Thu, 05 Sep 2013 12:55:17 -0700 (PDT) In-Reply-To: (Johannes Rainer's message of "Thu, 5 Sep 2013 21:33:48 +0200") 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: Johannes Rainer Cc: emacs-orgmode@gnu.org Hello, Johannes Rainer writes: > while working nicely for plain text I realized that macros are not expanded > if put in #+ATTR_LATEX: > > e.g. I defined > > #+MACRO: image_width 16 > > and wanted to use this macro like > > #+ATTR_LATEX: :center :placement [H] :width {{{image_width}}}cm > > however, in the exported tex file I get: > > \includegraphics[width={{{image_width}}}cm]{test.png} > > is that intentional that macro expansion works only for plain text? Yes. Macro are only expanded where one can find plain text. See "11.6 Macro replacement" in Org manual. Regards, -- Nicolas Goaziou