Simple Key Events table
I tried to replicate the table but I don't have a narrower font other than Arial Narrow. I didn't construct the full environment but I thought it might be better to type in the contents directly into a table. So I used pgfplotstable
but datatool
would also do it fine. Hence, it's kind of a conceptual answer.
I've put the table in a tikz node and made the title an external node (What a surprise)
EDIT Now it works as a simple command \timeline{<Title>}{<tabular content>}
\documentclass[twocolumn]{article}
\usepackage{fontspec}
\setsansfont[Ligatures=TeX]{Arial Narrow}
% ================================================================================
\usepackage{pgfplotstable,booktabs,colortbl,microtype,xparse,kantlipsum}
\usetikzlibrary{matrix}
\pgfplotsset{compat=1.8}
% ================================================================================
\NewDocumentCommand{\timeline}{m+m}{%
\begin{tikzpicture}[baseline,font=\sffamily]
\matrix[matrix of nodes,draw=yellow!40,ultra thick,inner sep=0pt,ampersand replacement=\&,nodes={anchor=center},row sep=-.5\pgflinewidth]{
|[font=\sffamily\bfseries,align=left,fill=yellow!25,text width={7cm},inner ysep=1.2ex]| \hspace{0.75em}#1\\ % Title node
|[inner xsep=0.5em,inner ysep=1.8ex,fill=yellow!8]|
{\pgfplotstabletypeset[ % Table inside the second row node
string type,
every odd row/.style={after row={\midrule}},
every even row/.style={after row={\midrule}},
every last row/.style={after row={}},
every head row/.style={output empty row},
display columns/0/.style={column type={@{}p{9mm}},postproc cell content/.style={@cell content=\textbf{####1}}},
display columns/1/.style={column type={p{5.3cm}@{}}},
col sep=ampersand, row sep=\\, header=false,
]{#2}}\\ % End of node, \\ is needed
}; % End of matrix node
\end{tikzpicture}
}
\begin{document}\sffamily
\kant[1-2]
\timeline{KEY EVENTS}{
1520 & Death of Raphael. His later works were\newline considered the beginning of Mannerism\\
1527 & Sack of Rome. Spreads Mannerism\newline across Italy and France\\
c.\thinspace1528 & Jacobo Pontomo finishes his \emph{Deposition}, a\newline Florentine altarpiece in the Mannerist style\\
1534--40 & Girolano Parmigiano paints \emph{The\newline Madonna of the Long Neck}\\
1541 & Birth of El Grego\\
}
\kant[3]
\timeline{BREAKING NEWS}{
16:55 & Nero is looking hot today\\
23:00 & Fire!! \\
05:55 & Smoke on the Water....\newline Fire in the sky!\\
}
\end{document}
It's not pretty, but it may be what you are looking for. It's hard to see in yellow, but if you put your MWE in blue, the difficulties become much more apparent. The key differences from your approach are:
1) I used two tabulars, one for the header and one for the rest (this allowed me to avoid problems with multicolumn
and color).
2) I wrapped everything in a \colorbox
to avoid getting white space between the rows.
Along the way, I had to trim a box vertically with \addvbuffer
and throw in a \strut
.
\documentclass[twocolumn,10pt]{article}
\usepackage{mathpazo,calc,tikz}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{microtype}
\usepackage{array,booktabs,colortbl}
\usepackage{verbatimbox}
\color[gray]{.1}
\makeatletter
\newif\if@top
\@toptrue
\if@top \def\one{\leavevmode\par}\def\two{\vfill}\fi
\newif\if@center
\if@center\def\one{\vfill}\def\two{\vfill}\fi
\newif\if@bottom
\@bottomtrue
\if@bottom\def\one{\vfill}\def\two{}\fi
\makeatother
\newenvironment{timeline}[1][1534--40]{%
\one%
\long\def\Row##1##2{%\rowcolor{blue!8}[5pt][2pt]
\textbf{##1}&##2 \\ \midrule}%
\setlength{\tabcolsep}{0pt}%
\arrayrulecolor{yellow!75}%
\renewcommand{\arraystretch}{1}%
\sffamily%
\noindent%
\newlength\templength%
\settowidth{\templength}{#1}%
\kern-2.5pt\addvbuffer[-3pt 1pt]{\colorbox{yellow!25}%
{\begin{tabular}{@{\hspace{-.5pt}}p{\columnwidth}}%
\bfseries KEY EVENTS%
\end{tabular}}}\\%
\addtolength{\templength}{1em}%
\begin{tabular}{p{\templength}%
p{\dimexpr\columnwidth-\templength%
%-2pt%
}}%
% \hline%
% \multicolumn{2}{>{\columncolor{yellow!25}%
% [3pt][3pt]%
% }l}{\bfseries KEY EVENTS}\\%
% \hline%
}%
{\end{tabular}%
\two\vspace{-6.5pt}%
}
\begin{document}
\lipsum[1-5]
\newsavebox{\mytab}
\sbox{\mytab}{\colorbox{yellow!8}{\vbox{%
\begin{timeline}
\Row{1520}{Death of Raphael. His later works were considered the beginning of Mannerism}
\Row{1528}{Sack of Rome. Spreads Mannerism across Italy and France}
\Row{c.\thinspace1528}{Jacobo Pontomo finishes his \textit{Deposition}, a Florentine altarpiece in the Mannerist style}
\Row{1534--40}{Girolano Parmigiano paints \textit{The\newline Madonna of the Long Neck}}
\Row{1541}{Birth of El Grego}
\end{timeline}%
}}}
\vfill
\color{yellow!75}\fboxsep=-.25pt\relax\fbox{\usebox{\mytab}\strut}
\end{document}