From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brett Viren Subject: Re: Embed images in formats best suited for HTML and LaTeX export and inline viewing Date: Wed, 01 Aug 2012 13:05:06 -0400 Message-ID: References: <87a9yepwx5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwcMB-0002lE-D0 for emacs-orgmode@gnu.org; Wed, 01 Aug 2012 13:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwcM9-0003AI-6P for emacs-orgmode@gnu.org; Wed, 01 Aug 2012 13:05:11 -0400 In-Reply-To: <87a9yepwx5.fsf@gnu.org> (Bastien's message of "Wed, 01 Aug 2012 15:24:38 +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: Bastien Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Bastien, Bastien writes: > Brett Viren writes: > >> Can they have newlines? > > I don't think so -- did you try? Now, there is an idea! I had not tried, but yes, the are accepted and a "multiline" macro can be defined using '\n' characters like: #+MACRO: mimg #+HTML:
$3 $3
\n#+LATEX: \begin{figure}\label{$1}\includegraphics[width=\textwidth]{$2.pdf}\caption{$3}\end{figure} I can now call this macro with a single line like: {{{mimg(fig-overview,dataflow,Overview of the data flow.)}}} and both HTML and LaTeX/PDF export produces correct output. I give up the "fig:" style prefix for the label, but that is a small detail. So, I'm satisfied now. Thanks for the nudge! -Brett. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlAZYcIACgkQEixH2Z0dKCxHOACcCQ8nrFaX7Pa3UGzTy8HdvCni to0AnAy/Tb9G9IKLNwH3gJo9gaWKe3tv =cIFK -----END PGP SIGNATURE----- --=-=-=--