----- Original Message -----
From: "Søren O'Neill" <[EMAIL PROTECTED]>
To: <lyx-users@lists.lyx.org>
Sent: Thursday, August 04, 2005 8:50 PM
Subject: Re: Longtable
I've managed to get Captions and labels and longtables and gray headers
:-)
But howcome the table numbering goes 1,3,5,7,9 ??
See attached file.
Kind regards Soren
Well this is the problem with Lyx and longtable that has come up before
IIRC. It appears that Longtable has an inbuilt way of doing caption and
counters. In fact the longway in ERT that I told you about earlier uses this
in built method. But sadly it is not possible to use it in conjunction with
Lyx tabular environment.
So basically after each table the tablecounter increases by one. In effect
you tell Latex by way of \captionof that this is a table. Longtable then
tells Latex it is a table, so when you get to the next \captionof the
counter is already at 2 and the number 3 is assigned.
Sorry that is long winded but it makes sense if you read it slowly!
Anyway the work around. At the end of each table put in ERT
\addtocounter{table}{-1}
Hope this helps
Geoff
On Thursday 04 August 2005 19:21, Herbert Voss wrote:
Geoffrey Lloyd wrote:
> According to the Docs captions cannot be used unless in a float. So it
> looks like you will have to do ALL this by hand in ERT. I am willing to
> be stood corrected though.
you shpuld make a difference between a floating environment and a
caption. They are independent from each other. In general we often used
a caption for a float, but we do not need a float to have a caption.
There are different possibilities to get a caption whithout
using one of the floating environments. But you need ERT
see example
Herbert
--
Soren O'Neill, kiropraktor, MSc, klinisk lektor
Rygambulatoriet, Sygehus Fyn
Lindevej 5, 5750 Ringe
[EMAIL PROTECTED]
http://www.dskkb.dk
tlf. 6362 1906 (arb.)