From: Stefan Vollmar <vollmar@nf.mpg.de>
To: etimecowboy <etimecowboy@googlemail.com>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: image size in html export
Date: Mon, 13 Sep 2010 09:22:12 +0200 [thread overview]
Message-ID: <AD70EFEF-B29D-45E8-B25C-FE8321A636F1@nf.mpg.de> (raw)
In-Reply-To: <20100913.070124.2244477084450416670.etimecowboy@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2208 bytes --]
Dear etimecowboy,
you can use a MACRO to create (almost) any HTML code you require.
Put this at the top of your Org file (I prefer to have macros in a separate file which I then include like this: "#+setupfile: my-macro-file.org"):
#+macro: my-image #+html: <img width="100px" src="./images/my-image.png" alt="The Title" />
Insert the image (here: scaled to a width of 100 pixels) with
{{{my-image()}}}
Here is a more fancy version that takes some image properties as arguments to the macro (file name, description, size in pixels):
#+macro: my-image #+html: <img width="$3px" src="./images/$1" alt="$2" />
Insert the image with
{{{my-image(alpha.png, The Alpha character, 87)}}}
CAVEAT: (1) observe that it is alpha.png and not "alpha.png" when used as a macro argument, (2) put the call of the macro at the beginning of a new line: this type of macro does not work inside a paragraph, as it uses the #+html command which needs to start at the beginning of a line.
Warm regards,
Stefan
On 13.09.2010, at 08:01, etimecowboy wrote:
> Hi everyone,
>
> Does anybody know how to set the size of an in-line image when exporting html? I know that org can set that when exporting latex (with #+ATTR_LaTeX: width=), but could not find a similar way when exporting html. Thanks for the help.
>
> -----------------------------
>
> etimecowboy@gmail.com
>
> _.,----,._
> .:' `:.
> .' `.
> .' `.
> : :
> ` .'`':'`'`/ '
> `. \ | / ,'
> \ \ | / /
> `\_..,,.._/'
> {`'-,_`'-}
> {`'-,_`'-}
> {`'-,_`'-}
> `YXXXXY'
> ~^^~
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213 FAX +49-221-4726-298
Tel.: +49-221-478-5713 Mobile: 0160-93874279
Email: vollmar@nf.mpg.de http://www.nf.mpg.de
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4409 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2010-09-13 7:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 6:01 image size in html export etimecowboy
2010-09-13 7:22 ` Stefan Vollmar [this message]
2010-09-13 8:01 ` Eric S Fraga
2010-09-16 3:37 ` etimecowboy
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AD70EFEF-B29D-45E8-B25C-FE8321A636F1@nf.mpg.de \
--to=vollmar@nf.mpg.de \
--cc=emacs-orgmode@gnu.org \
--cc=etimecowboy@googlemail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.