emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Brett Viren <bv@bnl.gov>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <ir4a9ye35ml.fsf@lycastus.phy.bnl.gov> (raw)
In-Reply-To: <87a9yepwx5.fsf@gnu.org> (Bastien's message of "Wed, 01 Aug 2012 15:24:38 +0200")

[-- Attachment #1: Type: text/plain, Size: 793 bytes --]

Hi Bastien,

Bastien <bzg@gnu.org> writes:

> Brett Viren <bv@bnl.gov> 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: <a name="$1"><center><img width="100%" src="$2.svg" alt="$3"/> $3</center></a>\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.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2012-08-01 17:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 13:26 Embed images in formats best suited for HTML and LaTeX export and inline viewing Brett Viren
2012-06-07  3:47 ` Avdi Grimm
2012-07-31 13:20   ` Brett Viren
2012-08-01 13:24     ` Bastien
2012-08-01 17:05       ` Brett Viren [this message]
2012-08-02 15:11         ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ir4a9ye35ml.fsf@lycastus.phy.bnl.gov \
    --to=bv@bnl.gov \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).