0

I need a table of 5 columns where the last column contains figures. When I use \parbox , the spacing between lines increases and the figures are not aligned under the lat column. How can I fix it please. Here is the code

\begin{table}[h]
\caption{ Simulation parameters.}
\begin{tabularx}{\textwidth}{@{}l*{5}{d{1}}@{}}
\toprule[\heavyrulewidth]
 Case & \mC{$D_{1}$} &  \mC{$D_{2}$}  &  \mC{$D_{3}$}  & \mC{shape}  \\
%\cmidrule(l){2-7}
%& \mC{OLS} & \mC{OLS} & \mC{OLS} & \mC{OLS} & \mC{2SLS} & \mC{2SLS}  \\
\midrule
$\mathcal{S}_{D1}$ & 0.077 & 0.065 & 0.061 & \parbox[t]{2em}{\linespread{0.2}\selectfont
      \includegraphics[scale=0.1]{Small_Def1_Sep2021_2.jpeg}} \\
      $\mathcal{S}_{D2}$ & 0.121 & 0.109 & 0.101 & \parbox[t]{2em}{\linespread{0.2}\selectfont
       \includegraphics[scale=0.1]{Small_Def2_Sep2021_2.jpeg}} \\
      $\mathcal{S}_{D3}$ & 0.157 & 0.143 & 0.119 & \parbox[t]{2em}{\linespread{0.2}\selectfont
   \includegraphics[scale=0.1]{Small_Def3_Sep2021_2.jpeg}} \\
    $\mathcal{S}_{D4}$ & -0.040 & -0.045 & -0.063 & \parbox[t]{2em}{\linespread{0.2}\selectfont
   \includegraphics[scale=0.1]{Small_Def4_Sep2021_4.jpeg}} \\
      $\mathcal{S}_{D5}$ & -0.097 & -0.139 & -0.196 & \parbox[t]{2em}{\linespread{0.2}\selectfont
   \includegraphics[scale=0.1]{Small_Def5_Sep2021_2.jpeg}} \\
\bottomrule[\heavyrulewidth]
\end{tabularx}\label{table:Parameters}
\end{table}
  • you have posted a lot of code but no one can run it and see the issue. But tabularx with no X column is always wrong, you need to have X (and very rarely need \parbox in a table, just use X or p columns). Please provide a complete small document that shows your problem (you ca use example-image as the image. – David Carlisle Nov 10 '21 at 15:36
  • what is the intention of the \parbox that don't have any paragraphs, just an \includegraphics? – David Carlisle Nov 10 '21 at 16:03
  • \parbox[t]{...} uses the first baseline, only the first baseline is at the bottom of \includegraphics. You want \raisebox{\dimexpr \ht\strutbox-\height}{...}. – John Kormylo Nov 10 '21 at 16:36

0 Answers0