I realize this question has been asked in many forms but from the responses I've read so far and the longtable documentation, I can't figure out where I'm going wrong. I want the table to break naturally where the rest of the text breaks. Currently the table is going down further than the bottom margin I have set and overlapping with the page number.
I tried using \pagebreak and \newpage to no avail. Also tried sticking \hline where I would normally put \ at the end of a line, and still no luck.
Any help is appreciated, thanks!
MWE:
\begin{table}
\begin{flushleft}
\noindent \caption{table title}
\end{flushleft}
\footnotesize
\begin{longtable}[h]{p{0.15\linewidth}p{0.6\linewidth}p{0.15\linewidth}}
\toprule
\textbf{Factor} & \textbf{Roles} & \textbf{References} \endhead
\midrule
\multicolumn{3}{l}{\textit{section1}} \\
\midrule
ATX &
Roles \newline
Role2 &
Refs here \\
\midrule
CXCLs &
Roles \newline
Role2 &
Refs here \\
\midrule
Endothelin-2 &
Roles \newline
Role2 &
Refs here \\
\midrule
IGF-1 &
Roles \newline
Role2 &
Refs here \\
\midrule
Laminin-2 &
Roles \newline
Role2 &
Refs here \\
\midrule
PDGF-A &
Roles \newline
Role2 &
Refs here \\
\midrule
Retinoic Acid &
Roles \newline
Role2 &
Refs here \\
\midrule
Sema3F &
Roles \newline
Role2 &
Refs here \\
\midrule
\multicolumn{3}{l}{\textit{section2}} \\
\midrule
BMPs &
Roles \newline
Role2 &
Refs here \\
\midrule
Hyaluronan &
Roles \newline
Role2 &
Refs here \\
\midrule
LINGO-1 &
Roles \newline
Role2 &
Refs here \\
\midrule
Notch-1 &
Roles \newline
Role2 &
Refs here \\
\midrule
Sema3A &
Roles \newline
Role2 &
Refs here \\
\multicolumn{3}{l}{\textit{section3}} \\
\midrule
Fibronectin &
Roles \newline
Role2 &
Refs here \\
\midrule
FGF &
Roles \newline
Role2 &
Refs here \\
\midrule
GPR17 &
Roles \newline
Role2 &
Refs here \\
\midrule
Netrin-1 &
Roles \newline
Role2 &
Refs here \\
\midrule
PSA-NCAM &
Roles \newline
Role2 &
Refs here \\
\midrule
S1P &
Roles \newline
Role2 &
Refs here \\
\midrule
Wnt/$\beta$-catenin &
Roles \newline
Role2 &
Refs here \\
\bottomrule
\end{longtable}
\end{table}
Best Answer
In addition to the pieces of advice already given -- don't encase a
longtable
environment in atable
environment; use the\caption
command properly; don't provide a useless[h]
location specifier (since longtables don't float) -- you should also make better use of thelongtable
machinery -- specifically, the\endfirsthead
,\endhead
,\endfoot
, and\endlastfoot
-- to provide some needed structure to the table's material. Also, don't overuse horizontal lines where (vertical) whitespace is just as effective....