A longtable cannot be put into a table float because floats can only be
on one page.
But the caption environment of floats can also be used for longtables when
- you use for a table row the longtable option
+ you use the longtable option
\family sans
Caption
\family default
1:
\series default
- The table number is increased for every longtable, also if you didn't set
- a caption for it.
+ The table number is increased for for every longtable, even if you did
+ not set a caption for it.
For this reason you could have the case that e.
\begin_inset space \thinspace{}
\end_inset
\begin_inset space ~
\end_inset
-2.4 follows on Table
+2.4 follows Table
\begin_inset space ~
\end_inset
2.1 in the list of tables if there are two longtables without captions.
- To avoid this you can add the following command in TeX-Code behind every
+ To avoid this you can add the following command in TeX-Code after every
longtable without a caption:
\end_layout
\end_layout
\begin_layout Standard
-in a dummy caption row that is marked as header.
+in a dummy caption row that is marked as a header.
Table
\begin_inset space ~
\end_inset
\end_inset
- is an example for a longtable with different heading where the second caption
+ is an example of a longtable with different heading where the second caption
doesn't include the table number.
\end_layout
\begin_layout Standard
LaTeX calculates the height of table pages and their page breaks using so
called chunks.
- Chunks are pieces of the tables that are at once in LaTeX's memory.
- The default value is historically set to only 20 table rows.
+ Chunks are parts of tables that held at the same time in LaTeX's memory.
+ The default value was historically set to only 20 table rows.
If you are using longtables with many pages this may slow down the creation
of your document.
You can safely increase the chunk size to values of 100-1000 by adding
\begin_layout Standard
There might be problems when a float appears on the same page where a longtable
starts.
- To avoid such situation, add the command
-\series bold
+ To avoid such a situation, insert a
+\begin_inset Quotes eld
+\end_inset
-\backslash
-clearpage
-\series default
- as TeX-Code before your longtable.
+clear page
+\begin_inset Quotes erd
+\end_inset
+
+ (menu
+\family sans
+Insert\SpecialChar \menuseparator
+Formatting\SpecialChar \menuseparator
+Clear
+\begin_inset space ~
+\end_inset
+
+Page
+\family default
+) before your longtable.
\end_layout
\begin_layout Subsection
\begin_inset Quotes erd
\end_inset
- as TeX-Code at this point of the cell where it can be broken.
+ as TeX-Code at the point of the cell where it can be broken.
Before the
\series bold
\backslash
\series default
- command you have to insert in TeX-Code so many
+ command you have to insert in TeX-Code as many
\begin_inset Quotes eld
\end_inset
\begin_inset Quotes erd
\end_inset
- characters like the number of the following table columns.
+ characters as the number of the following table columns.
The
\series bold
&
\begin_inset Newline newline
\end_inset
-Behind the the
+After the the
\series bold
\backslash
\backslash
\series default
- command, insert so many
+ command, insert aso many
\series bold
&
\series default
- characters like the number of table columns before the current column.
+ characters as the number of table columns before the current column.
In Table
\begin_inset space ~
\end_inset
the cell that should be broken is in the second column followed by another
column.
- Therefore the following command was inserted in the cell as TeX-Code behind
+ Therefore the following command was inserted in the cell as TeX-Code after
\begin_inset Quotes eld
\end_inset
\begin_inset Quotes erd
\end_inset
- in the third columns of the row was deleted.
+ in the third column of the row was deleted.
\series bold
\backslash
newpage
\series default
- is only needed when a page break should definitively occur at this position,
- otherwise it is only a possibility to break.
+ is only needed when a page break should definitely occur at this position,
+ otherwise it would be a conditional break.
If your footer row of the longtable has for a certain reason no upper line
but you would have a horizontal line where the cell is broken, use this
command instead:
\begin_layout Standard
must be inserted as TeX-Code at the beginning of the cell.
- This assures that the part of the cell that will be displayed on the new
+ This ensures that the part of the cell that will be displayed on the new
page appears with the full width.
\end_layout
\end_layout
\begin_layout Standard
-Adjusting a fixed width for a column, enables to enter text as a paragraph
- with multiple lines and hyphenations.
+Setting a fixed width for a column enables you to enter text as a paragraph
+ with multiple lines and hyphenation.
\end_layout
\begin_layout Standard
cm and choose centered for the vertical and horizontal alignment.
The vertical alignment is used for all cells of the row.
- As our text is smaller than than 2.5
+ As our text is smaller than 2.5
\begin_inset space \thinspace{}
\end_inset
\begin_layout Standard
If you have a long word in a cell with a fixed width, it cannot be hyphenated
by LaTeX if it is the first entry.
- Therefore you need to insert something, to make the word not being the
+ Therefore you need to insert something to prevent the word not being the
first entry.
So add a horizontal space of 0
\begin_inset space \thinspace{}
\end_layout
\begin_layout Standard
-To span a cell over multiple columns, mark as much cells within a line that
- should be one spanned cell and use either the table-toolbar button
+To merge cells over multiple columns, select as many cells within a row
+ as you want to merge and use either the table-toolbar button
\begin_inset Graphics
filename ../images/tabular-feature_multicolumn.png
scale 85
Table\SpecialChar \menuseparator
Multicolumn
\family default
-, or right click on the marked cells and choose multicolumn in the appearing
- table dialog under the tab
+, or right click on the marked cells and choose
\family sans
-Table Settings
+Multicolumn
\family default
-.
+ in the appearing context menu.
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-LyX supports multicolumns directly, but we have to take notice of the cell
+LyX supports multicolumns directly, but we have to take account of the cell
width of the columns spanned by the multicolumn cell.
\end_layout
\end_inset
cm in the table dialog.
- The spanned columns should have exactly half the width of the multicolumn
- cell, so that you would adjust a width of 1.25
+ The merged columns should have exactly half the width of the multicolumn
+ cell, so that you would set a width of 1.25
\begin_inset space \thinspace{}
\end_inset
\end_layout
\begin_layout Standard
-You can see that the first column has not the half width of the multicolumn
+You can see that the first column has not half the width of the multicolumn
cell, it is a bit bigger.
The reason is that the given width of a cell
\begin_inset Formula $W_{g}$
\end_inset
- explains it in detail.
+ explains this in detail.
\end_layout
\begin_layout Standard
-The needed given width
+The given width
\begin_inset Formula $W_{g\, n}$
\end_inset
- when
+ needed when
\emph on
n
\emph default
\end_layout
\begin_layout Standard
-LyX does not allow to calculate lengths in the width-field of the table
- dialog.
+LyX does not allow you to calculate lengths in the
+\family sans
+Width
+\family default
+ field of the table dialog.
Therefore you have to format the column by inserting a LaTeX-argument in
the dialog.
Here is an overview about the arguments:
Although we have chosen centered alignment for the text of the multicolumn
cell, it is still left aligned.
This is because LyX only applies the alignment to single columns.
- So we have to use for the multicolumn the LaTeX-argument
+ So for the multicolumn cell we have to use the LaTeX-argument
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-In contrary to multicolumns multirows are not yet supported by LyX so a
- bit of TeX-Code needs to be used.
+Unlike multicolumns multirows are not yet supported by LyX; so a bit of
+ TeX-Code needs to be used.
To use multirows load the LaTeX-package
\series bold
multirow
\series bold
}
\series default
- in another TeX-Code-box behind the text.
+ in another TeX-Code-box after the text.
\end_layout
\begin_layout Standard
in TeX-Code in the document preamble.
Then all entries of multirow cells in the document are centered.
If centering is only needed for several tables, you can renew the command
- in an TeX-Code box just before the table instead of the preamble.
+ in a TeX-Code box just before the table instead of the preamble.
If the text should be right-aligned, replace
\series bold