[cl-typesetting-devel] tables.lisp - committed fixes and extensions for cell spanning

Dmitriy Ivanov divanov at aha.ru
Wed Jun 27 07:41:30 UTC 2007


Hello folks,

I have just committed the new version of tables.lisp. First, the old code
obviously failed on the following table:

     (tt:table (:col-widths '(60 60 60) :border 1)
       (tt:row ()
         (tt:cell (:row-span 2) "1,1 2,1  row-span 2")
         (tt:cell () "1,2")
         (tt:cell () "1,3"))
       (tt::row ()
         (tt:cell (:row-span 3) "2,2 3,2 4,2  row-span 3")
         (tt:cell () "2,3"))
       (tt:row ()
         (tt:cell (:row-span 2) "3,1 4,1  row-span 2")
         (tt:cell () "3,3"))
       (tt:row ()
         (tt:cell () "4,3")))

Second, the new code also correctly calculates the height value of the cell
spanning several rows of fixed height. (This value is used for laying out
cell content.)

Third, zero is supported from now on as the value of col-span and row-span
cell properties a la HTML:
- col-span equal to 0 means that the cell spans all rows from the current
row to the last row of the table,
- row-span equal to 0 means that the cell spans all columns from the current
column to the last column of the table.

The doubtful explotation of  loop macro was replaced with proven do/do* :-)

Evaluation code creating simple tables was moved to the new file
examples/test-table.lisp.

Finally, a small change in stroke.lisp was committed:
    #<method stroke (text-line T T)>
now calls pdf:draw-spaced-strings instead of pdf:show-spaced-strings to
resolve problems with escaping special characters. This update relies on the
latest revision of CL-PDF.

Please test and enjoy :-)
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru




More information about the cl-typesetting-devel mailing list