For table captions and titles to be output correctly, you have to insert tables in the following way:
Be sure that your cursor is in the “Standard” environment (see Section 5.1).
Insert a table float (from the menu: Insert-->Floats-->Table)
You get a table float containing one line. Change the environment on that line to “Caption”.
You see the text “Table#:” and the cursor is positioned immediately to the right of it. Insert a label for the table (from the menu: Insert-->Label).
After the label, on the same one line: type the table title and press <enter>. This will produce a <para> element we will eliminate in sedscr (see Section 7.1.4.1).
On the new line, insert your table as usual.
A warning about an "end tag for element "TABLE" which is not open", when processing the SGML file with Jade, is the less evil we can get (see Chapter 6) and is harmless (probably caused by a LyX bug in version 1.2.0).
A LyX related concern is that text within a cell will not wrap to fit the page, so if a line of text in a table is too long, the table will extend beyond the right margin of the page. Similarly, LyX's table inset will not split itself at the bottom of a page, and so might extend below the bottom margin. You have these options to resolve this problem (taken from the LyX User's Guide):
Split it into two tables, to correctly handle pagebreaks and margins.
Select the Longtable button in the Table Layout dialog. This automatically splits the table over more pages, if it is too high. After doing this, the list of Longtable buttons activate themselves and you may now define:
FirstHead: The current row and all rows above that don't have any special options defined, are defined to be the header-lines of the first page of the multipage-table.
Head: The current row and all rows above that don't have any special options defined, are defined to be the header-lines of all pages of the multipage-table except for the first page if FirstHead is defined.
Foot: The current row and all rows above that don't have any special options defined, are defined to be the footer-lines of all pages of the multipage-table except for the last page if LastFoot is defined.
LastFoot: The current row and all rows above that don't have any special options defined, are defined to be the footer-lines of the last page of the multipage-table.
NewPage: This forces a pagebreak after the row where this flag is defined.
If you define more flags in the same table row, you should be aware of the fact that only the first flag is used in the defined table rows. The others will the be defined as empty. In this context, first means first in this order: Foot, LastFoot, Head, FirstHead. See the TableExamples.lyx example file to see how this works.
Use the Width entry in the Table Layout dialog to restrict the width of the table till it fits horizontally.
A table can also be placed in a float, as described below, which will allow TeX to place it as well as it can within the page.
One last remark: Longtable and Rotate 90° use special LaTeX packages, so you should look into LaTeX configuration in the Help menu to see if your system supports these features.
| Last updated Mon Sep 24 01:19:25 CEST 2007 | Permalink: http://www.karakas-online.de/mySGML/lyx-tables.html | All contents © 2002-2007 Chris Karakas |