* image size in html export
@ 2010-09-13 6:01 etimecowboy
2010-09-13 7:22 ` Stefan Vollmar
2010-09-13 8:01 ` Eric S Fraga
0 siblings, 2 replies; 4+ messages in thread
From: etimecowboy @ 2010-09-13 6:01 UTC (permalink / raw)
To: emacs-orgmode
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'
~^^~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: image size in html export
2010-09-13 6:01 image size in html export etimecowboy
@ 2010-09-13 7:22 ` Stefan Vollmar
2010-09-13 8:01 ` Eric S Fraga
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Vollmar @ 2010-09-13 7:22 UTC (permalink / raw)
To: etimecowboy; +Cc: emacs-orgmode Mailinglist
[-- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: image size in html export
2010-09-13 6:01 image size in html export etimecowboy
2010-09-13 7:22 ` Stefan Vollmar
@ 2010-09-13 8:01 ` Eric S Fraga
2010-09-16 3:37 ` etimecowboy
1 sibling, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2010-09-13 8:01 UTC (permalink / raw)
To: etimecowboy; +Cc: org-mode mailing list
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
On Mon, 13 Sep 2010 07:01:24 +0100 (BST), etimecowboy <etimecowboy@googlemail.com> 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.
The following
: #+attr_html: width="50%"
: [[./image.png]]
for instance, works just fine for me. This is with up-to-date org.
[-- Attachment #2: Type: text/plain, Size: 75 bytes --]
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
[-- Attachment #3: 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: image size in html export
2010-09-13 8:01 ` Eric S Fraga
@ 2010-09-16 3:37 ` etimecowboy
0 siblings, 0 replies; 4+ messages in thread
From: etimecowboy @ 2010-09-16 3:37 UTC (permalink / raw)
To: e.fraga, ucecesf; +Cc: etimecowboy, emacs-orgmode
From: Eric S Fraga <ucecesf@ucl.ac.uk>
Subject: Re: [Orgmode] image size in html export
Date: Mon, 13 Sep 2010 09:01:24 +0100
> On Mon, 13 Sep 2010 07:01:24 +0100 (BST), etimecowboy <etimecowboy@googlemail.com> 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.
>
> The following
>
> : #+attr_html: width="50%"
> : [[./image.png]]
>
> for instance, works just fine for me. This is with up-to-date org.
It works for me too! Thanks a lot.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-16 3:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 6:01 image size in html export etimecowboy
2010-09-13 7:22 ` Stefan Vollmar
2010-09-13 8:01 ` Eric S Fraga
2010-09-16 3:37 ` etimecowboy
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).