Bulleted list with vertical lines
Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
I want to add different positions within a company in a similar fashion to what LinkedIn uses, i.e. the vertical line connecting the dots of the bullet list. How can this be done?
Edit: now with a minimal working example after doing some research:
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray] ($(a)!0.1!(b)$) -- ($(a)!0.9!(b)$);
draw[gray] ($(b)!0.2!(c)$) -- ($(b)!0.8!(c)$);
endtikzpicture
enddocument
The problem currently is that I need to add the lines manually in a second overlay picture and that I specify the "gap" between the dot and the start/end of the line using a percentage instead of a fixed value (e.g. 2pt). This causes the gaps to be of different size depending on the length of the paragraph.
tikz-pgf lists resume
add a comment |Â
up vote
6
down vote
favorite
I want to add different positions within a company in a similar fashion to what LinkedIn uses, i.e. the vertical line connecting the dots of the bullet list. How can this be done?
Edit: now with a minimal working example after doing some research:
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray] ($(a)!0.1!(b)$) -- ($(a)!0.9!(b)$);
draw[gray] ($(b)!0.2!(c)$) -- ($(b)!0.8!(c)$);
endtikzpicture
enddocument
The problem currently is that I need to add the lines manually in a second overlay picture and that I specify the "gap" between the dot and the start/end of the line using a percentage instead of a fixed value (e.g. 2pt). This causes the gaps to be of different size depending on the length of the paragraph.
tikz-pgf lists resume
1
Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting withdocumentclass...
and ending withenddocument
.
– albert
2 hours ago
I've added an MWE.
– Tom
1 hour ago
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
I want to add different positions within a company in a similar fashion to what LinkedIn uses, i.e. the vertical line connecting the dots of the bullet list. How can this be done?
Edit: now with a minimal working example after doing some research:
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray] ($(a)!0.1!(b)$) -- ($(a)!0.9!(b)$);
draw[gray] ($(b)!0.2!(c)$) -- ($(b)!0.8!(c)$);
endtikzpicture
enddocument
The problem currently is that I need to add the lines manually in a second overlay picture and that I specify the "gap" between the dot and the start/end of the line using a percentage instead of a fixed value (e.g. 2pt). This causes the gaps to be of different size depending on the length of the paragraph.
tikz-pgf lists resume
I want to add different positions within a company in a similar fashion to what LinkedIn uses, i.e. the vertical line connecting the dots of the bullet list. How can this be done?
Edit: now with a minimal working example after doing some research:
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray] ($(a)!0.1!(b)$) -- ($(a)!0.9!(b)$);
draw[gray] ($(b)!0.2!(c)$) -- ($(b)!0.8!(c)$);
endtikzpicture
enddocument
The problem currently is that I need to add the lines manually in a second overlay picture and that I specify the "gap" between the dot and the start/end of the line using a percentage instead of a fixed value (e.g. 2pt). This causes the gaps to be of different size depending on the length of the paragraph.
tikz-pgf lists resume
tikz-pgf lists resume
edited 1 hour ago
asked 2 hours ago
Tom
1486
1486
1
Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting withdocumentclass...
and ending withenddocument
.
– albert
2 hours ago
I've added an MWE.
– Tom
1 hour ago
add a comment |Â
1
Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting withdocumentclass...
and ending withenddocument
.
– albert
2 hours ago
I've added an MWE.
– Tom
1 hour ago
1
1
Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with
documentclass...
and ending with enddocument
.– albert
2 hours ago
Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with
documentclass...
and ending with enddocument
.– albert
2 hours ago
I've added an MWE.
– Tom
1 hour ago
I've added an MWE.
– Tom
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
The following solution works as long as you have a single list. If you need multiple lists, page breaking, etc., you need to expand the code.
I used a new counter to name and save the nodes automatically and iterate over them in the end.
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcountermycnt % Usage of a new counter to name and iterate over bullet points
newcommandmyitem% Modified `item` to update counter and save nodes
stepcountermycnt
item[linkedlistiarabicmycnt]
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
AtEndDocument% To draw the lines in the end
begintikzpicture[remember picture,overlay]
ifnumvaluemycnt>1% Only if there are at least 2 bullet points
foreach x in 2,...,arabicmycnt% iterate over them
pgfmathparseint(x-1)
draw[gray] ($(ipgfmathresult)+(0,-1ex)$) -- ($(ix)+(0,1ex)$);% and draw the connecting lines
fi
endtikzpicture
begindocument
beginitemize
myitem test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
myitem test
myitem test
enditemize
enddocument
add a comment |Â
up vote
1
down vote
You can use shorten
option to fix a certain distance between node's border and end of line. There's no nees for calc
:
documentclassarticle
usepackagetikz
%usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray, shorten >=1mm, shorten <=1mm] (a)-- (b);
draw[gray, shorten >=1mm, shorten <=1mm] (b)-- (c);
endtikzpicture
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
The following solution works as long as you have a single list. If you need multiple lists, page breaking, etc., you need to expand the code.
I used a new counter to name and save the nodes automatically and iterate over them in the end.
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcountermycnt % Usage of a new counter to name and iterate over bullet points
newcommandmyitem% Modified `item` to update counter and save nodes
stepcountermycnt
item[linkedlistiarabicmycnt]
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
AtEndDocument% To draw the lines in the end
begintikzpicture[remember picture,overlay]
ifnumvaluemycnt>1% Only if there are at least 2 bullet points
foreach x in 2,...,arabicmycnt% iterate over them
pgfmathparseint(x-1)
draw[gray] ($(ipgfmathresult)+(0,-1ex)$) -- ($(ix)+(0,1ex)$);% and draw the connecting lines
fi
endtikzpicture
begindocument
beginitemize
myitem test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
myitem test
myitem test
enditemize
enddocument
add a comment |Â
up vote
2
down vote
The following solution works as long as you have a single list. If you need multiple lists, page breaking, etc., you need to expand the code.
I used a new counter to name and save the nodes automatically and iterate over them in the end.
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcountermycnt % Usage of a new counter to name and iterate over bullet points
newcommandmyitem% Modified `item` to update counter and save nodes
stepcountermycnt
item[linkedlistiarabicmycnt]
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
AtEndDocument% To draw the lines in the end
begintikzpicture[remember picture,overlay]
ifnumvaluemycnt>1% Only if there are at least 2 bullet points
foreach x in 2,...,arabicmycnt% iterate over them
pgfmathparseint(x-1)
draw[gray] ($(ipgfmathresult)+(0,-1ex)$) -- ($(ix)+(0,1ex)$);% and draw the connecting lines
fi
endtikzpicture
begindocument
beginitemize
myitem test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
myitem test
myitem test
enditemize
enddocument
add a comment |Â
up vote
2
down vote
up vote
2
down vote
The following solution works as long as you have a single list. If you need multiple lists, page breaking, etc., you need to expand the code.
I used a new counter to name and save the nodes automatically and iterate over them in the end.
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcountermycnt % Usage of a new counter to name and iterate over bullet points
newcommandmyitem% Modified `item` to update counter and save nodes
stepcountermycnt
item[linkedlistiarabicmycnt]
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
AtEndDocument% To draw the lines in the end
begintikzpicture[remember picture,overlay]
ifnumvaluemycnt>1% Only if there are at least 2 bullet points
foreach x in 2,...,arabicmycnt% iterate over them
pgfmathparseint(x-1)
draw[gray] ($(ipgfmathresult)+(0,-1ex)$) -- ($(ix)+(0,1ex)$);% and draw the connecting lines
fi
endtikzpicture
begindocument
beginitemize
myitem test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
myitem test
myitem test
enditemize
enddocument
The following solution works as long as you have a single list. If you need multiple lists, page breaking, etc., you need to expand the code.
I used a new counter to name and save the nodes automatically and iterate over them in the end.
documentclassarticle
usepackagetikz
usetikzlibrarycalc
newcountermycnt % Usage of a new counter to name and iterate over bullet points
newcommandmyitem% Modified `item` to update counter and save nodes
stepcountermycnt
item[linkedlistiarabicmycnt]
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
AtEndDocument% To draw the lines in the end
begintikzpicture[remember picture,overlay]
ifnumvaluemycnt>1% Only if there are at least 2 bullet points
foreach x in 2,...,arabicmycnt% iterate over them
pgfmathparseint(x-1)
draw[gray] ($(ipgfmathresult)+(0,-1ex)$) -- ($(ix)+(0,1ex)$);% and draw the connecting lines
fi
endtikzpicture
begindocument
beginitemize
myitem test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
myitem test
myitem test
enditemize
enddocument
answered 17 mins ago
nox
3,215419
3,215419
add a comment |Â
add a comment |Â
up vote
1
down vote
You can use shorten
option to fix a certain distance between node's border and end of line. There's no nees for calc
:
documentclassarticle
usepackagetikz
%usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray, shorten >=1mm, shorten <=1mm] (a)-- (b);
draw[gray, shorten >=1mm, shorten <=1mm] (b)-- (c);
endtikzpicture
enddocument
add a comment |Â
up vote
1
down vote
You can use shorten
option to fix a certain distance between node's border and end of line. There's no nees for calc
:
documentclassarticle
usepackagetikz
%usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray, shorten >=1mm, shorten <=1mm] (a)-- (b);
draw[gray, shorten >=1mm, shorten <=1mm] (b)-- (c);
endtikzpicture
enddocument
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can use shorten
option to fix a certain distance between node's border and end of line. There's no nees for calc
:
documentclassarticle
usepackagetikz
%usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray, shorten >=1mm, shorten <=1mm] (a)-- (b);
draw[gray, shorten >=1mm, shorten <=1mm] (b)-- (c);
endtikzpicture
enddocument
You can use shorten
option to fix a certain distance between node's border and end of line. There's no nees for calc
:
documentclassarticle
usepackagetikz
%usetikzlibrarycalc
newcommandlinkedlist[1]
begintikzpicture[remember picture]%
node (#1) [gray,circle,fill,inner sep=1.5pt];
endtikzpicture%
begindocument
beginitemize
item[linkedlista] test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph. test with a very long paragraph.
item[linkedlistb] test
item[linkedlistc] test
enditemize
begintikzpicture[remember picture,overlay]
draw[gray, shorten >=1mm, shorten <=1mm] (a)-- (b);
draw[gray, shorten >=1mm, shorten <=1mm] (b)-- (c);
endtikzpicture
enddocument
answered 18 mins ago
Ignasi
88.1k4159293
88.1k4159293
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454744%2fbulleted-list-with-vertical-lines%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with
documentclass...
and ending withenddocument
.– albert
2 hours ago
I've added an MWE.
– Tom
1 hour ago