3

I'd like to use \cline command in my table, but it doesn't work when I use it together with \usepackage[czech]{babel}. What I should do? Thanks.

Here is my example code:

\documentclass[10pt,a4paper]{article}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[cp1250]{inputenc}
\usepackage[czech]{babel}
\usepackage[T1]{fontenc}

\begin{document}

\begin{tabular}{|c|cc|c|}
\hline 
11 & 12 & 13 & 14 \\ \cline{2-3}
21 & 22 & 23 & 24 \\
31 & 32 & 33 & 34 \\ \cline{2-3}
41 & 42 & 43 & 44 \\ 
\hline 
\end{tabular}

\end{document}
Ludek
  • 31
  • Welcome to TeX.SX! The question has been asked before. If the solution presented in the linked answer doesn't work for you, please add the details to your question. – egreg Feb 21 '14 at 16:29

1 Answers1

0

I tried to use booktabs and replace \cline with \cmidrule, just to se. I obtained the same error message. A work around can be to use xelatexand polyglossia. Please note that XeLaTeX supposes your file is saved in UTF8 encodingI also load fontspec, since Latin Modern fonts exist in Opentype version:

        \documentclass[10pt,a4paper]{article}

        \usepackage{fontspec}
        \usepackage{polyglossia}
        \setmainlanguage{czech}

        \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

        \begin{document}

        \begin{tabular}{|c|cc|c|}
        \hline
        11 & 12 & 13 & 14 \\ \cline{2-3}
        21 & 22 & 23 & 24 \\
        31 & 32 & 33 & 34 \\ \cline{2-3}
        41 & 42 & 43 & 44 \\
        \hline
        \end{tabular}

        \end{document} 

enter image description here

Bernard
  • 271,350