[cl-typesetting-devel] Why does this wrap?
Marc Battyani
marc.battyani at fractalconcept.com
Thu Sep 7 07:26:14 UTC 2006
"Peter Seibel" <peter at gigamonkeys.com> wrote:
> With the code below I get a table that wraps the contents of the first
> cell despite there being plenty of room for the text. Can someone explain
> why or what I'm missing or whatever.
Putting the cell content in a paragraph fixes this:
BTW each cell is a separate cl-typesetting engine and don't inherit the
settings like the font, font-size, etc.
(defun everyday-checklist (&optional (file #P"/tmp/checklist.pdf"))
(with-document ()
(let ((content
(compile-text ()
(paragraph (:font "Helvetica" :font-size 6)
(table (:col-widths (list* 60 (loop repeat 8 collect (/ 115
8))) :border .1 :background-color '(1 1 1) :cell-padding 0 :padding
0 :splittable-p t)
(row ()
(cell () (put-string "Date"))
(cell () (put-string "M"))
(cell () (put-string "T"))
(cell () (put-string "S"))
(cell () (put-string "S"))
(cell () (put-string "J"))
(cell () (put-string "M"))
(cell () (put-string "R"))
(cell () (put-string "W")))
(dotimes (i 21)
(row ()
(cell () (paragraph (:h-align :left)
(put-string "2006-09-06")))
(dotimes (i 8)
(cell ()
(checkbox))))))))))
(draw-pages content :size #-(or)(cons (* 3 72) (* 5 72)) #+
(or):letter :margins '(18 18 18 18) :break :always)
(pdf:write-document file)))
(truename file))
Marc
More information about the cl-typesetting-devel
mailing list