[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [bug?] Link to be exported only in HTML
From: |
Richard Lawrence |
Subject: |
Re: [O] [bug?] Link to be exported only in HTML |
Date: |
Wed, 04 Feb 2015 08:12:07 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Hi Sebastien,
Sebastien Vauban <address@hidden>
writes:
> #+TITLE: ECM Links for HTML only
>
> * Test
>
> If I want to include a link (GPL logo, here) to the HTML export, I should put
> it
> in a block, right?
>
> #+begin_html
> [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
> #+end_html
>
> Well, that does not work: the link is not rendered as a link; it's copied
> "verbatim".
>
> OTOH, the link on its own is correctly exported to HTML:
>
> [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
>
> ... but it fails to be exported to LaTeX (causing a "TeX capacity exceeded"
> error), reason why I must not have the link when exporting to LaTeX.
>
> Is this a bug? Is there an alternative?
As far as I understand, this is not a bug: #+begin_html ... #+end_html
is for writing literal HTML that will be included in HTML output.
Thus, if you only care about the link appearing in HTML output, just use
literal HTML:
#+begin_html
<a href="http://opensource.org/licenses/GPL-3.0"><img
src="http://img.shields.io/:license-gpl-blue.svg"></a>
#+end_html
(That is hand-translated...you should check whether it is the right HTML for
your document.)
Best,
Richard