1

I have this very long and large table which I have compiled fine using normal article but today I just copied the whole tex to an elsearticle harv to submit to elsevier. Everything else works without the longtable in but I need that longtable. Thanks for help.

MWE:

%% 
%% Copyright 2007, 2008, 2009 Elsevier Ltd
%% 
%% This file is part of the 'Elsarticle Bundle'.
%% ---------------------------------------------
%% 
%% It may be distributed under the conditions of the LaTeX Project Public
%% License, either version 1.2 of this license or (at your option) any
%% later version.  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%% 
%% The list of all files belonging to the 'Elsarticle Bundle' is
%% given in the file `manifest.txt'.
%% 
%% Template article for Elsevier's document class `elsarticle'
%% with harvard style bibliographic references
%% SP 2008/03/01

\documentclass[preprint,12pt,authoryear]{elsarticle}

%% Use the option review to obtain double line spacing
%% \documentclass[authoryear,preprint,review,12pt]{elsarticle}

%% Use the options 1p,twocolumn; 3p; 3p,twocolumn; 5p; or 5p,twocolumn
%% for a journal layout:
%% \documentclass[final,1p,times,authoryear]{elsarticle}
%% \documentclass[final,1p,times,twocolumn,authoryear]{elsarticle}
%% \documentclass[final,3p,times,authoryear]{elsarticle}
%% \documentclass[final,3p,times,twocolumn,authoryear]{elsarticle}
%% \documentclass[final,5p,times,authoryear]{elsarticle}
%% \documentclass[final,5p,times,twocolumn,authoryear]{elsarticle}

%% For including figures, graphicx.sty has been loaded in
%% elsarticle.cls. If you prefer to use the old commands
%% please give \usepackage{epsfig}

%% The amssymb package provides various useful mathematical symbols
\usepackage{amssymb}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{graphicx} % support the \includegraphics command and options
\usepackage[fleqn,reqno]{amsmath}
\usepackage[version=3]{mhchem} % Formula subscripts using \ce{}
\usepackage{setspace}
\doublespacing
%
\usepackage{gensymb}
\usepackage{wasysym}%for \permil sign
\usepackage[para,online,flushleft]{threeparttable}
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{lineno}
\linenumbers
\usepackage{tabularx}
\usepackage{float}
\usepackage[capitalise]{cleveref}
%mytilde
\newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}} %around tilde
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The lineno packages adds line numbers. Start line numbering with
%% \begin{linenumbers}, end it with \end{linenumbers}. Or switch it on
%% for the whole article with \linenumbers.
\usepackage{lineno}
%
\usepackage{lipsum}
%
\journal{Something}

\begin{document}

\begin{frontmatter}

%% Title, authors and addresses

%% use the tnoteref command within \title for footnotes;
%% use the tnotetext command for theassociated footnote;
%% use the fnref command within \author or \address for footnotes;
%% use the fntext command for theassociated footnote;
%% use the corref command within \author for corresponding author footnotes;
%% use the cortext command for theassociated footnote;
%% use the ead command for the email address,
%% and the form \ead[url] for the home page:
%% \title{Title\tnoteref{label1}}
%% \tnotetext[label1]{}
%% \author{Name\corref{cor1}\fnref{label2}}
%% \ead{email address}
%% \ead[url]{home page}
%% \fntext[label2]{}
%% \cortext[cor1]{}
%% \address{Address\fnref{label3}}
%% \fntext[label3]{}

\title{nco;w;w;nfknkn}

%% use optional labels to link authors explicitly to addresses:
%% \author[label1,label2]{}
%% \address[label1]{}
%% \address[label2]{}

\author[a]{Trina}
\ead{[email protected]}

\address[a]{kbc, India}
\date{}
\begin{abstract}

\end{abstract}

\begin{keyword}

\end{keyword}

\end{frontmatter}

\linenumbers
%% main text
\lipsum[4][3]
%%%%%%%%%%%  
\begin{landscape}
\begin{longtable}{p{1cm}p{5cm}p{8cm}p{8cm}}
            & \textbf{\lipsum[4][6]} & \textbf{\lipsum[4][2]} & \textbf{\lipsum[4][3]} \\
    A     &  \lipsum[4][3] (ICP-MS)  \newline \includegraphics[align=t,width=\linewidth]{test} & \lipsum[3-4][2] & \lipsum[3-4][2] \\
    B     & \lipsum[2][2] \newline \includegraphics[align=t,width=\linewidth]{test} &   & \lipsum[3-4][2] \\
  \caption{\lipsum[3-4][7]}
  \label{tabmethods}%
\end{longtable}%
\end{landscape}
%%%%%%%%%%%  
\end{document}

\endinput
%%
%% End of file `elsarticle-template-harv.tex'.

The error:

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6300 64-bit) entering extended mode (E:/LaTeX-manual/test2/Bose_etal_IntPaleo-elsarticle-QSR.tex LaTeX2e <2017-04-15> Babel <3.9r> and hyphenation patterns for 76 language(s) loaded. ("C:\Program Files\MiKTeX
2.9\tex\latex\elsarticle\elsarticle.cls" Document Class: elsarticle 2009/09/17, 1.2.0: Elsevier Ltd ("C:\Program Files\MiKTeX
2.9\tex\latex\base\article.cls" Document Class: article 2014/09/29 v1.4h Standard LaTeX document class ("C:\Program Files\MiKTeX
2.9\tex\latex\base\size12.clo")) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-cfg\graphics.cfg") ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-def\pdftex.def" ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty") ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty")))) ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\pifont.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\upzd.fd") ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\upsy.fd")) ("C:\Program Files\MiKTeX 2.9\tex\latex\natbib\natbib.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\geometry\geometry.sty" ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty") ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty") ("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\geometry\geometry.cfg")) ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty" For additional information on amsmath, use the `?' option. ("C:\Program Files\MiKTeX
2.9\tex\latex\amsmath\amstext.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\mhchem\mhchem.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\expl3.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\expl3-code.tex") ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3pdfmode.def")) ("C:\Program Files\MiKTeX 2.9\tex\latex\l3packages\l3keys2e\l3keys2e.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3regex.sty" ("C:\Program Files\MiKTeX
2.9\tex\latex\l3experimental\l3str\l3tl-build.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\l3experimental\l3str\l3tl-analysis.sty" ) ("C:\Program Files\MiKTeX
2.9\tex\latex\l3experimental\l3str\l3str-convert.st y")) ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\calc.sty") ("C:\Program Files\MiKTeX
2.9\tex\latex\chemgreek\chemgreek.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\l3packages\xparse\xparse.sty"))) ("C:\Program Files\MiKTeX 2.9\tex\latex\setspace\setspace.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\was\gensymb.sty") ("C:\Program Files\MiKTeX
2.9\tex\latex\wasysym\wasysym.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\threeparttable\threeparttable.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\longtable.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\pdflscape.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\lscape.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\lineno\lineno.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\tabularx.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\array.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\float\float.sty") ("C:\Program Files\MiKTeX
2.9\tex\latex\cleveref\cleveref.sty") ("C:\Program Files\MiKTeX 2.9\tex\latex\lipsum\lipsum.sty") No file Bose_etal_IntPaleo-elsarticle-QSR.aux. ("C:\Program Files\MiKTeX
2.9\tex\context\base\supp-pdf.mkii" [Loading MPS to PDF converter (version 2006.09.02).] ) ("C:\Program Files\MiKTeX
2.9\tex\generic\oberdiek\pdftexcmds.sty" ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty" ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvdefinekeys.sty")) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty" ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty" ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"))))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex

Package gensymb Warning: Not defining \perthousand.


Package gensymb Warning: Not defining \micro.

("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd") ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd") ("C:\Program Files\MiKTeX 2.9\tex\latex\wasysym\uwasy.fd") [1{C:/ProgramData/Mi KTeX/2.9/pdftex/config/pdftex.map}] Underfull \hbox (badness 10000) in paragraph at lines 122--122 []|\OT1/cmr/bx/n/12 Quisque ul-lam-cor-per

Underfull \hbox (badness 10000) in paragraph at lines 122--122 \OT1/cmr/bx/n/12 vi-tae la-cus tin-cidunt

Underfull \hbox (badness 4726) in paragraph at lines 122--122 \OT1/cmr/bx/n/12 do-lor sit amet, con-

Underfull \hbox (badness 10000) in paragraph at lines 122--122 \OT1/cmr/bx/n/12 pus con-va-l-lis au-gue.

Underfull \hbox (badness 6032) in paragraph at lines 122--122 \OT1/cmr/bx/n/12 el-e-men-tum fer-men-tum

Underfull \hbox (badness 1721) in paragraph at lines 123--123 \OT1/cmr/m/n/12 erat ip-sum. Cras nibh.

Underfull \hbox (badness 1831) in paragraph at lines 123--123 \OT1/cmr/m/n/12 hac habitasse platea dic-

! Package keyval Error: align undefined.

See the keyval package documentation for explanation. Type  H <return> for immediate help.  ...                                              
                                                   l.123 ...egraphics[align=t,width=\linewidth]{test}
                                                   & \lipsum[3-4][2] & \lips...

?

1 Answer 1

2

align=t is not a valid option to \includegraphics.

If you add \usepackage[export]{adjustbox}, then you can use

\includegraphics[valign=t,width=\linewidth]{test}

Note that it's valign.

1
  • This worked fine but dunno why squeezed the caption in valign with the middle column
    – Trina
    Feb 1, 2019 at 6:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .