[cl-typesetting-devel] (make-toc) usage question

parisnight at softhome.net parisnight at softhome.net
Tue May 4 17:54:39 UTC 2010


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)))) 




More information about the cl-typesetting-devel mailing list