From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: New exporter macro question Date: Mon, 11 Feb 2013 22:37:44 +0100 Message-ID: <87k3qecz13.fsf@gmail.com> References: <8312EEB6-F657-449E-B025-167031ECACAC@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U514d-00038N-Ss for emacs-orgmode@gnu.org; Mon, 11 Feb 2013 16:38:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U514a-0002Bm-T7 for emacs-orgmode@gnu.org; Mon, 11 Feb 2013 16:38:03 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:45140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U514a-0002BP-MZ for emacs-orgmode@gnu.org; Mon, 11 Feb 2013 16:38:00 -0500 Received: by mail-wi0-f173.google.com with SMTP id hq4so3699387wib.6 for ; Mon, 11 Feb 2013 13:37:59 -0800 (PST) In-Reply-To: <8312EEB6-F657-449E-B025-167031ECACAC@gmail.com> (Carsten Dominik's message of "Mon, 11 Feb 2013 13:48: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: Carsten Dominik Cc: "emacs-orgmode@gnu.org List" Hello, Carsten Dominik writes: > I am porting my websites to the new exporter, finally. Much is very smooth. I do have a problem with macros: > > > * Macro definition > > > #+MACRO: thumbright #+ATTR_HTML: style="float:right;width:$1;margin:0px 20px 0px 20px;" \n [[./Content/$2/thumb.jpg]] > > > > * Macro call > > {{{thumbright(300px,Wiskunde)}}} > > > > > * This used to expand to > > ./Content/Wiskunde/thumb.jpg > > > * But now it expands to nothing > I am sure I am missing something basic. Thanks! Macros have been downgraded a bit, as there was some overlapping with Babel functionalities. In particular, they are meant to replace objects, not elements, which means they cannot contain newline characters anymore. You can use a Babel block to generate the Org code you want. You can also try the following macro, which will generate the HTML code you want: #+MACRO: thumbright @@html:./Content/$2/thumb.jpg@@ Regards, -- Nicolas Goaziou