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: Tue, 31 Jul 2012 09:20:22 -0400 Message-ID: References: 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]:51402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwCNf-0002D6-SD for emacs-orgmode@gnu.org; Tue, 31 Jul 2012 09:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwCNa-00028L-0r for emacs-orgmode@gnu.org; Tue, 31 Jul 2012 09:20:59 -0400 Received: from smtpgw.bnl.gov ([130.199.3.132]:57364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwCNZ-000258-KY for emacs-orgmode@gnu.org; Tue, 31 Jul 2012 09:20:53 -0400 Received: from localhost ([127.0.0.1] helo=lycastus.phy.bnl.gov) by lycastus.phy.bnl.gov with esmtp (Exim 4.80) (envelope-from ) id 1SwCN4-0003Bs-U8 for emacs-orgmode@gnu.org; Tue, 31 Jul 2012 09:20:22 -0400 In-Reply-To: (Avdi Grimm's message of "Wed, 6 Jun 2012 23:47:24 -0400") 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 --=-=-= Content-Type: text/plain Hi, I'm back wanting to specify per-export image formats again. I learned about macros in org-mode and I have found a half-solution: #+MACRO: himg #+HTML:
$3 $3
#+MACRO: limg #+LATEX: \begin{figure}\label{$1}\includegraphics[width=\textwidth]{$2.pdf}\caption{$3}\end{figure} I then call each macro explicitly: {{{limg(fig:overview,dataflow,Overview of the data flow.)}}} {{{himg(fig-overview,dataflow,Overview of the data flow.)}}} It works but has a few warts: 0) It totally subverts org-mode's figure markup. 1) So far I think I must use two macro calls thus annoyingly repeating data. Can macros be nested? Can they have newlines? 2) I prefer "fig:label" type labels in LaTeX but the HTML export apparently forms the link translating ":" to "-". So, this must be taken into account when the macros are called. Any other ideas? Thanks, -Brett. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlAX25YACgkQEixH2Z0dKCxTsQCfYoBSE2U/UR07rHgPFCxrsG2G wO8AnidRs+6CHP4kz5zTVjKEdDpKfBQq =Wggm -----END PGP SIGNATURE----- --=-=-=--