TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 4 down vote accepted

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

share|improve this answer
I was actually hoping for a more elegant solution, but if there is none, then probably this is the best I can hope for. – user10324 Dec 26 '12 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. – Torbjørn T. Dec 26 '12 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.