From: Brett Viren <bv@bnl.gov>
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <ir44noo5ap5.fsf@lycastus.phy.bnl.gov> (raw)
In-Reply-To: <CA+XG7-hyRnAuDzvxuingi-3T_oAC+VfB5vdM9F-f=5dpEX9q0w@mail.gmail.com> (Avdi Grimm's message of "Wed, 6 Jun 2012 23:47:24 -0400")
[-- Attachment #1: Type: text/plain, Size: 940 bytes --]
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: <a name="$1"><center><img width="100%" src="$2.svg" alt="$3"/> $3</center></a>
#+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.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2012-07-31 13:21 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 [this message]
2012-08-01 13:24 ` Bastien
2012-08-01 17:05 ` Brett Viren
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=ir44noo5ap5.fsf@lycastus.phy.bnl.gov \
--to=bv@bnl.gov \
--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).