Take the 2-minute tour ×
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.

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.

share|improve this question
add comment

2 Answers

up vote 8 down vote accepted

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 resonable value in width. I have, for your example, set it to 2cm.

Then, without space, Insert | Tex Code right after veni: In the field that appears, type \linebreak with, important, 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

share|improve this answer
add comment

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

share|improve this answer
    
\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
    
-> @ 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
add comment

Your Answer

 
discard

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.