Hi folks,
I've created a table that contains multiple combined rows. The problem is that I want to align the contant so that it is vertically centered in each row. But it doesn't seem to work if I choose the option "align center". I tried to adjust for that by altering the offset value, but that doesn't look that nice if the combined row is created of a large set of rows. Any ideas on how to improve that table?
Thanks a lot!
LyX ⇒ Creating a table with vertical centered text
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Creating a table with vertical centered text
rosspost to the german forum GoLaTeX.
Please read, what our administrator thinks about that: Gimme Pizza
The thing is, with the amount of information given, the question is not answerable. We need an example to test, called a minimal lyx example. As there are almost no LyX supporters here, i suggest to export the code to LaTeX. Your chance of help is much higher that way. Elke already asked you for more information in form of a minimal example in the german forum.
Please read, what our administrator thinks about that: Gimme Pizza
The thing is, with the amount of information given, the question is not answerable. We need an example to test, called a minimal lyx example. As there are almost no LyX supporters here, i suggest to export the code to LaTeX. Your chance of help is much higher that way. Elke already asked you for more information in form of a minimal example in the german forum.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Creating a table with vertical centered text
Thank you. I've created a minimal lyx example.
See cell "a" to get a grasp of what I'm speaking about. Due to the long lines of "lorem ipsum" with 15 words some of the words break into the next line. This causes the text in cell "a" to be misplaced from a veritically aligned perspective. Is there a way to fix this?
See cell "a" to get a grasp of what I'm speaking about. Due to the long lines of "lorem ipsum" with 15 words some of the words break into the next line. This causes the text in cell "a" to be misplaced from a veritically aligned perspective. Is there a way to fix this?
Code: Select all
%% LyX 2.1.1 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{array}
\usepackage{multirow}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{setspace}
\makeatother
\usepackage{babel}
\begin{document}
\begin{spacing}{0.8}
\begin{tabular}{>{\centering}p{1cm}>{\centering}p{4cm}}
\multicolumn{2}{c}{{\tiny{}A}}\tabularnewline
\hline
\multirow{23}{1cm}{{\tiny{}a}} & \multirow{4}{4cm}{{\tiny{}Lorem ipsum dolor sit amet}}\tabularnewline
& \tabularnewline
& \tabularnewline
& \tabularnewline
\cline{2-2}
& {\tiny{}Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut}\tabularnewline
\cline{2-2}
& {\tiny{}Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut}\tabularnewline
\cline{2-2}
& {\tiny{}Lorem ipsum dolor sit amet}\tabularnewline
\cline{2-2}
& {\tiny{}Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut}\tabularnewline
\cline{2-2}
& {\tiny{}Lorem ipsum dolor sit amet}\tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\cline{2-2}
& \tabularnewline
\hline
\end{tabular}
\end{spacing}
\end{document}