0

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.

MattAllegro
  • 6,455
  • 5
  • 45
  • 52
Matej Joštiak
  • 21
  • 1
  • 1
  • 3
  • Mmhh, I think you're using package `multirow`: https://www.ctan.org/pkg/multirow. – MattAllegro Apr 11 '15 at 18:04
  • I had the same issue in TeXworks with Czech (so I suppose Slovak could have the same problem), here is the solution that worked for me: http://www.abclinuxu.cz/tex/poradna/show/325037 (the thread is in Czech, but adding `\catcode\`\-=12` after the `\begin{table}` line should do the trick). – Lenka Vraná Jun 10 '18 at 19:03
  • @LenkaVraná oh thanks, I'd never think using `[czech] babel` and `csquotes` would make a problem like this. – Margotka000 Jan 15 '23 at 18:34

1 Answers1

1
\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).

MattAllegro
  • 6,455
  • 5
  • 45
  • 52