I've been trying to transform my table into a longtable desperately for the past hours. I looked at numerous examples, checked the documentation but I cannot get it working.

So I have a pretty long table containing 3 columns with 20+ rows, in the 2nd and 3rd column there are pictures inside the fields (1 or more, max 3). So this table can get quite big very fast, i'd like to spread it over 2 pages.

The latex code of the normal table is like this (i cut a lot of rows to save space in the question):

EDIT: user David Carlisle provided the answer to transform it to a longtable. The code of the longtable now looks like this (and works!):


\textbf{Verb}   & \textbf{Example}   & \textbf{Passive Voice (if applicable)} \\ \hline
``goes-to''         & \rowincludegraphics[scale=1]{images/appendix/B/1.png} &  \\ \hline
``walks-to''        & \rowincludegraphics[scale=1]{images/appendix/B/2.png} &    \\ \hline
``says to''         & \begin{tabular}[c]{@{}l@{}}\rowincludegraphics[scale=1]{images/appendix/B/3a.png} \\ or\\ \rowincludegraphics[scale=1]{images/appendix/B/3b.png}\end{tabular} &      \\ \hline
``chats to''        & \rowincludegraphics[scale=1]{images/appendix/B/4.png}             & \\ \hline
``texts to''        &  \rowincludegraphics[scale=1]{images/appendix/B/5.png}                &   \\ \hline
``sends to''        &  \begin{tabular}[c]{@{}l@{}@{}}\rowincludegraphics[scale=1]{images/appendix/B/6a.png} \\ or\\ \rowincludegraphics[scale=1]{images/appendix/B/6b.png} \\ or \\ \rowincludegraphics[scale=1]{images/appendix/B/6c.png} \end{tabular}                &   

I have 3 small issues remaining: how do i use \hspace{-3.5cm} here? It works perfectly in a \table but not in \longtable. And, when the table continues on a page, the top border of a row is shown on the new page, can this be hidden? (the bottom border of a row at the end of a page is also shown, but this is what I want so that is ok). Lastly, how do i show the caption at the end of the longtable? (on the last page only)

closed as unclear what you're asking by Moriambar, Mensch, Torbjørn T., Henri Menke, Martin Schröder Jun 13 '17 at 22:49

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    basically change \begin{table}[h] \centering \begin{tabular}{l|Sl|Sl} to \begin{longtable}{l|Sl|Sl} should be all you need to do (and matching change for \end) but as you haven't provided a usable test file and the fragment contains nonstandard commands that I can not guess the definition, can not give exact answer. – David Carlisle Apr 17 '15 at 16:49
  • I cannot believe how easy that was... I edited my question with a couple of other small things I cannot figure out! Thank you very much so far. – Dennis Apr 17 '15 at 17:05
  • 3
    please don't completely change the question in place it no longer matches the title (so you should change that) as there's no posted answers it's not too bad, but had the above comment been posted as an answer to the original question it wouldn't match the new one. Please always post complete documents not just fragments. You don't say where you want to use \hspace but you can not use it before a longtable as it is a vertical construct, you may want to look at \LTleft in the manual or perhaps my guess as to where you were using hspace was wrong – David Carlisle Apr 17 '15 at 17:38
  • 2
    look at the \endhead and \endfirsthead commands for the top border, and \caption to use a caption (just move it to the end). texdoc longtable should show you the manual – David Carlisle Apr 17 '15 at 17:39
  • I'm voting to close this question as off-topic because the solution was edited into the question. – Henri Menke Jun 13 '17 at 22:23

Browse other questions tagged or ask your own question.