[Tex/LaTex] Aligning columns in tabularx with multicolumn

tablestabularx

I'm trying to set up a table to use in my CV, where by I list my qualifications and the date achieved (two separate columns), and under it the list of grades achieved. I want two separate sets of qualifications

For now assume this is what the companies I'm applying to want, so don't worry about general CV content advice.

This is what I'm trying to use:

\begin{tabularx}{0.9\linewidth}{X|r|X|r}
\textbf{GCSEs} & 2000\textendash 2005 & \textbf{A-Levels}   & 2005\textendash 2007 \\
\multicolumn{2}{p{0.45\linewidth}}{10 GCSES A*-C; including A*/A* for Science Double Award, A* for  Mathematics and A for English Language}
\multicolumn{2}{p{0.45\linewidth}}{Physics A, Chemistry B, Communication Studies B, Mathematics B.} \
\end{tabularx}

But this is what it is producing:

enter image description here

And what I want is the section GCSEs and 2000-2005 aligned with the text below it (taking up ~50% of the table), and like-wise for A-Levels and 2005-2007. In both cases I'd like the dates left aligned.

Now I know there are many ways to skin a table in LaTeX, and I don't care how this gets fixed, I'd just like it fixed! Does anyone know of a way to sort this out?

Best Answer

You are missing a & between the multicolumns, also the specified width is greater than the width of the table as you are neglecting the inter-column space. In this small example there is no text that is actually being stretched by X at all and you could use a normal tabular rather than TX, but perhaps that's just an artifact of the example.

\documentclass{article}

\usepackage{tabularx,calc}
\begin{document}

\begin{tabularx}{0.9\linewidth}{X|r|X|r}
\textbf{GCSEs} & 2000\textendash 2005 & \textbf{A-Levels}   & 2005\textendash 2007 \\
\multicolumn{2}{p{0.45\linewidth - 2\tabcolsep}|}{10 GCSES A*-C; including A*/A* for Science Double Award, A* for  Mathematics and A for English Language}&
\multicolumn{2}{p{0.45\linewidth  - 2\tabcolsep}}{Physics A, Chemistry B, Communication Studies B, Mathematics B.} \\

\end{tabularx}

\end{document}