emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Problem with sectioning function for LaTeX export


From: Sebastian Hofer
Subject: [Orgmode] Re: Problem with sectioning function for LaTeX export
Date: Thu, 29 Apr 2010 14:10:42 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/24.0.50 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]