2

I have a table with two columns.

\begin{table}[ht]
\begin{tabular}{|p{12cm}|p{4cm}|}
\hline
\textbf{Company} & \textbf{Contact} \\
\hline
Company produces advanced product systems compatible with a range of blah, blah, and blah used on this and that & Company\\
& 1234\\
& First Street\\
& Troy, New York 12180\\ 
& USA\\ 
\hline
\end{tabular}
\end{table} 

The way I have set it out the second column has a blank line which is set by the size of my first column, as you may see in the image below. How can I avoid this?

enter image description here

  • Do you want the second column to be wider or do you want the first column to be narrow and wrap the text? – dustin Jun 17 '13 at 4:14
  • I am happy with the size of the columns. What is want is to remove the space between 'company' and the next line '1234' in the second column. I want them to be directly ontop of each other without a space – Cole Jun 17 '13 at 4:20
3

You mean something like (add \usepackage{multirow} in the preamble)?

\begin{table}[ht]
\begin{tabular}{|p{12cm}|p{4cm}|}
\hline
\textbf{Company} & \textbf{Contact} \\
\hline
\multirow{5}{12cm}{Company produces advanced product systems compatible with a range of blah, blah, and blah used on this and that} & Company\\
& 1234\\
& First Street\\
& Troy, New York 12180\\
& USA\\
\hline
\end{tabular}
\end{table}

or (multirow is not needed)

\begin{table}[ht]
\begin{tabular}{|p{12cm}|p{4cm}|}
\hline
\textbf{Company} & \textbf{Contact} \\
\hline
Company produces advanced product systems compatible with a range of blah, blah, and blah used on this and that & Company%
\newline 1234%
\newline First Street%
\newline Troy, New York 12180%
\newline USA\\
\hline
\end{tabular}
\end{table}
|improve this answer|||||
  • Yea, this is what I want....but can I have the text in the first column at the top (i.e., not centered)? – Cole Jun 17 '13 at 4:32
  • @Cole see the update – karlkoeller Jun 17 '13 at 4:35
1

Depending on your tabular design, you can nest the right-hand column entries:

enter image description here

\documentclass{article}
\begin{document}
\begin{tabular}{|p{8cm}|l|}
  \hline
  \textbf{Company} & \textbf{Contact} \\
  \hline
  Company produces advanced product systems compatible with a range of blah, blah, and blah used on this and that &
  \begin{tabular}[t]{@{}p{4cm}@{}}
    Company \\ 1234 \\ First Street \\ Troy, New York 12180 \\ USA
  \end{tabular} \\
  \hline
\end{tabular}
\end{document}

Make sure that the right-hand, nested tabular has a [t]op-aligned anchor.

|improve this answer|||||

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.