LyX ⇒ Centering text in table cell ?!
Centering text in table cell ?!
I'm having a problem centering a text in a table cell. Basically,
I have a three column table. The two end cells (1 and 3) in row 2 have
equations and the middle cell has an image. When I inserted the
image the two equations appeared in the bottom of the cell.
How can I place them in the middle of the cell ?
I'm attaching the table. The second row is the one that has a problem.
Thanks
- Attachments
-
- Jpeg image
- Table.jpg (17.98 KiB) Viewed 17582 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Centering text in table cell ?!
I attached an example .lyx file.
- Attachments
-
- Example.zip
- (6.12 KiB) Downloaded 676 times
Re: Centering text in table cell ?!
I tried that but it's not working.
I set the column width to 2 inch but no mater what option I choose
for the vertical alignment (Top, Middle, Bottom) the text still
appears in the bottom. I tried deleting the cell content and re-write
the equation but the cursor is only active at the bottom.
I'm not sure if this has to do with using Lyx on a mac.
Centering text in table cell ?!
BTW, you should use middle vertical alignment for all columns.
And, if everything else fails, you may add this code in LaTeX Argument field in Settings for every column:
Code: Select all
>{\centering}m{2in}
Re: Centering text in table cell ?!
It's working now. I re-created the table and before putting
anything there I set the column width, and the vertical row
alignment to Middle.
A side question, in the other picture I'm attaching now, I created
a Subsection which I called "1. step function", I hit Enter and Lyx
switched to the "Standard" environment. After creating a vertical space,
I created a two-cell table. However, the table appeared on the same line
as the Subsection heading and it is shifted all the way to the right. The
cell widths are 1.5 inch. How do I get the table to appear in the next line
at the left. In other parts of the document it worked fine. I'm not sure what
I did different here.
- Attachments
-
- Second attachment
- Table2.jpg (5.39 KiB) Viewed 17572 times
Re: Centering text in table cell ?!
I just realized it was there.
Re: Centering text in table cell ?!
Re: Centering text in table cell ?!
From the output you notice that row 2 of table 1 is not centered (I thought I solved it) . Also, the tables following subsections 1 and 3 are on the same line as the heading. But for subsection 2 the table is in an appropriate position.
- Attachments
-
- Archive.zip
- Archive
- (98.04 KiB) Downloaded 387 times
Centering text in table cell ?!
2. The issue with subsection is caused by document class (article (AMS)). Normal article document class doesn't have this problem. However, puting \mbox{} (i.e. Ctrl+L > \mbox{}) after vertical space should put the table below the subsection.
Note: if you encounter more issues, please don't forget to provide images together with .lyx and .pdf files.
Re: Centering text in table cell ?!
work.
Thanks so much