Convert all counters to base 6

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











up vote
1
down vote

favorite












Is it possible to change the numeration base of LaTeX? Actually I am looking for base 6.



I would like this change to apply to all counters (TOC, pages, chapters..).
I found this topic How can I make sure that all counters start at 0?
which is almost exactly what I want but I have not a base 10 to base 6 function.



makeatletter
def@arabic#1BASEVIrelax
def@roman#1romannumeralBASEVIrelax
def@Roman#1expandafter@slowromancapromannumeralBASEVIrelax @
makeatother


BASEVI is just a placeholder.



To know more about the seximal system: seximal.net.










share|improve this question







New contributor




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



















  • What would base 6 Roman be? It doesn't make sense.
    – egreg
    1 hour ago










  • You are right, it is just the same.
    – Blincer
    41 mins ago














up vote
1
down vote

favorite












Is it possible to change the numeration base of LaTeX? Actually I am looking for base 6.



I would like this change to apply to all counters (TOC, pages, chapters..).
I found this topic How can I make sure that all counters start at 0?
which is almost exactly what I want but I have not a base 10 to base 6 function.



makeatletter
def@arabic#1BASEVIrelax
def@roman#1romannumeralBASEVIrelax
def@Roman#1expandafter@slowromancapromannumeralBASEVIrelax @
makeatother


BASEVI is just a placeholder.



To know more about the seximal system: seximal.net.










share|improve this question







New contributor




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



















  • What would base 6 Roman be? It doesn't make sense.
    – egreg
    1 hour ago










  • You are right, it is just the same.
    – Blincer
    41 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Is it possible to change the numeration base of LaTeX? Actually I am looking for base 6.



I would like this change to apply to all counters (TOC, pages, chapters..).
I found this topic How can I make sure that all counters start at 0?
which is almost exactly what I want but I have not a base 10 to base 6 function.



makeatletter
def@arabic#1BASEVIrelax
def@roman#1romannumeralBASEVIrelax
def@Roman#1expandafter@slowromancapromannumeralBASEVIrelax @
makeatother


BASEVI is just a placeholder.



To know more about the seximal system: seximal.net.










share|improve this question







New contributor




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











Is it possible to change the numeration base of LaTeX? Actually I am looking for base 6.



I would like this change to apply to all counters (TOC, pages, chapters..).
I found this topic How can I make sure that all counters start at 0?
which is almost exactly what I want but I have not a base 10 to base 6 function.



makeatletter
def@arabic#1BASEVIrelax
def@roman#1romannumeralBASEVIrelax
def@Roman#1expandafter@slowromancapromannumeralBASEVIrelax @
makeatother


BASEVI is just a placeholder.



To know more about the seximal system: seximal.net.







counters






share|improve this question







New contributor




Blincer 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




Blincer 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






New contributor




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









asked 1 hour ago









Blincer

1084




1084




New contributor




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





New contributor





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






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











  • What would base 6 Roman be? It doesn't make sense.
    – egreg
    1 hour ago










  • You are right, it is just the same.
    – Blincer
    41 mins ago
















  • What would base 6 Roman be? It doesn't make sense.
    – egreg
    1 hour ago










  • You are right, it is just the same.
    – Blincer
    41 mins ago















What would base 6 Roman be? It doesn't make sense.
– egreg
1 hour ago




What would base 6 Roman be? It doesn't make sense.
– egreg
1 hour ago












You are right, it is just the same.
– Blincer
41 mins ago




You are right, it is just the same.
– Blincer
41 mins ago










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










A one liner:



documentclassarticle
usepackageexpl3

ExplSyntaxOn
cs_set:cpn @arabic #1 int_to_base:nn #1 6
ExplSyntaxOff

begindocument

newcountertest

loopifnumvaluetest<100
arabictest%
stepcountertest%
space
repeat

enddocument


Every counter that's defined to use arabic will print in base six, including page.



enter image description here



Beware: this will break all macros that abuse the<counter> for obtaining the decimal representation of the counter instead of relying on its abstract value.



Better defining a suitable representation and choosing it for representing the counters you need.



documentclassarticle
usepackageexpl3

ExplSyntaxOnmakeatletter
cs_new:Npn @basesix #1 int_to_base:nn #1 6
cs_new:Npn basesix #1 exp_args:Nc @basesix c@#1
makeatotherExplSyntaxOff

begindocument

newcountertest
renewcommandthetestbasesixtest

loopifnumvaluetest<100
thetest
stepcountertest%
space
repeat

enddocument





share|improve this answer





























    up vote
    2
    down vote













    enter image description here



    documentclassarticle

    usepackageexpl3
    ExplSyntaxOn
    defSIX#1expandafterint_to_base:nncsname c@#1endcsname6
    ExplSyntaxOff
    renewcommandthesectionSIXsection
    renewcommandtheenumiSIXenumi
    begindocument

    sectionaa

    beginenumerate
    item aaa
    item aaa
    item aaa
    item aaa
    item aaa
    item aaa
    item aaa
    item aaa
    item aaa
    item aaa
    endenumerate

    sectionzzz
    zz
    sectionzzz
    zz
    sectionzzz
    zz
    sectionzzz
    zz
    sectionzzz
    zz
    sectionzzz
    zz

    enddocument





    share|improve this answer




















    • Your knowledge of expl3 is astonishing!
      – egreg
      59 mins ago










    • @egreg Buono come il mio italiano
      – David Carlisle
      57 mins ago










    • Exactly so. :-)
      – egreg
      40 mins ago










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



    );






    Blincer 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%2f458191%2fconvert-all-counters-to-base-6%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    A one liner:



    documentclassarticle
    usepackageexpl3

    ExplSyntaxOn
    cs_set:cpn @arabic #1 int_to_base:nn #1 6
    ExplSyntaxOff

    begindocument

    newcountertest

    loopifnumvaluetest<100
    arabictest%
    stepcountertest%
    space
    repeat

    enddocument


    Every counter that's defined to use arabic will print in base six, including page.



    enter image description here



    Beware: this will break all macros that abuse the<counter> for obtaining the decimal representation of the counter instead of relying on its abstract value.



    Better defining a suitable representation and choosing it for representing the counters you need.



    documentclassarticle
    usepackageexpl3

    ExplSyntaxOnmakeatletter
    cs_new:Npn @basesix #1 int_to_base:nn #1 6
    cs_new:Npn basesix #1 exp_args:Nc @basesix c@#1
    makeatotherExplSyntaxOff

    begindocument

    newcountertest
    renewcommandthetestbasesixtest

    loopifnumvaluetest<100
    thetest
    stepcountertest%
    space
    repeat

    enddocument





    share|improve this answer


























      up vote
      2
      down vote



      accepted










      A one liner:



      documentclassarticle
      usepackageexpl3

      ExplSyntaxOn
      cs_set:cpn @arabic #1 int_to_base:nn #1 6
      ExplSyntaxOff

      begindocument

      newcountertest

      loopifnumvaluetest<100
      arabictest%
      stepcountertest%
      space
      repeat

      enddocument


      Every counter that's defined to use arabic will print in base six, including page.



      enter image description here



      Beware: this will break all macros that abuse the<counter> for obtaining the decimal representation of the counter instead of relying on its abstract value.



      Better defining a suitable representation and choosing it for representing the counters you need.



      documentclassarticle
      usepackageexpl3

      ExplSyntaxOnmakeatletter
      cs_new:Npn @basesix #1 int_to_base:nn #1 6
      cs_new:Npn basesix #1 exp_args:Nc @basesix c@#1
      makeatotherExplSyntaxOff

      begindocument

      newcountertest
      renewcommandthetestbasesixtest

      loopifnumvaluetest<100
      thetest
      stepcountertest%
      space
      repeat

      enddocument





      share|improve this answer
























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        A one liner:



        documentclassarticle
        usepackageexpl3

        ExplSyntaxOn
        cs_set:cpn @arabic #1 int_to_base:nn #1 6
        ExplSyntaxOff

        begindocument

        newcountertest

        loopifnumvaluetest<100
        arabictest%
        stepcountertest%
        space
        repeat

        enddocument


        Every counter that's defined to use arabic will print in base six, including page.



        enter image description here



        Beware: this will break all macros that abuse the<counter> for obtaining the decimal representation of the counter instead of relying on its abstract value.



        Better defining a suitable representation and choosing it for representing the counters you need.



        documentclassarticle
        usepackageexpl3

        ExplSyntaxOnmakeatletter
        cs_new:Npn @basesix #1 int_to_base:nn #1 6
        cs_new:Npn basesix #1 exp_args:Nc @basesix c@#1
        makeatotherExplSyntaxOff

        begindocument

        newcountertest
        renewcommandthetestbasesixtest

        loopifnumvaluetest<100
        thetest
        stepcountertest%
        space
        repeat

        enddocument





        share|improve this answer














        A one liner:



        documentclassarticle
        usepackageexpl3

        ExplSyntaxOn
        cs_set:cpn @arabic #1 int_to_base:nn #1 6
        ExplSyntaxOff

        begindocument

        newcountertest

        loopifnumvaluetest<100
        arabictest%
        stepcountertest%
        space
        repeat

        enddocument


        Every counter that's defined to use arabic will print in base six, including page.



        enter image description here



        Beware: this will break all macros that abuse the<counter> for obtaining the decimal representation of the counter instead of relying on its abstract value.



        Better defining a suitable representation and choosing it for representing the counters you need.



        documentclassarticle
        usepackageexpl3

        ExplSyntaxOnmakeatletter
        cs_new:Npn @basesix #1 int_to_base:nn #1 6
        cs_new:Npn basesix #1 exp_args:Nc @basesix c@#1
        makeatotherExplSyntaxOff

        begindocument

        newcountertest
        renewcommandthetestbasesixtest

        loopifnumvaluetest<100
        thetest
        stepcountertest%
        space
        repeat

        enddocument






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 41 mins ago

























        answered 1 hour ago









        egreg

        694k8518443099




        694k8518443099




















            up vote
            2
            down vote













            enter image description here



            documentclassarticle

            usepackageexpl3
            ExplSyntaxOn
            defSIX#1expandafterint_to_base:nncsname c@#1endcsname6
            ExplSyntaxOff
            renewcommandthesectionSIXsection
            renewcommandtheenumiSIXenumi
            begindocument

            sectionaa

            beginenumerate
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            endenumerate

            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz

            enddocument





            share|improve this answer




















            • Your knowledge of expl3 is astonishing!
              – egreg
              59 mins ago










            • @egreg Buono come il mio italiano
              – David Carlisle
              57 mins ago










            • Exactly so. :-)
              – egreg
              40 mins ago














            up vote
            2
            down vote













            enter image description here



            documentclassarticle

            usepackageexpl3
            ExplSyntaxOn
            defSIX#1expandafterint_to_base:nncsname c@#1endcsname6
            ExplSyntaxOff
            renewcommandthesectionSIXsection
            renewcommandtheenumiSIXenumi
            begindocument

            sectionaa

            beginenumerate
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            endenumerate

            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz

            enddocument





            share|improve this answer




















            • Your knowledge of expl3 is astonishing!
              – egreg
              59 mins ago










            • @egreg Buono come il mio italiano
              – David Carlisle
              57 mins ago










            • Exactly so. :-)
              – egreg
              40 mins ago












            up vote
            2
            down vote










            up vote
            2
            down vote









            enter image description here



            documentclassarticle

            usepackageexpl3
            ExplSyntaxOn
            defSIX#1expandafterint_to_base:nncsname c@#1endcsname6
            ExplSyntaxOff
            renewcommandthesectionSIXsection
            renewcommandtheenumiSIXenumi
            begindocument

            sectionaa

            beginenumerate
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            endenumerate

            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz

            enddocument





            share|improve this answer












            enter image description here



            documentclassarticle

            usepackageexpl3
            ExplSyntaxOn
            defSIX#1expandafterint_to_base:nncsname c@#1endcsname6
            ExplSyntaxOff
            renewcommandthesectionSIXsection
            renewcommandtheenumiSIXenumi
            begindocument

            sectionaa

            beginenumerate
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            item aaa
            endenumerate

            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz
            sectionzzz
            zz

            enddocument






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 1 hour ago









            David Carlisle

            474k3811031837




            474k3811031837











            • Your knowledge of expl3 is astonishing!
              – egreg
              59 mins ago










            • @egreg Buono come il mio italiano
              – David Carlisle
              57 mins ago










            • Exactly so. :-)
              – egreg
              40 mins ago
















            • Your knowledge of expl3 is astonishing!
              – egreg
              59 mins ago










            • @egreg Buono come il mio italiano
              – David Carlisle
              57 mins ago










            • Exactly so. :-)
              – egreg
              40 mins ago















            Your knowledge of expl3 is astonishing!
            – egreg
            59 mins ago




            Your knowledge of expl3 is astonishing!
            – egreg
            59 mins ago












            @egreg Buono come il mio italiano
            – David Carlisle
            57 mins ago




            @egreg Buono come il mio italiano
            – David Carlisle
            57 mins ago












            Exactly so. :-)
            – egreg
            40 mins ago




            Exactly so. :-)
            – egreg
            40 mins ago










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









             

            draft saved


            draft discarded


















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












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











            Blincer 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%2f458191%2fconvert-all-counters-to-base-6%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            Installing NextGIS Connect into QGIS 3?

            One-line joke