[cl-typesetting-devel] Should justification change inter-letter spacing?
Peter Heslin
pj at heslin.eclipse.co.uk
Mon Mar 27 09:43:21 UTC 2006
A bit of experimentation shows that when setting a pathological
paragraph with ( :h-align :justified ), cl-typesetting achieves the
justification not only by stretching the inter-word space, as it
should do, but also by slightly stretching the inter-letter spacing,
which seems like very bad practice to me. TeX never does this --
instead, it warns you and sticks text into the margin, which makes it
obvious that there is a problem.
Here is an example.
(defun test ()
(with-document ()
(draw-pages (compile-text ()
(paragraph (:h-align :justified)
"aaaaaaaaaaaaa"
"aaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaa
aaaaaaaaaaa aaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa
"))
:margins '(72 72 72 72))
(when pdf:*page* (finalize-page pdf:*page*))
(pdf:write-document #P"/tmp/test.pdf")))
Best wishes,
Peter
More information about the cl-typesetting-devel
mailing list