From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: [dev] footnotes improvements Date: Sun, 15 May 2011 11:47:30 -0400 Message-ID: <87oc34dkz1.fsf@fastmail.fm> References: <871v05f4ca.fsf@gmail.com> <87sjshjt4e.fsf@fastmail.fm> <87ei412amm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLdXa-0007Gv-OU for emacs-orgmode@gnu.org; Sun, 15 May 2011 11:47:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QLdXZ-0007Ka-JQ for emacs-orgmode@gnu.org; Sun, 15 May 2011 11:47:34 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:52835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLdXZ-0007KL-Gz for emacs-orgmode@gnu.org; Sun, 15 May 2011 11:47:33 -0400 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.messagingengine.com (Postfix) with ESMTP id 7DB2720B70 for ; Sun, 15 May 2011 11:47:31 -0400 (EDT) Received: from archdesk (67-197-62-83.rh2.dyn.cm.comporium.net [67.197.62.83]) by mail.messagingengine.com (Postfix) with ESMTPSA id 37660448C10 for ; Sun, 15 May 2011 11:47:31 -0400 (EDT) In-Reply-To: <87ei412amm.fsf@gmail.com> (Nicolas Goaziou's message of "Sun, 15 May 2011 16:59:46 +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: Org Mode List Nicolas Goaziou writes: >> First, a general consideration: my vote would be for highlighting the >> entire footnote label, including the brackets. IMO, leaving the brackets >> in the default face makes it more difficult to scan the buffer. >> (Similarly, I think it might be nice to fontify the entire contents of >> inline footnotes.) > > I tend to disagree here: > > - if we fontify the whole contents, it may override any special > fontification inside the inlined footnote (i.e. links, emphasis). > Moreover, it would look ugly with multi-lines footnotes (white spaces > at the beginning of the line are also fontified). Yes, I can see how overriding the fontification of links might be an issue. FWIW, auctex/font-latex provides a nice example of the behavior I have in mind. The face inside of the footnote macro overrides some faces, but not others. Leading whitespace indented, multi-line footnotes is not fontified. > - if we fontify the label and the brackets, it might be difficult to > distinguish when two or more footnotes are bound together. In the case > of a single inline footnote, the closing bracket would look silly when > fontified alone in the middle of the text. > > - fontifying only labels is enough to spot quickly a footnotes, and is > useful when you want to reuse an already defined label. Could we perhaps provide an option to fontify the brackets, if only to preserve the traditional behavior? I use footnotes that look like this.[fn:6592605c] I find them much easier to scan visually when the brackets and "fn:" are also highlighted. > That being said, I agree that the actual fontification process needs to > be tweaked a bit more (i.e. is buggy and not in is final state). Let me > improve this during the next week, then, if needed, we will discuss > again about it. > >> Square brackets containing digits inside of footnotes cause some issues. >> The primary use for such brackets would be to include LaTeX cite macros >> inside of footnotes. I imagine this might be tricky to fix, as [25] >> looks exactly like a footnote label. > > [25] isn't recognized as a footnote label, as LaTeX macros have > precedence over footnotes (`org-footnote-at-reference-p' dismisses any > footnote matching a part of a LaTeX macro). The problem is that, at the > moment, footnote contents are not protected from further processing. > Alas, unprotected macros are not seen as macros by LaTeX exporter. One > solution would be to protect the contents, but I have first to look at > the HTML exporter, as the reason might be different there. Indeed. It was the html exporter that treated the brackets as a footnote. The LaTeX exporter, by contrast, escaped the curly brackets. > Again, I will have a look at all of this during the week to come. Stay > tuned ! Thanks! Matt