emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: Unable to nest headings within export blocks [9.0 (9.0-elpa


From: Lixin Chin
Subject: Re: [O] Bug: Unable to nest headings within export blocks [9.0 (9.0-elpa @ c:/Data/Documents/emacs.d/elpa/org-20161102/)]
Date: Mon, 7 Nov 2016 10:47:08 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hi,

Thanks, yes that almost works. Unfortunately the heading line is just
reproduced verbatim in the output, whereas ideally it should be parsed
as a normal heading.

I.e., currently:

#+BEGIN_EXPORT html
,* HTML only heading
Text which should appear in HTML exports, but not \LaTeX{}.
#+END_EXPORT

Exports as:

<div class="outline-text-2" id="text-1">
* HTML only heading
Text which should appear in HTML exports, but not \LaTeX{}.
</div>

Whereas ideally I'd like to be able to input:

#+BEGIN_EXPORT html
* HTML only heading
Text which should appear in HTML exports, but not \LaTeX{}.
#+END_EXPORT

that would export as:

<div id="outline-container-org2295e90" class="outline-2">
<h2 id="org2295e90"><span class="section-number-2">2</span> HTML only heading</h2>
  <div class="outline-text-2" id="text-2">
  <p>
    Text which should appear in HTML exports, but not \LaTeX{}.
  </p>
  </div>
</div>

I'm not sure how difficult this would be to add to org-mode. It seems
that currently everything within a #+BEGIN_EXPORT <backend> ...
#+END_EXPORT block, or included using #+INCLUDE: <filename> export
<backend> is just treated as verbatim text to be include in the output,
and bypasses much of the org-mode parsing.

Regards,
Lixin


On 05/11/2016 03:41 PM, Nicolas Goaziou wrote:
Hello,

Lixin Chin <address@hidden> writes:

As per the subject, when a heading line is included within a
`#+BEGIN_EXPORT backend ... #+END_EXPORT' block, it breaks the parsing
of the block, which is instead split into multiple `paragraph' elements.

See the attached example (test.org), and associate exports (test.tex)
and (test.html).

Tested with `emacs -Q -l minimal-org.el', with the org package installed
from http://orgmode.org/elpa/, org-20161102.

* Test heading

#+BEGIN_EXPORT latex
Text which should appear in \LaTeX{} exports, but not HTML.
#+END_EXPORT

#+BEGIN_EXPORT html
* HTML only heading
Text which should appear in HTML exports, but not \LaTeX{}.
#+END_EXPORT
You need to escape the pseudo-headline with a comma.

   #+BEGIN_EXPORT html
   ,* HTML only heading
   Text which should appear in HTML exports, but not \LaTeX{}.
   #+END_EXPORT


Regards,





reply via email to

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