# 2 column layout without using tabular

I'd like to write a 2 column layout page: one column at the left that should show the year, and one column at the right that should show text that goes along the year.

\documentclass[12pt]{article}
\begin{document}
\begin{table}[ht]
\begin{tabular}{l|c}
2012&Some text\vspace{5pt}\\
2011&Some other text\\
\end{tabular}
\end{table}
\end{document}


Now: I would like to avoid using \begin{tabular} .

• \begin{tabular} will not split across multiple pages
• footnotes are too tricky.

My question: Is the a simple way to get this kind of 2 column layout without using \begin{tabular} ?

-

table will not split across pages either. So you shouldn't is too.

I would use a list, e.g. description or labeling from the KOMA-classes:

\documentclass{scrartcl}
\usepackage{lipsum}
\begin{document}
\begin{labeling}{XXXXXXX}%template for longest item.
\item[2000] \lipsum[1-2]
\item[2001] \lipsum[1-2]
\end{labeling}
\end{document}

-
Thats what I was looking for, thanks. –  Konrad Eisele May 24 '12 at 12:32
Now, there is only one thing that nags me: Is there a possibility to get the vertical seperator between year and text that you have with tabular? I'm be glad even with a brute force command, that "superposes" a simple line at a hand calculated coordinate onto the whole design... –  Konrad Eisele May 24 '12 at 12:59
You could look at the code of marginnote: It uses \pdfsavepos to store the line in which a \marginnote command appears in the .aux-file and uses this information in the next run to place the text. But I wouldn't use such lines, bad typography imho to overdecorate like this. –  Ulrike Fischer May 24 '12 at 13:20
I'm not familiar with Tex at that level, isnt there some kind of command like: \drawline{1cm,0cm,1cm,10cm} that simply draws a vertical line at 1cm horiz. pos... something like that... –  Konrad Eisele May 24 '12 at 14:18
Sure, you can use e.g. \rule, or picture, or the package tikz to draw lines all over your page. But you will have to adjust the coordinates manually which can get awkward if the end of the text can change often. –  Ulrike Fischer May 24 '12 at 14:37

I doubt that you are trying to write a CV. If so, you may try dedicated packages like moderncv for this. However, you may try the following:

\documentclass{article}
\usepackage{lipsum}
\usepackage{parallel}
\usepackage[margin=1in]{geometry}
\begin{document}
\begin{Parallel}[v]{0.1\textwidth}{0.89\textwidth} %% [v] for drawing the vertical line
%===========================
\ParallelLText{ 2001 }
\ParallelRText{ \lipsum[2] }
\ParallelPar
%===================
%===========================
\ParallelLText{ 2002 }
\ParallelRText{ \lipsum[4]This is a foot note\footnote{This is a foot note}. }
\ParallelPar
%===========================
\ParallelLText{ 2003 }
\ParallelRText{ \lipsum[6]}
\ParallelPar
%===========================
\ParallelLText{ 2004 }
\ParallelRText{ \lipsum[8] }
\ParallelPar
%===========================
\ParallelLText{ 2005 }
\ParallelRText{ \lipsum[10]}
\ParallelPar
%===========================
\ParallelLText{2006 }
\ParallelRText{ \lipsum[12] }
\ParallelPar
%===========================
\ParallelLText{ 2007 }
\ParallelRText{ \lipsum[14]}
\ParallelPar
%===========================
\ParallelLText{ 2008}
\ParallelRText{ \lipsum[16]}
\ParallelPar
%===========================
\ParallelLText{ 2009}
\ParallelRText{ \lipsum[18]}
\ParallelPar
%===========================
\end{Parallel}

\end{document}


Another option will be the famous longtable where 1. footnotes work and 2. things will break across pages.:

\documentclass[12pt]{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{r|p{.8\textwidth}}
2012&Some text\footnote{This is a foot note}\\
2011&Some other text\\
\newpage
2012&Some text\footnote{This is a foot note}\\
2011&Some other text\\
\end{longtable}
\end{document}


-

I would use the margin column to hold the years and the usual text column to put the paragraphs.

\documentclass[12pt]{article}

%setup a page layout with a large margin
\usepackage[paperwidth=170mm, paperheight=240mm, left=42pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt]{geometry}

%marginpar would move, but here the year has to be right next to the paragraph
\usepackage{marginnote}

\begin{document}
Some text\marginnote{2012}

Some other text\marginnote{2011}

\end{document}


you have to change the page layout to your liking. This leads to

Footnotes will work (try Some\footnote{This works} text\marginnote{2012}) and pagebreaks are no problem. Please run LaTeX up to 3 times if the alignment is off.

-