@@ -699,10 +699,9 @@ blockToLaTeX (Table caption aligns widths heads rows) = do
699699 then return empty
700700 else ($$ text "\\endfirsthead") <$> toHeaders heads
701701 head' <- if all null heads
702− then return empty
702+ then return "\\toprule"
703703 -- avoid duplicate notes in head and firsthead:
704− else ($$ text "\\endhead") <$>
705− toHeaders (if isEmpty firsthead
704+ else toHeaders (if isEmpty firsthead
706705 then heads
707706 else walk removeNote heads)
708707 let capt = if isEmpty captionText
@@ -717,8 +716,8 @@ blockToLaTeX (Table caption aligns widths heads rows) = do
717716 -- the @{} removes extra space at beginning and end
718717 $$ capt
719718 $$ firsthead
720− $$ (if all null heads then "\\toprule" else empty)
721719 $$ head'
720+ $$ "\\endhead"
722721 $$ vcat rows'
723722 $$ "\\bottomrule"
724723 $$ "\\end{longtable}"