
Quero que apenas uma das células das minhas colunas tenha preenchimento superior. Tentei :
\def\arraystretch{factor}%
mas o resultado não é o ideal. porque não quero que todas as colunas tenham o preenchimento superior.
existe alguma maneira de especificar o preenchimento superior para células de apenas uma coluna?
Editar
Eu tenho uma tabela longa com 10 linhas e 4 colunas que a 4ª coluna possui imagem. este é o meu código (resumido em 3 colunas):
\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}
O resultado é assim:
Tentei obter preenchimento com {\renewcommand{\arraystretch}{4}% mas o resultado não foi bom:
Seria bom se apenas as células da 4ª coluna tivessem preenchimento.
de qualquer forma, tenho outro problema nesta tabela:
1- O texto nas células está justificado e às vezes o espaço entre as palavras é muito grande.
Ficarei grato por qualquer ajuda.
Responder1
Já que você usa minipage
para as imagens, você pode adicionar algum preenchimento lá:
\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}
Observe que indiquei a largura da minipage
coluna p
em que ela está, e o mesmo para as imagens.
A entrada pode ser simplificada, tendo em conta que o esquema é fixo.
Com pequenas alterações você pode ter o texto nas três primeiras colunas começando no topo. Aqui usei \vspace{0pt}
no topo das 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}