Is there any way to define the enumerate label in general?

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











up vote
2
down vote

favorite
1












If I define numberenum like following,



newenvironmentnumberenum
renewcommandlabelenumi(arabicenumi)
renewcommandlabelenumii(arabicenumi.arabicenumii)
renewcommandlabelenumiii(arabicenumi.arabicenumii.arabicenumiii)
beginenumerate
endenumerate

beginnumberenum
item depth 1
beginenumerate
item depth 2
beginenumerate
item depth 3
endenumerate
endenumerate
endnumberenum


result of code 1



Then I can get the result like above.
However, after depth 4, this code doesn't work. It's easy to redefine labelenumiv, but the point is generating the label keeping this pattern until the depth limit of enumerate list.



custom labels for enumerate beyond level 4



This article solved a similar problem using label* method. But my case is more tricky because of brackets. Is there any way to define numberenum properly?










share|improve this question









New contributor




Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • enumitem does not provide a native way of wrapping labels.
    – Werner
    2 hours ago














up vote
2
down vote

favorite
1












If I define numberenum like following,



newenvironmentnumberenum
renewcommandlabelenumi(arabicenumi)
renewcommandlabelenumii(arabicenumi.arabicenumii)
renewcommandlabelenumiii(arabicenumi.arabicenumii.arabicenumiii)
beginenumerate
endenumerate

beginnumberenum
item depth 1
beginenumerate
item depth 2
beginenumerate
item depth 3
endenumerate
endenumerate
endnumberenum


result of code 1



Then I can get the result like above.
However, after depth 4, this code doesn't work. It's easy to redefine labelenumiv, but the point is generating the label keeping this pattern until the depth limit of enumerate list.



custom labels for enumerate beyond level 4



This article solved a similar problem using label* method. But my case is more tricky because of brackets. Is there any way to define numberenum properly?










share|improve this question









New contributor




Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • enumitem does not provide a native way of wrapping labels.
    – Werner
    2 hours ago












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





If I define numberenum like following,



newenvironmentnumberenum
renewcommandlabelenumi(arabicenumi)
renewcommandlabelenumii(arabicenumi.arabicenumii)
renewcommandlabelenumiii(arabicenumi.arabicenumii.arabicenumiii)
beginenumerate
endenumerate

beginnumberenum
item depth 1
beginenumerate
item depth 2
beginenumerate
item depth 3
endenumerate
endenumerate
endnumberenum


result of code 1



Then I can get the result like above.
However, after depth 4, this code doesn't work. It's easy to redefine labelenumiv, but the point is generating the label keeping this pattern until the depth limit of enumerate list.



custom labels for enumerate beyond level 4



This article solved a similar problem using label* method. But my case is more tricky because of brackets. Is there any way to define numberenum properly?










share|improve this question









New contributor




Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











If I define numberenum like following,



newenvironmentnumberenum
renewcommandlabelenumi(arabicenumi)
renewcommandlabelenumii(arabicenumi.arabicenumii)
renewcommandlabelenumiii(arabicenumi.arabicenumii.arabicenumiii)
beginenumerate
endenumerate

beginnumberenum
item depth 1
beginenumerate
item depth 2
beginenumerate
item depth 3
endenumerate
endenumerate
endnumberenum


result of code 1



Then I can get the result like above.
However, after depth 4, this code doesn't work. It's easy to redefine labelenumiv, but the point is generating the label keeping this pattern until the depth limit of enumerate list.



custom labels for enumerate beyond level 4



This article solved a similar problem using label* method. But my case is more tricky because of brackets. Is there any way to define numberenum properly?







enumerate labels






share|improve this question









New contributor




Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 5 hours ago





















New contributor




Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









Youngseok Choe

114




114




New contributor




Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Youngseok Choe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • enumitem does not provide a native way of wrapping labels.
    – Werner
    2 hours ago
















  • enumitem does not provide a native way of wrapping labels.
    – Werner
    2 hours ago















enumitem does not provide a native way of wrapping labels.
– Werner
2 hours ago




enumitem does not provide a native way of wrapping labels.
– Werner
2 hours ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote













EDIT: Ahem. I just realised that there is a way simpler method to accomplish the same thing...



The enumitem package has a format key, which is normally used to set the font of the items labels (the font key is an alias for it). The formatted label will look like <format><label>, where <format> is the value of the format key and <label> is the value of the label key.



You can define a macro that wraps its argument in parentheses and use that for the format key, like this: (I made the labels bold to show that this is still possible, but you can't swap bfseries and parenthesize.)



documentclassarticle

usepackageenumitem

renewlistenumerateenumerate10 %% <- set the max depth to 10
newcommand*parenthesize[1](#1)
setlist[enumerate]label*=.arabic*,format=bfseriesparenthesize,leftmargin=2em
setlist[enumerate,1]label=arabic* %% <- set the base level label separately

begindocument

beginenumerate
item this is level 1
item this is still level 1
beginenumerate
item this is level 2
item this is still level 2
beginenumerate
item this is level 3
item this is still level 3
beginenumerate
item this is level 4
item this is still level 4
beginenumerate
item this is level 5 labeldeepitem
item this is still level 5
endenumerate
endenumerate
endenumerate
endenumerate
endenumerate

This is a reference to second-to-last item: refdeepitem.

enddocument


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



    );






    Youngseok Choe is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458743%2fis-there-any-way-to-define-the-enumerate-label-in-general%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













    EDIT: Ahem. I just realised that there is a way simpler method to accomplish the same thing...



    The enumitem package has a format key, which is normally used to set the font of the items labels (the font key is an alias for it). The formatted label will look like <format><label>, where <format> is the value of the format key and <label> is the value of the label key.



    You can define a macro that wraps its argument in parentheses and use that for the format key, like this: (I made the labels bold to show that this is still possible, but you can't swap bfseries and parenthesize.)



    documentclassarticle

    usepackageenumitem

    renewlistenumerateenumerate10 %% <- set the max depth to 10
    newcommand*parenthesize[1](#1)
    setlist[enumerate]label*=.arabic*,format=bfseriesparenthesize,leftmargin=2em
    setlist[enumerate,1]label=arabic* %% <- set the base level label separately

    begindocument

    beginenumerate
    item this is level 1
    item this is still level 1
    beginenumerate
    item this is level 2
    item this is still level 2
    beginenumerate
    item this is level 3
    item this is still level 3
    beginenumerate
    item this is level 4
    item this is still level 4
    beginenumerate
    item this is level 5 labeldeepitem
    item this is still level 5
    endenumerate
    endenumerate
    endenumerate
    endenumerate
    endenumerate

    This is a reference to second-to-last item: refdeepitem.

    enddocument


    enter image description here






    share|improve this answer


























      up vote
      3
      down vote













      EDIT: Ahem. I just realised that there is a way simpler method to accomplish the same thing...



      The enumitem package has a format key, which is normally used to set the font of the items labels (the font key is an alias for it). The formatted label will look like <format><label>, where <format> is the value of the format key and <label> is the value of the label key.



      You can define a macro that wraps its argument in parentheses and use that for the format key, like this: (I made the labels bold to show that this is still possible, but you can't swap bfseries and parenthesize.)



      documentclassarticle

      usepackageenumitem

      renewlistenumerateenumerate10 %% <- set the max depth to 10
      newcommand*parenthesize[1](#1)
      setlist[enumerate]label*=.arabic*,format=bfseriesparenthesize,leftmargin=2em
      setlist[enumerate,1]label=arabic* %% <- set the base level label separately

      begindocument

      beginenumerate
      item this is level 1
      item this is still level 1
      beginenumerate
      item this is level 2
      item this is still level 2
      beginenumerate
      item this is level 3
      item this is still level 3
      beginenumerate
      item this is level 4
      item this is still level 4
      beginenumerate
      item this is level 5 labeldeepitem
      item this is still level 5
      endenumerate
      endenumerate
      endenumerate
      endenumerate
      endenumerate

      This is a reference to second-to-last item: refdeepitem.

      enddocument


      enter image description here






      share|improve this answer
























        up vote
        3
        down vote










        up vote
        3
        down vote









        EDIT: Ahem. I just realised that there is a way simpler method to accomplish the same thing...



        The enumitem package has a format key, which is normally used to set the font of the items labels (the font key is an alias for it). The formatted label will look like <format><label>, where <format> is the value of the format key and <label> is the value of the label key.



        You can define a macro that wraps its argument in parentheses and use that for the format key, like this: (I made the labels bold to show that this is still possible, but you can't swap bfseries and parenthesize.)



        documentclassarticle

        usepackageenumitem

        renewlistenumerateenumerate10 %% <- set the max depth to 10
        newcommand*parenthesize[1](#1)
        setlist[enumerate]label*=.arabic*,format=bfseriesparenthesize,leftmargin=2em
        setlist[enumerate,1]label=arabic* %% <- set the base level label separately

        begindocument

        beginenumerate
        item this is level 1
        item this is still level 1
        beginenumerate
        item this is level 2
        item this is still level 2
        beginenumerate
        item this is level 3
        item this is still level 3
        beginenumerate
        item this is level 4
        item this is still level 4
        beginenumerate
        item this is level 5 labeldeepitem
        item this is still level 5
        endenumerate
        endenumerate
        endenumerate
        endenumerate
        endenumerate

        This is a reference to second-to-last item: refdeepitem.

        enddocument


        enter image description here






        share|improve this answer














        EDIT: Ahem. I just realised that there is a way simpler method to accomplish the same thing...



        The enumitem package has a format key, which is normally used to set the font of the items labels (the font key is an alias for it). The formatted label will look like <format><label>, where <format> is the value of the format key and <label> is the value of the label key.



        You can define a macro that wraps its argument in parentheses and use that for the format key, like this: (I made the labels bold to show that this is still possible, but you can't swap bfseries and parenthesize.)



        documentclassarticle

        usepackageenumitem

        renewlistenumerateenumerate10 %% <- set the max depth to 10
        newcommand*parenthesize[1](#1)
        setlist[enumerate]label*=.arabic*,format=bfseriesparenthesize,leftmargin=2em
        setlist[enumerate,1]label=arabic* %% <- set the base level label separately

        begindocument

        beginenumerate
        item this is level 1
        item this is still level 1
        beginenumerate
        item this is level 2
        item this is still level 2
        beginenumerate
        item this is level 3
        item this is still level 3
        beginenumerate
        item this is level 4
        item this is still level 4
        beginenumerate
        item this is level 5 labeldeepitem
        item this is still level 5
        endenumerate
        endenumerate
        endenumerate
        endenumerate
        endenumerate

        This is a reference to second-to-last item: refdeepitem.

        enddocument


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 18 mins ago

























        answered 2 hours ago









        Circumscribe

        2,348323




        2,348323




















            Youngseok Choe is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            Youngseok Choe is a new contributor. Be nice, and check out our Code of Conduct.












            Youngseok Choe is a new contributor. Be nice, and check out our Code of Conduct.











            Youngseok Choe is a new contributor. Be nice, and check out our Code of Conduct.













             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458743%2fis-there-any-way-to-define-the-enumerate-label-in-general%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