[pdftex] Problem with hlines in pdftex

David Carlisle davidc at nag.co.uk
Thu Jun 24 14:53:00 CEST 2004


  The real problem is that the rules should be drawn later (e.g., on top
  of) the the color fill rectangles. 

It wouldn't be too hard to do this in colortbl for vertical lines
(although you'd have to shake up some internals a bit more than is
currently the case, which would probably break some random 3rd party
table extension packages, however that might not matter in a controlled
environment. Currently the painting order is left rule, colour block,
right rule, so you'd just have to delay the painting of the left hand
rule in each column a bit.

For hlines though I don't really see any solution (other than just
re-implementing everything) as the hlines are really added to the main
vertical list and forgotten about by the time the next row comes along
and decides to do a row with a colour. Note there is not really any "row
colour" in colortbl: the rowcolor command is just a thin piece of
syntactic sugar to add a separate "column" colour to each cell in the
row: That is you can't paint one big coloured rule under the whole row
(which is what you'd like to do) you have to interleave the text and
colour blocks from each cell.


 A "solution" is to create the
  table twice, first just a "background" with the color fill rectangles and 
  then an overlay with the lines and text.

Yes if you were designing from scratch with colour in mind that's
probably what you'd do, colortbl is a compromise to fit with existing
latex table syntax (and existing code). It's rather hard given latex's
flexibility with @{...} and other features to be totally sure where the
lines have to be overlayed (especially if colortbl is being used in
conjunction with longtable page breaking.

David
(provoked out of tex-hypernation:-)

-- 
The LaTeX Companion
  http://www.awprofessional.com/bookstore/product.asp?isbn=0201362996
  http://www.amazon.co.uk/exec/obidos/tg/detail/-/0201362996/202-7257897-0619804


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the pdftex mailing list