Manually create `enumerate`-labels
up vote
2
down vote
favorite
In the statement of a mathematical lemma, I have two similar statements that are supposed to make up statement a) and b) of the lemma. However, since I want to align the similarities properly, after some fiddling around with makemathbox
I have resorted to simply using alignedat
-environments. So my current code looks like this:
For all
$begin{alignedat}[t]{2}
t, t' & in c^+:text{with} & t & leq t'colon & ldots\
r, r' & in c^-:text{with} & r & leq r'colon & ldots
end{alignedat}$
Edit: This is how I got so far, which is almost what I want:
documentclass{scrartcl}
usepackage{amsthm,amsmath,mathtools}
usepackage[inline]{enumitem}
setlist[enumerate]{
label=textit{alph*}textup{)},
}
newtheorem{lemma}{Lemma}
begin{document}
newlengthmyleftmarginsetlengthmyleftmarginleftmargin
newlengthmyitemindentsetlengthmyitemindentitemindent
begin{lemma}For all
vspacepartopsep%
noindenthspacemyleftmargin%
begin{enumerate*}[mode=unboxed]%
$begin{alignedat}[t]{4}
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
t, t' & in c^+:text{with} & t & leq t'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
r, r' & in c^-:text{with} & r &leq r'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
mathmakebox[widthof{$r, r'$}][l]{mathrm{S}}
end{alignedat}$
end{enumerate*}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.qedhere
end{enumerate}
end{proof}
end{document}
which produces
However, if you zoom in, you'll notice that the labels in the statement and the enumeration in the proof are not perfectly aligned. Also, you'll notice that the capital "S" are not aligned. How to do this right?
enumerate itemize labels
add a comment |
up vote
2
down vote
favorite
In the statement of a mathematical lemma, I have two similar statements that are supposed to make up statement a) and b) of the lemma. However, since I want to align the similarities properly, after some fiddling around with makemathbox
I have resorted to simply using alignedat
-environments. So my current code looks like this:
For all
$begin{alignedat}[t]{2}
t, t' & in c^+:text{with} & t & leq t'colon & ldots\
r, r' & in c^-:text{with} & r & leq r'colon & ldots
end{alignedat}$
Edit: This is how I got so far, which is almost what I want:
documentclass{scrartcl}
usepackage{amsthm,amsmath,mathtools}
usepackage[inline]{enumitem}
setlist[enumerate]{
label=textit{alph*}textup{)},
}
newtheorem{lemma}{Lemma}
begin{document}
newlengthmyleftmarginsetlengthmyleftmarginleftmargin
newlengthmyitemindentsetlengthmyitemindentitemindent
begin{lemma}For all
vspacepartopsep%
noindenthspacemyleftmargin%
begin{enumerate*}[mode=unboxed]%
$begin{alignedat}[t]{4}
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
t, t' & in c^+:text{with} & t & leq t'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
r, r' & in c^-:text{with} & r &leq r'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
mathmakebox[widthof{$r, r'$}][l]{mathrm{S}}
end{alignedat}$
end{enumerate*}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.qedhere
end{enumerate}
end{proof}
end{document}
which produces
However, if you zoom in, you'll notice that the labels in the statement and the enumeration in the proof are not perfectly aligned. Also, you'll notice that the capital "S" are not aligned. How to do this right?
enumerate itemize labels
What'sim
for?
– egreg
yesterday
@egreg Removed everything not necessary for making clear what I want.
– Bubaya
yesterday
Now it is very different from the original. Please, roll back and add the definition forim
.
– egreg
yesterday
@Bubaya: What would help here is if you can draft up what you want the output to look like using some other application. Currently all you're stating is that "this is ugly", but that's subjective. Clearly define what you're after and we can work with that.
– Werner
yesterday
@Werner: The bottom code produces what is to be achieved. By "this is ugly", I mean that the TeX code (and not the output) is bad style since it is hard to maintain if I decide that enumerations in a lemma-environment should have a different appearance.
– Bubaya
17 hours ago
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
In the statement of a mathematical lemma, I have two similar statements that are supposed to make up statement a) and b) of the lemma. However, since I want to align the similarities properly, after some fiddling around with makemathbox
I have resorted to simply using alignedat
-environments. So my current code looks like this:
For all
$begin{alignedat}[t]{2}
t, t' & in c^+:text{with} & t & leq t'colon & ldots\
r, r' & in c^-:text{with} & r & leq r'colon & ldots
end{alignedat}$
Edit: This is how I got so far, which is almost what I want:
documentclass{scrartcl}
usepackage{amsthm,amsmath,mathtools}
usepackage[inline]{enumitem}
setlist[enumerate]{
label=textit{alph*}textup{)},
}
newtheorem{lemma}{Lemma}
begin{document}
newlengthmyleftmarginsetlengthmyleftmarginleftmargin
newlengthmyitemindentsetlengthmyitemindentitemindent
begin{lemma}For all
vspacepartopsep%
noindenthspacemyleftmargin%
begin{enumerate*}[mode=unboxed]%
$begin{alignedat}[t]{4}
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
t, t' & in c^+:text{with} & t & leq t'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
r, r' & in c^-:text{with} & r &leq r'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
mathmakebox[widthof{$r, r'$}][l]{mathrm{S}}
end{alignedat}$
end{enumerate*}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.qedhere
end{enumerate}
end{proof}
end{document}
which produces
However, if you zoom in, you'll notice that the labels in the statement and the enumeration in the proof are not perfectly aligned. Also, you'll notice that the capital "S" are not aligned. How to do this right?
enumerate itemize labels
In the statement of a mathematical lemma, I have two similar statements that are supposed to make up statement a) and b) of the lemma. However, since I want to align the similarities properly, after some fiddling around with makemathbox
I have resorted to simply using alignedat
-environments. So my current code looks like this:
For all
$begin{alignedat}[t]{2}
t, t' & in c^+:text{with} & t & leq t'colon & ldots\
r, r' & in c^-:text{with} & r & leq r'colon & ldots
end{alignedat}$
Edit: This is how I got so far, which is almost what I want:
documentclass{scrartcl}
usepackage{amsthm,amsmath,mathtools}
usepackage[inline]{enumitem}
setlist[enumerate]{
label=textit{alph*}textup{)},
}
newtheorem{lemma}{Lemma}
begin{document}
newlengthmyleftmarginsetlengthmyleftmarginleftmargin
newlengthmyitemindentsetlengthmyitemindentitemindent
begin{lemma}For all
vspacepartopsep%
noindenthspacemyleftmargin%
begin{enumerate*}[mode=unboxed]%
$begin{alignedat}[t]{4}
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
t, t' & in c^+:text{with} & t & leq t'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
r, r' & in c^-:text{with} & r &leq r'colon &
ldots
\[dimexpritemsep+parseprelax]%
%
makebox[myitemindent][r]{itemhspace{labelsep}}&&%
mathmakebox[widthof{$r, r'$}][l]{mathrm{S}}
end{alignedat}$
end{enumerate*}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.qedhere
end{enumerate}
end{proof}
end{document}
which produces
However, if you zoom in, you'll notice that the labels in the statement and the enumeration in the proof are not perfectly aligned. Also, you'll notice that the capital "S" are not aligned. How to do this right?
enumerate itemize labels
enumerate itemize labels
edited 14 hours ago
asked yesterday
Bubaya
32119
32119
What'sim
for?
– egreg
yesterday
@egreg Removed everything not necessary for making clear what I want.
– Bubaya
yesterday
Now it is very different from the original. Please, roll back and add the definition forim
.
– egreg
yesterday
@Bubaya: What would help here is if you can draft up what you want the output to look like using some other application. Currently all you're stating is that "this is ugly", but that's subjective. Clearly define what you're after and we can work with that.
– Werner
yesterday
@Werner: The bottom code produces what is to be achieved. By "this is ugly", I mean that the TeX code (and not the output) is bad style since it is hard to maintain if I decide that enumerations in a lemma-environment should have a different appearance.
– Bubaya
17 hours ago
add a comment |
What'sim
for?
– egreg
yesterday
@egreg Removed everything not necessary for making clear what I want.
– Bubaya
yesterday
Now it is very different from the original. Please, roll back and add the definition forim
.
– egreg
yesterday
@Bubaya: What would help here is if you can draft up what you want the output to look like using some other application. Currently all you're stating is that "this is ugly", but that's subjective. Clearly define what you're after and we can work with that.
– Werner
yesterday
@Werner: The bottom code produces what is to be achieved. By "this is ugly", I mean that the TeX code (and not the output) is bad style since it is hard to maintain if I decide that enumerations in a lemma-environment should have a different appearance.
– Bubaya
17 hours ago
What's
im
for?– egreg
yesterday
What's
im
for?– egreg
yesterday
@egreg Removed everything not necessary for making clear what I want.
– Bubaya
yesterday
@egreg Removed everything not necessary for making clear what I want.
– Bubaya
yesterday
Now it is very different from the original. Please, roll back and add the definition for
im
.– egreg
yesterday
Now it is very different from the original. Please, roll back and add the definition for
im
.– egreg
yesterday
@Bubaya: What would help here is if you can draft up what you want the output to look like using some other application. Currently all you're stating is that "this is ugly", but that's subjective. Clearly define what you're after and we can work with that.
– Werner
yesterday
@Bubaya: What would help here is if you can draft up what you want the output to look like using some other application. Currently all you're stating is that "this is ugly", but that's subjective. Clearly define what you're after and we can work with that.
– Werner
yesterday
@Werner: The bottom code produces what is to be achieved. By "this is ugly", I mean that the TeX code (and not the output) is bad style since it is hard to maintain if I decide that enumerations in a lemma-environment should have a different appearance.
– Bubaya
17 hours ago
@Werner: The bottom code produces what is to be achieved. By "this is ugly", I mean that the TeX code (and not the output) is bad style since it is hard to maintain if I decide that enumerations in a lemma-environment should have a different appearance.
– Bubaya
17 hours ago
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
I'll use the original code, with a mocked up definition for im
.
The alignment is possible, but the output is not really nice. The second realization is how I'd do it; I don't think that the alignment is helpful, but rather that it's distracting.
documentclass{article}
usepackage{amsmath}
usepackage{enumitem}
newtheorem{lemma}{Lemma}
newcommand{im}{I}
begin{document}
begin{lemma}
For all\[topsep]
$begin{alignedat}{4}
makebox[leftmargini][r]{upshape(a)hspace{labelsep}}
&& t,t' &in c^+ &text{ with } t &leq t'textup{: }
& V_{tt'}(im^pm_c V_t) &= im^pm_c V_{t'}textup{;}
\
makebox[labelwidth][r]{upshape(b)hspace{labelsep}}
&& r,r' &in c^- &text{ with } r &leq r'textup{: }
& V_{rr'}(im^pm_c V_t) &subseteq im^pm_c V_{t'}.
end{alignedat}$
end{lemma}
begin{lemma}mbox{}
begin{enumerate}[label=upshape(alph*)]
item For all $t,t'in c^+$ with $tleq t'$textup{:}
$V_{tt'}(im^pm_c V_t)=im^pm_c V_{t'}$textup{;}
item For all $r, r'in c^-$ with $rleq r'$textup{:}
$V_{rr'}(im^pm_c V_t)subseteq im^pm_c V_{t'}$.
end{enumerate}
end{lemma}
end{document}
Thanks for your code. However, the problem was not the alignment, but to produce the labels: What happens if I decide later that labels for enumerations should look different in the entire document?
– Bubaya
17 hours ago
@Bubaya A further reason for (1) defining withenumitem
features a type of enumeration to be used in statements; (2) avoiding those alignments, which may be good in math displays, but usually aren't for running text.
– egreg
17 hours ago
I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
– Bubaya
14 hours ago
add a comment |
up vote
0
down vote
Finally, I found a solution myself: obstructions for proper spacing were:
- That
theorem
-environments redefine all lengths involved in printing enumerations,
alignedat
introduces additional spacing.
The following code seems to do the correct thing, although I do not want why I need the additional length myspacewidth
:
documentclass{scrartcl}
usepackage{amsthm,amsmath}
usepackage{printlen,array}
usepackage[inline]{enumitem}
setlist[enumerate]{%
label=textit{alph*}textup{)}%
}
newtheorem{lemma}{Lemma}
newlengthmytopsepmytopseptopsep
newlengthmyleftmarginmyleftmarginleftmargin
newlengthmylabelsepmylabelseplabelsep
newlengthmyitemsepmyitemsepitemsep
newlengthmyparsepmyparsepparsep
newlengthmyspacewidth%
newenvironment{enumalign}[1]{%
par%
vspacemytopsep%
noindent%
letolditemitem%
settowidthmyspacewidth{{} {}}%
renewcommanditem{llap{strutolditemhspace{dimexprmylabelsep-myspacewidthrelax}}}%
newcommandnl{\[dimexprmyitemsep+myparseprelax]}%
begin{enumerate*}[mode=unboxed]$%
begin{array}{@{hspace{myleftmargin}}r@{}*{#1}{r@{}>{{}}l@{ }}}%
}{%
end{array}%
$end{enumerate*}%
}
begin{document}
begin{lemma}
For all
begin{enumalign}{3}
item &
t, t' & in c^+:text{with} &
t & leq t'colon &
a &= b
nl%
item & r, r' & in c^-:text{with} & r &leq r'colon &
end{enumalign}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.
end{enumerate}
end{proof}
end{document}
which yields
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
I'll use the original code, with a mocked up definition for im
.
The alignment is possible, but the output is not really nice. The second realization is how I'd do it; I don't think that the alignment is helpful, but rather that it's distracting.
documentclass{article}
usepackage{amsmath}
usepackage{enumitem}
newtheorem{lemma}{Lemma}
newcommand{im}{I}
begin{document}
begin{lemma}
For all\[topsep]
$begin{alignedat}{4}
makebox[leftmargini][r]{upshape(a)hspace{labelsep}}
&& t,t' &in c^+ &text{ with } t &leq t'textup{: }
& V_{tt'}(im^pm_c V_t) &= im^pm_c V_{t'}textup{;}
\
makebox[labelwidth][r]{upshape(b)hspace{labelsep}}
&& r,r' &in c^- &text{ with } r &leq r'textup{: }
& V_{rr'}(im^pm_c V_t) &subseteq im^pm_c V_{t'}.
end{alignedat}$
end{lemma}
begin{lemma}mbox{}
begin{enumerate}[label=upshape(alph*)]
item For all $t,t'in c^+$ with $tleq t'$textup{:}
$V_{tt'}(im^pm_c V_t)=im^pm_c V_{t'}$textup{;}
item For all $r, r'in c^-$ with $rleq r'$textup{:}
$V_{rr'}(im^pm_c V_t)subseteq im^pm_c V_{t'}$.
end{enumerate}
end{lemma}
end{document}
Thanks for your code. However, the problem was not the alignment, but to produce the labels: What happens if I decide later that labels for enumerations should look different in the entire document?
– Bubaya
17 hours ago
@Bubaya A further reason for (1) defining withenumitem
features a type of enumeration to be used in statements; (2) avoiding those alignments, which may be good in math displays, but usually aren't for running text.
– egreg
17 hours ago
I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
– Bubaya
14 hours ago
add a comment |
up vote
2
down vote
I'll use the original code, with a mocked up definition for im
.
The alignment is possible, but the output is not really nice. The second realization is how I'd do it; I don't think that the alignment is helpful, but rather that it's distracting.
documentclass{article}
usepackage{amsmath}
usepackage{enumitem}
newtheorem{lemma}{Lemma}
newcommand{im}{I}
begin{document}
begin{lemma}
For all\[topsep]
$begin{alignedat}{4}
makebox[leftmargini][r]{upshape(a)hspace{labelsep}}
&& t,t' &in c^+ &text{ with } t &leq t'textup{: }
& V_{tt'}(im^pm_c V_t) &= im^pm_c V_{t'}textup{;}
\
makebox[labelwidth][r]{upshape(b)hspace{labelsep}}
&& r,r' &in c^- &text{ with } r &leq r'textup{: }
& V_{rr'}(im^pm_c V_t) &subseteq im^pm_c V_{t'}.
end{alignedat}$
end{lemma}
begin{lemma}mbox{}
begin{enumerate}[label=upshape(alph*)]
item For all $t,t'in c^+$ with $tleq t'$textup{:}
$V_{tt'}(im^pm_c V_t)=im^pm_c V_{t'}$textup{;}
item For all $r, r'in c^-$ with $rleq r'$textup{:}
$V_{rr'}(im^pm_c V_t)subseteq im^pm_c V_{t'}$.
end{enumerate}
end{lemma}
end{document}
Thanks for your code. However, the problem was not the alignment, but to produce the labels: What happens if I decide later that labels for enumerations should look different in the entire document?
– Bubaya
17 hours ago
@Bubaya A further reason for (1) defining withenumitem
features a type of enumeration to be used in statements; (2) avoiding those alignments, which may be good in math displays, but usually aren't for running text.
– egreg
17 hours ago
I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
– Bubaya
14 hours ago
add a comment |
up vote
2
down vote
up vote
2
down vote
I'll use the original code, with a mocked up definition for im
.
The alignment is possible, but the output is not really nice. The second realization is how I'd do it; I don't think that the alignment is helpful, but rather that it's distracting.
documentclass{article}
usepackage{amsmath}
usepackage{enumitem}
newtheorem{lemma}{Lemma}
newcommand{im}{I}
begin{document}
begin{lemma}
For all\[topsep]
$begin{alignedat}{4}
makebox[leftmargini][r]{upshape(a)hspace{labelsep}}
&& t,t' &in c^+ &text{ with } t &leq t'textup{: }
& V_{tt'}(im^pm_c V_t) &= im^pm_c V_{t'}textup{;}
\
makebox[labelwidth][r]{upshape(b)hspace{labelsep}}
&& r,r' &in c^- &text{ with } r &leq r'textup{: }
& V_{rr'}(im^pm_c V_t) &subseteq im^pm_c V_{t'}.
end{alignedat}$
end{lemma}
begin{lemma}mbox{}
begin{enumerate}[label=upshape(alph*)]
item For all $t,t'in c^+$ with $tleq t'$textup{:}
$V_{tt'}(im^pm_c V_t)=im^pm_c V_{t'}$textup{;}
item For all $r, r'in c^-$ with $rleq r'$textup{:}
$V_{rr'}(im^pm_c V_t)subseteq im^pm_c V_{t'}$.
end{enumerate}
end{lemma}
end{document}
I'll use the original code, with a mocked up definition for im
.
The alignment is possible, but the output is not really nice. The second realization is how I'd do it; I don't think that the alignment is helpful, but rather that it's distracting.
documentclass{article}
usepackage{amsmath}
usepackage{enumitem}
newtheorem{lemma}{Lemma}
newcommand{im}{I}
begin{document}
begin{lemma}
For all\[topsep]
$begin{alignedat}{4}
makebox[leftmargini][r]{upshape(a)hspace{labelsep}}
&& t,t' &in c^+ &text{ with } t &leq t'textup{: }
& V_{tt'}(im^pm_c V_t) &= im^pm_c V_{t'}textup{;}
\
makebox[labelwidth][r]{upshape(b)hspace{labelsep}}
&& r,r' &in c^- &text{ with } r &leq r'textup{: }
& V_{rr'}(im^pm_c V_t) &subseteq im^pm_c V_{t'}.
end{alignedat}$
end{lemma}
begin{lemma}mbox{}
begin{enumerate}[label=upshape(alph*)]
item For all $t,t'in c^+$ with $tleq t'$textup{:}
$V_{tt'}(im^pm_c V_t)=im^pm_c V_{t'}$textup{;}
item For all $r, r'in c^-$ with $rleq r'$textup{:}
$V_{rr'}(im^pm_c V_t)subseteq im^pm_c V_{t'}$.
end{enumerate}
end{lemma}
end{document}
answered yesterday
egreg
699k8518593129
699k8518593129
Thanks for your code. However, the problem was not the alignment, but to produce the labels: What happens if I decide later that labels for enumerations should look different in the entire document?
– Bubaya
17 hours ago
@Bubaya A further reason for (1) defining withenumitem
features a type of enumeration to be used in statements; (2) avoiding those alignments, which may be good in math displays, but usually aren't for running text.
– egreg
17 hours ago
I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
– Bubaya
14 hours ago
add a comment |
Thanks for your code. However, the problem was not the alignment, but to produce the labels: What happens if I decide later that labels for enumerations should look different in the entire document?
– Bubaya
17 hours ago
@Bubaya A further reason for (1) defining withenumitem
features a type of enumeration to be used in statements; (2) avoiding those alignments, which may be good in math displays, but usually aren't for running text.
– egreg
17 hours ago
I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
– Bubaya
14 hours ago
Thanks for your code. However, the problem was not the alignment, but to produce the labels: What happens if I decide later that labels for enumerations should look different in the entire document?
– Bubaya
17 hours ago
Thanks for your code. However, the problem was not the alignment, but to produce the labels: What happens if I decide later that labels for enumerations should look different in the entire document?
– Bubaya
17 hours ago
@Bubaya A further reason for (1) defining with
enumitem
features a type of enumeration to be used in statements; (2) avoiding those alignments, which may be good in math displays, but usually aren't for running text.– egreg
17 hours ago
@Bubaya A further reason for (1) defining with
enumitem
features a type of enumeration to be used in statements; (2) avoiding those alignments, which may be good in math displays, but usually aren't for running text.– egreg
17 hours ago
I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
– Bubaya
14 hours ago
I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
– Bubaya
14 hours ago
add a comment |
up vote
0
down vote
Finally, I found a solution myself: obstructions for proper spacing were:
- That
theorem
-environments redefine all lengths involved in printing enumerations,
alignedat
introduces additional spacing.
The following code seems to do the correct thing, although I do not want why I need the additional length myspacewidth
:
documentclass{scrartcl}
usepackage{amsthm,amsmath}
usepackage{printlen,array}
usepackage[inline]{enumitem}
setlist[enumerate]{%
label=textit{alph*}textup{)}%
}
newtheorem{lemma}{Lemma}
newlengthmytopsepmytopseptopsep
newlengthmyleftmarginmyleftmarginleftmargin
newlengthmylabelsepmylabelseplabelsep
newlengthmyitemsepmyitemsepitemsep
newlengthmyparsepmyparsepparsep
newlengthmyspacewidth%
newenvironment{enumalign}[1]{%
par%
vspacemytopsep%
noindent%
letolditemitem%
settowidthmyspacewidth{{} {}}%
renewcommanditem{llap{strutolditemhspace{dimexprmylabelsep-myspacewidthrelax}}}%
newcommandnl{\[dimexprmyitemsep+myparseprelax]}%
begin{enumerate*}[mode=unboxed]$%
begin{array}{@{hspace{myleftmargin}}r@{}*{#1}{r@{}>{{}}l@{ }}}%
}{%
end{array}%
$end{enumerate*}%
}
begin{document}
begin{lemma}
For all
begin{enumalign}{3}
item &
t, t' & in c^+:text{with} &
t & leq t'colon &
a &= b
nl%
item & r, r' & in c^-:text{with} & r &leq r'colon &
end{enumalign}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.
end{enumerate}
end{proof}
end{document}
which yields
add a comment |
up vote
0
down vote
Finally, I found a solution myself: obstructions for proper spacing were:
- That
theorem
-environments redefine all lengths involved in printing enumerations,
alignedat
introduces additional spacing.
The following code seems to do the correct thing, although I do not want why I need the additional length myspacewidth
:
documentclass{scrartcl}
usepackage{amsthm,amsmath}
usepackage{printlen,array}
usepackage[inline]{enumitem}
setlist[enumerate]{%
label=textit{alph*}textup{)}%
}
newtheorem{lemma}{Lemma}
newlengthmytopsepmytopseptopsep
newlengthmyleftmarginmyleftmarginleftmargin
newlengthmylabelsepmylabelseplabelsep
newlengthmyitemsepmyitemsepitemsep
newlengthmyparsepmyparsepparsep
newlengthmyspacewidth%
newenvironment{enumalign}[1]{%
par%
vspacemytopsep%
noindent%
letolditemitem%
settowidthmyspacewidth{{} {}}%
renewcommanditem{llap{strutolditemhspace{dimexprmylabelsep-myspacewidthrelax}}}%
newcommandnl{\[dimexprmyitemsep+myparseprelax]}%
begin{enumerate*}[mode=unboxed]$%
begin{array}{@{hspace{myleftmargin}}r@{}*{#1}{r@{}>{{}}l@{ }}}%
}{%
end{array}%
$end{enumerate*}%
}
begin{document}
begin{lemma}
For all
begin{enumalign}{3}
item &
t, t' & in c^+:text{with} &
t & leq t'colon &
a &= b
nl%
item & r, r' & in c^-:text{with} & r &leq r'colon &
end{enumalign}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.
end{enumerate}
end{proof}
end{document}
which yields
add a comment |
up vote
0
down vote
up vote
0
down vote
Finally, I found a solution myself: obstructions for proper spacing were:
- That
theorem
-environments redefine all lengths involved in printing enumerations,
alignedat
introduces additional spacing.
The following code seems to do the correct thing, although I do not want why I need the additional length myspacewidth
:
documentclass{scrartcl}
usepackage{amsthm,amsmath}
usepackage{printlen,array}
usepackage[inline]{enumitem}
setlist[enumerate]{%
label=textit{alph*}textup{)}%
}
newtheorem{lemma}{Lemma}
newlengthmytopsepmytopseptopsep
newlengthmyleftmarginmyleftmarginleftmargin
newlengthmylabelsepmylabelseplabelsep
newlengthmyitemsepmyitemsepitemsep
newlengthmyparsepmyparsepparsep
newlengthmyspacewidth%
newenvironment{enumalign}[1]{%
par%
vspacemytopsep%
noindent%
letolditemitem%
settowidthmyspacewidth{{} {}}%
renewcommanditem{llap{strutolditemhspace{dimexprmylabelsep-myspacewidthrelax}}}%
newcommandnl{\[dimexprmyitemsep+myparseprelax]}%
begin{enumerate*}[mode=unboxed]$%
begin{array}{@{hspace{myleftmargin}}r@{}*{#1}{r@{}>{{}}l@{ }}}%
}{%
end{array}%
$end{enumerate*}%
}
begin{document}
begin{lemma}
For all
begin{enumalign}{3}
item &
t, t' & in c^+:text{with} &
t & leq t'colon &
a &= b
nl%
item & r, r' & in c^-:text{with} & r &leq r'colon &
end{enumalign}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.
end{enumerate}
end{proof}
end{document}
which yields
Finally, I found a solution myself: obstructions for proper spacing were:
- That
theorem
-environments redefine all lengths involved in printing enumerations,
alignedat
introduces additional spacing.
The following code seems to do the correct thing, although I do not want why I need the additional length myspacewidth
:
documentclass{scrartcl}
usepackage{amsthm,amsmath}
usepackage{printlen,array}
usepackage[inline]{enumitem}
setlist[enumerate]{%
label=textit{alph*}textup{)}%
}
newtheorem{lemma}{Lemma}
newlengthmytopsepmytopseptopsep
newlengthmyleftmarginmyleftmarginleftmargin
newlengthmylabelsepmylabelseplabelsep
newlengthmyitemsepmyitemsepitemsep
newlengthmyparsepmyparsepparsep
newlengthmyspacewidth%
newenvironment{enumalign}[1]{%
par%
vspacemytopsep%
noindent%
letolditemitem%
settowidthmyspacewidth{{} {}}%
renewcommanditem{llap{strutolditemhspace{dimexprmylabelsep-myspacewidthrelax}}}%
newcommandnl{\[dimexprmyitemsep+myparseprelax]}%
begin{enumerate*}[mode=unboxed]$%
begin{array}{@{hspace{myleftmargin}}r@{}*{#1}{r@{}>{{}}l@{ }}}%
}{%
end{array}%
$end{enumerate*}%
}
begin{document}
begin{lemma}
For all
begin{enumalign}{3}
item &
t, t' & in c^+:text{with} &
t & leq t'colon &
a &= b
nl%
item & r, r' & in c^-:text{with} & r &leq r'colon &
end{enumalign}
end{lemma}
begin{proof}strut
begin{enumerate}
item Some argument;
item Some argument.
end{enumerate}
end{proof}
end{document}
which yields
answered 11 hours ago
Bubaya
32119
32119
add a comment |
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461306%2fmanually-create-enumerate-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
What's
im
for?– egreg
yesterday
@egreg Removed everything not necessary for making clear what I want.
– Bubaya
yesterday
Now it is very different from the original. Please, roll back and add the definition for
im
.– egreg
yesterday
@Bubaya: What would help here is if you can draft up what you want the output to look like using some other application. Currently all you're stating is that "this is ugly", but that's subjective. Clearly define what you're after and we can work with that.
– Werner
yesterday
@Werner: The bottom code produces what is to be achieved. By "this is ugly", I mean that the TeX code (and not the output) is bad style since it is hard to maintain if I decide that enumerations in a lemma-environment should have a different appearance.
– Bubaya
17 hours ago