From d78bc34d3b34d9b764337fad537bc7d38b3ccfc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sun, 12 Jul 2009 13:43:30 +0000 Subject: [PATCH] * InsetTabular.cpp: fix bug 6057: longtable captions must always be in a first header. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30501 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTabular.cpp | 10 ++++++++-- status.16x | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index a81f37413d..0f960548a6 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -2081,7 +2081,7 @@ int Tabular::TeXLongtableHeaderFooter(odocstream & os, int ret = 0; // caption handling - // the caption must be output befrore the headers + // the caption must be output before the headers if (haveLTCaption()) { for (row_type i = 0; i < row_info.size(); ++i) { if (row_info[i].caption) { @@ -2256,7 +2256,13 @@ int Tabular::TeXRow(odocstream & os, row_type i, } ++cell; } - os << "\\tabularnewline"; + if (row_info[i].caption && !endfirsthead.empty && !haveLTFirstHead()) + // if no first header and no empty first header is used, + // the caption needs to be terminated by \endfirsthead + // (bug 6056) + os << "\\endfirsthead"; + else + os << "\\tabularnewline"; if (row_info[i].bottom_space_default) { if (use_booktabs) os << "\\addlinespace"; diff --git a/status.16x b/status.16x index b6d25884e0..7f5c483177 100644 --- a/status.16x +++ b/status.16x @@ -118,6 +118,10 @@ What's new present (bug 6030). - Fix reverse DVI/PDF search with child documents (bug 6020). + +- Assure that a longtable caption is in a first header even if the table + does not have one. This assures the caption is not repeated after a + page break and consequently in the list of tables (bug 6057). * USER INTERFACE