Description list with aligned descriptions Announcing the arrival of Valued Associate #679:...

Understanding piped commands in GNU/Linux

Random body shuffle every night—can we still function?

First paper to introduce the "principal-agent problem"

2018 MacBook Pro won't let me install macOS High Sierra 10.13 from USB installer

Order between one to one functions and their inverses

What are some likely causes to domain member PC losing contact to domain controller?

newbie Q : How to read an output file in one command line

Is this Kuo-toa homebrew race balanced?

Twin's vs. Twins'

Besides transaction validation, are there any other uses of the Script language in Bitcoin

Is the Mordenkainens' Sword spell underpowered?

Why does BitLocker not use RSA?

How do you write "wild blueberries flavored"?

Did pre-Columbian Americans know the spherical shape of the Earth?

One-one communication

Is it OK to use the testing sample to compare algorithms?

By what mechanism was the 2017 UK General Election called?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Who said what about *meanings*?

Determine whether an integer is a palindrome

Weaponising the Grasp-at-a-Distance spell

Is the time—manner—place ordering of adverbials an oversimplification?

What was the last profitable war?

In musical terms, what properties are varied by the human voice to produce different words / syllables?



Description list with aligned descriptions



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Multi-line indentation using descriptionHow to get “two column” paragraph headers?Automatically set description list `labelwidth` based on widest label?Make the lines of a description item line upAligned descriptionDescription Environment options in LyXdescription, enumitem, beamerAutomatically setting the label width in a description environment, for each pageAutomatically number a description listDescription list with right alignment of labelsAligining item descriptionsspacing in a description list using enumitemCentered, left-aligned listSpacing between item and description using description listAligned descriptionNumbered description list with dot leaders?How to implement common layouts instead of misusing tabular environments?Description list aligned right












37















This forum thread is exactly what I'm looking for. I want my description environment to produce this:



Label is long   text 
lab2 blalballalaa
label3 possible second rule
label four hello world


Someone offered this:



newenvironment{mydescription}[1]                                                
{begin{list}{}%
{renewcommandmakelabel[1]{##1:hfill}%
settowidthlabelwidth{makelabel{#1}}%
setlengthleftmargin{labelwidth}
addtolengthleftmargin{labelsep}}}
{end{list}}


Which works great (the parameter is the longest label), except I think the enumitem should be able to do this. Unfortunately, the documentation for it is extremely confusing to me. Could someone show me how to achieve the same result with enumitem?










share|improve this question



























    37















    This forum thread is exactly what I'm looking for. I want my description environment to produce this:



    Label is long   text 
    lab2 blalballalaa
    label3 possible second rule
    label four hello world


    Someone offered this:



    newenvironment{mydescription}[1]                                                
    {begin{list}{}%
    {renewcommandmakelabel[1]{##1:hfill}%
    settowidthlabelwidth{makelabel{#1}}%
    setlengthleftmargin{labelwidth}
    addtolengthleftmargin{labelsep}}}
    {end{list}}


    Which works great (the parameter is the longest label), except I think the enumitem should be able to do this. Unfortunately, the documentation for it is extremely confusing to me. Could someone show me how to achieve the same result with enumitem?










    share|improve this question

























      37












      37








      37


      10






      This forum thread is exactly what I'm looking for. I want my description environment to produce this:



      Label is long   text 
      lab2 blalballalaa
      label3 possible second rule
      label four hello world


      Someone offered this:



      newenvironment{mydescription}[1]                                                
      {begin{list}{}%
      {renewcommandmakelabel[1]{##1:hfill}%
      settowidthlabelwidth{makelabel{#1}}%
      setlengthleftmargin{labelwidth}
      addtolengthleftmargin{labelsep}}}
      {end{list}}


      Which works great (the parameter is the longest label), except I think the enumitem should be able to do this. Unfortunately, the documentation for it is extremely confusing to me. Could someone show me how to achieve the same result with enumitem?










      share|improve this question














      This forum thread is exactly what I'm looking for. I want my description environment to produce this:



      Label is long   text 
      lab2 blalballalaa
      label3 possible second rule
      label four hello world


      Someone offered this:



      newenvironment{mydescription}[1]                                                
      {begin{list}{}%
      {renewcommandmakelabel[1]{##1:hfill}%
      settowidthlabelwidth{makelabel{#1}}%
      setlengthleftmargin{labelwidth}
      addtolengthleftmargin{labelsep}}}
      {end{list}}


      Which works great (the parameter is the longest label), except I think the enumitem should be able to do this. Unfortunately, the documentation for it is extremely confusing to me. Could someone show me how to achieve the same result with enumitem?







      horizontal-alignment lists enumitem description






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 18 '12 at 17:35









      mk12mk12

      8471915




      8471915






















          2 Answers
          2






          active

          oldest

          votes


















          57














          This is one possibility:



          documentclass{article}  
          usepackage{calc}
          usepackage{enumitem}

          begin{document}

          begin{description}[leftmargin=!,labelwidth=widthof{bfseries The longest label}]
          item[The longest label] text
          item[Short] long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text
          end{description}

          end{document}


          enter image description here






          share|improve this answer



















          • 1





            Thanks for the leftmargin=! option!

            – paulequilibrio
            Nov 12 '16 at 15:28



















          0














          A solution using the scrextend package (taken from WikiBook):



          documentclass[twocolumn]{article}
          usepackage{scrextend}
          begin{document}
          begin{labeling}{alligator} % alligator is the longest label
          item [textbf{ant}]really busy all the time
          item [chimp] likes bananas
          item [alligator] very dangerous animal, sharp teeth, long
          muscular tail and a bit of text that is longer than one
          line and shows the alignment of text quite nicely
          end{labeling}
          end{document}


          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',
            autoActivateHeartbeat: false,
            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%2f67720%2fdescription-list-with-aligned-descriptions%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            57














            This is one possibility:



            documentclass{article}  
            usepackage{calc}
            usepackage{enumitem}

            begin{document}

            begin{description}[leftmargin=!,labelwidth=widthof{bfseries The longest label}]
            item[The longest label] text
            item[Short] long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text
            end{description}

            end{document}


            enter image description here






            share|improve this answer



















            • 1





              Thanks for the leftmargin=! option!

              – paulequilibrio
              Nov 12 '16 at 15:28
















            57














            This is one possibility:



            documentclass{article}  
            usepackage{calc}
            usepackage{enumitem}

            begin{document}

            begin{description}[leftmargin=!,labelwidth=widthof{bfseries The longest label}]
            item[The longest label] text
            item[Short] long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text
            end{description}

            end{document}


            enter image description here






            share|improve this answer



















            • 1





              Thanks for the leftmargin=! option!

              – paulequilibrio
              Nov 12 '16 at 15:28














            57












            57








            57







            This is one possibility:



            documentclass{article}  
            usepackage{calc}
            usepackage{enumitem}

            begin{document}

            begin{description}[leftmargin=!,labelwidth=widthof{bfseries The longest label}]
            item[The longest label] text
            item[Short] long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text
            end{description}

            end{document}


            enter image description here






            share|improve this answer













            This is one possibility:



            documentclass{article}  
            usepackage{calc}
            usepackage{enumitem}

            begin{document}

            begin{description}[leftmargin=!,labelwidth=widthof{bfseries The longest label}]
            item[The longest label] text
            item[Short] long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text
            end{description}

            end{document}


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 18 '12 at 22:04









            Gonzalo MedinaGonzalo Medina

            404k4213231584




            404k4213231584








            • 1





              Thanks for the leftmargin=! option!

              – paulequilibrio
              Nov 12 '16 at 15:28














            • 1





              Thanks for the leftmargin=! option!

              – paulequilibrio
              Nov 12 '16 at 15:28








            1




            1





            Thanks for the leftmargin=! option!

            – paulequilibrio
            Nov 12 '16 at 15:28





            Thanks for the leftmargin=! option!

            – paulequilibrio
            Nov 12 '16 at 15:28











            0














            A solution using the scrextend package (taken from WikiBook):



            documentclass[twocolumn]{article}
            usepackage{scrextend}
            begin{document}
            begin{labeling}{alligator} % alligator is the longest label
            item [textbf{ant}]really busy all the time
            item [chimp] likes bananas
            item [alligator] very dangerous animal, sharp teeth, long
            muscular tail and a bit of text that is longer than one
            line and shows the alignment of text quite nicely
            end{labeling}
            end{document}


            enter image description here






            share|improve this answer




























              0














              A solution using the scrextend package (taken from WikiBook):



              documentclass[twocolumn]{article}
              usepackage{scrextend}
              begin{document}
              begin{labeling}{alligator} % alligator is the longest label
              item [textbf{ant}]really busy all the time
              item [chimp] likes bananas
              item [alligator] very dangerous animal, sharp teeth, long
              muscular tail and a bit of text that is longer than one
              line and shows the alignment of text quite nicely
              end{labeling}
              end{document}


              enter image description here






              share|improve this answer


























                0












                0








                0







                A solution using the scrextend package (taken from WikiBook):



                documentclass[twocolumn]{article}
                usepackage{scrextend}
                begin{document}
                begin{labeling}{alligator} % alligator is the longest label
                item [textbf{ant}]really busy all the time
                item [chimp] likes bananas
                item [alligator] very dangerous animal, sharp teeth, long
                muscular tail and a bit of text that is longer than one
                line and shows the alignment of text quite nicely
                end{labeling}
                end{document}


                enter image description here






                share|improve this answer













                A solution using the scrextend package (taken from WikiBook):



                documentclass[twocolumn]{article}
                usepackage{scrextend}
                begin{document}
                begin{labeling}{alligator} % alligator is the longest label
                item [textbf{ant}]really busy all the time
                item [chimp] likes bananas
                item [alligator] very dangerous animal, sharp teeth, long
                muscular tail and a bit of text that is longer than one
                line and shows the alignment of text quite nicely
                end{labeling}
                end{document}


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 18 mins ago









                Maximilian JanischMaximilian Janisch

                1064




                1064






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f67720%2fdescription-list-with-aligned-descriptions%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

                    Castillo d'Acher Características Menú de navegación

                    Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...