1

In a cell with fixed column width and wrapped text in a table - the table is generated entirely in LyX, rather than LaTeX - there is too much vertical space in that cell. Image below; problem highlighted in yellow. Does anyone have any thoughts on how to deal with this? I've tried line spacing (single) and modifying the height of the cell (impossible).

(My LyX tables are quite pretty now - thanks mostly to the expertise of everyone on this forum - but this issue is still bothering me.)

Table example - too much vertical space in final row

Edit: this is what LaTeX is apparently doing in the background:

\begin{singlespace}
\noindent \begin{center}
\begin{tabular}{lc}
\toprule 
\textbf{Test XYZ} & \textbf{p-value}\tabularnewline
\midrule
Statistic A & 0.00\tabularnewline
Statistic B & 0.00\tabularnewline
Statistic C & 0.00\tabularnewline
\midrule
\multicolumn{2}{>{\raggedright}p{0.75\textwidth}}{\begin{singlespace}
\noindent \raggedright{}\textcolor{black}{\footnotesize{}Lorem ipsum
dolor sit amet, consectetur adipiscing elit. Donec mollis est libero,
sed vehicula erat tempor eget. Morbi justo justo, mattis ut elit tristique,
iaculis ornare sapien. Nulla tristique eros id justo pulvinar lacinia. }
\end{singlespace}
}\tabularnewline
\bottomrule
\end{tabular}
\par\end{center}
\end{singlespace}

Thanks a million!

  • Welcome to TeX SX! Could you post a full compilable code for this table? – Bernard Jun 13 '18 at 9:15
  • @Bernard This is fully generated in LyX -- i.e. Insert Table etc.; then a right-click into the cell the width of which I want to fix, and so on. I can add a Lyx file rather than code? – oceansize Jun 13 '18 at 9:16
  • No idea. I don't know Lyx, so I can't help in this respect, but the reason for this unwanted spacing lies in the LaTeX code which is behind. – Bernard Jun 13 '18 at 9:19
  • @Bernard I've added the LaTeX code – oceansize Jun 13 '18 at 9:24
  • @oceansize: The unwanted vertical white space is caused by the singlespace environment inside the multicolumn. – leandriis Jun 13 '18 at 9:29
0

The extra vertical white space is caused by the singlespace environment inside the multicolumn command. You can safely remove this environment to obtian the following output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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