[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-e-html and table of contents
From: |
Nick Dokos |
Subject: |
Re: [O] org-e-html and table of contents |
Date: |
Thu, 23 Aug 2012 15:29:40 -0400 |
Eric Schulte <address@hidden> wrote:
> I'd recommend the attached patch.
>
> Thanks,
>
> From 228c4bbdd2fc145b135de233632e8884d1d53cd7 Mon Sep 17 00:00:00 2001
> From: Eric Schulte <address@hidden>
> Date: Thu, 23 Aug 2012 12:41:52 -0600
> Subject: [PATCH] Better use of default org-export-with-toc value
>
> * contrib/lisp/org-e-html.el (org-e-html-template): Default value of t
> for org-export-with-toc has no impact, so instead when t set TOC depth
> to 4.
> ---
> contrib/lisp/org-e-html.el | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
> index 4e9d398..ee0f247 100644
> --- a/contrib/lisp/org-e-html.el
> +++ b/contrib/lisp/org-e-html.el
> @@ -1473,6 +1473,7 @@ original parsed data. INFO is a plist holding export
> options."
> <h1 class=\"title\">%s</h1>\n" (org-export-data (plist-get info :title)
> info))
> ;; table of contents
> (let ((depth (plist-get info :with-toc)))
> + (when (eq t depth) (setq depth 4))
> (when (wholenump depth) (org-e-html-toc depth info)))
> ;; document contents
> contents
In the t case, the depth should probably be set to org-export-headline-levels,
instead of 4.
Nick