# Cant align longtable cell to the top

I am making a long table and the text in columns is starting in the middle or is flushed to the bottom.

    %
\documentclass[12pt,twoside,a4paper,fleqn]{article}
%\documentclass[natbib,fleqn,smallextended]{svjour3}
%
\usepackage{filecontents}
%
%Author list
\usepackage[noblocks,auth-lg]{authblk}
%
%
\usepackage[version=3]{mhchem} % for upright CO2
\usepackage{graphicx}
\usepackage{floatrow}
%\usepackage{tabularx}%modifiable tabular
%\usepackage[usestackEOL]{stackengine}
\usepackage{longtable}
%
%setting spacing
\usepackage{setspace}
\doublespacing
%\singlespacing
%\onehalfspacing
%For other sizes use the \setstretch command like this:
%\setstretch{1.8}
\usepackage[square,authoryear]{natbib}
\usepackage{color}
\usepackage[top=1in, bottom=1in, left=0.8in, right=0.8in]{geometry}
%line Numbers
\usepackage{lineno}
\linenumbers*[1]
%to set numbering format
\usepackage{enumerate}
%Maths
\usepackage{amsmath}
\usepackage{amssymb}
%for deg
\usepackage{gensymb}
%for permil
\usepackage{wasysym}
\usepackage{fancyhdr}
%\pagestyle{fancy}
%\rhead{Past p\ce{CO_2} of air from Tree-ring cellulose $\delta^{13}C$}
% for rotating floats
\usepackage{lscape}
%for subfigures and tables
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[font=footnotesize]{subfig}
%automatic referencing
\usepackage[capitalise]{cleveref}
%for long tables
\usepackage{longtable}
\newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}} %around tilde

\title{saf}
%
%\author{}
\author{}
%\author{}
%\author{}
%\affil{}
%\author{}
%\affil{}

\date{}

\begin{document}

\maketitle

\begin{abstract}

\end{abstract}

\subsubsection*{Keywords}

\section*{Introduction}

Long term changes
% Table generated by Excel2LaTeX from sheet 'Sheet1'

\begin{longtable}{lp{5cm}p{4.5cm}p{4.5cm}@{}}
& \textbf{dsf} & \textbf{sdafg} & \textbf{hj} \\
%          &  &  &  \\
A     &  \includegraphics[width=\linewidth]{test} ifiuyruldlulud & U-Pb, K-Ar, etc. & Mg/Ca, Sr/Ca, etc. \\
%          &  &  &  \\
\label{tabmethods}%
\end{longtable}%

\clearpage
% Tables and Figures

\end{document}


no clues why this isnt working

• Welcome to Tex.SE! The output looks normal to me. Everything is aligned on its baseline. Including the graphic, which has the baseline along the bottom edge by default. If you want to adjust the baseline of the graphic, then graphbox can help. – Thruston Apr 11 '18 at 10:57
• I want to align this to the top instead of the baseline :( – Trina Apr 11 '18 at 11:03
• So try adding \usepackage{graphbox} and then add an align=t option to your \includegraphics. Like so\includegraphics[align=t]{whatever.png} ? – Thruston Apr 11 '18 at 11:25
• This did solve the problem! please write this as an answer so that I can mark it as the solution. :) Thanks – Trina Apr 11 '18 at 11:36

As requested...

\documentclass[a4paper]{article}
\usepackage{graphbox}
\begin{document}

With \verb|\includegraphics[width=1in]{example-image-a}|

\smallskip

\begin{tabular}{lll}
A & B & C\\
Another & \includegraphics[width=1in]{example-image-a} & over here \\
Finally & a longer line to show & the alignment
\end{tabular}

\bigskip
With \verb|\includegraphics[align=t,width=1in]{example-image-a}|

\smallskip

\begin{tabular}{lll}
A & B & C\\
Another & \includegraphics[align=t,width=1in]{example-image-a} & over here \\
Finally & a longer line to show & the alignment
\end{tabular}

\bigskip
With \verb|\includegraphics[align=c,width=1in]{example-image-a}|

\smallskip

\begin{tabular}{lll}
A & B & C\\
Another & \includegraphics[align=c,width=1in]{example-image-a} & over here \\
Finally & a longer line to show & the alignment
\end{tabular}

\end{document}