Re: [Orgmode] Org-mode version 4.68

2007-03-19 Thread Alex Fu

Dear all,

On Fri, 16 Mar 2007 13:08:33 -0400, Carsten Dominik  
<[EMAIL PROTECTED]> wrote:



* Exporting text before the first heading ?

  It seems that text before the first heading is not exported.  Using
  #+TEXT: might help, but #+TEXT: does not understand links.  Is that
  intentional ?


I guess this is not very well though-out, and maybe it would be good
to simply export the text before the first heading.
That TEXT is not HTML processed I would also consider as
a bug, but I know that some have made clever use of this bug
to insert custom HTML into a file.  This is now no loger
necessary since you can embed protected HTML with special commands.


Note that the #+HTML: and #+BEGIN_HTML...#+END_HTML directives are not  
(yet) a replacement for inserting literal html as it can be done using  
#+TEXT:.  As far as I've noticed, #+TEXT: inserts html (or any other text)  
before the first heading (before the  in the resulting html file),  
something the #+HTML directives can't do, since the effect of placing it  
before the first heading is null, as it is not exported.


I don't expect to use Org as a full-featured publishing engine.  Still,  
the following example represents a very specific use of #+TEXT: that I  
need for implementing file-specific site navigation (as opposed to  
project-specific, which in this case is configured using :preamble in  
`org-publish-project-alist').  These are the relevant lines in the org  
file:


-
  #+TEXT: @@@Return to  
introduction@@

  * Sonata for Unaccompanied Achilles
^ will be exported as  after ...
-

AFAIK, I can't use #+HTML: to insert that snippet before the , or  
first level 'org' heading, which is what I need.



Hmmm, not clear to me how exactly this should be done.  Should we
cast a vote for exporting text before the first heading?


This is my idea: if the text before the first heading were exported and  
that included the #+HTML: directives, it would be one way (out of perhaps  
a handful) to avoid having to use the #+HTML: and #+TEXT: directives for  
the same purpose -- exporting literal html.  In the end, for literal html  
we'd just use #+HTML: anywhere in the file, while #+TEXT: could be  
reserved for a different purpose.


Vote: +1

But the final decision should consider other (broader) aspects...

Kind regards.

--
Alex Fu


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Problems exporting literal HTML fragments

2007-03-19 Thread Alex Fu

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  and  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: @@@Back to  
main@@@


or

  #+HTML: Back to  
main


Thus, I think it would be a good idea *not* to enclose literal html  
fragments in a paragraph (...), 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
  
  #+END_HTML

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


  

However,

  #+BEGIN_HTML
  
  
  
  #+END_HTML

produces:

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

Tested on org 4.68, GNU Emacs 22.0.92.1.

Kind regards.

--
Alex Fu


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode