Automatically end list item with proper punctuation (semicolon, period)List separated by semicolons, ending with a periodEnumerate and itemize undefined + captions not workingaligning a multiline formula with the bullet of itemizeItem displayed twice in beamer itemizeSplit itemize into multiple columnsHow to achieve multicolumn item lists with independent content?possible memoir bug with font sizes and tightlistsFinishing math with a periodIndentation of new list levels with enumitemChecking if current item is last item inside enumerated list

Why is infinite intersection "towards infinity" an empty set?

The Green Glass Door, Revisited

Does the word voltage exist in academic engineering?

Are fast interviews red flags?

Should I tip on the Amtrak train?

Features seen on the Space Shuttle's solid booster; what does "LOADED" mean exactly?

How do you say "to hell with everything" in French?

How to plot two curves with the same area under?

Did "Dirty Harry" feel lucky?

What's the biggest difference between these two photos?

How invisible hand adjusts stock prices if company is listed on multiple exchanges, under multiple currencies, and one of the currencies plunges?

I won a car in a poker game. How is that taxed in Canada?

Electric shock from pedals and guitar. Jacks too long?

Can taking my 1-week-old on a 6-7 hours journey in the car lead to medical complications?

Is future tense in English really a myth?

Owner keeps cutting corners and poaching workers for his other company

PWM on 5V GPIO pin

Template default argument loses its reference type

Did the Byzantines ever attempt to move their capital to Rome?

Leaving the USA for 10 yrs when you have asylum

Would a character take damage when surrounded by, but not in, flames?

What makes an ending "happy"?

Short story: Interstellar inspector senses "off" nature of planet hiding aggressive culture

How is the phase of 120V AC established in a North American home?



Automatically end list item with proper punctuation (semicolon, period)


List separated by semicolons, ending with a periodEnumerate and itemize undefined + captions not workingaligning a multiline formula with the bullet of itemizeItem displayed twice in beamer itemizeSplit itemize into multiple columnsHow to achieve multicolumn item lists with independent content?possible memoir bug with font sizes and tightlistsFinishing math with a periodIndentation of new list levels with enumitemChecking if current item is last item inside enumerated list






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















If I have a list using itemize, I want to automatically end each item with a semicolon (for all but the last item) or a period (for the last item).



For example:



beginitemize
item One
item Two
item Three
enditemize


Should display as



  • One;

  • Two;

  • Three.

Is there any way to make that happen? I looked around but didn't really find anything. The closest I could find was this, but that seems to be a fancy, custom list rather than a vanilla itemize.










share|improve this question









New contributor



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



























    2















    If I have a list using itemize, I want to automatically end each item with a semicolon (for all but the last item) or a period (for the last item).



    For example:



    beginitemize
    item One
    item Two
    item Three
    enditemize


    Should display as



    • One;

    • Two;

    • Three.

    Is there any way to make that happen? I looked around but didn't really find anything. The closest I could find was this, but that seems to be a fancy, custom list rather than a vanilla itemize.










    share|improve this question









    New contributor



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























      2












      2








      2








      If I have a list using itemize, I want to automatically end each item with a semicolon (for all but the last item) or a period (for the last item).



      For example:



      beginitemize
      item One
      item Two
      item Three
      enditemize


      Should display as



      • One;

      • Two;

      • Three.

      Is there any way to make that happen? I looked around but didn't really find anything. The closest I could find was this, but that seems to be a fancy, custom list rather than a vanilla itemize.










      share|improve this question









      New contributor



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











      If I have a list using itemize, I want to automatically end each item with a semicolon (for all but the last item) or a period (for the last item).



      For example:



      beginitemize
      item One
      item Two
      item Three
      enditemize


      Should display as



      • One;

      • Two;

      • Three.

      Is there any way to make that happen? I looked around but didn't really find anything. The closest I could find was this, but that seems to be a fancy, custom list rather than a vanilla itemize.







      lists itemize punctuation






      share|improve this question









      New contributor



      Marcel 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



      Marcel 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 8 hours ago









      Bernard

      190k7 gold badges86 silver badges225 bronze badges




      190k7 gold badges86 silver badges225 bronze badges






      New contributor



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








      asked 8 hours ago









      MarcelMarcel

      1134 bronze badges




      1134 bronze badges




      New contributor



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




      New contributor




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

























          2 Answers
          2






          active

          oldest

          votes


















          2
















          I'm not sure whether it is a good idea to do this, maybe you should use a different environment for that. The following patches item inside every itemize environment to add a semicolon after the first, and the enditemize macro is changed to add a dot. You can no longer nest itemize environments with this simple approach. All in all I think this creates more problems than it solves...



          documentclass[]article

          usepackageetoolbox
          AtBeginEnvironmentitemize
          %
          defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
          pretocmditemitemizepunctuation%
          pretocmdenditemizeifhmodeunskipfi.%


          newenvironmentpunctitemize
          %
          itemize
          defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
          pretocmditemitemizepunctuation%
          pretocmdenditemizeifhmodeunskipfi.%

          %
          enditemize


          begindocument
          beginitemize
          item One
          item Two
          item Three
          enditemize

          beginpunctitemize
          item One
          item Two
          item Three
          endpunctitemize
          enddocument


          enter image description here



          EDIT: added the environment approach, nesting is still not supported.






          share|improve this answer



























          • Thanks for the answer. When you say use a different environment, do you mean add a new punctuateditemize (for example) rather than overriding the default itemize? If so, could you give an example of what this would look like?

            – Marcel
            8 hours ago











          • @Marcel see my edit.

            – Skillmon
            8 hours ago











          • Thanks for the edit. I am nitpicking now, but if I have a newline in the item, the semicolon / period is on its own line. I don't suppose there is any way to fix that?

            – Marcel
            8 hours ago











          • Actually, it looks like that happens if there is a newline in the itemize.

            – Marcel
            7 hours ago






          • 1





            @Skillmon Probably Marcel is referring to a blank line between items. Try it.

            – egreg
            6 hours ago


















          2
















          You can use xparse, absorbing the whole contents and splitting it at item; then add a semicolon (and the removed item) between items.



          The processing is complicated by the fact that a blank line between items would introduce a spurious paragraph before the semicolon or the final period, so we need to remove blanks and par tokens at the end of each item.



          Thus the sequence obtained by splitting at item is mapped to “purify” it.



          I added enumitem for maximum flexibility.



          documentclassarticle
          usepackagexparse
          usepackageenumitem

          ExplSyntaxOn

          NewDocumentEnvironmentautoitemizeO +b

          beginitemize[#1]
          marcel_autoitemize:n #2
          enditemize


          seq_new:N l__marcel_autoitemize_items_seq
          seq_new:N l__marcel_autoitemize_items_nopar_seq
          tl_new:N l__marcel_autoitemize_item_tl

          cs_new_protected:Nn marcel_autoitemize:n

          % split the contents at item; this also removes blanks at either end
          seq_set_split:Nnn l__marcel_autoitemize_items_seq item #1
          % remove the first (empty) item
          seq_pop_left:NN l__marcel_autoitemize_items_seq l_tmpa_tl
          % we need to remove trailing par tokens
          seq_clear:N l__marcel_autoitemize_items_nopar_seq
          seq_map_function:NN l__marcel_autoitemize_items_seq __marcel_autoitemize_purify:n
          % start the first item
          item
          % use the sequence, putting a semicolon and item between items
          seq_use:Nn l__marcel_autoitemize_items_nopar_seq ; item
          % end up with a period
          .


          cs_new_protected:Nn __marcel_autoitemize_purify:n

          tl_set:Nn l__marcel_autoitemize_item_tl #1
          regex_replace_once:nnN s* cpar* Z l__marcel_autoitemize_item_tl
          seq_put_right:NV l__marcel_autoitemize_items_nopar_seq l__marcel_autoitemize_item_tl


          ExplSyntaxOff

          begindocument

          beginautoitemize
          item One

          item Two
          item Three
          endautoitemize

          beginautoitemize[label=--]
          item One
          item Two
          item Three
          endautoitemize

          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/4.0/"u003ecc by-sa 4.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
            );



            );







            Marcel 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%2f507406%2fautomatically-end-list-item-with-proper-punctuation-semicolon-period%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









            2
















            I'm not sure whether it is a good idea to do this, maybe you should use a different environment for that. The following patches item inside every itemize environment to add a semicolon after the first, and the enditemize macro is changed to add a dot. You can no longer nest itemize environments with this simple approach. All in all I think this creates more problems than it solves...



            documentclass[]article

            usepackageetoolbox
            AtBeginEnvironmentitemize
            %
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%


            newenvironmentpunctitemize
            %
            itemize
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%

            %
            enditemize


            begindocument
            beginitemize
            item One
            item Two
            item Three
            enditemize

            beginpunctitemize
            item One
            item Two
            item Three
            endpunctitemize
            enddocument


            enter image description here



            EDIT: added the environment approach, nesting is still not supported.






            share|improve this answer



























            • Thanks for the answer. When you say use a different environment, do you mean add a new punctuateditemize (for example) rather than overriding the default itemize? If so, could you give an example of what this would look like?

              – Marcel
              8 hours ago











            • @Marcel see my edit.

              – Skillmon
              8 hours ago











            • Thanks for the edit. I am nitpicking now, but if I have a newline in the item, the semicolon / period is on its own line. I don't suppose there is any way to fix that?

              – Marcel
              8 hours ago











            • Actually, it looks like that happens if there is a newline in the itemize.

              – Marcel
              7 hours ago






            • 1





              @Skillmon Probably Marcel is referring to a blank line between items. Try it.

              – egreg
              6 hours ago















            2
















            I'm not sure whether it is a good idea to do this, maybe you should use a different environment for that. The following patches item inside every itemize environment to add a semicolon after the first, and the enditemize macro is changed to add a dot. You can no longer nest itemize environments with this simple approach. All in all I think this creates more problems than it solves...



            documentclass[]article

            usepackageetoolbox
            AtBeginEnvironmentitemize
            %
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%


            newenvironmentpunctitemize
            %
            itemize
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%

            %
            enditemize


            begindocument
            beginitemize
            item One
            item Two
            item Three
            enditemize

            beginpunctitemize
            item One
            item Two
            item Three
            endpunctitemize
            enddocument


            enter image description here



            EDIT: added the environment approach, nesting is still not supported.






            share|improve this answer



























            • Thanks for the answer. When you say use a different environment, do you mean add a new punctuateditemize (for example) rather than overriding the default itemize? If so, could you give an example of what this would look like?

              – Marcel
              8 hours ago











            • @Marcel see my edit.

              – Skillmon
              8 hours ago











            • Thanks for the edit. I am nitpicking now, but if I have a newline in the item, the semicolon / period is on its own line. I don't suppose there is any way to fix that?

              – Marcel
              8 hours ago











            • Actually, it looks like that happens if there is a newline in the itemize.

              – Marcel
              7 hours ago






            • 1





              @Skillmon Probably Marcel is referring to a blank line between items. Try it.

              – egreg
              6 hours ago













            2














            2










            2









            I'm not sure whether it is a good idea to do this, maybe you should use a different environment for that. The following patches item inside every itemize environment to add a semicolon after the first, and the enditemize macro is changed to add a dot. You can no longer nest itemize environments with this simple approach. All in all I think this creates more problems than it solves...



            documentclass[]article

            usepackageetoolbox
            AtBeginEnvironmentitemize
            %
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%


            newenvironmentpunctitemize
            %
            itemize
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%

            %
            enditemize


            begindocument
            beginitemize
            item One
            item Two
            item Three
            enditemize

            beginpunctitemize
            item One
            item Two
            item Three
            endpunctitemize
            enddocument


            enter image description here



            EDIT: added the environment approach, nesting is still not supported.






            share|improve this answer















            I'm not sure whether it is a good idea to do this, maybe you should use a different environment for that. The following patches item inside every itemize environment to add a semicolon after the first, and the enditemize macro is changed to add a dot. You can no longer nest itemize environments with this simple approach. All in all I think this creates more problems than it solves...



            documentclass[]article

            usepackageetoolbox
            AtBeginEnvironmentitemize
            %
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%


            newenvironmentpunctitemize
            %
            itemize
            defitemizepunctuationdefitemizepunctuationifhmodeunskipfi;%
            pretocmditemitemizepunctuation%
            pretocmdenditemizeifhmodeunskipfi.%

            %
            enditemize


            begindocument
            beginitemize
            item One
            item Two
            item Three
            enditemize

            beginpunctitemize
            item One
            item Two
            item Three
            endpunctitemize
            enddocument


            enter image description here



            EDIT: added the environment approach, nesting is still not supported.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 3 hours ago









            user7214865

            1226 bronze badges




            1226 bronze badges










            answered 8 hours ago









            SkillmonSkillmon

            27.9k1 gold badge28 silver badges59 bronze badges




            27.9k1 gold badge28 silver badges59 bronze badges















            • Thanks for the answer. When you say use a different environment, do you mean add a new punctuateditemize (for example) rather than overriding the default itemize? If so, could you give an example of what this would look like?

              – Marcel
              8 hours ago











            • @Marcel see my edit.

              – Skillmon
              8 hours ago











            • Thanks for the edit. I am nitpicking now, but if I have a newline in the item, the semicolon / period is on its own line. I don't suppose there is any way to fix that?

              – Marcel
              8 hours ago











            • Actually, it looks like that happens if there is a newline in the itemize.

              – Marcel
              7 hours ago






            • 1





              @Skillmon Probably Marcel is referring to a blank line between items. Try it.

              – egreg
              6 hours ago

















            • Thanks for the answer. When you say use a different environment, do you mean add a new punctuateditemize (for example) rather than overriding the default itemize? If so, could you give an example of what this would look like?

              – Marcel
              8 hours ago











            • @Marcel see my edit.

              – Skillmon
              8 hours ago











            • Thanks for the edit. I am nitpicking now, but if I have a newline in the item, the semicolon / period is on its own line. I don't suppose there is any way to fix that?

              – Marcel
              8 hours ago











            • Actually, it looks like that happens if there is a newline in the itemize.

              – Marcel
              7 hours ago






            • 1





              @Skillmon Probably Marcel is referring to a blank line between items. Try it.

              – egreg
              6 hours ago
















            Thanks for the answer. When you say use a different environment, do you mean add a new punctuateditemize (for example) rather than overriding the default itemize? If so, could you give an example of what this would look like?

            – Marcel
            8 hours ago





            Thanks for the answer. When you say use a different environment, do you mean add a new punctuateditemize (for example) rather than overriding the default itemize? If so, could you give an example of what this would look like?

            – Marcel
            8 hours ago













            @Marcel see my edit.

            – Skillmon
            8 hours ago





            @Marcel see my edit.

            – Skillmon
            8 hours ago













            Thanks for the edit. I am nitpicking now, but if I have a newline in the item, the semicolon / period is on its own line. I don't suppose there is any way to fix that?

            – Marcel
            8 hours ago





            Thanks for the edit. I am nitpicking now, but if I have a newline in the item, the semicolon / period is on its own line. I don't suppose there is any way to fix that?

            – Marcel
            8 hours ago













            Actually, it looks like that happens if there is a newline in the itemize.

            – Marcel
            7 hours ago





            Actually, it looks like that happens if there is a newline in the itemize.

            – Marcel
            7 hours ago




            1




            1





            @Skillmon Probably Marcel is referring to a blank line between items. Try it.

            – egreg
            6 hours ago





            @Skillmon Probably Marcel is referring to a blank line between items. Try it.

            – egreg
            6 hours ago













            2
















            You can use xparse, absorbing the whole contents and splitting it at item; then add a semicolon (and the removed item) between items.



            The processing is complicated by the fact that a blank line between items would introduce a spurious paragraph before the semicolon or the final period, so we need to remove blanks and par tokens at the end of each item.



            Thus the sequence obtained by splitting at item is mapped to “purify” it.



            I added enumitem for maximum flexibility.



            documentclassarticle
            usepackagexparse
            usepackageenumitem

            ExplSyntaxOn

            NewDocumentEnvironmentautoitemizeO +b

            beginitemize[#1]
            marcel_autoitemize:n #2
            enditemize


            seq_new:N l__marcel_autoitemize_items_seq
            seq_new:N l__marcel_autoitemize_items_nopar_seq
            tl_new:N l__marcel_autoitemize_item_tl

            cs_new_protected:Nn marcel_autoitemize:n

            % split the contents at item; this also removes blanks at either end
            seq_set_split:Nnn l__marcel_autoitemize_items_seq item #1
            % remove the first (empty) item
            seq_pop_left:NN l__marcel_autoitemize_items_seq l_tmpa_tl
            % we need to remove trailing par tokens
            seq_clear:N l__marcel_autoitemize_items_nopar_seq
            seq_map_function:NN l__marcel_autoitemize_items_seq __marcel_autoitemize_purify:n
            % start the first item
            item
            % use the sequence, putting a semicolon and item between items
            seq_use:Nn l__marcel_autoitemize_items_nopar_seq ; item
            % end up with a period
            .


            cs_new_protected:Nn __marcel_autoitemize_purify:n

            tl_set:Nn l__marcel_autoitemize_item_tl #1
            regex_replace_once:nnN s* cpar* Z l__marcel_autoitemize_item_tl
            seq_put_right:NV l__marcel_autoitemize_items_nopar_seq l__marcel_autoitemize_item_tl


            ExplSyntaxOff

            begindocument

            beginautoitemize
            item One

            item Two
            item Three
            endautoitemize

            beginautoitemize[label=--]
            item One
            item Two
            item Three
            endautoitemize

            enddocument


            enter image description here






            share|improve this answer





























              2
















              You can use xparse, absorbing the whole contents and splitting it at item; then add a semicolon (and the removed item) between items.



              The processing is complicated by the fact that a blank line between items would introduce a spurious paragraph before the semicolon or the final period, so we need to remove blanks and par tokens at the end of each item.



              Thus the sequence obtained by splitting at item is mapped to “purify” it.



              I added enumitem for maximum flexibility.



              documentclassarticle
              usepackagexparse
              usepackageenumitem

              ExplSyntaxOn

              NewDocumentEnvironmentautoitemizeO +b

              beginitemize[#1]
              marcel_autoitemize:n #2
              enditemize


              seq_new:N l__marcel_autoitemize_items_seq
              seq_new:N l__marcel_autoitemize_items_nopar_seq
              tl_new:N l__marcel_autoitemize_item_tl

              cs_new_protected:Nn marcel_autoitemize:n

              % split the contents at item; this also removes blanks at either end
              seq_set_split:Nnn l__marcel_autoitemize_items_seq item #1
              % remove the first (empty) item
              seq_pop_left:NN l__marcel_autoitemize_items_seq l_tmpa_tl
              % we need to remove trailing par tokens
              seq_clear:N l__marcel_autoitemize_items_nopar_seq
              seq_map_function:NN l__marcel_autoitemize_items_seq __marcel_autoitemize_purify:n
              % start the first item
              item
              % use the sequence, putting a semicolon and item between items
              seq_use:Nn l__marcel_autoitemize_items_nopar_seq ; item
              % end up with a period
              .


              cs_new_protected:Nn __marcel_autoitemize_purify:n

              tl_set:Nn l__marcel_autoitemize_item_tl #1
              regex_replace_once:nnN s* cpar* Z l__marcel_autoitemize_item_tl
              seq_put_right:NV l__marcel_autoitemize_items_nopar_seq l__marcel_autoitemize_item_tl


              ExplSyntaxOff

              begindocument

              beginautoitemize
              item One

              item Two
              item Three
              endautoitemize

              beginautoitemize[label=--]
              item One
              item Two
              item Three
              endautoitemize

              enddocument


              enter image description here






              share|improve this answer



























                2














                2










                2









                You can use xparse, absorbing the whole contents and splitting it at item; then add a semicolon (and the removed item) between items.



                The processing is complicated by the fact that a blank line between items would introduce a spurious paragraph before the semicolon or the final period, so we need to remove blanks and par tokens at the end of each item.



                Thus the sequence obtained by splitting at item is mapped to “purify” it.



                I added enumitem for maximum flexibility.



                documentclassarticle
                usepackagexparse
                usepackageenumitem

                ExplSyntaxOn

                NewDocumentEnvironmentautoitemizeO +b

                beginitemize[#1]
                marcel_autoitemize:n #2
                enditemize


                seq_new:N l__marcel_autoitemize_items_seq
                seq_new:N l__marcel_autoitemize_items_nopar_seq
                tl_new:N l__marcel_autoitemize_item_tl

                cs_new_protected:Nn marcel_autoitemize:n

                % split the contents at item; this also removes blanks at either end
                seq_set_split:Nnn l__marcel_autoitemize_items_seq item #1
                % remove the first (empty) item
                seq_pop_left:NN l__marcel_autoitemize_items_seq l_tmpa_tl
                % we need to remove trailing par tokens
                seq_clear:N l__marcel_autoitemize_items_nopar_seq
                seq_map_function:NN l__marcel_autoitemize_items_seq __marcel_autoitemize_purify:n
                % start the first item
                item
                % use the sequence, putting a semicolon and item between items
                seq_use:Nn l__marcel_autoitemize_items_nopar_seq ; item
                % end up with a period
                .


                cs_new_protected:Nn __marcel_autoitemize_purify:n

                tl_set:Nn l__marcel_autoitemize_item_tl #1
                regex_replace_once:nnN s* cpar* Z l__marcel_autoitemize_item_tl
                seq_put_right:NV l__marcel_autoitemize_items_nopar_seq l__marcel_autoitemize_item_tl


                ExplSyntaxOff

                begindocument

                beginautoitemize
                item One

                item Two
                item Three
                endautoitemize

                beginautoitemize[label=--]
                item One
                item Two
                item Three
                endautoitemize

                enddocument


                enter image description here






                share|improve this answer













                You can use xparse, absorbing the whole contents and splitting it at item; then add a semicolon (and the removed item) between items.



                The processing is complicated by the fact that a blank line between items would introduce a spurious paragraph before the semicolon or the final period, so we need to remove blanks and par tokens at the end of each item.



                Thus the sequence obtained by splitting at item is mapped to “purify” it.



                I added enumitem for maximum flexibility.



                documentclassarticle
                usepackagexparse
                usepackageenumitem

                ExplSyntaxOn

                NewDocumentEnvironmentautoitemizeO +b

                beginitemize[#1]
                marcel_autoitemize:n #2
                enditemize


                seq_new:N l__marcel_autoitemize_items_seq
                seq_new:N l__marcel_autoitemize_items_nopar_seq
                tl_new:N l__marcel_autoitemize_item_tl

                cs_new_protected:Nn marcel_autoitemize:n

                % split the contents at item; this also removes blanks at either end
                seq_set_split:Nnn l__marcel_autoitemize_items_seq item #1
                % remove the first (empty) item
                seq_pop_left:NN l__marcel_autoitemize_items_seq l_tmpa_tl
                % we need to remove trailing par tokens
                seq_clear:N l__marcel_autoitemize_items_nopar_seq
                seq_map_function:NN l__marcel_autoitemize_items_seq __marcel_autoitemize_purify:n
                % start the first item
                item
                % use the sequence, putting a semicolon and item between items
                seq_use:Nn l__marcel_autoitemize_items_nopar_seq ; item
                % end up with a period
                .


                cs_new_protected:Nn __marcel_autoitemize_purify:n

                tl_set:Nn l__marcel_autoitemize_item_tl #1
                regex_replace_once:nnN s* cpar* Z l__marcel_autoitemize_item_tl
                seq_put_right:NV l__marcel_autoitemize_items_nopar_seq l__marcel_autoitemize_item_tl


                ExplSyntaxOff

                begindocument

                beginautoitemize
                item One

                item Two
                item Three
                endautoitemize

                beginautoitemize[label=--]
                item One
                item Two
                item Three
                endautoitemize

                enddocument


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 6 hours ago









                egregegreg

                767k91 gold badges2002 silver badges3355 bronze badges




                767k91 gold badges2002 silver badges3355 bronze badges
























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









                    draft saved

                    draft discarded

















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












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











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














                    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%2f507406%2fautomatically-end-list-item-with-proper-punctuation-semicolon-period%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

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її