Bulleted list with vertical lines

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
6
down vote

favorite
1












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?



Bulleted list with vertical line



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.










share|improve this question



















  • 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










  • I've added an MWE.
    – Tom
    1 hour ago














up vote
6
down vote

favorite
1












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?



Bulleted list with vertical line



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.










share|improve this question



















  • 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










  • I've added an MWE.
    – Tom
    1 hour ago












up vote
6
down vote

favorite
1









up vote
6
down vote

favorite
1






1





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?



Bulleted list with vertical line



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.










share|improve this question















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?



Bulleted list with vertical line



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 with documentclass... and ending with enddocument.
    – albert
    2 hours ago










  • I've added an MWE.
    – Tom
    1 hour ago












  • 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










  • 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










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


MWE result






share|improve this answer



























    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


    enter image description here






    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "85"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      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






























      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


      MWE result






      share|improve this answer
























        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


        MWE result






        share|improve this answer






















          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


          MWE result






          share|improve this answer












          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


          MWE result







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 17 mins ago









          nox

          3,215419




          3,215419




















              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


              enter image description here






              share|improve this answer
























                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


                enter image description here






                share|improve this answer






















                  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


                  enter image description here






                  share|improve this answer












                  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


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 18 mins ago









                  Ignasi

                  88.1k4159293




                  88.1k4159293



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      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













































































                      Comments

                      Popular posts from this blog

                      What does second last employer means? [closed]

                      List of Gilmore Girls characters

                      Confectionery