* image alt text for HTML export
@ 2010-09-14 7:01 Aidan Gauland
2010-09-14 7:45 ` Christian Moe
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Aidan Gauland @ 2010-09-14 7:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 591 bytes --]
Is it possible to set the alt attribute of an image for HTML export?
If I insert an inline image into an Org buffer like so...
[[./foo.png]]
...and export it to HTML, I get something like this...
<img src="foo.png" alt="foo.png" />
But I want the alt attribute to be "foo" (or something else), not the
filename.
I know this is an HTML-specific setting, but I still want the image be
exported to other formats, so inserting literal HTML (see below) isn't
really suitable.
#+HTML: <img src="foo.png" alt="foo" />
If there is no way to do this, should I file a feature request?
--Aidan
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 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] 6+ messages in thread
* Re: image alt text for HTML export
2010-09-14 7:01 image alt text for HTML export Aidan Gauland
@ 2010-09-14 7:45 ` Christian Moe
2010-09-14 8:58 ` Aidan Gauland
2010-09-20 8:42 ` Bastien
2010-09-14 7:48 ` Eric S Fraga
2011-01-04 16:26 ` Bastien
2 siblings, 2 replies; 6+ messages in thread
From: Christian Moe @ 2010-09-14 7:45 UTC (permalink / raw)
To: emacs-orgmode
On 9/14/10 9:01 AM, Aidan Gauland wrote:
> Is it possible to set the alt attribute of an image for HTML export?
Yes, like so:
: #+attr_html: alt="Picture of a foo"
: [[./foo.png]]
See the manual section on exporting to HTML.
Cheers,
CM
> If I insert an inline image into an Org buffer like so...
>
> [[./foo.png]]
>
> ...and export it to HTML, I get something like this...
>
> <img src="foo.png" alt="foo.png" />
>
> But I want the alt attribute to be "foo" (or something else), not the
> filename.
>
> I know this is an HTML-specific setting, but I still want the image be
> exported to other formats, so inserting literal HTML (see below) isn't
> really suitable.
>
> #+HTML:<img src="foo.png" alt="foo" />
>
> If there is no way to do this, should I file a feature request?
>
> --Aidan
>
>
>
> _______________________________________________
> 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
--
Christian Moe
E-mail: mail@christianmoe.com
Website: http://christianmoe.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: image alt text for HTML export
2010-09-14 7:01 image alt text for HTML export Aidan Gauland
2010-09-14 7:45 ` Christian Moe
@ 2010-09-14 7:48 ` Eric S Fraga
2011-01-04 16:26 ` Bastien
2 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2010-09-14 7:48 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
On Tue, 14 Sep 2010 19:01:12 +1200, Aidan Gauland <aidalgol@no8wireless.co.nz> wrote:
>
> [1 <multipart/signed (7bit)>]
> [1.1 <text/plain; us-ascii (7bit)>]
> Is it possible to set the alt attribute of an image for HTML export?
> If I insert an inline image into an Org buffer like so...
>
> [[./foo.png]]
>
> ...and export it to HTML, I get something like this...
>
> <img src="foo.png" alt="foo.png" />
>
> But I want the alt attribute to be "foo" (or something else), not the
> filename.
>
> I know this is an HTML-specific setting, but I still want the image be
> exported to other formats, so inserting literal HTML (see below) isn't
> really suitable.
>
> #+HTML: <img src="foo.png" alt="foo" />
>
> If there is no way to do this, should I file a feature request?
The following works for me:
: #+attr_html: width="50%" alt="This is a test image"
: [[file:image.png]]
(without the : obviously) and with
: Org-mode version 7.01trans (release_7.01h.501.gc19a0)
[-- 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] 6+ messages in thread
* Re: image alt text for HTML export
2010-09-14 7:45 ` Christian Moe
@ 2010-09-14 8:58 ` Aidan Gauland
2010-09-20 8:42 ` Bastien
1 sibling, 0 replies; 6+ messages in thread
From: Aidan Gauland @ 2010-09-14 8:58 UTC (permalink / raw)
To: emacs-orgmode
Christian Moe <mail <at> christianmoe.com> writes:
> Yes, like so:
>
> : #+attr_html: alt="Picture of a foo"
> : [[./foo.png]]
>
> See the manual section on exporting to HTML.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
That's exactly what I was looking for. Thank you! I never would have
thought to look under "Links in HTML export" for how to set HTML
attributes. :P
Thanks,
Aidan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkyPORAACgkQjyzTRvYJmaUq2wCggZ1/iNnbnlva25pAKFm4knb2
j2AAn3wUM9uK6CGSNHo3ApPloyi4UZrM
=dG3w
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: image alt text for HTML export
2010-09-14 7:45 ` Christian Moe
2010-09-14 8:58 ` Aidan Gauland
@ 2010-09-20 8:42 ` Bastien
1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2010-09-20 8:42 UTC (permalink / raw)
To: mail; +Cc: emacs-orgmode
Christian Moe <mail@christianmoe.com> writes:
>> Is it possible to set the alt attribute of an image for HTML export?
>
> Yes, like so:
>
> : #+attr_html: alt="Picture of a foo"
> : [[./foo.png]]
>
> See the manual section on exporting to HTML.
I added a FAQ about this in org-faq.org.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: image alt text for HTML export
2010-09-14 7:01 image alt text for HTML export Aidan Gauland
2010-09-14 7:45 ` Christian Moe
2010-09-14 7:48 ` Eric S Fraga
@ 2011-01-04 16:26 ` Bastien
2 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2011-01-04 16:26 UTC (permalink / raw)
To: emacs-orgmode
Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
> #+HTML: <img src="foo.png" alt="foo" />
>
> If there is no way to do this, should I file a feature request?
I think you're looking for this:
#+ATTR_HTML: alt="My image description"
[[file:~/image.jpg][My Image]]
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-04 16:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 7:01 image alt text for HTML export Aidan Gauland
2010-09-14 7:45 ` Christian Moe
2010-09-14 8:58 ` Aidan Gauland
2010-09-20 8:42 ` Bastien
2010-09-14 7:48 ` Eric S Fraga
2011-01-04 16:26 ` Bastien
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).