good way to horizontally align enumerate items

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











up vote
1
down vote

favorite












I have a collection of multiple choice questions that use the enumerate environment. In some cases, I'd like the align the answers (items) in specific ways. For example, I might want to align numbers at their decimal points like this:



enter image description hereenter image description here



I aligned the decimal points in this example using phantoms and llaps, but I'm curious if there's a better/slicker way that doesn't require as much manual tweaking -- something analogous to an align* environment that I could wrap around the enumerate items and just stick ampersands where needed?



Since I have a lot of multiple choice questions I'd like to change, I'm hoping to make this as easy as possible, and it would be great if it didn't break my enumerate environments.



MWE:



documentclassarticle

begindocument

beginenumerate
item What is the meaning of life?
beginenumerate
item $1.618$
item $2.71828$
item $3.14159$
item $42.00$
item $1000.00$
endenumerate
endenumerate

beginenumerate
item What is the meaning of life?
beginenumerate
item $phantom1000.000llap1.618$
item $phantom1000.00000llap2.71828$
item $phantom1000.00000llap3.14159$
item $phantom1000.00llap42.00$
item $phantom1000.00llap1000.00$
endenumerate
endenumerate

enddocument









share|improve this question



























    up vote
    1
    down vote

    favorite












    I have a collection of multiple choice questions that use the enumerate environment. In some cases, I'd like the align the answers (items) in specific ways. For example, I might want to align numbers at their decimal points like this:



    enter image description hereenter image description here



    I aligned the decimal points in this example using phantoms and llaps, but I'm curious if there's a better/slicker way that doesn't require as much manual tweaking -- something analogous to an align* environment that I could wrap around the enumerate items and just stick ampersands where needed?



    Since I have a lot of multiple choice questions I'd like to change, I'm hoping to make this as easy as possible, and it would be great if it didn't break my enumerate environments.



    MWE:



    documentclassarticle

    begindocument

    beginenumerate
    item What is the meaning of life?
    beginenumerate
    item $1.618$
    item $2.71828$
    item $3.14159$
    item $42.00$
    item $1000.00$
    endenumerate
    endenumerate

    beginenumerate
    item What is the meaning of life?
    beginenumerate
    item $phantom1000.000llap1.618$
    item $phantom1000.00000llap2.71828$
    item $phantom1000.00000llap3.14159$
    item $phantom1000.00llap42.00$
    item $phantom1000.00llap1000.00$
    endenumerate
    endenumerate

    enddocument









    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have a collection of multiple choice questions that use the enumerate environment. In some cases, I'd like the align the answers (items) in specific ways. For example, I might want to align numbers at their decimal points like this:



      enter image description hereenter image description here



      I aligned the decimal points in this example using phantoms and llaps, but I'm curious if there's a better/slicker way that doesn't require as much manual tweaking -- something analogous to an align* environment that I could wrap around the enumerate items and just stick ampersands where needed?



      Since I have a lot of multiple choice questions I'd like to change, I'm hoping to make this as easy as possible, and it would be great if it didn't break my enumerate environments.



      MWE:



      documentclassarticle

      begindocument

      beginenumerate
      item What is the meaning of life?
      beginenumerate
      item $1.618$
      item $2.71828$
      item $3.14159$
      item $42.00$
      item $1000.00$
      endenumerate
      endenumerate

      beginenumerate
      item What is the meaning of life?
      beginenumerate
      item $phantom1000.000llap1.618$
      item $phantom1000.00000llap2.71828$
      item $phantom1000.00000llap3.14159$
      item $phantom1000.00llap42.00$
      item $phantom1000.00llap1000.00$
      endenumerate
      endenumerate

      enddocument









      share|improve this question















      I have a collection of multiple choice questions that use the enumerate environment. In some cases, I'd like the align the answers (items) in specific ways. For example, I might want to align numbers at their decimal points like this:



      enter image description hereenter image description here



      I aligned the decimal points in this example using phantoms and llaps, but I'm curious if there's a better/slicker way that doesn't require as much manual tweaking -- something analogous to an align* environment that I could wrap around the enumerate items and just stick ampersands where needed?



      Since I have a lot of multiple choice questions I'd like to change, I'm hoping to make this as easy as possible, and it would be great if it didn't break my enumerate environments.



      MWE:



      documentclassarticle

      begindocument

      beginenumerate
      item What is the meaning of life?
      beginenumerate
      item $1.618$
      item $2.71828$
      item $3.14159$
      item $42.00$
      item $1000.00$
      endenumerate
      endenumerate

      beginenumerate
      item What is the meaning of life?
      beginenumerate
      item $phantom1000.000llap1.618$
      item $phantom1000.00000llap2.71828$
      item $phantom1000.00000llap3.14159$
      item $phantom1000.00llap42.00$
      item $phantom1000.00llap1000.00$
      endenumerate
      endenumerate

      enddocument






      enumerate






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 44 mins ago









      Torbjørn T.

      152k13244429




      152k13244429










      asked 56 mins ago









      lwad

      182




      182




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          You can emulate the labels of an enumerate environment in the first column of a table, with package listliketab and use siunitxto align the numbers in the second column on the decimal dots, with the S column type. You even can cross-reference the items:



          documentclassarticle
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagesiunitx, listliketab

          begindocument

          storestyleofenumerate
          beginlistliketab
          newcountertabenumsetcountertabenum0renewcommandthetabenum(alphtabenum)
          newcommandtabitemrefstepcountertabenumthetabenum
          begintabular@L S[table-format=4.5, table-number-alignment=center]@
          tabitem & 1.618 \
          tabitemlabelrow-2 & 2.71828 \
          tabitem & 3.14159 \
          tabitem & 42.00 \
          tabitem & 1000.00
          endtabular
          endlistliketab

          We read in row refrow-2 an approximate value of Euler’s number $e$.

          enddocument


          enter image description here






          share|improve this answer






















          • Thanks for editing, @sigur!
            – Bernard
            20 mins ago










          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%2f456126%2fgood-way-to-horizontally-align-enumerate-items%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          You can emulate the labels of an enumerate environment in the first column of a table, with package listliketab and use siunitxto align the numbers in the second column on the decimal dots, with the S column type. You even can cross-reference the items:



          documentclassarticle
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagesiunitx, listliketab

          begindocument

          storestyleofenumerate
          beginlistliketab
          newcountertabenumsetcountertabenum0renewcommandthetabenum(alphtabenum)
          newcommandtabitemrefstepcountertabenumthetabenum
          begintabular@L S[table-format=4.5, table-number-alignment=center]@
          tabitem & 1.618 \
          tabitemlabelrow-2 & 2.71828 \
          tabitem & 3.14159 \
          tabitem & 42.00 \
          tabitem & 1000.00
          endtabular
          endlistliketab

          We read in row refrow-2 an approximate value of Euler’s number $e$.

          enddocument


          enter image description here






          share|improve this answer






















          • Thanks for editing, @sigur!
            – Bernard
            20 mins ago














          up vote
          3
          down vote













          You can emulate the labels of an enumerate environment in the first column of a table, with package listliketab and use siunitxto align the numbers in the second column on the decimal dots, with the S column type. You even can cross-reference the items:



          documentclassarticle
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagesiunitx, listliketab

          begindocument

          storestyleofenumerate
          beginlistliketab
          newcountertabenumsetcountertabenum0renewcommandthetabenum(alphtabenum)
          newcommandtabitemrefstepcountertabenumthetabenum
          begintabular@L S[table-format=4.5, table-number-alignment=center]@
          tabitem & 1.618 \
          tabitemlabelrow-2 & 2.71828 \
          tabitem & 3.14159 \
          tabitem & 42.00 \
          tabitem & 1000.00
          endtabular
          endlistliketab

          We read in row refrow-2 an approximate value of Euler’s number $e$.

          enddocument


          enter image description here






          share|improve this answer






















          • Thanks for editing, @sigur!
            – Bernard
            20 mins ago












          up vote
          3
          down vote










          up vote
          3
          down vote









          You can emulate the labels of an enumerate environment in the first column of a table, with package listliketab and use siunitxto align the numbers in the second column on the decimal dots, with the S column type. You even can cross-reference the items:



          documentclassarticle
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagesiunitx, listliketab

          begindocument

          storestyleofenumerate
          beginlistliketab
          newcountertabenumsetcountertabenum0renewcommandthetabenum(alphtabenum)
          newcommandtabitemrefstepcountertabenumthetabenum
          begintabular@L S[table-format=4.5, table-number-alignment=center]@
          tabitem & 1.618 \
          tabitemlabelrow-2 & 2.71828 \
          tabitem & 3.14159 \
          tabitem & 42.00 \
          tabitem & 1000.00
          endtabular
          endlistliketab

          We read in row refrow-2 an approximate value of Euler’s number $e$.

          enddocument


          enter image description here






          share|improve this answer














          You can emulate the labels of an enumerate environment in the first column of a table, with package listliketab and use siunitxto align the numbers in the second column on the decimal dots, with the S column type. You even can cross-reference the items:



          documentclassarticle
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagesiunitx, listliketab

          begindocument

          storestyleofenumerate
          beginlistliketab
          newcountertabenumsetcountertabenum0renewcommandthetabenum(alphtabenum)
          newcommandtabitemrefstepcountertabenumthetabenum
          begintabular@L S[table-format=4.5, table-number-alignment=center]@
          tabitem & 1.618 \
          tabitemlabelrow-2 & 2.71828 \
          tabitem & 3.14159 \
          tabitem & 42.00 \
          tabitem & 1000.00
          endtabular
          endlistliketab

          We read in row refrow-2 an approximate value of Euler’s number $e$.

          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 24 mins ago









          Sigur

          22.4k350132




          22.4k350132










          answered 25 mins ago









          Bernard

          159k764192




          159k764192











          • Thanks for editing, @sigur!
            – Bernard
            20 mins ago
















          • Thanks for editing, @sigur!
            – Bernard
            20 mins ago















          Thanks for editing, @sigur!
          – Bernard
          20 mins ago




          Thanks for editing, @sigur!
          – Bernard
          20 mins ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456126%2fgood-way-to-horizontally-align-enumerate-items%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