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

Understanding piped commands in GNU/Linux

Does the main washing effect of soap come from foam?

Number of generators of subgroup

Is there a verb for listening stealthily?

Why not use the yoke to control yaw, as well as pitch and roll?

Weaponising the Grasp-at-a-Distance spell

How to achieve cat-like agility?

Does the transliteration of 'Dravidian' exist in Hindu scripture? Does 'Dravida' refer to a Geographical area or an ethnic group?

Was the pager message from Nick Fury to Captain Marvel unnecessary?

What does 丫 mean? 丫是什么意思?

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

What is a more techy Technical Writer job title that isn't cutesy or confusing?

Marquee sign letters

Can the Haste spell grant both a Beast Master ranger and their animal companion extra attacks?

How do Java 8 default methods hеlp with lambdas?

Inverse square law not accurate for non-point masses?

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

latest version of QGIS fails to edit attribute table of GeoJSON file

Centre cell vertically in tabularx

Any stored/leased 737s that could substitute for grounded MAXs?

By what mechanism was the 2017 UK General Election called?

Why do C and C++ allow the expression (int) + 4*5;

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

Noise in Eigenvalues plot



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

                    Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

                    Schneeberg (Smreczany) Bibliografia | Menu...

                    Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...