emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Hofer <sebhofer@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Problem with sectioning function for LaTeX export
Date: Fri, 30 Apr 2010 01:05:18 +0200	[thread overview]
Message-ID: <hrd3bp$5be$1@dough.gmane.org> (raw)
In-Reply-To: <87aasmxxvh.wl%sebhofer@gmail.com>

Oh, nevermind. I figured it out,
(cons Heading (cons "\section[year]{%s}" "\section*[year]{%s}"))
solves the problem. I guess I really need to learn more about the 
different types of sequences in lisp. Sorry for that.

Cheers, Sebastian

On 29.04.10 14:10 Uhr, Sebastian Hofer wrote:
> 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
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

  reply	other threads:[~2010-04-29 23:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-29 12:10 Problem with sectioning function for LaTeX export Sebastian Hofer
2010-04-29 23:05 ` Sebastian Hofer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-04-18 10:05 Sebastian Hofer
2010-04-27 15:44 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hrd3bp$5be$1@dough.gmane.org' \
    --to=sebhofer@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).