[cl-typesetting-devel] How to make some text flush left andsomeflush right?
Peter Seibel
peter at gigamonkeys.com
Thu Jul 20 18:09:43 UTC 2006
On Jul 20, 2006, at 10:59 AM, Marc Battyani wrote:
> hbox is not normally not meant to be used at a user level so you
> should use a paragraph in the header too.
> You probably want to use :fill as h-align value in addition to
> the :hfill where you want the separation.
Okay, almost there. Now I've got this:
(draw-pages content
:size :Letter
:margins '(72 72 72 72) ; left top right bottom
:header-top 36
:footer-bottom 36
:header #'(lambda (page)
(declare (ignore page))
(compile-text (:font "Times-Italic" :font-size 10)
(paragraph (:h-align :fill)
(put-string (get-contextual-variable 'chapter-name))
:hfill
(put-string (format nil "Page ~d of ~d"
pdf:*page-number*
(find-ref-point-page-number :the-end))))))
:footer (compile-text (:font "Times-Italic" :font-size 10)
(paragraph (:h-align :fill)
(put-string
(format nil "Copyright ~c ~a" +copyright+ *copyright*))
:hfill
(put-string (date-string)))))
The only problem is that there are weird bits of inter-string space.
(See attached PDF.) For instance the "Gigamonkeys Markup" on the left
side of the header is rendered like "Gi ga monkeys Markup" and the
date in the footer has an inordinate amount of space between the
month and the year. Advice?
-Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: docs.pdf
Type: application/pdf
Size: 12153 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-typesetting-devel/attachments/20060720/31eb027e/attachment.pdf>
-------------- next part --------------
--
Peter Seibel * peter at gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp * http://www.gigamonkeys.com/book/
More information about the cl-typesetting-devel
mailing list