
Quiero que solo una de las celdas de mis columnas tenga relleno superior. Lo intenté :
\def\arraystretch{factor}%
pero el resultado no es el ideal. porque no quiero que todas las columnas tengan el relleno superior.
¿Hay alguna forma de especificar el relleno superior para celdas de una sola columna?
Editar
Tengo una tabla larga con 10 filas y 4 columnas y la cuarta columna tiene imagen. este es mi código (resumido con 3 columnas):
\begin{longtable}{|p{2cm}|p{3cm}|p{8cm}|p{2cm}|}
\caption{my caption}
\label{table:10.1}
\\
\hline
\centering titile 1 & \centering title 2 & \centering title 3 & {\centering title 4} \\
\hline \hline
first r first c & first r second c & first r third c &
\begin{minipage}{.12\textwidth}
\includegraphics[width=\linewidth]{table10-1-1.png}
\end{minipage}
\\
\hline
second r first c & second r second c & second r third c &
\begin{minipage}{.12\textwidth}
\includegraphics[width=\linewidth]{table10-1-2.png}
\end{minipage}
\\
\hline
third r first c & third r second d & third r third c &
\begin{minipage}{.12\textwidth}
\includegraphics[width=\linewidth]{table10-1-3.png}
\end{minipage}
\\
\hline
\end{longtable}
El resultado es así:
Intenté rellenar con {\renewcommand{\arraystretch}{4}% pero el resultado no fue bueno:
Estaría bien si solo las celdas de la cuarta columna tuvieran relleno.
de todos modos tengo otro problema en esta tabla:
1- El texto de las celdas está justificado y, a veces, el espacio entre las palabras es demasiado.
Estaré agradecido por cualquier ayuda.
Respuesta1
Como lo usas minipage
para las imágenes, puedes agregar algo de relleno allí:
\documentclass{article}
\usepackage[margin=1cm]{geometry}% just for not having overfull lines
\usepackage{graphicx}
\usepackage{longtable,array}
\begin{document}
\begin{longtable}{|p{2cm}|p{3cm}|p{8cm}|p{2cm}|}
\caption{my caption}
\label{table:10.1}
\\
\hline
\centering title 1 &
\centering title 2 &
\centering title 3 &
\centering\arraybackslash title 4 \\
\hline \hline
first r first c & first r second c & first r third c &
\begin{minipage}{\linewidth}
\vspace{12pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{12pt}
\end{minipage}
\\
\hline
second r first c & second r second c & second r third c &
\begin{minipage}{\linewidth}
\vspace{12pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{12pt}
\end{minipage}
\\
\hline
third r first c & third r second d & third r third c &
\begin{minipage}{\linewidth}
\vspace{12pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{3pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{12pt}
\end{minipage}
\\
\hline
\end{longtable}
\end{document}
Tenga en cuenta que indiqué el ancho de minipage
la p
columna en la que se encuentra, y lo mismo para las imágenes.
La entrada podría simplificarse, teniendo en cuenta que el esquema es fijo.
Con pequeños cambios puedes tener el texto en las tres primeras columnas comenzando en la parte superior. Aquí usé \vspace{0pt}
en la parte superior de las minipáginas.
\documentclass{article}
\usepackage[margin=1cm]{geometry}% just for not having overfull lines
\usepackage{graphicx}
\usepackage{longtable,array}
\begin{document}
\begin{longtable}{|p{2cm}|p{3cm}|p{8cm}|p{2cm}|}
\caption{my caption}
\label{table:10.1}
\\
\hline
\centering title 1 &
\centering title 2 &
\centering title 3 &
\centering\arraybackslash title 4 \\
\hline \hline
first r first c & first r second c & first r third c &
\begin{minipage}[t]{\linewidth}
\vspace{0pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{12pt}
\end{minipage}
\\
\hline
second r first c & second r second c & second r third c &
\begin{minipage}[t]{\linewidth}
\vspace{0pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{12pt}
\end{minipage}
\\
\hline
third r first c & third r second d & third r third c &
\begin{minipage}[t]{\linewidth}
\vspace{0pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{3pt}
\includegraphics[width=\linewidth]{example-grid-100x100pt}\par
\vspace{12pt}
\end{minipage}
\\
\hline
\end{longtable}
\end{document}