I tried to use the Slovak language with the booktabs
package.
Let's see a couple of cases.
-
slovak
is included in the options tobabel
\usepackage[english,slovak]{babel}
or
\usepackage[slovak,english]{babel}
or
\usepackage[slovak]{babel}`
-
"slovak" is NOT included in the options to
babel
\usepackage[english]{babel}
Similarly two cases for \cmidrule
A. \cmidrule{2-3}
is included in the table
B. \cmidrule{2-3}
is NOT included in the table
If both (slovak
+\cmidrule
) are included (case 1A), then following error occurrs
Paragraph ended before \@@@cmidrule was complete
(and a lot of other errors)
In the other cases (1B, 2A and 2B) (NO slovak
or NO \cmidrule
), then pdflatex
is succesful
Does anybody know why 1A is wrong?
And how to use slovak
and \cmidrule
together (case 1A)?
\documentclass[10pt]{book}
\usepackage[english,slovak]{babel}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ccc}
A & B & C \\
%\cmidrule{2-3}
A & B & C \\
\end{tabular}
\end{document}
I have Win7, TeXstudio 2.5.2
Best Answer
The
slovak
(and alsoczech
) module forbabel
not only breaks\cmidrule
, but also the kernel command\cline
(and possibly many others).Since the active
-
is used for hyphenation, its role shouldn't be important in tables. The following hack seems to fix things:A less invasive hack is to change the delimiter in the definition of
\@@@cmidrule
and of\@cline
:A package-free version (it could be made to work also without
\unexpanded
):The patch is independent of the loading of
booktabs
, but of course it must be placed after it.