From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug, ox-latex] footnotes with math in narrowed buffer Date: Fri, 24 Apr 2015 22:41:26 +0200 Message-ID: <878udhz2bt.fsf@gmx.us> References: <87y4lhzf63.fsf@gmx.us> <87tww5ze22.fsf@gmx.us> <87oamdco8r.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlkTM-0004ne-Lo for emacs-orgmode@gnu.org; Fri, 24 Apr 2015 16:45:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlkTI-0002Sy-Ia for emacs-orgmode@gnu.org; Fri, 24 Apr 2015 16:45:16 -0400 Received: from plane.gmane.org ([80.91.229.3]:35025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlkTF-0002RZ-3d for emacs-orgmode@gnu.org; Fri, 24 Apr 2015 16:45:12 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YlkTA-0000NP-Nn for emacs-orgmode@gnu.org; Fri, 24 Apr 2015 22:45:04 +0200 Received: from f052144110.adsl.alicedsl.de ([78.52.144.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Apr 2015 22:45:04 +0200 Received: from rasmus by f052144110.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Apr 2015 22:45:04 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, Nicolas Goaziou writes: >>> * h1 >>> foo[fn:1] >>> >>> * Footnotes >>> [fn:1] if \alpha $\beta$ \(\gamma\) >>> >>> Narrow it to h1 and export the buffer. Something like this is exported: >> >> This also does not seem to work correctly when exporting with ox-html. >> But there the problem is that the parse-tree does not recognize any >> latex-fragments. So org-html--build-mathjax-config returns nil rather >> than the appropriate mathjax setup. > > `org-html--build-mathjax-config' needs to check, in addition to parse > tree, cdr of all associations in (plist-get > info :footnote-definition-alist), and values of all parsed keywords. It seems you did not do this. I will add this over the weekend. >> BTW: While it's nice to try to make a sensible decision on whether to load >> mathjax, this rest of pretty fragile assumptions. I could INCLUDE a html >> file with math. > > What do you suggest instead? Load mathjax every time? Perhaps. It's a tough call. On the one hand the current behavior very much seems like the famous "smart" can of worms. On the other hand, unnecessary JS should be avoided at very high costs. Perhaps it's enough to check is mathjax or latex math has been explicitly set for these corner cases. —Rasmus -- Hvor meget poesi tror De kommer ud af et glas isvand?