1

I need a longtable with only two columns. I saw this topic Two column list with and I managed to convert into longtable.

\documentclass{article}
\begin{document}
\begin{longtable}{|p{0.45\textwidth}|p{0.45\textwidth}|}
\caption{ex} \\
\hline
1. One one one
&
3. One one one One one one One one one One one one One one one One one one One one one One one one One one one \\
2. One one one One one one One one one One one one One one one One one one One one one One one one One one one
&
4. One one one One one one\\
\hline
\end{longtable}
\end{document}

The problem is that between point 1 and 2 there is a huge space. I want that the points do not have extra space between them. It needs to be a longtable! Thanks.

enter image description here

7
  • Have a look at your cells - you've created a 2x2-table. Put your paragraphs in the right order and just use one & between the second and third.
    – Hackbard_C
    Sep 7 '14 at 12:38
  • Based on rows in second column you get extra page. That is why Hackbard has suggested you to order your data
    – murugan
    Sep 7 '14 at 13:04
  • saying that you do not want a space there is the same as saying that you do not want a tabular layout. Why do you say that you want to use longtable? Sep 7 '14 at 14:28
  • It must be in a table format because of the caption, and have that aspect. I mentioned longtable because the information that will be on the longtable will exceed the size of the page.
    – Jack Stage
    Sep 7 '14 at 14:43
  • @Hackbard_C so if the table exceeds the size of the page will not move to the next page? I do not want that.
    – Jack Stage
    Sep 7 '14 at 14:45
1

A tabular alignment implies that the data is positioned into rectangular blocks, hence the space that you show. You have a list not a table:

enter image description here

\documentclass{article}
\usepackage{capt-of}
\begin{document}


\twocolumn[\captionof{table}{A caption}]
\begin{enumerate}

\item One one one
\item  One one one One one one One one one One one one One one one One one one One one one One one one One one one
\newpage
\item
One one one One one one One one one One one one One one one One one one One one one One one one One one one 

\item One one one One one one
\end{enumerate}
\end{document}
5
  • Like I said, I need in a table environment.
    – Jack Stage
    Sep 7 '14 at 14:46
  • @JackStage If you need a table layout then you need to arrange the data into rectangular cells which means that you need the space that you show in your image. If you do not want that then you need to say what you mean by "need a table" (I can't guess, sorry) Sep 7 '14 at 14:49
  • @JackStage I added some formatting to the caption so it will appear in list of tables, etc Sep 7 '14 at 14:56
  • Ok, I saw your comment about the caption. That was one reason. The other reason is to keep the same look as I presented in the picture, it is possible?
    – Jack Stage
    Sep 7 '14 at 14:57
  • @JackStage The look you show is of a tabular layout which necessarily implies that the data is arranged in table rows I honestly can't guess how you want a table to look that does not have the space you show (imagine putting a \hline after each \\ to make it more obvious what is happening.) So I can't see any way to change this answer (but others may answer later of course) Sep 7 '14 at 15:05
0

You need to use a list/enumerate to avoid the spacing. However you can still have a caption by putting the list into a table or figure float.

I created a minipage within which the two-column environment and list was placed.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{multicol}
\usepackage{babel}
\begin{document}
\begin{table}
\begin{minipage}[t]{1\columnwidth}%
\begin{multicols}{2}
\begin{enumerate}
\item One one one
\item One one one One one one One one one One one one One one one One one
one One one one One one one One one one \newpage{}
\item One one one One one one One one one One one one One one one One one
one One one one One one one One one one
\item One one one One one one \end{enumerate}
\end{multicols}
%
\end{minipage}

\protect\caption{some caption}


\end{table}

\end{document}

enter image description here

1
  • 1
    The OP said that it needed to be longer than a page, which will not work using table Sep 7 '14 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.