11

While inside a table, it seems impossible to use Ctrl+Enter in order to start a new line in the same column. So if I have, for example, a column name "veni, vidi, vici" and I don't want it to be so wide, I would be able to write it:

veni
vidi
vici

one word under the other. Anybody knows how to do it with LyX?

Thanks.

2 Answers2

14

You need to give the column where you want to do this a fixed width — right-click the cell, select More | Settings and in the pop-up dialogue enter a reasonable value in width. I have, for your example, set it to 2 cm.

If you have Lyx ≥ 2.0.4, you can just type Enter now.

Otherwise, without space, Insert | Tex Code right after veni. In the field that appears, type \linebreak with, importantly, a space after the box. Repeat the same for vidi. The job should be done.

LyX PDF

Using \newline as suggested by @Vitaly also allows new lines, but indents the last line and moves off the center:

LyX_2 PDF_2

Sparhawk
  • 494
  • 1
  • 6
  • 13
vaettchen
  • 1,706
0

Also a \newline can be used. A quite similar question was asked here: newline in table cell

Vitaly
  • 163
  • 1
    \newline distorts the alignment of the three words – vaettchen Oct 19 '12 at 12:03
  • Spot on;) Interestingly, it works even without LaTeX command inserted. Simple Return does the job in LyX 2.0.4 after the column width is set to be fixed. – Vitaly Oct 19 '12 at 12:19
  • 1
    -> @ Vitaly: Should have checked that first... - with simple Return, alignment remains intact, so clearly the best choice, if the OP has LyX 2.0.4 or better – vaettchen Oct 19 '12 at 12:43
  • Interesting... I tried Enter at first but it won't work. I have LyX 2.0.0. It's good to know they added this simple option... Thank you! – Chandrasekhar Oct 19 '12 at 22:15