Graphics, Figures & Tableshelp with multirow

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
lancekam
Posts: 6
Joined: Mon May 18, 2009 10:40 pm

help with multirow

Post by lancekam »

I need some help with "multirow" I am trying to create a table that is set up like the following:


___________________________________
Equation & $n$ & Values of $d$ & Values of a and b & Values of $z$ \\
_________________________________________________________________________________
| | |$d=1,2,4,5,6$| a=0|$z=2^a$\\
| | | $d=3$ | a=0 | $z=2^a$ \\
|w^2+x^2+y^2+dz^2$| $4^a (8b+7) | $d=3$ | $\a\geq0$ | $z=2^{a+1}$\\
| | |$d=7$ | $a=0,1,\mbox{ or }2$| $z=2^a$\\
| | |$d=7$ | $\a\geq3$ & $z=2^{a+1}$
___________________________________________________________________________________

Sorry if it is hard to tell. The vertical bars repsent columns, the underlines are rows. The first two columns have only an entry in the middle. The other 3 columns have entrys for all five rows. I have seen how to do one column with mutlicol, but do not know how to with two. Any help would be greatly appreciated. (I know to use \hline and "&" to make the lines, I am just trying to show what I want it to look like.)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Re: help with multirow

Post by mas »

Have you tried the package multirow?

sridhar

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
lancekam
Posts: 6
Joined: Mon May 18, 2009 10:40 pm

help with multirow

Post by lancekam »

So I kind of got it working with multirow but now I am having trouble with the lines. Here is my code:

Code: Select all

\begin{table}
    \begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
Equation & $n$ is of the form &  Values of $d$ & Values of $\mu$ and $\lambda$ & Values of $z$ \\
\hline
\multirow{5}{*}{$w^2+x^2+y^2+dz^2$} & \multirow{5}{*}{$4^\lambda (8\mu+7)$} & $d=1,2,4,5,6$ & &$z=2^\lambda$\\
\hline
& & $d=3$ & $\mu=0$ & $z=2^\lambda$\\
\hline
 & & $d=3$ & $\mu\geq0$ & $z=2^{\lambda+1}$\\
\hline
 & & $d=7$ & $\mu=0,1,\mbox{ or }2$ & $z=2^{\lambda}$\\
\hline
  &  & $d=7$ & $\mu\geq3$ & $z=2^{\lambda+1}$  \\
  \hline

\end{tabular}
\end{center}
\end{table}
So now the problem is I only want the horizontal lines on the last three columns. Is there a way to do that. Most examples of multirow I find online do not use lines. Again, any help would be appreciated.
lancekam
Posts: 6
Joined: Mon May 18, 2009 10:40 pm

Re: help with multirow

Post by lancekam »

Nevermind, just found something about cline.
Post Reply