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



Output of the above code



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?










share|improve this question
























  • 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















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



Output of the above code



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?










share|improve this question
























  • 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













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



Output of the above code



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?










share|improve this question















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



Output of the above code



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 14 hours ago

























asked yesterday









Bubaya

32119




32119












  • 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


















  • 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
















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










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}


enter image description here






share|improve this answer





















  • 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










  • I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
    – Bubaya
    14 hours ago


















up vote
0
down vote













Finally, I found a solution myself: obstructions for proper spacing were:




  1. That theorem-environments redefine all lengths involved in printing enumerations,


  2. 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



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',
    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%2f461306%2fmanually-create-enumerate-labels%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








    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}


    enter image description here






    share|improve this answer





















    • 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










    • I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
      – Bubaya
      14 hours ago















    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}


    enter image description here






    share|improve this answer





















    • 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










    • I have improved my own attempt, but I'am afraid that I'm unable to get the spacing right.
      – Bubaya
      14 hours ago













    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}


    enter image description here






    share|improve this answer












    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}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    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 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


















    • 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










    • 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










    up vote
    0
    down vote













    Finally, I found a solution myself: obstructions for proper spacing were:




    1. That theorem-environments redefine all lengths involved in printing enumerations,


    2. 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



    enter image description here






    share|improve this answer

























      up vote
      0
      down vote













      Finally, I found a solution myself: obstructions for proper spacing were:




      1. That theorem-environments redefine all lengths involved in printing enumerations,


      2. 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



      enter image description here






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Finally, I found a solution myself: obstructions for proper spacing were:




        1. That theorem-environments redefine all lengths involved in printing enumerations,


        2. 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



        enter image description here






        share|improve this answer












        Finally, I found a solution myself: obstructions for proper spacing were:




        1. That theorem-environments redefine all lengths involved in printing enumerations,


        2. 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



        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 11 hours ago









        Bubaya

        32119




        32119






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            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





















































            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

            サソリ

            広島県道265号伴広島線

            Accessing regular linux commands in Huawei's Dopra Linux