Re: table with double entries using \rowcolors from xcolor



>>>>> jlr_0@xxxxxxxxx (j) wrote:

>j> I want to build a table where each row holds double entries (pairs
>j> [a1,a2]; [b1,b2]; etc.) that are
>j> vertically placed, like this:

>j> ----------------
>j> | a1 | b1 | c1 |
>j> | a2 | b2 | c2 |
>j> |--------------|
>j> | d1 | e1 | f1 |
>j> | d2 | e2 | f2 |
>j> |--------------|
>j> | g1 | h1 | i1 |
>j> | g2 | h2 | i2 |
>j> ----------------

>j> I could split an entry on two different rows in order to obtain such a
>j> table:

>j> \hline
>j> a1 & b1 & c1 \\
>j> a2 & b2 & c2 \\
>j> ...

>j> but this is not convenient because I want to keep handling pairs and
>j> not just one element of a pair.

>j> I could also use the \multirow command but this is awkward too since
>j> all entries are multirows.

>j> Besides, I want my tables to have gray background on every other row.
>j> But if I use the \rowcolors command from the xcolor package I
>j> absolutely need to have each double entry placed in one single row.

\newcommand\D[1]{\begin{tabular}{@{}c@{}}#1\end{tabular}}
\begin{tabular}{|c|c|c|}
\hline
\D{a1\\a2} & \D{b1\\b2} & \D{c1\\c2}\\
\hline
\D{d1\\d2} & \D{e1\\e2} & \D{f1\\f2}\\
\hline
\end{tabular}

Unfortunately \rowcolor doesn't propagate properly into the inner tabulars
(the topleft cell of each double row gets black). Probably David Carlisle
knows how to repair this.
--
Piet van Oostrum <piet@xxxxxxxx>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@xxxxxxxxxxxxxx
.



Relevant Pages

  • Re: Solving the lib mismatch problem
    ... This section is pointed to by an entry in the section table with the ... The number of entries in the table is determined by DT_VERDEFNUM. ... This is an index into the string section referenced in the section ... Offset in the string section reference by the link in the section ...
    (comp.unix.programmer)
  • Re: I want my money back! (and lower taxes)
    ... Add a new entry to the list of sectors in src/lib/global/sect.c (can ... do I have to modify a total number of entries in some other ... of "comm" command, ... any other commodities. ...
    (rec.games.empire)
  • Hollywood Book Festival - Call For Entries
    ... 2006 Hollywood Book Festival - Call for Entries ... Hollywood Book Festival submissions cannot be returned. ... Each entry package must contain the official entry form or facsimile, ... Applications must be accompanied by a non-refundable entry fee via ...
    (alt.fan.harry-potter)
  • Hollywood Book Festival - Call For Entries
    ... 2006 Hollywood Book Festival - Call for Entries ... Hollywood Book Festival submissions cannot be returned. ... Each entry package must contain the official entry form or facsimile, ... Applications must be accompanied by a non-refundable entry fee via ...
    (rec.arts.sf.written)
  • Hollywood Book Festival - Call For Entries
    ... 2006 Hollywood Book Festival - Call for Entries ... Hollywood Book Festival submissions cannot be returned. ... Each entry package must contain the official entry form or facsimile, ... Applications must be accompanied by a non-refundable entry fee via ...
    (misc.writing)