2

How can I center a table in a, say, theorem environment in LyX ? When I have a centered table in the standart LR-mode writing mode everythings ok. But when I select the whole table and try to turn it into a theorem, by clicking on "theorem" in LyX's environment box, I get the message

The new layout does not permit the alignment previously used.
Setting to default.

And the table wanders to left inside the newly created theorem environment.

Looking at the source code LyX generates, when doing the things I just described, I can see that LyX forbids be to put the tabular environment inside a \begin{center} ... \end{center} environment as soon as the tabular environment is inside a \begin{thm} ... \end{thm} environment.

In plain LaTeX this works fine, therefor I can't see why LyX forbids this.

0

1 Answer 1

4

LyX apparently doesn't allow centered paragraphs inside theorems (at least the two modules I tried). As a workaround, you can add the center environment in ERT's before and after the tabular.

enter image description here

2
  • I was actually hoping for a more elegant solution, but if there is none, then probably this is the best I can hope for.
    – l7ll7
    Dec 26, 2012 at 12:35
  • @user10324 There may well exist a more elegant solution, as I'm hardly a LyX expert. This was just my first thought for a workaround. Dec 26, 2012 at 14:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .