Re: [Orgmode] image size in html export

2010-09-15 Thread etimecowboy
From: Eric S Fraga ucec...@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 
 etimecow...@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.

___
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


Re: [Orgmode] image size in html export

2010-09-13 Thread Stefan Vollmar
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.
 
 -
 
 etimecow...@gmail.com
 
  _.,,._
.:'`:.
  .'  `.
 .'`.
 :  :
 `.'`':'`'`/'
  `.   \  |   /   ,'
\   \ |  /   /
 `\_..,,.._/'
  {`'-,_`'-}
  {`'-,_`'-}
  {`'-,_`'-}
   `YY'
 ~^^~
 
 ___
 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: voll...@nf.mpg.de   http://www.nf.mpg.de








smime.p7s
Description: S/MIME cryptographic signature
___
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


Re: [Orgmode] image size in html export

2010-09-13 Thread Eric S Fraga
On Mon, 13 Sep 2010 07:01:24 +0100 (BST), etimecowboy 
etimecow...@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.
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
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