From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: bug: html export, latex fragments and emphasize Date: Fri, 12 Nov 2010 07:22:21 -0600 Message-ID: <23641707-153F-4F09-B3E1-2AF9CD5CA80F@gmail.com> References: <87y68z2uv1.wl%n.goaziou@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=39422 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGtau-0006M8-0Q for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 08:23:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGtaC-0004cL-1f for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 08:22:25 -0500 Received: from mail-gw0-f41.google.com ([74.125.83.41]:51400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGtaB-0004cH-S1 for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 08:22:24 -0500 Received: by gwj16 with SMTP id 16so1706426gwj.0 for ; Fri, 12 Nov 2010 05:22:23 -0800 (PST) In-Reply-To: <87y68z2uv1.wl%n.goaziou@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Org Mode List On Nov 11, 2010, at 7:28 PM, Nicolas Goaziou wrote: > Hello, > > Here is a problem when a latex fragment is split across two lines and > an emphasize follows. The text won't be italicized upon exporting to > HTML. > > ===== > * latex-fragments bug > > Imagine we have a formula starting here $e^{i\pi} + > 1 = 0$. Now we have a problem with /emphasize/. > ===== > > This is because the line starts with a char with 'org-protected > property and, thus, get caught by the "Protected HTML" (org-html.el > l. 1216) part of `org-export-as-html'. In others words, the line is > inserted as-is in the output buffer, before getting any > transformation. > > I'm not sure how it should be done (I don't get yet the usefulness of > this "Protected HTML" part), but that piece of code may be moved after > the `org-html-expand' call, as long as every sub-function in > `org-html-expand' has a check to prevent modifying protected stuff > (this not yet the case for `org-export-with-emphasize' and > `org-html-protect' while others seem ok). > > But even in this case, every function getting called after that would > be ignored. So, for example, links would not be inserted. > > Couldn't the "Protected HTML" part be removed altogether? Hi Nicolas, I am not entirely sure if it could be removed. The origin of this is to make begin_html ... end_html work to keep entire blocks unmodified. It is possible that the code after this line by now has enough checks for protectedness - but I am not sure. For the time being, I have pushed a different fix which does fix the specific issue you show, but will still fail if the math expression in more than 2 lines :( It might be worth while to switch the protected html part off and see what happens - but that would have to be done on a special branch with significant testing by a number of people. Regards - Carsten