From parisnight at softhome.net Tue May 4 17:54:39 2010 From: parisnight at softhome.net (parisnight at softhome.net) Date: Tue, 04 May 2010 11:54:39 -0600 Subject: [cl-typesetting-devel] (make-toc) usage question Message-ID: Hello, I'm enjoying cl-typesetting but I have a question about the make-toc function. I am trying to use it in compile-text as shown below, but I don't see any output on the page. It generates some forms when I execute it at the REPL, but I don't see anything in the pdf output. From Bob (defun hello (&optional (file #P"toctest.pdf")) (tt:with-document () (let ((content (compile-text () (paragraph (:top-margin 10 :font-size 12) "Test the kw-extension table of contents") "---expect table of contents below---" (tt::make-toc) (tt::put-string "asdfasdf") (eval (tt::chapter-markup 0 "Introduction")) (eval (tt::chapter-markup 0 "Introduction")) (eval (tt::chapter-markup 1 "Introduction")) (eval (tt::chapter-markup 2 "Introduction"))))) (draw-pages content :finalize-fn #'tt::page-decorations :margins '(36 72 36 100) :header (generate-header1) :footer (generate-footer) :size (rest (assoc :Letter tt::+paper-sizes+))) (when pdf:*page* (finalize-page pdf:*page*)) (pdf:write-document file)))) From parisnight at softhome.net Mon May 24 19:06:45 2010 From: parisnight at softhome.net (parisnight at softhome.net) Date: Mon, 24 May 2010 13:06:45 -0600 Subject: [cl-typesetting-devel] (make-toc) usage question - answer Message-ID: In response to my own question earlier, (make-toc) returns a list of elements each of which must be evaluated. So to get the table of contents printed within a compile-text form we must use: (dolist (i (tt::make-toc)) (eval i)) Are there many users of cl-typesetting existing?