From ae99cfbd9a0372b577a23636f0677f266a559c5f Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Tue, 19 Mar 2013 18:25:18 +0100 Subject: Implement full table of contents generation By default panfry now generates a full table of contents navigation for split page documents. This means the TOC navitation has links to all pages and page sections. Simple, page only level table of contents can be switched on by passing the --simple-toc option. --- panfry/main.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'panfry/main.py') diff --git a/panfry/main.py b/panfry/main.py index 1a7acf7..776fd52 100755 --- a/panfry/main.py +++ b/panfry/main.py @@ -24,6 +24,7 @@ def get_env(): return env + def main(): env = get_env() if os.path.exists(env.pub_path): @@ -32,6 +33,8 @@ def main(): document = Document(env.src_path) document.set_templater(Templater(env.templates_path)) + if env.simple_toc: + document.set_simple_toc ###### Create PDF pdffile = document.publish_pdf(env.pub_path) -- cgit v1.2.3