4

I am struggling in using longtable environment for the answer posted in following thread.

How can you create a vertical timeline?

\documentclass[a4paper, twoside, 11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}
\usepackage{fourier, heuristica}
\usepackage{array, booktabs}
\usepackage{graphicx}
\usepackage[x11names]{xcolor}
\usepackage{colortbl}
\usepackage{caption}
\DeclareCaptionFont{blue}{\color{LightSteelBlue3}}

\newcommand{\foo}{\color{LightSteelBlue3}\makebox[0pt]{\textbullet}\hskip-0.5pt\vrule width 1pt\hspace{\labelsep}}

\begin{document}

\begin{table}
\renewcommand\arraystretch{1.4}\arrayrulecolor{LightSteelBlue3}
\captionsetup{singlelinecheck=false, font=blue, labelfont=sc, labelsep=quad}
\caption{Timeline}\vskip -1.5ex
\begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
\toprule
\addlinespace[1.5ex]
1947 & AT and T Bell Labs develop the idea of cellular phones\\
1968 & Xerox Palo Alto Research Centre envisage the 'Dynabook\\
1971 & Busicom 'Handy-LE' Calculator\\
1973 & First mobile handset invented by Martin Cooper\\
1978 & Parker Bros. Merlin Computer Toy\\
1981 & Osborne 1 Portable Computer\\
1982 & Grid Compass 1100 Clamshell Laptop\\
1983 & TRS-80 Model 100 Portable PC\\
1984 & Psion Organiser Handheld Computer\\
1991 & Psion Series 3 Minicomputer\\
\end{tabular}
\end{table}

\end{document} 
2
  • You have neither loaded nor used longtable in that example.... – jon Oct 27 '16 at 5:34
  • Off-topic: Please write AT\&T, not AT and T. – Mico Oct 27 '16 at 5:53
4

Something like this?

enter image description here

\documentclass[a4paper, twoside, 11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}
\usepackage{fourier, heuristica}
\usepackage{array, booktabs, longtable}
\usepackage{graphicx}
\usepackage[x11names,table]{xcolor}
\usepackage{caption}
\DeclareCaptionFont{blue}{\color{LightSteelBlue3}}

\newcommand{\foo}{\color{LightSteelBlue3}\makebox[0pt]{\textbullet}\hskip-0.5pt\vrule width 1pt\hspace{\labelsep}}

\begin{document}

\begingroup
\renewcommand\arraystretch{1.4}\arrayrulecolor{LightSteelBlue3}
\captionsetup{font=blue, labelfont=sc, labelsep=quad,
              skip=0.5\baselineskip}

\begin{longtable}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}

% header and footer information
\caption{Timeline}\\
\toprule
\addlinespace[1.5ex]
\endhead

\addlinespace[1.5ex]
\bottomrule
\endlastfoot

% body of table
1947 & AT\&T Bell Labs develop the idea of cellular phones\\
1968 & Xerox Palo Alto Research Centre envisage the `Dynabook'\\
1971 & Busicom `Handy-LE' Calculator\\
1973 & First mobile handset invented by Martin Cooper\\
1978 & Parker Bros.\ Merlin Computer Toy\\
1981 & Osborne 1 Portable Computer\\
1982 & Grid Compass 1100 Clamshell Laptop\\
1983 & TRS-80 Model 100 Portable PC\\
1984 & Psion Organiser Handheld Computer\\
1991 & Psion Series 3 Minicomputer\\
\end{longtable}
\endgroup
\end{document}
4
  • Thanks for the answer. Is it possible to make such a timeline without using tables so that I can use multicolumn page format and which will continue to the subsequent pages? – cosmicraga Oct 27 '16 at 7:36
  • 2
    @cosmicraga - As you've noticed, the longtable environment cannot be placed into a multicolumn environment. However, the xtabular environment (provided by the xtab package) does have this ability. Be aware, though, that the syntax of the longtable and xtabular environments aren't identical. – Mico Oct 27 '16 at 9:21
  • I have posted this as a new question. I will be grateful if you give me a MWE. Thanks. – cosmicraga Oct 27 '16 at 10:29
  • 2
    @cosmicraga The idea is that you provide an MWE in the question and we help you to modify it to solve a problem or add a feature - not that somebody start writing your document from scratch without knowing anything about it. – cfr Oct 29 '16 at 0:52

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.