[Tex/LaTex] tabular – \cline not working

rulestables

I have this table

\begin{tabular}{ | p{2cm} | p{4cm} | p{4cm} | p{4cm} | }
\hline
Název & \multicolumn{3}{ l }{vypsatZapojeniResiteluDoProjektu} \vline\\
\hline
Popis & \multicolumn{3}{ l }{Vedouci pracovnik}  \vline \\
\hline
Priorita & 1 = vysoka & \textbf{Frekvence} & nekolikrat denne \\
\hline
Vstupni podminky & \multicolumn{3}{p{12cm}}{sdgsdgsg.} \vline \\
\hline
Vystupni podminky & \multicolumn{3}{p{12cm}}{sdgsdgsga.} \vline \\
\hline
Uzivatele & \multicolumn{3}{p{12cm}}{sdgsdgsdg.} \vline \\
\hline
\multirow{3}{2pt}{Zakladni posloupnost} & \multicolumn{3}{p{12cm}}{sgdsgsdg.} \vline \\
\cline{2-4}
& \multicolumn{3}{p{12cm}}{sdgsdgg.} \vline \\
\cline{2-4}
& \multicolumn{3}{p{12cm}}{sgsdggdsg.} \vline \\
\hline
\end{tabular}

But \cline doesn't work and my LaTeX IDE singalize some error. I need to have hline only by last 3 columns.

Best Answer

Your table, after suitable completion, will compile with some warnings about over/under full boxes which I solved with the following modifications:

\documentclass{article}
\usepackage[textwidth=17cm]{geometry}% just for the example
\usepackage{multirow}

\begin{document}

\noindent\begin{tabular}{ | p{2cm} | p{4cm} | p{4cm} | p{4cm} | }
\hline
Název & \multicolumn{3}{ l|}{vypsatZapojeniResiteluDoProjektu}\\
\hline
Popis & \multicolumn{3}{ l|}{Vedouci pracovnik}  \vline \\
\hline
Priorita & 1 = vysoka & \textbf{Frekvence} & nekolikrat denne \\
\hline
\parbox[t]{2cm}{Vstupni\\ podminky} & \multicolumn{3}{p{12cm}|}{sdgsdgsg.}\\
\hline
\parbox[t]{2cm}{Vystupni\\ podminky} & \multicolumn{3}{p{12cm}|}{sdgsdgsga.}\\
\hline
Uzivatele & \multicolumn{3}{p{12cm}|}{sdgsdgsdg.}\\
\hline
\multirow{3}{2cm}{Zakladni\\ posloupnost} & \multicolumn{3}{p{12cm}|}{sgdsgsdg.}\\
\cline{2-4}
& \multicolumn{3}{p{12cm}|}{sdgsdgg.}\\
\cline{2-4}
& \multicolumn{3}{p{12cm}}{sgsdggdsg.} \vline \\
\hline
\end{tabular}

\end{document}

And here's the result:

enter image description here

I would like to suggest you, however, some changes to your table, using the features provided by the booktabs package:

\documentclass{article}
\usepackage[textwidth=16cm]{geometry}% just for the example
\usepackage{multirow}
\usepackage{booktabs}

\begin{document}

\noindent\begin{tabular}{@{}p{2cm}p{4cm}@{}p{4cm}@{}p{4cm}@{}}
\toprule
Název & \multicolumn{3}{ l }{vypsatZapojeniResiteluDoProjektu} \\
\midrule
Popis & \multicolumn{3}{ l }{Vedouci pracovnik}  \\
\midrule
Priorita & 1 = vysoka & \textbf{Frekvence} & nekolikrat denne \\
\midrule
\parbox[t]{2cm}{Vstupni\\ podminky} & \multicolumn{3}{p{12cm}}{sdgsdgsg.} \\
\midrule
\parbox[t]{2cm}{Vystupni\\  podminky} & \multicolumn{3}{p{12cm}}{sdgsdgsga.} \\
\midrule
Uzivatele & \multicolumn{3}{p{12cm}}{sdgsdgsdg.} \\
\midrule
\multirow{4}{2cm}{Zakladni\\ posloupnost} & \multicolumn{3}{p{12cm}}{sgdsgsdg.} \\
\cmidrule{2-4}
& \multicolumn{3}{p{12cm}}{sdgsdgg.} \\
\cmidrule{2-4}
& \multicolumn{3}{p{12cm}}{sgsdggdsg.} \\
\bottomrule
\end{tabular}

\end{document}

Now the table has the following aspect:

enter image description here

As you can see, the spacing between the horizontal lines and the cell contents has improved; also, the absence of vertical rules improves the readability (vertical rules are superfluous). Depending on the actual content of the cells, it would even be possible to remove more lines; refer to the package documentation to see additional features provided by booktabs.