[cl-typesetting-devel] Kerning question: hbox vs. paragraph

Peter Heslin pj at heslin.eclipse.co.uk
Fri Jan 13 21:48:55 UTC 2006


On Fri, Jan 13, 2006 at 08:52:24PM +0100, Marc Battyani wrote:
> You can make a simplified macro inspired by paragraph or expanding into a paragraph if you
> want. I often do that.

OK, thanks.  While I'm on the subject of headers, if the header or
footer argument to draw-pages is a function, and that function returns
NIL, then cl-typesetting throws an error, but I think this should be a
way of indicating that, on this particular page, no header or footer
should be drawn.  It's just a matter of adding two WHENs to
finalize-page.

Best,

Peter

--- top-level-orig.lisp 2006-01-13 21:39:54.000000000 +0000
+++ top-level.lisp      2006-01-13 21:40:11.000000000 +0000
@@ -141,16 +141,16 @@
              (pdf:with-saved-state
                (stroke (typecase content
                          (box content)
-                         (t (make-filled-vbox content dx (- top-margin header-top)
-                                              :top nil)))
+                         (t (when content (make-filled-vbox content dx (- top-margin header-top)
+                                              :top nil))))
                        left-margin (- height header-top)))))
          (when footer
            (let ((content (if (functionp footer) (funcall footer pdf:*page*) footer)))
              (pdf:with-saved-state
                (stroke (typecase content
                          (box content)
-                         (t (make-filled-vbox content dx (- bottom-margin footer-bottom)
-                                              :bottom nil)))
+                         (t (when content (make-filled-vbox content dx (- bottom-margin footer-bottom)
+                                              :bottom nil))))
                        left-margin bottom-margin))))))
     (when finalize-fn
       (funcall finalize-fn pdf:*page*))



More information about the cl-typesetting-devel mailing list