[cl-typesetting-devel] Spaces at beginnings of linesfollowingperiods

Marc Battyani marc.battyani at fractalconcept.com
Wed Jun 16 22:26:53 UTC 2004


Peter Seibel wrote:

> "Marc Battyani" <marc.battyani at fractalconcept.com> writes:
>
> > Peter Seibel wrote:
> >
> >> In my typesetting of my book it seems that whenever I have a line
> >> break immediately after a period, the first character of the next line
> >> is indented a bit. I.e. it seems like the first character of the next
> >> line is in fact a space. I haven't tried to track this down or even
> >> reduce it to a simple test case because I'm hoping that someone will
> >> just know what the problem is. Any ideas?
> >
> > Corrected.
> > The extra spacing added after punctuation marks was not trimmable.
>
> So I'm pretty certain I've got the latest code loaded but I still seem
> to be seeing the same problem on lines following a colon, semicolon,
> or comma.

I've not commited the changes to the repository yet.
I've also added Dmitri's fixes as well but I always want to check all that
the test examples still work before I publish the changes.
I will do that tomorow morning but you can change the following function
with this version if you want to check that it fixes the problem.

(defun make-punctuation-space-box (char)
  (let ((width (* (pdf:get-char-width char *font* *font-size*)
*text-x-scale*))
 (space-params (cdr (assoc char *punctuation-marks-extra-spacing-ratios*
:test #'char=))))
    (when space-params
      (destructuring-bind (w max-exp exp max-compr compr) space-params
   (make-instance 'white-char-box :dx (* width w)
    :trimmable-p t
    :max-expansion (* width max-exp)
    :expansibility (* width exp)
    :max-compression (* width max-compr)
    :compressibility (* width compr))))))

Marc





More information about the cl-typesetting-devel mailing list