emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Problems exporting literal HTML fragments


From: Alex Fu
Subject: [Orgmode] Problems exporting literal HTML fragments
Date: Mon, 19 Mar 2007 10:21:23 -0400
User-agent: Opera Mail/9.10 (Win32)

Hello all,

When using the #+TEXT:, #+HTML:, or #BEGIN_HTML...#END_HTML directives to output literal html fragments, the resulting markup is enclosed in a paragraph with <p> and </p> tags. Whenever I need something else, I am forced to inhibit their generation in clumsy ways, "cancelling out" the opening and closing paragraph tags like this:

#+TEXT: @</p>@<p class="marginpar">@<a href="/home.html">Back to main@</a>@</p>@<p>

or

#+HTML: </p><p class="marginpar"><a href="/home.html">Back to main</a></p><p>

Thus, I think it would be a good idea *not* to enclose literal html fragments in a paragraph (<p>...</p>), given that the markup is already being controlled through these directives.

* * *

Possible bug:

#+BEGIN_HTML...#+END_HTML blocks are not correctly interpreted if they consist of multiline text. Only 1 line --the one exactly above #+END_HTML-- is exported literally.

For example:

  #+BEGIN_HTML
  </p><div id="special"><p><img src="someimage.jpg"/></p></div><p>
  #+END_HTML

does right thing (well, almost, because of having to cancel out <p> tags), producing:

  <div id="special"><p><img src="someimage.jpg"/></p></div>

However,

  #+BEGIN_HTML
  </p><div id="special">
  <p><img src="someimage.jpg"/></p>
  </div><p>
  #+END_HTML

produces:

  <p>
  &lt;/p&gt;&lt;div id="special"&gt;
  &lt;img src="someimage.jpg"/&gt;
  </div>

Tested on org 4.68, GNU Emacs 22.0.92.1.

Kind regards.

--
Alex Fu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]