good way to horizontally align enumerate items
Clash 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:
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
add a comment |Â
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:
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
add a comment |Â
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:
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
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:
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
enumerate
edited 44 mins ago
Torbjørn T.
152k13244429
152k13244429
asked 56 mins ago
lwad
182
182
add a comment |Â
add a comment |Â
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 siunitx
to 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
Thanks for editing, @sigur!
– Bernard
20 mins ago
add a comment |Â
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 siunitx
to 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
Thanks for editing, @sigur!
– Bernard
20 mins ago
add a comment |Â
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 siunitx
to 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
Thanks for editing, @sigur!
– Bernard
20 mins ago
add a comment |Â
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 siunitx
to 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
You can emulate the labels of an enumerate environment in the first column of a table, with package listliketab
and use siunitx
to 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
edited 24 mins ago
Sigur
22.4k350132
22.4k350132
answered 25 mins ago
Bernard
159k764192
159k764192
Thanks for editing, @sigur!
– Bernard
20 mins ago
add a comment |Â
Thanks for editing, @sigur!
– Bernard
20 mins ago
Thanks for editing, @sigur!
– Bernard
20 mins ago
Thanks for editing, @sigur!
– Bernard
20 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password