Latex (texmaker) table \cline

Matej Joštiak picture Matej Joštiak · Apr 9, 2015 · Viewed 12.1k times · Source

I'm having this problem with creating table in Latex.

So I want to create a table but when I use \cline it gives me

error ! Paragraph ended before \@cline was complete.\par

and much more.

I'm using \usepackage{multiraw}, \usepackage{tabulary} for tables.

The table:

\begin{table}  
\centering  
\begin{tabular}{|c|c|c|c|c|c|c|}  
\hline  
\multirow{2}{*}{laktóza $ [\mathrm{mmol \cdot dm^{-3}}] $} & \multirow{2}{*}{} & \multicolumn{5}{c|}{ONPG $ [\mathrm{mmol \cdot dm^{-3}}] $} \\ \  
& & \multicolumn{1}{c|}{0,10} & \multicolumn{1}{c|}{0,25} & \multicolumn{1}{c|}{0,50} & \multicolumn{1}{c|}{1,0} & \multicolumn{1}{c|}{2,0} \\ \  
\hline  
\multirow{2}{*}{0} & $ V_{ONPG} \enskip [\mathrm{\mu l}] $ & 10 & 25 & 50 & 100 & 200 \\ \cline{2-7}
& $ V_{roztok \enskip Z} \enskip [\mathrm{\mu l}] $ & 990 & 975 & 950 & 900 & 800 \\ \  \hline  
\end{tabular}  
\end{table}

Thanks for every help.

Answer

MattAllegro picture MattAllegro · Apr 11, 2015
\documentclass{article}

\usepackage{multirow}
\usepackage{tabulary}

\begin{document}

\begin{table}
\centering
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{laktóza $ [\mathrm{mmol \cdot dm^{-3}}] $} & \multirow{2}{*}{} & \multicolumn{5}{c|}{ONPG $ [\mathrm{mmol \cdot dm^{-3}}] $} \\
 & & \multicolumn{1}{c|}{0,10} & \multicolumn{1}{c|}{0,25} & \multicolumn{1}{c|}{0,50} & \multicolumn{1}{c|}{1,0} & \multicolumn{1}{c|}{2,0} \\
\hline
\multirow{2}{*}{0} & $ V_{ONPG} \enskip [\mathrm{\mu l}] $ & 10 & 25 & 50 & 100 & 200 \\
\cline{2-7}
 & $ V_{roztok \enskip Z} \enskip [\mathrm{\mu l}] $ & 990 & 975 & 950 & 900 & 800 \\
\hline  
\end{tabular}  
\end{table}

\end{document}

This code compiles and the output should now look like in your thoughts:

output pdf screenshot

Some \ after \\ and before \hline were not supposed to be and produced errors (compare lines 5, 6 and 9 of your code with mine).