[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there any way to make alternate rows of a table have a light gray
Re: Is there any way to make alternate rows of a table have a light gray background?
Thu, 10 Jun 2021 21:21:23 +0200
The HDTBL has a lot of options for colors and so on.
One thing to note is if you use attributes in TD start them each time on a
new line like a groff macro.
Otherwise they are not always pickup.
I mostly use a little awk script to create my tables with hdtbl.
I use it to generate invoices and price offers.
If you have other questions on hdtbl please let me know since a while ago I
spitted out the whole code. So I know my way around it.
Have fun fellow Groffers!
Op wo 9 jun. 2021 om 16:51 schreef Oliver Corff <email@example.com>:
> Hi Tadziu, your answer looks more like a new feature and less than an
> occasional hack.
> Perhaps, if this code is placed in a .so-urcable macro wrapper, then
> users will certainly pick it up. To me, it really looks like a welcome
> Best regards,
> On 09/06/2021 14:31, Tadziu Hoffmann wrote:
> >> The data is simple, but the table is wide and the data
> >> occurs in a right triangle shape, with one point at the
> >> top left, another point at the top right, and the other
> >> point at the bottom right. This means that it is hard to
> >> accurately follow from the row heading on the left to the
> >> appropriate column on the right.
> >> Is there any way to make alternate rows of a table have a
> >> light gray background?
> > It is possible only with some trickery, and it's easier
> > if all the lines have the same height, otherwise much more
> > manual intervention will be necessary. To make this fully
> > automatic will probably require modifying tbl.
> > In the attached example, the gray background is created by
> > drawing filled boxes across the width of the table. In fact,
> > the background is drawn in advance for the *next* line, in
> > order to prevent the horizontal line from being painted over,
> > which can happen at low resolutions; however, this requires
> > two slightly different versions of the fill because the line
> > spacing is different around the horizontal line.
> > TW is the width of the table and is set by tbl. LW is a
> > correction for (half) the line width and is only necessary
> > because I'm using square linecaps.
Re: Is there any way to make alternate rows of a table have a light gray background?, Boss Hog, 2021/06/08