Unary EnumerationHow do I change the `enumerate` list format to use letters instead of the default Arabic numerals?How can you make custom counter display types?Custom numbering style using the number of Symbols instead of NumbersHow to continue an enumeration?Custom EnumerationNested enumeration numberingHow to change the numbering style for enumeration and sub-enumerationHow to let enumeration start at (0) automatically?New enumerationExercise enumerationEnumeration on one lineRelated enumeration inside another enumerate environmentFancy enumeration

Way of refund if scammed?

What does it mean when みたいな is at the end of a sentence?

Illustrating that universal optimality is stronger than sphere packing

Existence of a model of ZFC in which the natural numbers are really the natural numbers

Writing "hahaha" versus describing the laugh

Surface of the 3x3x3 cube as a graph

nginx conf: http2 module not working in Chrome in ubuntu 18.04

Can someone get a spouse off a deed that never lived together and was incarcerated?

What is the required burn to keep a satellite at a Lagrangian point?

How do I write real-world stories separate from my country of origin?

Nunc est bibendum: gerund or gerundive?

Why do testers need root cause analysis?

DeleteCases using two lists but with partial match?

Why is this python script running in background consuming 100 % CPU?

Department head said that group project may be rejected. How to mitigate?

Why is Ni[(PPh₃)₂Cl₂] tetrahedral?

How does the Earth's center produce heat?

Is it OK to look at the list of played moves during the game to determine the status of the 50 move rule?

What does it mean for something to be strictly less than epsilon for an arbitrary epsilon?

Team member is vehemently against code formatting

How would a physicist explain this starship engine?

Why is the reciprocal used in fraction division?

Has the wall been repaired?

How to safely discharge oneself



Unary Enumeration


How do I change the `enumerate` list format to use letters instead of the default Arabic numerals?How can you make custom counter display types?Custom numbering style using the number of Symbols instead of NumbersHow to continue an enumeration?Custom EnumerationNested enumeration numberingHow to change the numbering style for enumeration and sub-enumerationHow to let enumeration start at (0) automatically?New enumerationExercise enumerationEnumeration on one lineRelated enumeration inside another enumerate environmentFancy enumeration













5















I would like to have an enumerate list, with the numbers expressed in unary. That is, "1" would be represented as , "3" as •••, and "8" as •••••|•••.



I'm able to print the dots already, and that's working fine:



newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style


However, I have no idea how to make enumerate use this. Based on this answer, I tried redefining theenumi:



renewcommandtheenumixdotsarabicenumi


But this went badly wrong:



! Illegal parameter number in definition of @currentlabel.
<to be read again>
1
l.376 ^^Iitem My text here ...
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.


How can I apply my unary-printing code to the enumerate label?



EDIT: Based on this answer, I tried this:



newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax


And it seems to work! As in, this produces the correct output:



newcountertest
setcountertest8
unarytest


However, the MWE still throws a bunch of errors.



MWE follows:



documentclassarticle

usepackageforloop
usepackagetipa
usepackage[T1]fontenc

newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

makeatletter
newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax
makeatother

%renewcommandtheenumiunaryenumi % This crashes and burns

begindocument

Unary works normally: xdots1, xdots3, xdots8.

It even works with a counter.

newcountertest
setcountertest8
unarytest

But in a list:

beginenumerate
item My text here my text here
item More text more text
item Even more text
endenumerate

enddocument









share|improve this question
























  • Are you aware of this question?

    – marmot
    1 hour ago











  • @marmot I was not, but it seems to offer good solutions!

    – Draconis
    1 hour ago















5















I would like to have an enumerate list, with the numbers expressed in unary. That is, "1" would be represented as , "3" as •••, and "8" as •••••|•••.



I'm able to print the dots already, and that's working fine:



newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style


However, I have no idea how to make enumerate use this. Based on this answer, I tried redefining theenumi:



renewcommandtheenumixdotsarabicenumi


But this went badly wrong:



! Illegal parameter number in definition of @currentlabel.
<to be read again>
1
l.376 ^^Iitem My text here ...
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.


How can I apply my unary-printing code to the enumerate label?



EDIT: Based on this answer, I tried this:



newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax


And it seems to work! As in, this produces the correct output:



newcountertest
setcountertest8
unarytest


However, the MWE still throws a bunch of errors.



MWE follows:



documentclassarticle

usepackageforloop
usepackagetipa
usepackage[T1]fontenc

newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

makeatletter
newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax
makeatother

%renewcommandtheenumiunaryenumi % This crashes and burns

begindocument

Unary works normally: xdots1, xdots3, xdots8.

It even works with a counter.

newcountertest
setcountertest8
unarytest

But in a list:

beginenumerate
item My text here my text here
item More text more text
item Even more text
endenumerate

enddocument









share|improve this question
























  • Are you aware of this question?

    – marmot
    1 hour ago











  • @marmot I was not, but it seems to offer good solutions!

    – Draconis
    1 hour ago













5












5








5








I would like to have an enumerate list, with the numbers expressed in unary. That is, "1" would be represented as , "3" as •••, and "8" as •••••|•••.



I'm able to print the dots already, and that's working fine:



newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style


However, I have no idea how to make enumerate use this. Based on this answer, I tried redefining theenumi:



renewcommandtheenumixdotsarabicenumi


But this went badly wrong:



! Illegal parameter number in definition of @currentlabel.
<to be read again>
1
l.376 ^^Iitem My text here ...
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.


How can I apply my unary-printing code to the enumerate label?



EDIT: Based on this answer, I tried this:



newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax


And it seems to work! As in, this produces the correct output:



newcountertest
setcountertest8
unarytest


However, the MWE still throws a bunch of errors.



MWE follows:



documentclassarticle

usepackageforloop
usepackagetipa
usepackage[T1]fontenc

newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

makeatletter
newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax
makeatother

%renewcommandtheenumiunaryenumi % This crashes and burns

begindocument

Unary works normally: xdots1, xdots3, xdots8.

It even works with a counter.

newcountertest
setcountertest8
unarytest

But in a list:

beginenumerate
item My text here my text here
item More text more text
item Even more text
endenumerate

enddocument









share|improve this question
















I would like to have an enumerate list, with the numbers expressed in unary. That is, "1" would be represented as , "3" as •••, and "8" as •••••|•••.



I'm able to print the dots already, and that's working fine:



newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style


However, I have no idea how to make enumerate use this. Based on this answer, I tried redefining theenumi:



renewcommandtheenumixdotsarabicenumi


But this went badly wrong:



! Illegal parameter number in definition of @currentlabel.
<to be read again>
1
l.376 ^^Iitem My text here ...
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.


How can I apply my unary-printing code to the enumerate label?



EDIT: Based on this answer, I tried this:



newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax


And it seems to work! As in, this produces the correct output:



newcountertest
setcountertest8
unarytest


However, the MWE still throws a bunch of errors.



MWE follows:



documentclassarticle

usepackageforloop
usepackagetipa
usepackage[T1]fontenc

newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

makeatletter
newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax
makeatother

%renewcommandtheenumiunaryenumi % This crashes and burns

begindocument

Unary works normally: xdots1, xdots3, xdots8.

It even works with a counter.

newcountertest
setcountertest8
unarytest

But in a list:

beginenumerate
item My text here my text here
item More text more text
item Even more text
endenumerate

enddocument






numbering lists enumerate






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago







Draconis

















asked 2 hours ago









DraconisDraconis

2046




2046












  • Are you aware of this question?

    – marmot
    1 hour ago











  • @marmot I was not, but it seems to offer good solutions!

    – Draconis
    1 hour ago

















  • Are you aware of this question?

    – marmot
    1 hour ago











  • @marmot I was not, but it seems to offer good solutions!

    – Draconis
    1 hour ago
















Are you aware of this question?

– marmot
1 hour ago





Are you aware of this question?

– marmot
1 hour ago













@marmot I was not, but it seems to offer good solutions!

– Draconis
1 hour ago





@marmot I was not, but it seems to offer good solutions!

– Draconis
1 hour ago










2 Answers
2






active

oldest

votes


















5














The enumitem package is your friend. You can define a new list style, which I have called unerate, and then make this list style use your unary code. To achieve this it is enough to add the following lines to your code:



letrealItemitem
newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
usepackageenumitem
newlistunerateenumerate1
setlist[unerate]label=alph*, before=letitemunerateItem


So this redefines item to be unerateItem and this, in turn, uses the "real" item with unary applied to the list environment counter, which is called uneratei. With this in place, the code



beginunerate
item My text here my text here
item More text more text
item Even more text
item Even more text
item Even more text
item Even more text
item Even more text
item Even more text
endunerate


produces:



enter image description here



Here is the full code:



documentclassarticle

usepackageforloop
usepackagetipa
usepackage[T1]fontenc

newcommandxxdottextbullet % The dot character to use
newcounterloopcntr % A one-off counter for forloop

newcommandxxdots[1]% Print #1 dots in a row
ifthenelse#1>5% If there are more than five, break them into groups
xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
% Otherwise, just print that many dots
forlooploopcntr0valueloopcntr<#1xxdot%
%

newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

makeatletter
newcommand*unary[1]expandafter@unarycsname c@#1endcsname
newcommand*@unary[1]xdotsthenumexpr#1relax
makeatother

letrealItemitem
newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
usepackageenumitem
newlistunerateenumerate1
setlist[unerate]label=alph*, before=letitemunerateItem

begindocument

beginunerate
item My text here my text here
item More text more text
item Even more text
item Even more text
item Even more text
item Even more text
item Even more text
item Even more text
endunerate

enddocument


You can now use enumitem to style these environments to your heart's content.



The code above will not let you nest unerate environments. If this is required let me know and I will update it - it's not difficult, but requires a little extra work.






share|improve this answer

























  • Perfect! I'll wait a bit longer before accepting, but this seems to fulfill my needs perfectly. (As you surmised, I won't need to nest these environments.)

    – Draconis
    1 hour ago











  • Actually, one thing to note: this does not work if the hyperref package is included first. It works fine if hyperref is included later, though.

    – Draconis
    47 mins ago











  • @DraconisAccording to its manual, you should always load hyperref last :)

    – Andrew
    25 mins ago



















5














I recycled this code and slightly extended it to get



documentclassarticle
usepackagepgffor
newcommandnbullets[2][textbullet]%
foreach X [evaluate=X as Y using int(mod(X,5))]in 1,...,#2
ifnumX>1%
ifnumY=1%
$vert$fi%
fi%
#1
begindocument
renewcommandlabelenuminbulletsvalueenumi
beginenumerate
item first
item second
item third
item fourth
item fifth
item sixth
item seventh
item last
endenumerate

Nestable:
renewcommandlabelenumiinbullets[*]valueenumii
beginenumerate
item first
item second
beginenumerate
item a
item b
item c
item d
item e
item f
endenumerate
item third
item fourth
item fifth
item sixth
item seventh
item last
endenumerate
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',
    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f491681%2funary-enumeration%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









    5














    The enumitem package is your friend. You can define a new list style, which I have called unerate, and then make this list style use your unary code. To achieve this it is enough to add the following lines to your code:



    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem


    So this redefines item to be unerateItem and this, in turn, uses the "real" item with unary applied to the list environment counter, which is called uneratei. With this in place, the code



    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate


    produces:



    enter image description here



    Here is the full code:



    documentclassarticle

    usepackageforloop
    usepackagetipa
    usepackage[T1]fontenc

    newcommandxxdottextbullet % The dot character to use
    newcounterloopcntr % A one-off counter for forloop

    newcommandxxdots[1]% Print #1 dots in a row
    ifthenelse#1>5% If there are more than five, break them into groups
    xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
    % Otherwise, just print that many dots
    forlooploopcntr0valueloopcntr<#1xxdot%
    %

    newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

    makeatletter
    newcommand*unary[1]expandafter@unarycsname c@#1endcsname
    newcommand*@unary[1]xdotsthenumexpr#1relax
    makeatother

    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem

    begindocument

    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate

    enddocument


    You can now use enumitem to style these environments to your heart's content.



    The code above will not let you nest unerate environments. If this is required let me know and I will update it - it's not difficult, but requires a little extra work.






    share|improve this answer

























    • Perfect! I'll wait a bit longer before accepting, but this seems to fulfill my needs perfectly. (As you surmised, I won't need to nest these environments.)

      – Draconis
      1 hour ago











    • Actually, one thing to note: this does not work if the hyperref package is included first. It works fine if hyperref is included later, though.

      – Draconis
      47 mins ago











    • @DraconisAccording to its manual, you should always load hyperref last :)

      – Andrew
      25 mins ago
















    5














    The enumitem package is your friend. You can define a new list style, which I have called unerate, and then make this list style use your unary code. To achieve this it is enough to add the following lines to your code:



    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem


    So this redefines item to be unerateItem and this, in turn, uses the "real" item with unary applied to the list environment counter, which is called uneratei. With this in place, the code



    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate


    produces:



    enter image description here



    Here is the full code:



    documentclassarticle

    usepackageforloop
    usepackagetipa
    usepackage[T1]fontenc

    newcommandxxdottextbullet % The dot character to use
    newcounterloopcntr % A one-off counter for forloop

    newcommandxxdots[1]% Print #1 dots in a row
    ifthenelse#1>5% If there are more than five, break them into groups
    xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
    % Otherwise, just print that many dots
    forlooploopcntr0valueloopcntr<#1xxdot%
    %

    newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

    makeatletter
    newcommand*unary[1]expandafter@unarycsname c@#1endcsname
    newcommand*@unary[1]xdotsthenumexpr#1relax
    makeatother

    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem

    begindocument

    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate

    enddocument


    You can now use enumitem to style these environments to your heart's content.



    The code above will not let you nest unerate environments. If this is required let me know and I will update it - it's not difficult, but requires a little extra work.






    share|improve this answer

























    • Perfect! I'll wait a bit longer before accepting, but this seems to fulfill my needs perfectly. (As you surmised, I won't need to nest these environments.)

      – Draconis
      1 hour ago











    • Actually, one thing to note: this does not work if the hyperref package is included first. It works fine if hyperref is included later, though.

      – Draconis
      47 mins ago











    • @DraconisAccording to its manual, you should always load hyperref last :)

      – Andrew
      25 mins ago














    5












    5








    5







    The enumitem package is your friend. You can define a new list style, which I have called unerate, and then make this list style use your unary code. To achieve this it is enough to add the following lines to your code:



    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem


    So this redefines item to be unerateItem and this, in turn, uses the "real" item with unary applied to the list environment counter, which is called uneratei. With this in place, the code



    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate


    produces:



    enter image description here



    Here is the full code:



    documentclassarticle

    usepackageforloop
    usepackagetipa
    usepackage[T1]fontenc

    newcommandxxdottextbullet % The dot character to use
    newcounterloopcntr % A one-off counter for forloop

    newcommandxxdots[1]% Print #1 dots in a row
    ifthenelse#1>5% If there are more than five, break them into groups
    xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
    % Otherwise, just print that many dots
    forlooploopcntr0valueloopcntr<#1xxdot%
    %

    newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

    makeatletter
    newcommand*unary[1]expandafter@unarycsname c@#1endcsname
    newcommand*@unary[1]xdotsthenumexpr#1relax
    makeatother

    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem

    begindocument

    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate

    enddocument


    You can now use enumitem to style these environments to your heart's content.



    The code above will not let you nest unerate environments. If this is required let me know and I will update it - it's not difficult, but requires a little extra work.






    share|improve this answer















    The enumitem package is your friend. You can define a new list style, which I have called unerate, and then make this list style use your unary code. To achieve this it is enough to add the following lines to your code:



    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem


    So this redefines item to be unerateItem and this, in turn, uses the "real" item with unary applied to the list environment counter, which is called uneratei. With this in place, the code



    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate


    produces:



    enter image description here



    Here is the full code:



    documentclassarticle

    usepackageforloop
    usepackagetipa
    usepackage[T1]fontenc

    newcommandxxdottextbullet % The dot character to use
    newcounterloopcntr % A one-off counter for forloop

    newcommandxxdots[1]% Print #1 dots in a row
    ifthenelse#1>5% If there are more than five, break them into groups
    xxdots5textpipexxdotsnumbernumexpr#1-5relax% By printing five, then a pipe, then the rest
    % Otherwise, just print that many dots
    forlooploopcntr0valueloopcntr<#1xxdot%
    %

    newcommandxdots[1]textnormalxxdots#1 % Wrap it in textnormal style

    makeatletter
    newcommand*unary[1]expandafter@unarycsname c@#1endcsname
    newcommand*@unary[1]xdotsthenumexpr#1relax
    makeatother

    letrealItemitem
    newcommandunerateItemrefstepcounterunerateirealItem[unaryuneratei]
    usepackageenumitem
    newlistunerateenumerate1
    setlist[unerate]label=alph*, before=letitemunerateItem

    begindocument

    beginunerate
    item My text here my text here
    item More text more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    item Even more text
    endunerate

    enddocument


    You can now use enumitem to style these environments to your heart's content.



    The code above will not let you nest unerate environments. If this is required let me know and I will update it - it's not difficult, but requires a little extra work.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 1 hour ago

























    answered 1 hour ago









    AndrewAndrew

    33.1k34685




    33.1k34685












    • Perfect! I'll wait a bit longer before accepting, but this seems to fulfill my needs perfectly. (As you surmised, I won't need to nest these environments.)

      – Draconis
      1 hour ago











    • Actually, one thing to note: this does not work if the hyperref package is included first. It works fine if hyperref is included later, though.

      – Draconis
      47 mins ago











    • @DraconisAccording to its manual, you should always load hyperref last :)

      – Andrew
      25 mins ago


















    • Perfect! I'll wait a bit longer before accepting, but this seems to fulfill my needs perfectly. (As you surmised, I won't need to nest these environments.)

      – Draconis
      1 hour ago











    • Actually, one thing to note: this does not work if the hyperref package is included first. It works fine if hyperref is included later, though.

      – Draconis
      47 mins ago











    • @DraconisAccording to its manual, you should always load hyperref last :)

      – Andrew
      25 mins ago

















    Perfect! I'll wait a bit longer before accepting, but this seems to fulfill my needs perfectly. (As you surmised, I won't need to nest these environments.)

    – Draconis
    1 hour ago





    Perfect! I'll wait a bit longer before accepting, but this seems to fulfill my needs perfectly. (As you surmised, I won't need to nest these environments.)

    – Draconis
    1 hour ago













    Actually, one thing to note: this does not work if the hyperref package is included first. It works fine if hyperref is included later, though.

    – Draconis
    47 mins ago





    Actually, one thing to note: this does not work if the hyperref package is included first. It works fine if hyperref is included later, though.

    – Draconis
    47 mins ago













    @DraconisAccording to its manual, you should always load hyperref last :)

    – Andrew
    25 mins ago






    @DraconisAccording to its manual, you should always load hyperref last :)

    – Andrew
    25 mins ago












    5














    I recycled this code and slightly extended it to get



    documentclassarticle
    usepackagepgffor
    newcommandnbullets[2][textbullet]%
    foreach X [evaluate=X as Y using int(mod(X,5))]in 1,...,#2
    ifnumX>1%
    ifnumY=1%
    $vert$fi%
    fi%
    #1
    begindocument
    renewcommandlabelenuminbulletsvalueenumi
    beginenumerate
    item first
    item second
    item third
    item fourth
    item fifth
    item sixth
    item seventh
    item last
    endenumerate

    Nestable:
    renewcommandlabelenumiinbullets[*]valueenumii
    beginenumerate
    item first
    item second
    beginenumerate
    item a
    item b
    item c
    item d
    item e
    item f
    endenumerate
    item third
    item fourth
    item fifth
    item sixth
    item seventh
    item last
    endenumerate
    enddocument


    enter image description here






    share|improve this answer





























      5














      I recycled this code and slightly extended it to get



      documentclassarticle
      usepackagepgffor
      newcommandnbullets[2][textbullet]%
      foreach X [evaluate=X as Y using int(mod(X,5))]in 1,...,#2
      ifnumX>1%
      ifnumY=1%
      $vert$fi%
      fi%
      #1
      begindocument
      renewcommandlabelenuminbulletsvalueenumi
      beginenumerate
      item first
      item second
      item third
      item fourth
      item fifth
      item sixth
      item seventh
      item last
      endenumerate

      Nestable:
      renewcommandlabelenumiinbullets[*]valueenumii
      beginenumerate
      item first
      item second
      beginenumerate
      item a
      item b
      item c
      item d
      item e
      item f
      endenumerate
      item third
      item fourth
      item fifth
      item sixth
      item seventh
      item last
      endenumerate
      enddocument


      enter image description here






      share|improve this answer



























        5












        5








        5







        I recycled this code and slightly extended it to get



        documentclassarticle
        usepackagepgffor
        newcommandnbullets[2][textbullet]%
        foreach X [evaluate=X as Y using int(mod(X,5))]in 1,...,#2
        ifnumX>1%
        ifnumY=1%
        $vert$fi%
        fi%
        #1
        begindocument
        renewcommandlabelenuminbulletsvalueenumi
        beginenumerate
        item first
        item second
        item third
        item fourth
        item fifth
        item sixth
        item seventh
        item last
        endenumerate

        Nestable:
        renewcommandlabelenumiinbullets[*]valueenumii
        beginenumerate
        item first
        item second
        beginenumerate
        item a
        item b
        item c
        item d
        item e
        item f
        endenumerate
        item third
        item fourth
        item fifth
        item sixth
        item seventh
        item last
        endenumerate
        enddocument


        enter image description here






        share|improve this answer















        I recycled this code and slightly extended it to get



        documentclassarticle
        usepackagepgffor
        newcommandnbullets[2][textbullet]%
        foreach X [evaluate=X as Y using int(mod(X,5))]in 1,...,#2
        ifnumX>1%
        ifnumY=1%
        $vert$fi%
        fi%
        #1
        begindocument
        renewcommandlabelenuminbulletsvalueenumi
        beginenumerate
        item first
        item second
        item third
        item fourth
        item fifth
        item sixth
        item seventh
        item last
        endenumerate

        Nestable:
        renewcommandlabelenumiinbullets[*]valueenumii
        beginenumerate
        item first
        item second
        beginenumerate
        item a
        item b
        item c
        item d
        item e
        item f
        endenumerate
        item third
        item fourth
        item fifth
        item sixth
        item seventh
        item last
        endenumerate
        enddocument


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 1 hour ago

























        answered 1 hour ago









        marmotmarmot

        128k6162308




        128k6162308



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f491681%2funary-enumeration%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

            ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

            Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

            19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу