Is it impossible to insert a table made with ERT into a float in LyX 2.0 such that I can edit the height and placement of the table in my document?
[Tex/LaTex] Inserting a table made with ERT into a float in LyX
lyxtables
lyxtables
Is it impossible to insert a table made with ERT into a float in LyX 2.0 such that I can edit the height and placement of the table in my document?
Best Answer
Looking at the table code you posted in your previous question, I'll give some explanation of it, and how it relates to LyX.
The
table
environment, i.e.This is a float, and it is what you get when you do Insert --> Float --> Table in LyX. The optional argument, i.e.
[ht]
is the placement specifier, and equivalent to choosing Here if possible and Top of page in the float settings.The caption, i.e.
\caption{...}
. This is the same as the caption-box that is placed in floats in LyX by default. You can also get it in LyX with Insert --> Caption.Centering of the content of the float, i.e.
This is (almost) the same as changing the paragraph settings inside the table float to centered alignment, via right-click --> Paragraph settings.
The difference is that LyX inserts a
centering
environment, instead of the\centering
switch.The
tabular
enviroment, i.e.This is what actually produces your table, and is what you get when doing Insert --> Table in LyX.
The label, i.e.
\label{table:nonlin}
. This is the same as labels in LyX, so you can insert this with Insert --> Label.The point
If you would like to edit your tables such as this with code rather than the LyX GUI, you really don't need anything more than the
tabular
environment in an ERT, the rest can just as well be added via the GUI. That could also make cross-referencing easier, as the label will be listed in the GUI. For example as seen in the screenshot below:You don't have to use the GUI though, you could just have the complete code as above in an ERT. Just don't place it inside a second float, which won't work, and doesn't make sense.
Finally, note that floating environments have nothing to do with the scaling of their contents, so having your table in a float won't help you change its height.