width of (alph*) labels
I made a list using enumitem
and
begin{enumerate}[label=(alph*)]
...
end{enumerate}
The resulting labels are, to me, annoyingly uneven. Notice that (b) is much wider than (c) in the image below. Would it be possible to get the label to insert padding to get the text generated for each label to be equally wide? This sounds like a microtype
kind of job. As a work around I could use a monospaced font for the labels but that's less elegant.
spacing labels enumitem microtype
add a comment |
I made a list using enumitem
and
begin{enumerate}[label=(alph*)]
...
end{enumerate}
The resulting labels are, to me, annoyingly uneven. Notice that (b) is much wider than (c) in the image below. Would it be possible to get the label to insert padding to get the text generated for each label to be equally wide? This sounds like a microtype
kind of job. As a work around I could use a monospaced font for the labels but that's less elegant.
spacing labels enumitem microtype
add a comment |
I made a list using enumitem
and
begin{enumerate}[label=(alph*)]
...
end{enumerate}
The resulting labels are, to me, annoyingly uneven. Notice that (b) is much wider than (c) in the image below. Would it be possible to get the label to insert padding to get the text generated for each label to be equally wide? This sounds like a microtype
kind of job. As a work around I could use a monospaced font for the labels but that's less elegant.
spacing labels enumitem microtype
I made a list using enumitem
and
begin{enumerate}[label=(alph*)]
...
end{enumerate}
The resulting labels are, to me, annoyingly uneven. Notice that (b) is much wider than (c) in the image below. Would it be possible to get the label to insert padding to get the text generated for each label to be equally wide? This sounds like a microtype
kind of job. As a work around I could use a monospaced font for the labels but that's less elegant.
spacing labels enumitem microtype
spacing labels enumitem microtype
asked Jan 22 at 13:12
Joe CorneliJoe Corneli
2,1731834
2,1731834
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can pre-define a length, say, mylength
, and then use that to make a box of constant width with hbox tomylength{<stuff>}
. You can:
- center-align with
label=(hbox tomywidth{hssalph*hss})
- right-align with
label=(hbox tomywidth{hssalph*})
- and left-align with
label=(hbox tomywidth{alph*hss})
or, with a more LaTeX-y syntax: label={(makebox[mywidth][<align>]{alph*})}
where <align>
is either c
, r
, or l
.
documentclass{article}
usepackage{enumitem}
begin{document}
newdimenmywidth
sbox0{m}%
setlengthmywidth{wd0}%
begin{enumerate}[label={(makebox[mywidth][c]{alph*})}]
item
item
item
item
item
item
item
item
item
end{enumerate}
end{document}
2
Much better than it was, thanks! I usedsbox{0}{b}
. Only a real neat-freak would complain now ;-)
– Joe Corneli
Jan 22 at 13:22
3
or evenmakebox[mywidth]{alph*}
so it looks like latex:-)
– David Carlisle
Jan 22 at 13:23
1
Don't forget the bracesbegin{enumerate}[label={(makebox[mywidth]{alph*})}]
otherwise the[
and]
confuse the argument parser.
– moewe
Jan 22 at 13:25
1
@moewe testing code? what sort of advice is that? :-)
– David Carlisle
Jan 22 at 13:28
1
@DavidCarlisle github.com/latex3/latex2e/commit/… ;-)
– Phelype Oleinik
Jan 22 at 13:32
|
show 4 more comments
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
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f471273%2fwidth-of-alph-labels%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can pre-define a length, say, mylength
, and then use that to make a box of constant width with hbox tomylength{<stuff>}
. You can:
- center-align with
label=(hbox tomywidth{hssalph*hss})
- right-align with
label=(hbox tomywidth{hssalph*})
- and left-align with
label=(hbox tomywidth{alph*hss})
or, with a more LaTeX-y syntax: label={(makebox[mywidth][<align>]{alph*})}
where <align>
is either c
, r
, or l
.
documentclass{article}
usepackage{enumitem}
begin{document}
newdimenmywidth
sbox0{m}%
setlengthmywidth{wd0}%
begin{enumerate}[label={(makebox[mywidth][c]{alph*})}]
item
item
item
item
item
item
item
item
item
end{enumerate}
end{document}
2
Much better than it was, thanks! I usedsbox{0}{b}
. Only a real neat-freak would complain now ;-)
– Joe Corneli
Jan 22 at 13:22
3
or evenmakebox[mywidth]{alph*}
so it looks like latex:-)
– David Carlisle
Jan 22 at 13:23
1
Don't forget the bracesbegin{enumerate}[label={(makebox[mywidth]{alph*})}]
otherwise the[
and]
confuse the argument parser.
– moewe
Jan 22 at 13:25
1
@moewe testing code? what sort of advice is that? :-)
– David Carlisle
Jan 22 at 13:28
1
@DavidCarlisle github.com/latex3/latex2e/commit/… ;-)
– Phelype Oleinik
Jan 22 at 13:32
|
show 4 more comments
You can pre-define a length, say, mylength
, and then use that to make a box of constant width with hbox tomylength{<stuff>}
. You can:
- center-align with
label=(hbox tomywidth{hssalph*hss})
- right-align with
label=(hbox tomywidth{hssalph*})
- and left-align with
label=(hbox tomywidth{alph*hss})
or, with a more LaTeX-y syntax: label={(makebox[mywidth][<align>]{alph*})}
where <align>
is either c
, r
, or l
.
documentclass{article}
usepackage{enumitem}
begin{document}
newdimenmywidth
sbox0{m}%
setlengthmywidth{wd0}%
begin{enumerate}[label={(makebox[mywidth][c]{alph*})}]
item
item
item
item
item
item
item
item
item
end{enumerate}
end{document}
2
Much better than it was, thanks! I usedsbox{0}{b}
. Only a real neat-freak would complain now ;-)
– Joe Corneli
Jan 22 at 13:22
3
or evenmakebox[mywidth]{alph*}
so it looks like latex:-)
– David Carlisle
Jan 22 at 13:23
1
Don't forget the bracesbegin{enumerate}[label={(makebox[mywidth]{alph*})}]
otherwise the[
and]
confuse the argument parser.
– moewe
Jan 22 at 13:25
1
@moewe testing code? what sort of advice is that? :-)
– David Carlisle
Jan 22 at 13:28
1
@DavidCarlisle github.com/latex3/latex2e/commit/… ;-)
– Phelype Oleinik
Jan 22 at 13:32
|
show 4 more comments
You can pre-define a length, say, mylength
, and then use that to make a box of constant width with hbox tomylength{<stuff>}
. You can:
- center-align with
label=(hbox tomywidth{hssalph*hss})
- right-align with
label=(hbox tomywidth{hssalph*})
- and left-align with
label=(hbox tomywidth{alph*hss})
or, with a more LaTeX-y syntax: label={(makebox[mywidth][<align>]{alph*})}
where <align>
is either c
, r
, or l
.
documentclass{article}
usepackage{enumitem}
begin{document}
newdimenmywidth
sbox0{m}%
setlengthmywidth{wd0}%
begin{enumerate}[label={(makebox[mywidth][c]{alph*})}]
item
item
item
item
item
item
item
item
item
end{enumerate}
end{document}
You can pre-define a length, say, mylength
, and then use that to make a box of constant width with hbox tomylength{<stuff>}
. You can:
- center-align with
label=(hbox tomywidth{hssalph*hss})
- right-align with
label=(hbox tomywidth{hssalph*})
- and left-align with
label=(hbox tomywidth{alph*hss})
or, with a more LaTeX-y syntax: label={(makebox[mywidth][<align>]{alph*})}
where <align>
is either c
, r
, or l
.
documentclass{article}
usepackage{enumitem}
begin{document}
newdimenmywidth
sbox0{m}%
setlengthmywidth{wd0}%
begin{enumerate}[label={(makebox[mywidth][c]{alph*})}]
item
item
item
item
item
item
item
item
item
end{enumerate}
end{document}
edited Jan 22 at 13:31
answered Jan 22 at 13:19
Phelype OleinikPhelype Oleinik
23.5k54586
23.5k54586
2
Much better than it was, thanks! I usedsbox{0}{b}
. Only a real neat-freak would complain now ;-)
– Joe Corneli
Jan 22 at 13:22
3
or evenmakebox[mywidth]{alph*}
so it looks like latex:-)
– David Carlisle
Jan 22 at 13:23
1
Don't forget the bracesbegin{enumerate}[label={(makebox[mywidth]{alph*})}]
otherwise the[
and]
confuse the argument parser.
– moewe
Jan 22 at 13:25
1
@moewe testing code? what sort of advice is that? :-)
– David Carlisle
Jan 22 at 13:28
1
@DavidCarlisle github.com/latex3/latex2e/commit/… ;-)
– Phelype Oleinik
Jan 22 at 13:32
|
show 4 more comments
2
Much better than it was, thanks! I usedsbox{0}{b}
. Only a real neat-freak would complain now ;-)
– Joe Corneli
Jan 22 at 13:22
3
or evenmakebox[mywidth]{alph*}
so it looks like latex:-)
– David Carlisle
Jan 22 at 13:23
1
Don't forget the bracesbegin{enumerate}[label={(makebox[mywidth]{alph*})}]
otherwise the[
and]
confuse the argument parser.
– moewe
Jan 22 at 13:25
1
@moewe testing code? what sort of advice is that? :-)
– David Carlisle
Jan 22 at 13:28
1
@DavidCarlisle github.com/latex3/latex2e/commit/… ;-)
– Phelype Oleinik
Jan 22 at 13:32
2
2
Much better than it was, thanks! I used
sbox{0}{b}
. Only a real neat-freak would complain now ;-)– Joe Corneli
Jan 22 at 13:22
Much better than it was, thanks! I used
sbox{0}{b}
. Only a real neat-freak would complain now ;-)– Joe Corneli
Jan 22 at 13:22
3
3
or even
makebox[mywidth]{alph*}
so it looks like latex:-)– David Carlisle
Jan 22 at 13:23
or even
makebox[mywidth]{alph*}
so it looks like latex:-)– David Carlisle
Jan 22 at 13:23
1
1
Don't forget the braces
begin{enumerate}[label={(makebox[mywidth]{alph*})}]
otherwise the [
and ]
confuse the argument parser.– moewe
Jan 22 at 13:25
Don't forget the braces
begin{enumerate}[label={(makebox[mywidth]{alph*})}]
otherwise the [
and ]
confuse the argument parser.– moewe
Jan 22 at 13:25
1
1
@moewe testing code? what sort of advice is that? :-)
– David Carlisle
Jan 22 at 13:28
@moewe testing code? what sort of advice is that? :-)
– David Carlisle
Jan 22 at 13:28
1
1
@DavidCarlisle github.com/latex3/latex2e/commit/… ;-)
– Phelype Oleinik
Jan 22 at 13:32
@DavidCarlisle github.com/latex3/latex2e/commit/… ;-)
– Phelype Oleinik
Jan 22 at 13:32
|
show 4 more comments
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.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f471273%2fwidth-of-alph-labels%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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