7

I want to make a document that contains a synopsis of events, like

YEAR           HISTORY          CULTURE             SCIENCE

1770        History para-     culture para-      science para-
            graph history     graph culture      graph science
            paragraph.        paragraph cult-    paragraph sci-
                              re paragraph.      ence paragraph
            History para-                        science para-
            graph history     culture para-      graph science
            paragraph his-    graph culture      paragraph.
            tory paragraph    paragraph
            History para-     
            graph.

1771        History para-     culture para-      science para-
            graph history     graph culture      graph science
            paragraph...      paragraph ...      ence ...

I tried to use a longtable to achieve such a result, but run into the problem that longtables do not allow page breaks within cells, but only inbetween rows. In my example, page breaks are only possible between the 1770 and 1771 row, but not for example, if one of the rows itself becomes too long for one page.

The text of the paragraphs comes from a database and is automatically assembled. So manual adjustments are not an option.

Exists there any alternative for longtables that allows page breaks inside a row, or is there any other way to achieve such a layout without using tables?

1 Answer 1

8

Use the parcolumns package. Here is a small example:

enter image description here

\documentclass{article}
\usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{parcolumns}% http://ctan.org/pkg/parcolumns
\begin{document}
\begin{parcolumns}[nofirstindent,colwidths={1=2cm}]{4}
% Headings
\colchunk[1]{YEAR}
\colchunk[2]{\centering HISTORY}
\colchunk[3]{\centering CULTURE}
\colchunk[4]{\centering SCIENCE}
\colplacechunks

% Content
\colchunk[1]{\noindent 1770}
\colchunk[2]{\noindent\lipsum[1-3]}
\colchunk[3]{\noindent\lipsum[4-6]}
\colchunk[4]{\noindent\lipsum[7-9]}
\end{parcolumns}

\end{document}

Columns are constructed using \colchunk[<column>]{<stuff>} and placed using \colplacechunks. If you don't specify <column> it's sequentially filled.

lipsum (for dummy text, Lorem Ipsum style) and geometry (for document layout) was used as an illustration in this example.

4
  • Or parallel package!
    – user11232
    May 7, 2012 at 23:50
  • @HarishKumar: No, the OP wants more than 2 columns.
    – Speravir
    May 8, 2012 at 19:44
  • 2
    Additional note: If one wants to use colours, one must load pdfparcolumns instead from the oberdiek bundle, which loads loads parcolumns and patches some macros.
    – Speravir
    May 8, 2012 at 20:41
  • I meant pdfcolparcolumns.
    – Speravir
    May 8, 2012 at 20:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .