From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-latex question Date: Sun, 12 Apr 2015 20:15:23 +0200 Message-ID: <877fth5i2s.fsf@nicolasgoaziou.fr> References: <3A6F6CD4-C7F2-4796-8D16-007AFC0BEC91@agrarianresearch.org> <87bnitde2a.fsf@nicolasgoaziou.fr> <87fv85fzxp.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhMOX-0005wY-94 for emacs-orgmode@gnu.org; Sun, 12 Apr 2015 14:14:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhMOT-0005XB-7Y for emacs-orgmode@gnu.org; Sun, 12 Apr 2015 14:14:09 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:52823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhMOT-0005Vl-1A for emacs-orgmode@gnu.org; Sun, 12 Apr 2015 14:14:05 -0400 In-Reply-To: <87fv85fzxp.fsf@wmi.amu.edu.pl> (Marcin Borkowski's message of "Sun, 12 Apr 2015 11:39:30 +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: Marcin Borkowski Cc: org-mode mailing list Hello, Marcin Borkowski writes: > True. This is because org-latex-headline is written this way: > > ,---- > | (if (and numberedp opt-title > | ;; ^^^ ^^^^^^^^^ why this? Maybe there's a good reason... > | (not (equal opt-title full-text)) > | (string-match "\\`\\\\\\(.*?[^*]\\){" section-fmt)) > | (...) > | ;; Impossible to add an alternative heading. Fallback to > | ;; regular sectioning format string. > | (format section-fmt full-text > | (concat headline-label pre-blanks contents))) > `---- > > However, it need not be this way: LaTeX itself (or more precisely: the > default classes) seem to support the alt-title even for starred > sectioning commands. I removed NUMBEREDP, since I cannot remember the reason for its presence. > Also, another way to circumvent this (/if/ there is some deep reason for > the above code which I don't see, which is quite probable) is to hack > into this part of the let form in org-latex-headline: > > ,---- > | (section-back-end > | (org-export-create-backend > | :parent 'latex > | :transcoders > | '((underline . (lambda (o c i) (format "\\underline{%s}" c)))))) > `---- > > and apply a (smart enough) filter in the (auxiliary) section-back-end, > something like removing a match for > > \\footnote{.*?} > > (this would be easy to break; in general, regexen are not a suitable > tool for this, because they can't "count" and match braces; however, > writing a suitable filter should not be extremely difficult). Or ignore completely footnotes-references in the anonymous back-end. However, is it needed since :ALT_TITLE: is now supported for all headlines? I'm not sure. Regards, -- Nicolas Goaziou