[cl-typesetting-devel] How to make some text flush leftandsomeflush right?

Marc Battyani marc.battyani at fractalconcept.com
Thu Jul 20 18:37:44 UTC 2006


"Peter Seibel" <peter at gigamonkeys.com> wrote:
> 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?

Weird. Maybe put 3 :hfill instead of just one ;-)
Also can you disable the stream compression so that I can look inside the 
pdf.

Marc




More information about the cl-typesetting-devel mailing list