I'm using the \endfirsthead and \endhead but the first row is not repeated for some reason.
Here's a piece of my code, I'll appreciate any help.
\documentclass[12pt]{article}
\linespread{1.2}
\usepackage{longtable}
\usepackage[table]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{breakable,skins}
\cellcolor[gray]{0.95}
\begin{document}
\begin{tcolorbox}[%%
breakable,
]
\begin{longtable}{b{0.35cm}|b{2cm}||c|c|}
C. & HEADER & {CSF1} & {CSF2} \\\hline\hline\endfirsthead
C. & HEADER & {CSF1} & {CSF2} \\\hline\hline\endhead
P1 & Vyroba & OK & OK \\\hline
P2 & Nakup & & OK \\\hline
P3 & Prodej & OK & OK \\\hline
P4 & Logistika & & \\\hline
P5 & Sklad & OK & OK \\\hline
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
P6 & Inventura & OK & OK \\
% the table continues
\end{longtable}
\end{tcolorbox}
\end{document}


tcolorboxjust to have table head in shape with rounded upper corners. If you sacrifice this, you can obtain desired shadowing with\rowcolor{<desired color>} .... – Zarko May 24 '15 at 22:53longtable. The header is stored in a box\LT@head. But the boxing and unboxing of this relies upon register\z@. I suppose that something might be happening betweentcolorboxmanaging the page break andlongtabletrying to do the same that's interrupting each other. – A.Ellett May 25 '15 at 01:31\captionin the title as a part of the table which was handy) - do you think I can still use the\definecolor{tablerow1}{}{}to define alternating colours of rows in a simplelongtable? – Eliska Vlckova May 25 '15 at 11:33frame codedefinitions for each section of the brokentcolorbox? I found these in the manual fortcolorboxon p.201 but I haven't tried them. Or is it easier to use Zarko's solution? – Eliska Vlckova May 25 '15 at 11:39tcolorboxis a huge\vboxwhich is broken using\vsplit. Therefore, the embeddedlongtableis set like on a huge single page and cannot repeat the header. So, unfortunately, there is no easy solution. – Thomas F. Sturm May 26 '15 at 09:36\vsplitor is it too late at this point of the typesetting procedure? – MaxNoe May 26 '15 at 11:22