0

I need to remove the whitespace between the rows of a table due to the first cell of first column overflowing to more than a line. See the screenshot the current typset of the pdf.

Screenshot of the current typset of the pdf.

So I need to remove the whitespace between the bold "Summer Placement at the University of Manchester" and the main body "Worked with Professor Terrance Wyatt..." in the cell below.

Here is my current code:

\section{Work Experience}
\begin{tabular}{p{0.12\linewidth}p{0.85\linewidth}}
\textsc{June 2017 - Sep. 2017} & \textbf{Summer Placement at the University of 
Manchester} \\
& Worked with Professor Terrance Wyatt at the High Energy Particle (HEP) Group 
at the University of Manchester on a research project over the summer of 2017.\\

Any help would be greatly appreciated.

  • Welcome to TeX.SX! Well, this space is caused by you as you want a new line and the left column is too high. Use e.g. a parbox to avoid that. – TeXnician Oct 13 '17 at 12:31
1

Here's a version using \parbox. You real problem is not the spacing between table rows (that's correct as you have a two line high left column), but that you used a new row for something which should be in the same row, just a new line.

table

\documentclass{article}
\usepackage[margin=2cm]{geometry} % to make it nearly fit
\usepackage{adjustbox}

\begin{document}

\section{Work Experience}
\begin{tabular}{p{0.12\linewidth}p{0.85\linewidth}}
\textsc{June 2017 - Sep. 2017} & \adjustbox{valign=t}{\parbox{.85\linewidth}{\textbf{Summer Placement at the University of 
Manchester} \\
Worked with Professor Terrance Wyatt at the High Energy Particle (HEP) Group 
at the University of Manchester on a research project over the summer of 2017.}}\\
Test & Test
\end{tabular}

\end{document}
  • why the parbox not just use the existing p column (which is a parbox)? – David Carlisle Oct 13 '17 at 13:31
  • @DavidCarlisle You're right, I forgot the par version. I oriented at the \\ . Upvoted yours. – TeXnician Oct 13 '17 at 13:38
  • you could use \newline rather than a blank line if you wanted a linebreak in a p column without making a nested box – David Carlisle Oct 13 '17 at 13:44
  • @DavidCarlisle Thanks, got my tables bronze badge with that :) – TeXnician Oct 13 '17 at 13:47
1

I'd suggest one of these three layouts, based on tabularx:

\documentclass{article}
\usepackage[margin=2cm]{geometry} % to make it nearly fit
\usepackage{makecell, tabularx}
\renewcommand{\theadfont}{\normalsize\scshape}
\renewcommand{\theadalign}{tl}
\newcommand{\nl}{\newline}

\begin{document}

\section{Work Experience}

\begin{tabularx}{\linewidth}{@{}p{0.12\linewidth}X@{}}
\thead{June 2017\\--\,Sep. 2017} & \textbf{Summer Placement at the University of
Manchester} \nl
Worked with Professor Terrance Wyatt at the High Energy Particle (HEP) Group
at the University of Manchester on a research project over the summer of 2017.\\
Test & Test
\end{tabularx}
\vspace{1cm}

\noindent\begin{tabularx}{\linewidth}{@{}p{0.12\linewidth}X@{}}
\multicolumn{2}{l}{\textsc{June 2017\,--\,Sep. 2017}\qquad \textbf{Summer Placement at the University of
Manchester}} \\[1ex]
 & Worked with Professor Terrance Wyatt at the High Energy Particle (HEP) Group
at the University of Manchester on a research project over the summer of 2017.\\
Test & Test
\end{tabularx}
\vspace{1cm}

\noindent\begin{tabularx}{\linewidth}{@{}lX@{}}
\textsc{June 2017\,--\,Sep. 2017} & \textbf{Summer Placement at the University of
Manchester} \smallskip\nl
Worked with Professor Terrance Wyatt at the High Energy Particle (HEP) Group
at the University of Manchester on a research project over the summer of 2017.\\
Test & Test
\end{tabularx}

\end{document} 

enter image description here

1

The text should be part of the same p cell as the bold line so

\documentclass{article}
\usepackage[margin=2cm]{geometry} % to make it nearly fit


\begin{document}

\section{Work Experience}
\begin{tabular}{@{}p{\dimexpr.15\linewidth-2\tabcolsep}p{0.85\linewidth}@{}}
\textsc{June 2017 - Sep. 2017} &\textbf{Summer Placement at the University of 
Manchester}

Worked with Professor Terrance Wyatt at the High Energy Particle (HEP) Group 
at the University of Manchester on a research project over the summer of 2017.\\
Test & Test
\end{tabular}

\end{document}
  • I borrowed TeXnician's mwe:-) – David Carlisle Oct 13 '17 at 13:36

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.