# how to compile a latex file containing only a table and references inside the table

I have a latex file (supplement.tex) with only a table in it. This table is a supplement to a paper, and I need to use references inside this table. The complete list of references are already listed in original paper (doc.tex). In the end of the supplement.tex I have added the reference file name, so the references can be compiled. Please note that I do not need the list of references at the end of supplement file. I just want the references given in the table are compiled correctly. The table looks like this:

\begin{center}
\end{center}
\begin{longtable}{|c | p{4cm}  |p{8cm}|} % centered columns (4 columns)
\caption{The list }
\label{cee}\\
\hline
T & kd & d \\ \hline
\multirow{21}{*}{\rotatebox[origin=c]{90}{B}}
& ne,
nel & n  \\ \cline{2-3}
& g & G .   \\ \cline{2-3}
& o &  Oli. \\ \cline{2-3}
& der &  Dndi  and .  \\  \cline{2-3}
&  ayptic &  Synon.  \\  \cline{2-3}
& dente & it and spal . \\
\cline{2-3}
& ber, t &  Imports.  \\  \cline{2-3}
& bn,  &  Bn.  \\  \cline{2-3}
& mile &  mim.   \\  \cline{2-3}
& sd &  The c.  \\  \cline{2-3}
& gc & Gam   \\  \cline{2-3}
&  cer,m &  cere   \\  \cline{2-3}
& prepulse inhibition & \\  \cline{2-3}
& Myelin&Mye ne \\  \cline{2-3}
& astte & kk)  \\  \cline{2-3}
& olfaulb & Olfact  \\  \cline{2-3}
& ephriceptor & -  \\  \cline{2-3}
& dmine &  a  mov \\  \cline{2-3}
& anesis,  & -   \\  \cline{2-3}
&  myelion & Myel a diels th.   \\  \cline{2-3}
& osteast  & -   \\

\hline

\multirow{7}{*}{\rotatebox[origin=c]{90}{Mu}}  & sarcre  &   are formed of .   \\ \cline{2-3}
&  mus & - \\ \cline{2-3}
&  MAP & MAP (mi is one of t  \\ \cline{2-3}
&   fusionion & Myob  .   \\ \cline{2-3}
&  crein & Sing ce which occurs in      \\ \cline{2-3}
&gyogen&\\ \cline{2-3}
&cagen &\\
\hline

\multirow{7}{*}{\rotatebox[origin=c]{90}{help}}  & Tell & -   \\ \cline{2-3}
&  maroge & Macps are  of  \\ \cline{2-3}
&  class II &   class  \\ \cline{2-3}
& MyD88 & -  \\ \cline{2-3}
& tolike  & Toll-ills .  \\ \cline{2-3}
&  class I&HC class I molx () \\  \cline{2-3}
&   (TNF)& Most mlls\\

\hline

\multirow{27}{*}{\rotatebox[origin=c]{90}{Imem}}
& phagis& Phates. \\ \cline{2-3}
& erythrtes& -  \\ \cline{2-3}
& cl& -  \\ \cline{2-3}
& porphn& One of the kno  \\  \cline{2-3}
&heme bsyss& Heme  and  \\ \cline{2-3}
& tolliktor& Toll-lv.   \\ \cline{2-3}

& boalization & \\ \cline{2-3}
& dponse&\\ \cline{2-3}
& lipcharide&Lipopolys.\\ \cline{2-3}
&phagme&In cellosis\\ \cline{2-3}
&  with host&-\\ \cline{2-3}
&  response&-\\ \cline{2-3}
&antigen&In , an ant. \\ \cline{2-3}
& Interferons&Inteor cells.\\ \cline{2-3}
&
Supide&Superox. \\ \cline{2-3}
&  cedhesion&Interns bm also neith ea,.\\ \cline{2-3}
&  neuil&Neutr acroorganisms.\\ \cline{2-3}
& inrin& Igrins pl.\\ \cline{2-3}

&Chemotactic & Chegions wit\\ \cline{2-3}
& Macges&Macrophages stim.\\ \cline{2-3}
& Dendrcells &Dendrders. \\ \cline{2-3}
&intein&Interleukins  cells (les).\\ \cline{2-3}
&cytokine&They are pa.\\ \cline{2-3}
& acute-phase response&Positive system.\\ \cline{2-3}
&negative regula&\\ \cline{2-3}
&thymus&The thymus is a s.\\ \cline{2-3}
&chemotactic&\\
\hline
\multirow{3}{*}{\rotatebox[origin=c]{90}{he}}  & aant & adregctions   \\ \cline{2-3}
& het & -  \\ \cline{2-3}

& carac & -   \\
\hline

\end{longtable}
\bibliographystyle{natbib}
\bibliography{document.bib}

I used

pdflatex '\documentclass{article}\usepackage{longtable}\begin{document}\input{supplement}\end{document}'

to compile.

I get the error in line 8

l.8 \multirow
{17}{*}{\rotatebox[origin=c]{90}{B}}

Any suggestion is appreciated.

• unrelated but longtable has not got a [h] option. – David Carlisle May 12 '15 at 11:26
• The error occurs because you're missing a \usepackage{longtable} in the pdflatex line. The other solution uses a built-in table environment, and doesn't require any extra packages. – Mike Renfro May 12 '15 at 11:30
• @MikeRenfro Thanks. That solved the problem. Now I get this error: ! Misplaced \noalign. \hline ->\noalign – Pegah May 12 '15 at 12:18
• the \hline after \cline is an error. – David Carlisle May 12 '15 at 12:50
• It is impossible to help unless you fix your example so that reproduces the error for which you are asking for help, add \documentclass \begin{document} and any packages needed so that the example is a complete small document. – David Carlisle May 28 '15 at 9:00

You simply have undefined commands as the required packages are not loaded.

You could use

\$  pdflatex '\documentclass{article}\usepackage{longtable,multirow,graphicx}\begin{document}\input{supplement}\end{document}'

but more normal would be to use

pdflatex supplement-only

where supplement-only.tex is

\documentclass{article}
\usepackage{longtable,multirow,graphicx}
\begin{document}
\input{supplement}
\end{document}

That way you don't have to keep remembering to construct an increasingly long commandline.

• thanks a lot for your help. It solved the problem. The last thing is that instead of references a ? appears. I put the current code to compile in next comment. The supplement file is still the same. Do you have any idea how to solve it? thanks again. – Pegah Jun 16 '15 at 11:23
• \documentclass{article} \usepackage{longtable,multirow,graphicx} \usepackage[square, numbers, comma, sort&compress]{natbib} \bibliographystyle{plainnat}\begin{document} \input{supplement}\end{document} – Pegah Jun 16 '15 at 11:24