Discussion:
\multirow and \slashbox
(too old to reply)
Ben
2003-09-11 18:18:38 UTC
Permalink
Hi all,

I have a problem with a table the uses both \multirow and
\backslashbox. It seems to happen only if the argument of the
\multirow is not 2.

Compiling the following source to a DVI output will produce a
\backslash-ed line that begins lower than it should and end higher
than it should, thus, not covering the whole cell.

Reading previous threads, I've learnt that both packages have
their share of problems. Is there a workaround? another package?
or is it simply a misuse on my behalf?

Thanks in advance, Ben

\documentclass{article}
\usepackage{slashbox}
\usepackage{multirow}

\begin{document}

\begin{tabular}{|c|c|c|c|c|c|} \hline
\multirow{3}*{\backslashbox{a}{b}} & \multirow{3}*{c} &
\multicolumn{4}{|c|}{d} \\ \cline{3-6}
& & \multicolumn{2}{|c|}{e} & \multicolumn{2}{|c|}{f} \\
\cline{3-6}
& & g & h & i & j \\ \hline
k & & & & & \\ \hline
l & & & & & \\ \hline
\end{tabular}\\

\end{document}

(NO SPAM - omit the number in my email)
Robin Fairbairns
2003-09-12 16:37:42 UTC
Permalink
Post by Ben
I have a problem with a table the uses both \multirow and
\backslashbox. It seems to happen only if the argument of the
\multirow is not 2.
Compiling the following source to a DVI output will produce a
\backslash-ed line that begins lower than it should and end higher
than it should, thus, not covering the whole cell.
i misunderstood what you had said: and all because i write a backslash
starting from the top, whereas you plainly start from the bottom ;-)
Post by Ben
Reading previous threads, I've learnt that both packages have
their share of problems. Is there a workaround? another package?
or is it simply a misuse on my behalf?
i don't believe there are alternative packages. the fact is probably,
that this usage works for you at all through good fortune.

i expect there's some stupid picture mode problem with drawing the
[back]slash that makes larger boxes tricky; i've only read slashbox
once, which is not enough to debug it from memory...
Post by Ben
\begin{tabular}{|c|c|c|c|c|c|} \hline
\multirow{3}*{\backslashbox{a}{b}} & \multirow{3}*{c} &
\multicolumn{4}{|c|}{d} \\ \cline{3-6}
& & \multicolumn{2}{|c|}{e} & \multicolumn{2}{|c|}{f} \\
\cline{3-6}
& & g & h & i & j \\ \hline
k & & & & & \\ \hline
l & & & & & \\ \hline
\end{tabular}\\
actually, i don't think this example looks at all bad: i presume the
thing that's really bugging you looks far more egregious.
--
Robin (the partially spineless) Fairbairns, Cambridge
Ben
2003-09-12 21:52:21 UTC
Permalink
Post by Robin Fairbairns
Post by Ben
[...]
Compiling the following source to a DVI output will produce a
\backslash-ed line that begins lower than it should and end higher
than it should, thus, not covering the whole cell.
i misunderstood what you had said: and all because i write a backslash
starting from the top, whereas you plainly start from the bottom ;-)
Well, actually we meant the same thing (top to bottom), but being used to write
right-to-left, I have this kind of misunderstanding quite often... :)
Post by Robin Fairbairns
i expect there's some stupid picture mode problem with drawing the
[back]slash that makes larger boxes tricky; I've only read slashbox
once, which is not enough to debug it from memory...
I reckon you're right, but my TeX skills aren't good enough to
find the problem in the package code.
Post by Robin Fairbairns
actually, i don't think this example looks at all bad: i presume the
thing that's really bugging you looks far more egregious.
It does look OK, and I guess my motives in sending the original
post were more of frustration of not getting the package to work
as *I* want it than of the appearance of the table.

Thanks for your reply,
Best regards, Ben

(NO SPAM - omit the number in my email)

Loading...