From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Hofer Subject: Re: Problem with sectioning function for LaTeX export Date: Thu, 29 Apr 2010 14:10:42 +0200 Message-ID: <87aasmxxvh.wl%sebhofer@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7Sa7-0004B9-Cu for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 08:11:03 -0400 Received: from [140.186.70.92] (port=38778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7Sa6-0004As-4d for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 08:11:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7Sa3-000652-Jb for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 08:11:01 -0400 Received: from lo.gmane.org ([80.91.229.12]:35098) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7Sa3-00064f-0B for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 08:10:59 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O7Sa1-0004qW-0O for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 14:10:57 +0200 Received: from wlan-022-137.uconnect.univie.ac.at ([77.80.22.137]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Apr 2010 14:10:56 +0200 Received: from sebhofer by wlan-022-137.uconnect.univie.ac.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Apr 2010 14:10:56 +0200 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: emacs-orgmode@gnu.org Hi Carsten, thanks for your reply! At Tue, 27 Apr 2010 17:44:07 +0200, Carsten Dominik wrote: > I think it must be > > ("Heading" "\section[year]{%s}" "\section*[year]{%s}") > > Note the %s for the heading, and also it i just one flat list of 3 > items. > > And yes, this is not too well documented. I tried that actually but to no avail. I tracked down the problem to the following code in org-latex.el (if (consp (cdr sec)) (setq start (nth (if num 0 2) sec) end (nth (if num 1 3) sec)) (setq start (if num (car sec) (cdr sec)))) For a flat list as you suggested sec is ("\section[year]{%s}" "\section*[year]{%s}"). The thing is that then (consp (cdr sec)) evaluates to true, which I think is not the supposed behaviour. Replacing (cdr sec) by (cadr sec) would fix this. Is this a bug or just me being too stupid? On another subject: Wouldn't it be nice if the properties of the current headline would be accessible by the sectioning function? I think that would proof very powerful to create customized export classes (together with customized latex commands). And I guess it would be quite easy to implement, right? Anyway, thanks for your help (and of course for your great work on org-mode, I really love it!) Sebastian