1

I am building a table where each row contains an image, however when I insert the image I end up with a lot of whitespace under the image and it making the row unnecessarily tall.

A minimum working example of the code would be:

\documentclass[twoside,11pt]{article}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=1.9cm,rmargin=3.8cm}
\renewcommand{\baselinestretch}{1.5}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\usepackage{graphics}

\begin{document}

{\fontfamily{cmss}\selectfont

\begin{table}[H]
\begin{tabular}{|p{2.7cm}|p{6.2cm}|p{1.7cm}|p{3.5cm}|}
\hline
\textbf{Process} & \textbf{Separation Conceot} &\textbf{Materials Passed} & \textbf{Typically Rejects} \\ \hline
Microfiltration & \includegraphics[width=1\linewidth]{Images/FloridaGDP.png}& Water and dissolved species & Large particles and micro-organisms  \\ \hline
Ultrafiltation & \includegraphics[width=0.2\linewidth]{Images/Mobifilt.png} & Water and Salts & Bacteria and macro-molecules such as proteins \\ \hline
Nanofiltration & \includegraphics[width=0.2\linewidth]{Images/Mobifilt.png} & Water & Dissolved contaminants \\ \hline
Reverse Osmosis & \includegraphics[width=0.2\linewidth]{Images/Mobifilt.png} & Water & Particles and low molar mass species such as ions \\ \hline
\end{tabular}
\caption{Some caption}
\end{table}
\end{document}

The first row looks like this: enter image description here

  • My welcome between the users of LaTeX into the site TeX.SE. Good work. – Sebastiano Dec 17 '18 at 13:04
2

Add a vspace before the graphic to change the alignment:

\documentclass[twoside,11pt]{article}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=1.9cm,rmargin=3.8cm}
\renewcommand{\baselinestretch}{1.5}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}

\begin{document}

\begin{table}[H]
\begin{tabular}{|p{2.7cm}|p{6.2cm}|p{1.7cm}|p{3.5cm}|}
\hline
\textbf{Process} & \textbf{Separation Conceot} &\textbf{Materials Passed} & \textbf{Typically Rejects} \\ \hline
Microfiltration & \vspace{-0.7\ht\strutbox}\includegraphics[width=1\linewidth]{example-image}& Water and dissolved species & Large particles and micro-organisms  \\ \hline
\end{tabular}
\caption{Some caption}
\end{table}

\end{document}

enter image description here

1

With the adjustbox package, you can instruct the graphics to be top aligned:

\documentclass[twoside,11pt]{article}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=1.9cm,rmargin=3.8cm}
\renewcommand{\baselinestretch}{1.5}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\usepackage{graphics}

\usepackage[export]{adjustbox}

\begin{document}

{\fontfamily{cmss}\selectfont

\begin{table}[htbp]
\begin{tabular}{|p{2.7cm}|p{6.2cm}|p{1.7cm}|p{3.5cm}|}
\hline
\textbf{Process} & \textbf{Separation Conceot} &\textbf{Materials Passed} & \textbf{Typically Rejects} \\ \hline
Microfiltration & \includegraphics[width=1\linewidth,valign=t]{example-image-duck}& Water and dissolved species & Large particles and micro-organisms  \\ \hline
Ultrafiltation & \includegraphics[width=0.2\linewidth,valign=t]{example-image-duck} & Water and Salts & Bacteria and macro-molecules such as proteins \\ \hline
Nanofiltration & \includegraphics[width=0.2\linewidth,valign=t]{example-image-duck} & Water & Dissolved contaminants \\ \hline
Reverse Osmosis & \includegraphics[width=0.2\linewidth,valign=t]{example-image-duck} & Water & Particles and low molar mass species such as ions \\ \hline
\end{tabular}
\caption{Some caption}
\end{table}
\end{document}

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.