Aligned boxes without exceeding textwidth

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











up vote
2
down vote

favorite












I have this:



newcommandbpic[2]
makebox[textwidth][l]
fboxmakebox[.1textwidth][r]includegraphics[width=20pt]#1hspace*5ptfboxparbox.9textwidth#2newline%



bpicresilience.pngResilience, in that broken nodes do not compromise the network entirely;
bpicspontaneity.pngSpontaneity, a feature empowered by the network's capacity to form and heal itself;
bpicdecentralization.pngDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;
bpicscale.pngScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;
bpicthroughput.pngThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;
bpicbalancing.pngLoad balancing, with several alternatives being used to leverage traffic on the network;
bpiccosts.pngReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


That is resulting in this:



enter image description here



All fboxs are there only for the sake of understanding the layout. There a few things wrong with what I want:



  • The boxes are exceeding the text width in comparison with the rest of the text. Notice that at the right.


  • I wanted the picture and text boxes to be the same height and with the text centered vertically.


  • If the text needs more vertically space than what is used by the image, the image below should adjust by being lower––just as with a bullet list.


How can I do this?










share|improve this question





















  • Have you thought using a tabular for this? (And well, if you add dimensions that exceed the text width, it is perhaps not too surprising that things run over. E.g. tabularx takes care of this.)
    – marmot
    47 mins ago














up vote
2
down vote

favorite












I have this:



newcommandbpic[2]
makebox[textwidth][l]
fboxmakebox[.1textwidth][r]includegraphics[width=20pt]#1hspace*5ptfboxparbox.9textwidth#2newline%



bpicresilience.pngResilience, in that broken nodes do not compromise the network entirely;
bpicspontaneity.pngSpontaneity, a feature empowered by the network's capacity to form and heal itself;
bpicdecentralization.pngDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;
bpicscale.pngScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;
bpicthroughput.pngThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;
bpicbalancing.pngLoad balancing, with several alternatives being used to leverage traffic on the network;
bpiccosts.pngReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


That is resulting in this:



enter image description here



All fboxs are there only for the sake of understanding the layout. There a few things wrong with what I want:



  • The boxes are exceeding the text width in comparison with the rest of the text. Notice that at the right.


  • I wanted the picture and text boxes to be the same height and with the text centered vertically.


  • If the text needs more vertically space than what is used by the image, the image below should adjust by being lower––just as with a bullet list.


How can I do this?










share|improve this question





















  • Have you thought using a tabular for this? (And well, if you add dimensions that exceed the text width, it is perhaps not too surprising that things run over. E.g. tabularx takes care of this.)
    – marmot
    47 mins ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have this:



newcommandbpic[2]
makebox[textwidth][l]
fboxmakebox[.1textwidth][r]includegraphics[width=20pt]#1hspace*5ptfboxparbox.9textwidth#2newline%



bpicresilience.pngResilience, in that broken nodes do not compromise the network entirely;
bpicspontaneity.pngSpontaneity, a feature empowered by the network's capacity to form and heal itself;
bpicdecentralization.pngDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;
bpicscale.pngScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;
bpicthroughput.pngThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;
bpicbalancing.pngLoad balancing, with several alternatives being used to leverage traffic on the network;
bpiccosts.pngReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


That is resulting in this:



enter image description here



All fboxs are there only for the sake of understanding the layout. There a few things wrong with what I want:



  • The boxes are exceeding the text width in comparison with the rest of the text. Notice that at the right.


  • I wanted the picture and text boxes to be the same height and with the text centered vertically.


  • If the text needs more vertically space than what is used by the image, the image below should adjust by being lower––just as with a bullet list.


How can I do this?










share|improve this question













I have this:



newcommandbpic[2]
makebox[textwidth][l]
fboxmakebox[.1textwidth][r]includegraphics[width=20pt]#1hspace*5ptfboxparbox.9textwidth#2newline%



bpicresilience.pngResilience, in that broken nodes do not compromise the network entirely;
bpicspontaneity.pngSpontaneity, a feature empowered by the network's capacity to form and heal itself;
bpicdecentralization.pngDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;
bpicscale.pngScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;
bpicthroughput.pngThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;
bpicbalancing.pngLoad balancing, with several alternatives being used to leverage traffic on the network;
bpiccosts.pngReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


That is resulting in this:



enter image description here



All fboxs are there only for the sake of understanding the layout. There a few things wrong with what I want:



  • The boxes are exceeding the text width in comparison with the rest of the text. Notice that at the right.


  • I wanted the picture and text boxes to be the same height and with the text centered vertically.


  • If the text needs more vertically space than what is used by the image, the image below should adjust by being lower––just as with a bullet list.


How can I do this?







boxes bullets






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 51 mins ago









André Fratelli

1606




1606











  • Have you thought using a tabular for this? (And well, if you add dimensions that exceed the text width, it is perhaps not too surprising that things run over. E.g. tabularx takes care of this.)
    – marmot
    47 mins ago
















  • Have you thought using a tabular for this? (And well, if you add dimensions that exceed the text width, it is perhaps not too surprising that things run over. E.g. tabularx takes care of this.)
    – marmot
    47 mins ago















Have you thought using a tabular for this? (And well, if you add dimensions that exceed the text width, it is perhaps not too surprising that things run over. E.g. tabularx takes care of this.)
– marmot
47 mins ago




Have you thought using a tabular for this? (And well, if you add dimensions that exceed the text width, it is perhaps not too surprising that things run over. E.g. tabularx takes care of this.)
– marmot
47 mins ago










2 Answers
2






active

oldest

votes

















up vote
3
down vote













Your desired output looks like a table to me. (If you want to run over page breaks with it, you may want to use longtable instead of tabularx.)



documentclassarticle
usepackagetabularx,graphicx,lipsum
% raisebox-.5height... from https://tex.stackexchange.com/a/19083/121799
newcommandbpic[1]raisebox-.5heightincludegraphics[width=16pt]#1
begindocument
lipsum[1]

noindent
begintabularxtextwidthm20ptX
bpicexample-image-a & Resilience, in that broken nodes do not compromise the
network entirely\
bpicexample-image-b & Spontaneity, a feature empowered by the network's capacity to form and heal itself;\
endtabularx

lipsum[2]
enddocument


enter image description here



Of course, I do not have your figures.



EDIT: I'm confused about your comment. So maybe an even simpler thing will do?



documentclassarticle
usepackagelipsum,graphicx
newcommandbpic[1]includegraphics[width=16pt]#1
begindocument
lipsum[1]

beginitemize
item[bpicexample-image-a] Resilience, in that broken nodes do not compromise the
network entirely
item[bpicexample-image-b] Spontaneity, a feature empowered by the network's capacity to form and heal itself;
enditemize

lipsum[2]
enddocument


enter image description here






share|improve this answer






















  • Works in terms of not exceeding textwidth and adjusting to the contents of the previous point, but what about centering text vertically?
    – André Fratelli
    25 mins ago






  • 1




    @AndréFratelli I am not sure I understand your comment because in the table the texts are centered, aren't they? (For more options see e.g. this post and its answers). Rereading your question, especially "just as with a bullet list.", I added a second option.
    – marmot
    17 mins ago

















up vote
3
down vote













As marmot suggests, I'd wrap this in a table. In fact, to ensure consistent formatting I would wrap everything into a nice little macro so that you can write your table as



 ImageTable{
example-image-aResilience, in that broken nodes ...,
example-image-bSpontaneity, a feature empowered...,
example-image-cDecentralization, in the sense...,
example-image-aScale, as a consequence of the fact...,
example-image-bThroughput, an attribute achieved...,
example-image-cLoad balancing, with several alternatives...,
example-imageReduced costs of infrastructure, due...



to produce:



enter image description here



So, ImageTable accepts a comma separated list of pairs that give the image and the corresponding text.



Normally. I would do this using docsvlist from the etoolbox package but I found it tricky to pass two arguments (the image and the text) through to the do command (newcomanddo[2]... didn't work). Instead I have used the slightly fancier and scarier looking LaTeX3 package together with the etoolbox package to align the images (this adds a few extra options to the includegraphics command such as the align=? used below). If you want to tweak the image alignment have a look at the other options available in the package documentation.



Here is the full code:



documentclassarticle
usepackagetabularx
usepackageexpl3
usepackagegraphbox
usepackagemwe% for images

ExplSyntaxOn
clist_new:N l_image_table_list
cs_new_protected:Npn image_table_row #1 #2
includegraphics[width=20pt, align=t]#1 & #2\

cs_new:Npn ImageTable #1 %
noindent
clist_set:Nn l_image_table_list #1
begintabularxtextwidthcX
clist_map_inline:Nn l_image_table_list image_table_row ##1
endtabularx

ExplSyntaxOff

begindocument

ImageTable
example-image-aResilience, in that broken nodes do not compromise the network entirely;,
example-image-bSpontaneity, a feature empowered by the network's capacity to form and heal itself;,
example-image-cDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;,
example-image-aScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;,
example-image-bThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;,
example-image-cLoad balancing, with several alternatives being used to leverage traffic on the network;,
example-imageReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


enddocument





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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    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%2f457959%2faligned-boxes-without-exceeding-textwidth%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
    3
    down vote













    Your desired output looks like a table to me. (If you want to run over page breaks with it, you may want to use longtable instead of tabularx.)



    documentclassarticle
    usepackagetabularx,graphicx,lipsum
    % raisebox-.5height... from https://tex.stackexchange.com/a/19083/121799
    newcommandbpic[1]raisebox-.5heightincludegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    noindent
    begintabularxtextwidthm20ptX
    bpicexample-image-a & Resilience, in that broken nodes do not compromise the
    network entirely\
    bpicexample-image-b & Spontaneity, a feature empowered by the network's capacity to form and heal itself;\
    endtabularx

    lipsum[2]
    enddocument


    enter image description here



    Of course, I do not have your figures.



    EDIT: I'm confused about your comment. So maybe an even simpler thing will do?



    documentclassarticle
    usepackagelipsum,graphicx
    newcommandbpic[1]includegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    beginitemize
    item[bpicexample-image-a] Resilience, in that broken nodes do not compromise the
    network entirely
    item[bpicexample-image-b] Spontaneity, a feature empowered by the network's capacity to form and heal itself;
    enditemize

    lipsum[2]
    enddocument


    enter image description here






    share|improve this answer






















    • Works in terms of not exceeding textwidth and adjusting to the contents of the previous point, but what about centering text vertically?
      – André Fratelli
      25 mins ago






    • 1




      @AndréFratelli I am not sure I understand your comment because in the table the texts are centered, aren't they? (For more options see e.g. this post and its answers). Rereading your question, especially "just as with a bullet list.", I added a second option.
      – marmot
      17 mins ago














    up vote
    3
    down vote













    Your desired output looks like a table to me. (If you want to run over page breaks with it, you may want to use longtable instead of tabularx.)



    documentclassarticle
    usepackagetabularx,graphicx,lipsum
    % raisebox-.5height... from https://tex.stackexchange.com/a/19083/121799
    newcommandbpic[1]raisebox-.5heightincludegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    noindent
    begintabularxtextwidthm20ptX
    bpicexample-image-a & Resilience, in that broken nodes do not compromise the
    network entirely\
    bpicexample-image-b & Spontaneity, a feature empowered by the network's capacity to form and heal itself;\
    endtabularx

    lipsum[2]
    enddocument


    enter image description here



    Of course, I do not have your figures.



    EDIT: I'm confused about your comment. So maybe an even simpler thing will do?



    documentclassarticle
    usepackagelipsum,graphicx
    newcommandbpic[1]includegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    beginitemize
    item[bpicexample-image-a] Resilience, in that broken nodes do not compromise the
    network entirely
    item[bpicexample-image-b] Spontaneity, a feature empowered by the network's capacity to form and heal itself;
    enditemize

    lipsum[2]
    enddocument


    enter image description here






    share|improve this answer






















    • Works in terms of not exceeding textwidth and adjusting to the contents of the previous point, but what about centering text vertically?
      – André Fratelli
      25 mins ago






    • 1




      @AndréFratelli I am not sure I understand your comment because in the table the texts are centered, aren't they? (For more options see e.g. this post and its answers). Rereading your question, especially "just as with a bullet list.", I added a second option.
      – marmot
      17 mins ago












    up vote
    3
    down vote










    up vote
    3
    down vote









    Your desired output looks like a table to me. (If you want to run over page breaks with it, you may want to use longtable instead of tabularx.)



    documentclassarticle
    usepackagetabularx,graphicx,lipsum
    % raisebox-.5height... from https://tex.stackexchange.com/a/19083/121799
    newcommandbpic[1]raisebox-.5heightincludegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    noindent
    begintabularxtextwidthm20ptX
    bpicexample-image-a & Resilience, in that broken nodes do not compromise the
    network entirely\
    bpicexample-image-b & Spontaneity, a feature empowered by the network's capacity to form and heal itself;\
    endtabularx

    lipsum[2]
    enddocument


    enter image description here



    Of course, I do not have your figures.



    EDIT: I'm confused about your comment. So maybe an even simpler thing will do?



    documentclassarticle
    usepackagelipsum,graphicx
    newcommandbpic[1]includegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    beginitemize
    item[bpicexample-image-a] Resilience, in that broken nodes do not compromise the
    network entirely
    item[bpicexample-image-b] Spontaneity, a feature empowered by the network's capacity to form and heal itself;
    enditemize

    lipsum[2]
    enddocument


    enter image description here






    share|improve this answer














    Your desired output looks like a table to me. (If you want to run over page breaks with it, you may want to use longtable instead of tabularx.)



    documentclassarticle
    usepackagetabularx,graphicx,lipsum
    % raisebox-.5height... from https://tex.stackexchange.com/a/19083/121799
    newcommandbpic[1]raisebox-.5heightincludegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    noindent
    begintabularxtextwidthm20ptX
    bpicexample-image-a & Resilience, in that broken nodes do not compromise the
    network entirely\
    bpicexample-image-b & Spontaneity, a feature empowered by the network's capacity to form and heal itself;\
    endtabularx

    lipsum[2]
    enddocument


    enter image description here



    Of course, I do not have your figures.



    EDIT: I'm confused about your comment. So maybe an even simpler thing will do?



    documentclassarticle
    usepackagelipsum,graphicx
    newcommandbpic[1]includegraphics[width=16pt]#1
    begindocument
    lipsum[1]

    beginitemize
    item[bpicexample-image-a] Resilience, in that broken nodes do not compromise the
    network entirely
    item[bpicexample-image-b] Spontaneity, a feature empowered by the network's capacity to form and heal itself;
    enditemize

    lipsum[2]
    enddocument


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 20 mins ago

























    answered 36 mins ago









    marmot

    70.7k476151




    70.7k476151











    • Works in terms of not exceeding textwidth and adjusting to the contents of the previous point, but what about centering text vertically?
      – André Fratelli
      25 mins ago






    • 1




      @AndréFratelli I am not sure I understand your comment because in the table the texts are centered, aren't they? (For more options see e.g. this post and its answers). Rereading your question, especially "just as with a bullet list.", I added a second option.
      – marmot
      17 mins ago
















    • Works in terms of not exceeding textwidth and adjusting to the contents of the previous point, but what about centering text vertically?
      – André Fratelli
      25 mins ago






    • 1




      @AndréFratelli I am not sure I understand your comment because in the table the texts are centered, aren't they? (For more options see e.g. this post and its answers). Rereading your question, especially "just as with a bullet list.", I added a second option.
      – marmot
      17 mins ago















    Works in terms of not exceeding textwidth and adjusting to the contents of the previous point, but what about centering text vertically?
    – André Fratelli
    25 mins ago




    Works in terms of not exceeding textwidth and adjusting to the contents of the previous point, but what about centering text vertically?
    – André Fratelli
    25 mins ago




    1




    1




    @AndréFratelli I am not sure I understand your comment because in the table the texts are centered, aren't they? (For more options see e.g. this post and its answers). Rereading your question, especially "just as with a bullet list.", I added a second option.
    – marmot
    17 mins ago




    @AndréFratelli I am not sure I understand your comment because in the table the texts are centered, aren't they? (For more options see e.g. this post and its answers). Rereading your question, especially "just as with a bullet list.", I added a second option.
    – marmot
    17 mins ago










    up vote
    3
    down vote













    As marmot suggests, I'd wrap this in a table. In fact, to ensure consistent formatting I would wrap everything into a nice little macro so that you can write your table as



     ImageTable{
    example-image-aResilience, in that broken nodes ...,
    example-image-bSpontaneity, a feature empowered...,
    example-image-cDecentralization, in the sense...,
    example-image-aScale, as a consequence of the fact...,
    example-image-bThroughput, an attribute achieved...,
    example-image-cLoad balancing, with several alternatives...,
    example-imageReduced costs of infrastructure, due...



    to produce:



    enter image description here



    So, ImageTable accepts a comma separated list of pairs that give the image and the corresponding text.



    Normally. I would do this using docsvlist from the etoolbox package but I found it tricky to pass two arguments (the image and the text) through to the do command (newcomanddo[2]... didn't work). Instead I have used the slightly fancier and scarier looking LaTeX3 package together with the etoolbox package to align the images (this adds a few extra options to the includegraphics command such as the align=? used below). If you want to tweak the image alignment have a look at the other options available in the package documentation.



    Here is the full code:



    documentclassarticle
    usepackagetabularx
    usepackageexpl3
    usepackagegraphbox
    usepackagemwe% for images

    ExplSyntaxOn
    clist_new:N l_image_table_list
    cs_new_protected:Npn image_table_row #1 #2
    includegraphics[width=20pt, align=t]#1 & #2\

    cs_new:Npn ImageTable #1 %
    noindent
    clist_set:Nn l_image_table_list #1
    begintabularxtextwidthcX
    clist_map_inline:Nn l_image_table_list image_table_row ##1
    endtabularx

    ExplSyntaxOff

    begindocument

    ImageTable
    example-image-aResilience, in that broken nodes do not compromise the network entirely;,
    example-image-bSpontaneity, a feature empowered by the network's capacity to form and heal itself;,
    example-image-cDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;,
    example-image-aScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;,
    example-image-bThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;,
    example-image-cLoad balancing, with several alternatives being used to leverage traffic on the network;,
    example-imageReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


    enddocument





    share|improve this answer


























      up vote
      3
      down vote













      As marmot suggests, I'd wrap this in a table. In fact, to ensure consistent formatting I would wrap everything into a nice little macro so that you can write your table as



       ImageTable{
      example-image-aResilience, in that broken nodes ...,
      example-image-bSpontaneity, a feature empowered...,
      example-image-cDecentralization, in the sense...,
      example-image-aScale, as a consequence of the fact...,
      example-image-bThroughput, an attribute achieved...,
      example-image-cLoad balancing, with several alternatives...,
      example-imageReduced costs of infrastructure, due...



      to produce:



      enter image description here



      So, ImageTable accepts a comma separated list of pairs that give the image and the corresponding text.



      Normally. I would do this using docsvlist from the etoolbox package but I found it tricky to pass two arguments (the image and the text) through to the do command (newcomanddo[2]... didn't work). Instead I have used the slightly fancier and scarier looking LaTeX3 package together with the etoolbox package to align the images (this adds a few extra options to the includegraphics command such as the align=? used below). If you want to tweak the image alignment have a look at the other options available in the package documentation.



      Here is the full code:



      documentclassarticle
      usepackagetabularx
      usepackageexpl3
      usepackagegraphbox
      usepackagemwe% for images

      ExplSyntaxOn
      clist_new:N l_image_table_list
      cs_new_protected:Npn image_table_row #1 #2
      includegraphics[width=20pt, align=t]#1 & #2\

      cs_new:Npn ImageTable #1 %
      noindent
      clist_set:Nn l_image_table_list #1
      begintabularxtextwidthcX
      clist_map_inline:Nn l_image_table_list image_table_row ##1
      endtabularx

      ExplSyntaxOff

      begindocument

      ImageTable
      example-image-aResilience, in that broken nodes do not compromise the network entirely;,
      example-image-bSpontaneity, a feature empowered by the network's capacity to form and heal itself;,
      example-image-cDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;,
      example-image-aScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;,
      example-image-bThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;,
      example-image-cLoad balancing, with several alternatives being used to leverage traffic on the network;,
      example-imageReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


      enddocument





      share|improve this answer
























        up vote
        3
        down vote










        up vote
        3
        down vote









        As marmot suggests, I'd wrap this in a table. In fact, to ensure consistent formatting I would wrap everything into a nice little macro so that you can write your table as



         ImageTable{
        example-image-aResilience, in that broken nodes ...,
        example-image-bSpontaneity, a feature empowered...,
        example-image-cDecentralization, in the sense...,
        example-image-aScale, as a consequence of the fact...,
        example-image-bThroughput, an attribute achieved...,
        example-image-cLoad balancing, with several alternatives...,
        example-imageReduced costs of infrastructure, due...



        to produce:



        enter image description here



        So, ImageTable accepts a comma separated list of pairs that give the image and the corresponding text.



        Normally. I would do this using docsvlist from the etoolbox package but I found it tricky to pass two arguments (the image and the text) through to the do command (newcomanddo[2]... didn't work). Instead I have used the slightly fancier and scarier looking LaTeX3 package together with the etoolbox package to align the images (this adds a few extra options to the includegraphics command such as the align=? used below). If you want to tweak the image alignment have a look at the other options available in the package documentation.



        Here is the full code:



        documentclassarticle
        usepackagetabularx
        usepackageexpl3
        usepackagegraphbox
        usepackagemwe% for images

        ExplSyntaxOn
        clist_new:N l_image_table_list
        cs_new_protected:Npn image_table_row #1 #2
        includegraphics[width=20pt, align=t]#1 & #2\

        cs_new:Npn ImageTable #1 %
        noindent
        clist_set:Nn l_image_table_list #1
        begintabularxtextwidthcX
        clist_map_inline:Nn l_image_table_list image_table_row ##1
        endtabularx

        ExplSyntaxOff

        begindocument

        ImageTable
        example-image-aResilience, in that broken nodes do not compromise the network entirely;,
        example-image-bSpontaneity, a feature empowered by the network's capacity to form and heal itself;,
        example-image-cDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;,
        example-image-aScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;,
        example-image-bThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;,
        example-image-cLoad balancing, with several alternatives being used to leverage traffic on the network;,
        example-imageReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


        enddocument





        share|improve this answer














        As marmot suggests, I'd wrap this in a table. In fact, to ensure consistent formatting I would wrap everything into a nice little macro so that you can write your table as



         ImageTable{
        example-image-aResilience, in that broken nodes ...,
        example-image-bSpontaneity, a feature empowered...,
        example-image-cDecentralization, in the sense...,
        example-image-aScale, as a consequence of the fact...,
        example-image-bThroughput, an attribute achieved...,
        example-image-cLoad balancing, with several alternatives...,
        example-imageReduced costs of infrastructure, due...



        to produce:



        enter image description here



        So, ImageTable accepts a comma separated list of pairs that give the image and the corresponding text.



        Normally. I would do this using docsvlist from the etoolbox package but I found it tricky to pass two arguments (the image and the text) through to the do command (newcomanddo[2]... didn't work). Instead I have used the slightly fancier and scarier looking LaTeX3 package together with the etoolbox package to align the images (this adds a few extra options to the includegraphics command such as the align=? used below). If you want to tweak the image alignment have a look at the other options available in the package documentation.



        Here is the full code:



        documentclassarticle
        usepackagetabularx
        usepackageexpl3
        usepackagegraphbox
        usepackagemwe% for images

        ExplSyntaxOn
        clist_new:N l_image_table_list
        cs_new_protected:Npn image_table_row #1 #2
        includegraphics[width=20pt, align=t]#1 & #2\

        cs_new:Npn ImageTable #1 %
        noindent
        clist_set:Nn l_image_table_list #1
        begintabularxtextwidthcX
        clist_map_inline:Nn l_image_table_list image_table_row ##1
        endtabularx

        ExplSyntaxOff

        begindocument

        ImageTable
        example-image-aResilience, in that broken nodes do not compromise the network entirely;,
        example-image-bSpontaneity, a feature empowered by the network's capacity to form and heal itself;,
        example-image-cDecentralization, in the sense that having devices connect directly the need for Internet providers is alleviated;,
        example-image-aScale, as a consequence of the fact that such networks benefit from node density to form a greater number of alternative paths;,
        example-image-bThroughput, an attribute achieved by enabling multiple paths simultaneously to transmit data to a given destination;,
        example-image-cLoad balancing, with several alternatives being used to leverage traffic on the network;,
        example-imageReduced costs of infrastructure, due to the nodes connecting directly, thereby alleviating the need for central authorities.


        enddocument






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 12 mins ago

























        answered 21 mins ago









        Andrew

        28.7k34075




        28.7k34075



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457959%2faligned-boxes-without-exceeding-textwidth%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery