I'm trying to draw a list of items, not unline itemize, where the dots are all connected by a vertical line. In other words, what I'm aiming for is a kind of vertical timeline, but without dates. In fact, I have started by -stealing-, I mean, taking inspiration, from the TikZ answer in How can you create a vertical timeline?, but I have to major problems:
- list items go beyond page limit, while they should remain inside the page, like an actual
itemize - List items currently do not accept
\parand\\, while I would need to support these
Here is what I have so far:
\documentclass{article}
\usepackage{environ,tikz}
\usetikzlibrary{calc,matrix,backgrounds}
\makeatletter
\let\matamp=&
\catcode`&=13
\def&{%
\iftikz@is@matrix%
\pgfmatrixnextcell%
\else%
\matamp%
\fi%
}
\makeatother
\newcounter{lines}
\def\endlr{\stepcounter{lines}\}
\newcounter{vtml}
\setcounter{vtml}{0}
\tikzset{
description/.style={column 2/.append style={#1}},
timeline color/.store in=\vtmlcolor,
timeline color=red!80!black,
timeline color st/.style={fill=orange,draw=green},
line offset/.store in=\lineoffset,
line offset=4pt,
}
\NewEnviron{vtimeline}[1][]{%
\setcounter{lines}{1}%
\stepcounter{vtml}%
\begin{tikzpicture}[%column 1/.style={anchor=east},
column 1/.style={anchor=west},
text depth=0pt,text height=1ex,
row sep=1ex,
column sep=1em,
#1
]
\matrix(vtimeline\thevtml)[matrix of nodes]{\BODY};
\pgfmathtruncatemacro\endmtx{\thelines-1}
\foreach \x in {1,...,\endmtx}{
\node[circle,timeline color st, inner sep=0pt, minimum size=10pt, line width=.75mm]
(vtimeline\thevtml-c-\x) at
($(vtimeline\thevtml-\x-1.west) + (-1ex, 0)$){};
}
\begin{scope}[on background layer]
\draw[blue, line width=1mm] (vtimeline\thevtml-c-1.center) -- (vtimeline\thevtml-c-\endmtx.center);
\end{scope}
\end{tikzpicture}
}
\begin{document}
\begin{vtimeline}%[row sep=4ex]
This is a very long sentence, hopefully it will generate a new line, otherwise I will have to keep writing nonsense on and on and on and on\endlr
Xerox Palo Alto Research Centre envisage the `Dynabook'\endlr
Busicom 'Handy-LE' Calculator\endlr
First mobile handset invented by Martin Cooper\endlr
Parker Bros. Merlin Computer Toy\endlr
Osborne 1 Portable Computer\endlr
Grid Compass 1100 Clamshell Laptop\endlr
TRS-80 Model 100 Portable PC\endlr
Psion Organiser Handheld Computer\endlr
Psion Series 3 Minicomputer\endlr
\end{vtimeline}
\end{document}
Do you have any suggestions on how to proceed? Thanks in advance!
P.S. I know that the colors I chose are ugly, in fact they are temporary and just for testing purposes. Moreover, I would really like to be able to make this work with TikZ because this is the first step of something a bit more complicated that I would not know how to do without TikZ.


tikzmarkto remember the positions of bullets and connect them after all texts are properly broken into lines and pages. – Symbol 1 Nov 21 '22 at 22:57