From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: 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 08:44:47 -0800 Message-ID: References: <338ea338-093e-6323-083e-ac8732c44778@gmail.com> <878tsybcg7.fsf@nicolasgoaziou.fr> <3cb1d470-fb7b-adde-70ca-d34a3ec9c717@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3n2U-0000r2-20 for emacs-orgmode@gnu.org; Mon, 07 Nov 2016 11:44:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3n2Q-0005Mr-SF for emacs-orgmode@gnu.org; Mon, 07 Nov 2016 11:44:54 -0500 Received: from iport-acv5-out.ucsd.edu ([132.239.0.10]:53816) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3n2Q-0005MC-Fp for emacs-orgmode@gnu.org; Mon, 07 Nov 2016 11:44:50 -0500 In-Reply-To: <3cb1d470-fb7b-adde-70ca-d34a3ec9c717@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Lixin Chin Cc: emacs-orgmode@gnu.org On Mon, 7 Nov 2016, Lixin Chin wrote: > 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: > >
> * HTML only heading > Text which should appear in HTML exports, but not \LaTeX{}. >
> > 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: > >
>

2 HTML only > heading

>
>

> Text which should appear in HTML exports, but not \LaTeX{}. >

>
>
> Run this: #+BEGIN_SRC emacs-lisp :eval never-export :exports none (require 'ob-org) (defun eval-if-html () (if (not (eq org-export-current-backend 'html)) "never")) #+END_SRC Then export this with the html backend: #+OPTIONS: toc:nil #+BEGIN_SRC org :eval (eval-if-html) :exports results :results replace ,* HTML only heading Text which should appear in HTML exports, but not \LaTeX{}. #+END_SRC and you will get this:

1 HTML only heading

Text which should appear in HTML exports, but not \LaTeX{}.

With other backends you get nothing. HTH, Chuck