Vertical list customization like enumitem's itemjoin?












7















I like the flexibility in editing afforded by custom inline enumitem lists; for example:



documentclass{article}
usepackage{enumitem}

newlist{inlineitem}{itemize*}{1}
setlist[inlineitem]{ % Customize itemize* environ
before=unskip{:}, % Colon before list
itemjoin={{;}}, % Join with semicolons
itemjoin*={{; and}}, % Last join has "; and "
label={}, % No label
after=.} % Period at end of last item

begin{document}

Here is some text that will have a list of
begin{inlineitem}
item a list item that could go first but also last
item another list item that I'm not sure about
item this one should go last unless I think of another one
end{inlineitem}

It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

end{document}


enter image description here



I'd like to do the same thing with a non-inline list; however, enumitem's docs state that "itemjoin is ignored in vertical mode", and so it is.










share|improve this question























  • What does "the same thing" mean? Have you tried label={; and}?

    – Andrew
    Sep 13 '18 at 14:39








  • 1





    @Andrew "the same thing" means automatically adding before before the list, itemjoin to the end of every item in the list except the penultimate and last ones, itemjoin* to the penultimate item, and after to the last item. Using label={; and} changes the label of every item to be ; and, which is definitely not the effect I'm going for.

    – Dan
    Sep 14 '18 at 7:39











  • I'm reminded this bounty needs to be allocated soon, so just a reminder to raise any concerns with either answer before I have to make a decision.

    – KJO
    Feb 3 at 17:44
















7















I like the flexibility in editing afforded by custom inline enumitem lists; for example:



documentclass{article}
usepackage{enumitem}

newlist{inlineitem}{itemize*}{1}
setlist[inlineitem]{ % Customize itemize* environ
before=unskip{:}, % Colon before list
itemjoin={{;}}, % Join with semicolons
itemjoin*={{; and}}, % Last join has "; and "
label={}, % No label
after=.} % Period at end of last item

begin{document}

Here is some text that will have a list of
begin{inlineitem}
item a list item that could go first but also last
item another list item that I'm not sure about
item this one should go last unless I think of another one
end{inlineitem}

It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

end{document}


enter image description here



I'd like to do the same thing with a non-inline list; however, enumitem's docs state that "itemjoin is ignored in vertical mode", and so it is.










share|improve this question























  • What does "the same thing" mean? Have you tried label={; and}?

    – Andrew
    Sep 13 '18 at 14:39








  • 1





    @Andrew "the same thing" means automatically adding before before the list, itemjoin to the end of every item in the list except the penultimate and last ones, itemjoin* to the penultimate item, and after to the last item. Using label={; and} changes the label of every item to be ; and, which is definitely not the effect I'm going for.

    – Dan
    Sep 14 '18 at 7:39











  • I'm reminded this bounty needs to be allocated soon, so just a reminder to raise any concerns with either answer before I have to make a decision.

    – KJO
    Feb 3 at 17:44














7












7








7








I like the flexibility in editing afforded by custom inline enumitem lists; for example:



documentclass{article}
usepackage{enumitem}

newlist{inlineitem}{itemize*}{1}
setlist[inlineitem]{ % Customize itemize* environ
before=unskip{:}, % Colon before list
itemjoin={{;}}, % Join with semicolons
itemjoin*={{; and}}, % Last join has "; and "
label={}, % No label
after=.} % Period at end of last item

begin{document}

Here is some text that will have a list of
begin{inlineitem}
item a list item that could go first but also last
item another list item that I'm not sure about
item this one should go last unless I think of another one
end{inlineitem}

It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

end{document}


enter image description here



I'd like to do the same thing with a non-inline list; however, enumitem's docs state that "itemjoin is ignored in vertical mode", and so it is.










share|improve this question














I like the flexibility in editing afforded by custom inline enumitem lists; for example:



documentclass{article}
usepackage{enumitem}

newlist{inlineitem}{itemize*}{1}
setlist[inlineitem]{ % Customize itemize* environ
before=unskip{:}, % Colon before list
itemjoin={{;}}, % Join with semicolons
itemjoin*={{; and}}, % Last join has "; and "
label={}, % No label
after=.} % Period at end of last item

begin{document}

Here is some text that will have a list of
begin{inlineitem}
item a list item that could go first but also last
item another list item that I'm not sure about
item this one should go last unless I think of another one
end{inlineitem}

It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

end{document}


enter image description here



I'd like to do the same thing with a non-inline list; however, enumitem's docs state that "itemjoin is ignored in vertical mode", and so it is.







lists enumitem






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 13 '18 at 12:38









DanDan

1625




1625













  • What does "the same thing" mean? Have you tried label={; and}?

    – Andrew
    Sep 13 '18 at 14:39








  • 1





    @Andrew "the same thing" means automatically adding before before the list, itemjoin to the end of every item in the list except the penultimate and last ones, itemjoin* to the penultimate item, and after to the last item. Using label={; and} changes the label of every item to be ; and, which is definitely not the effect I'm going for.

    – Dan
    Sep 14 '18 at 7:39











  • I'm reminded this bounty needs to be allocated soon, so just a reminder to raise any concerns with either answer before I have to make a decision.

    – KJO
    Feb 3 at 17:44



















  • What does "the same thing" mean? Have you tried label={; and}?

    – Andrew
    Sep 13 '18 at 14:39








  • 1





    @Andrew "the same thing" means automatically adding before before the list, itemjoin to the end of every item in the list except the penultimate and last ones, itemjoin* to the penultimate item, and after to the last item. Using label={; and} changes the label of every item to be ; and, which is definitely not the effect I'm going for.

    – Dan
    Sep 14 '18 at 7:39











  • I'm reminded this bounty needs to be allocated soon, so just a reminder to raise any concerns with either answer before I have to make a decision.

    – KJO
    Feb 3 at 17:44

















What does "the same thing" mean? Have you tried label={; and}?

– Andrew
Sep 13 '18 at 14:39







What does "the same thing" mean? Have you tried label={; and}?

– Andrew
Sep 13 '18 at 14:39






1




1





@Andrew "the same thing" means automatically adding before before the list, itemjoin to the end of every item in the list except the penultimate and last ones, itemjoin* to the penultimate item, and after to the last item. Using label={; and} changes the label of every item to be ; and, which is definitely not the effect I'm going for.

– Dan
Sep 14 '18 at 7:39





@Andrew "the same thing" means automatically adding before before the list, itemjoin to the end of every item in the list except the penultimate and last ones, itemjoin* to the penultimate item, and after to the last item. Using label={; and} changes the label of every item to be ; and, which is definitely not the effect I'm going for.

– Dan
Sep 14 '18 at 7:39













I'm reminded this bounty needs to be allocated soon, so just a reminder to raise any concerns with either answer before I have to make a decision.

– KJO
Feb 3 at 17:44





I'm reminded this bounty needs to be allocated soon, so just a reminder to raise any concerns with either answer before I have to make a decision.

– KJO
Feb 3 at 17:44










2 Answers
2






active

oldest

votes


















2





+50









Here's a possible solution that works by redefining item.
This may seem a little heavy-handed, but it is also how the itemjoin key for inline lists works.



I'm using SetEnumitemKey to define a new key, sentence, that can be supplied to any list environment that enumitem knows about.
It will append a period (.) to the last item and a semicolon (;) to every other item.



documentclass{article}

usepackage{enumitem}
SetEnumitemKey{sentence}{%
before*={sentencelistprep{;}},
after*={unskip.},
}

letsentenceitemjoinempty
edefsentenceitem{noexpandsentenceitemjoinunexpandedexpandafter{item}}%
newcommand*sentencelistprep[1]{%
defsentenceitemjoin{defsentenceitemjoin{unskip#1}}%
letitemsentenceitem
}

begin{document}

Here is an texttt{itemize} environment whose items are part of this sentence and therefore come with appropriate punctuation:
begin{itemize}[sentence]
item a list item that could go first but also last
item another list item that I'm not sure about that is long enough to span two lines
item this one should go last unless I think of another one
end{itemize}

It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

end{document}


output




Warning: you can't use any other list environments inside one with the sentence key because the redefinition of item will also apply to those and will insert additional semicolons there as well.

(You probably wouldn't want to nest lists inside a running sentence, but if you have to you can add letsentenceitemjoinempty inside the inner list.)






Remarks




  • I didn't include the colon (:) because does not feel like it is a part of the list (and not affected if items are reordered).
    If you do want the colon to automatically be inserted you can replace the value of before* above by {unskip:sentencelistprep{;}}.


  • If you don't want to have to supply the sentence key every time, you can create a custom list environment that includes it with e.g.



    newlist{myitemize}{itemize}{1}
    setlist[myitemize]{label=textbullet,sentence}


  • The before and after keys overwrite sentence if supplied later, but the converse is not true because sentence uses the starred versions before* and after*.


  • sentencelistprep{;}, which is called at the start of a list with sentence, does the following: it defines sentenceitemjoin asdefsentenceitemjoin{unskip;} and replaces item by a version that includes sentenceitemjoin.
    The first item therefore redefines sentenceitemjoin to unskip;, and every item after that consequently inserts a ; before it.







share|improve this answer

































    6














    Here is a version that sort of reproduces a display itemize allowing for the features of an itemize*. Below is the same content using inlineitem (provided in question), displayitem and a regular itemize for comparison purposes:



    enter image description here



    Notes:





    • The color red has been added to make it easier to compare the three versions. You can replace the definition of Show with



      newcommand*{Show}[1]{#1}


      to eliminate the highlighting or simply remove all references to the Show macro.



    • The "sort of" is because I wasn't able to get the vertical spacing of the very first item to match what itemize yields.



    Code:



    documentclass{article}
    usepackage{enumitem}
    usepackage{xcolor}

    newcommand*{NextLine}{%
    newline
    vspace*{0.5baselineskip}%
    hspace*{dimexprlabelindent+labelwidth-labelseprelax}%
    }%
    newcommand*{Show}[1]{textcolor{red}{bfseries#1}}% Make it easier to see difference



    newlist{inlineitem}{itemize*}{1}
    setlist[inlineitem]{ % Customize itemize* environ
    before={unskipShow:}, % Colon before list
    itemjoin={{Show;}}, % Join with semicolons
    itemjoin*={{Show{; and}}}, % Last join has "; and "
    label={}, % No label
    after=., % Period at end of last item
    }

    newlist{displayitem}{itemize*}{1}
    setlist[displayitem]{ % Customize itemize* environ
    before={unskipShow:NextLine}, % Colon before list
    itemjoin={Show;NextLine}, % Join with semicolons
    itemjoin*={Show{; and}NextLine}, % Last join has "; and "
    label={$bullet$}, % Label
    after={unskipShow.endgrafnoindent}, % Period at end of last item
    }

    pagecolor{white}
    begin{document}
    noindent
    Here is some text in a verb|inlineitem|
    begin{inlineitem}
    item a list item that could go first but also last
    item another list item that I'm not sure about
    item this one should go last unless I think of another one
    end{inlineitem}
    Some text after verb|inlineitem|.

    bigskip

    noindent
    Here is the same text in a verb|displayitem|
    begin{displayitem}
    item a list item that could go first but also last
    item another list item that I'm not sure about
    item this one should go last unless I think of another one
    end{displayitem}
    Some text after verb|displayitem|.

    bigskip

    noindent
    Here is the same text in an verb|itemize|
    begin{itemize}
    item a list item that could go first but also last
    item another list item that I'm not sure about
    item this one should go last unless I think of another one
    end{itemize}
    Some text after regular verb|itemize|.
    end{document}





    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%2f450715%2fvertical-list-customization-like-enumitems-itemjoin%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





      +50









      Here's a possible solution that works by redefining item.
      This may seem a little heavy-handed, but it is also how the itemjoin key for inline lists works.



      I'm using SetEnumitemKey to define a new key, sentence, that can be supplied to any list environment that enumitem knows about.
      It will append a period (.) to the last item and a semicolon (;) to every other item.



      documentclass{article}

      usepackage{enumitem}
      SetEnumitemKey{sentence}{%
      before*={sentencelistprep{;}},
      after*={unskip.},
      }

      letsentenceitemjoinempty
      edefsentenceitem{noexpandsentenceitemjoinunexpandedexpandafter{item}}%
      newcommand*sentencelistprep[1]{%
      defsentenceitemjoin{defsentenceitemjoin{unskip#1}}%
      letitemsentenceitem
      }

      begin{document}

      Here is an texttt{itemize} environment whose items are part of this sentence and therefore come with appropriate punctuation:
      begin{itemize}[sentence]
      item a list item that could go first but also last
      item another list item that I'm not sure about that is long enough to span two lines
      item this one should go last unless I think of another one
      end{itemize}

      It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

      end{document}


      output




      Warning: you can't use any other list environments inside one with the sentence key because the redefinition of item will also apply to those and will insert additional semicolons there as well.

      (You probably wouldn't want to nest lists inside a running sentence, but if you have to you can add letsentenceitemjoinempty inside the inner list.)






      Remarks




      • I didn't include the colon (:) because does not feel like it is a part of the list (and not affected if items are reordered).
        If you do want the colon to automatically be inserted you can replace the value of before* above by {unskip:sentencelistprep{;}}.


      • If you don't want to have to supply the sentence key every time, you can create a custom list environment that includes it with e.g.



        newlist{myitemize}{itemize}{1}
        setlist[myitemize]{label=textbullet,sentence}


      • The before and after keys overwrite sentence if supplied later, but the converse is not true because sentence uses the starred versions before* and after*.


      • sentencelistprep{;}, which is called at the start of a list with sentence, does the following: it defines sentenceitemjoin asdefsentenceitemjoin{unskip;} and replaces item by a version that includes sentenceitemjoin.
        The first item therefore redefines sentenceitemjoin to unskip;, and every item after that consequently inserts a ; before it.







      share|improve this answer






























        2





        +50









        Here's a possible solution that works by redefining item.
        This may seem a little heavy-handed, but it is also how the itemjoin key for inline lists works.



        I'm using SetEnumitemKey to define a new key, sentence, that can be supplied to any list environment that enumitem knows about.
        It will append a period (.) to the last item and a semicolon (;) to every other item.



        documentclass{article}

        usepackage{enumitem}
        SetEnumitemKey{sentence}{%
        before*={sentencelistprep{;}},
        after*={unskip.},
        }

        letsentenceitemjoinempty
        edefsentenceitem{noexpandsentenceitemjoinunexpandedexpandafter{item}}%
        newcommand*sentencelistprep[1]{%
        defsentenceitemjoin{defsentenceitemjoin{unskip#1}}%
        letitemsentenceitem
        }

        begin{document}

        Here is an texttt{itemize} environment whose items are part of this sentence and therefore come with appropriate punctuation:
        begin{itemize}[sentence]
        item a list item that could go first but also last
        item another list item that I'm not sure about that is long enough to span two lines
        item this one should go last unless I think of another one
        end{itemize}

        It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

        end{document}


        output




        Warning: you can't use any other list environments inside one with the sentence key because the redefinition of item will also apply to those and will insert additional semicolons there as well.

        (You probably wouldn't want to nest lists inside a running sentence, but if you have to you can add letsentenceitemjoinempty inside the inner list.)






        Remarks




        • I didn't include the colon (:) because does not feel like it is a part of the list (and not affected if items are reordered).
          If you do want the colon to automatically be inserted you can replace the value of before* above by {unskip:sentencelistprep{;}}.


        • If you don't want to have to supply the sentence key every time, you can create a custom list environment that includes it with e.g.



          newlist{myitemize}{itemize}{1}
          setlist[myitemize]{label=textbullet,sentence}


        • The before and after keys overwrite sentence if supplied later, but the converse is not true because sentence uses the starred versions before* and after*.


        • sentencelistprep{;}, which is called at the start of a list with sentence, does the following: it defines sentenceitemjoin asdefsentenceitemjoin{unskip;} and replaces item by a version that includes sentenceitemjoin.
          The first item therefore redefines sentenceitemjoin to unskip;, and every item after that consequently inserts a ; before it.







        share|improve this answer




























          2





          +50







          2





          +50



          2




          +50





          Here's a possible solution that works by redefining item.
          This may seem a little heavy-handed, but it is also how the itemjoin key for inline lists works.



          I'm using SetEnumitemKey to define a new key, sentence, that can be supplied to any list environment that enumitem knows about.
          It will append a period (.) to the last item and a semicolon (;) to every other item.



          documentclass{article}

          usepackage{enumitem}
          SetEnumitemKey{sentence}{%
          before*={sentencelistprep{;}},
          after*={unskip.},
          }

          letsentenceitemjoinempty
          edefsentenceitem{noexpandsentenceitemjoinunexpandedexpandafter{item}}%
          newcommand*sentencelistprep[1]{%
          defsentenceitemjoin{defsentenceitemjoin{unskip#1}}%
          letitemsentenceitem
          }

          begin{document}

          Here is an texttt{itemize} environment whose items are part of this sentence and therefore come with appropriate punctuation:
          begin{itemize}[sentence]
          item a list item that could go first but also last
          item another list item that I'm not sure about that is long enough to span two lines
          item this one should go last unless I think of another one
          end{itemize}

          It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

          end{document}


          output




          Warning: you can't use any other list environments inside one with the sentence key because the redefinition of item will also apply to those and will insert additional semicolons there as well.

          (You probably wouldn't want to nest lists inside a running sentence, but if you have to you can add letsentenceitemjoinempty inside the inner list.)






          Remarks




          • I didn't include the colon (:) because does not feel like it is a part of the list (and not affected if items are reordered).
            If you do want the colon to automatically be inserted you can replace the value of before* above by {unskip:sentencelistprep{;}}.


          • If you don't want to have to supply the sentence key every time, you can create a custom list environment that includes it with e.g.



            newlist{myitemize}{itemize}{1}
            setlist[myitemize]{label=textbullet,sentence}


          • The before and after keys overwrite sentence if supplied later, but the converse is not true because sentence uses the starred versions before* and after*.


          • sentencelistprep{;}, which is called at the start of a list with sentence, does the following: it defines sentenceitemjoin asdefsentenceitemjoin{unskip;} and replaces item by a version that includes sentenceitemjoin.
            The first item therefore redefines sentenceitemjoin to unskip;, and every item after that consequently inserts a ; before it.







          share|improve this answer















          Here's a possible solution that works by redefining item.
          This may seem a little heavy-handed, but it is also how the itemjoin key for inline lists works.



          I'm using SetEnumitemKey to define a new key, sentence, that can be supplied to any list environment that enumitem knows about.
          It will append a period (.) to the last item and a semicolon (;) to every other item.



          documentclass{article}

          usepackage{enumitem}
          SetEnumitemKey{sentence}{%
          before*={sentencelistprep{;}},
          after*={unskip.},
          }

          letsentenceitemjoinempty
          edefsentenceitem{noexpandsentenceitemjoinunexpandedexpandafter{item}}%
          newcommand*sentencelistprep[1]{%
          defsentenceitemjoin{defsentenceitemjoin{unskip#1}}%
          letitemsentenceitem
          }

          begin{document}

          Here is an texttt{itemize} environment whose items are part of this sentence and therefore come with appropriate punctuation:
          begin{itemize}[sentence]
          item a list item that could go first but also last
          item another list item that I'm not sure about that is long enough to span two lines
          item this one should go last unless I think of another one
          end{itemize}

          It's convenient because I can add, remove, and rearrange items without worrying about punctuation.

          end{document}


          output




          Warning: you can't use any other list environments inside one with the sentence key because the redefinition of item will also apply to those and will insert additional semicolons there as well.

          (You probably wouldn't want to nest lists inside a running sentence, but if you have to you can add letsentenceitemjoinempty inside the inner list.)






          Remarks




          • I didn't include the colon (:) because does not feel like it is a part of the list (and not affected if items are reordered).
            If you do want the colon to automatically be inserted you can replace the value of before* above by {unskip:sentencelistprep{;}}.


          • If you don't want to have to supply the sentence key every time, you can create a custom list environment that includes it with e.g.



            newlist{myitemize}{itemize}{1}
            setlist[myitemize]{label=textbullet,sentence}


          • The before and after keys overwrite sentence if supplied later, but the converse is not true because sentence uses the starred versions before* and after*.


          • sentencelistprep{;}, which is called at the start of a list with sentence, does the following: it defines sentenceitemjoin asdefsentenceitemjoin{unskip;} and replaces item by a version that includes sentenceitemjoin.
            The first item therefore redefines sentenceitemjoin to unskip;, and every item after that consequently inserts a ; before it.








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 31 at 13:50

























          answered Jan 30 at 23:44









          CircumscribeCircumscribe

          6,4312836




          6,4312836























              6














              Here is a version that sort of reproduces a display itemize allowing for the features of an itemize*. Below is the same content using inlineitem (provided in question), displayitem and a regular itemize for comparison purposes:



              enter image description here



              Notes:





              • The color red has been added to make it easier to compare the three versions. You can replace the definition of Show with



                newcommand*{Show}[1]{#1}


                to eliminate the highlighting or simply remove all references to the Show macro.



              • The "sort of" is because I wasn't able to get the vertical spacing of the very first item to match what itemize yields.



              Code:



              documentclass{article}
              usepackage{enumitem}
              usepackage{xcolor}

              newcommand*{NextLine}{%
              newline
              vspace*{0.5baselineskip}%
              hspace*{dimexprlabelindent+labelwidth-labelseprelax}%
              }%
              newcommand*{Show}[1]{textcolor{red}{bfseries#1}}% Make it easier to see difference



              newlist{inlineitem}{itemize*}{1}
              setlist[inlineitem]{ % Customize itemize* environ
              before={unskipShow:}, % Colon before list
              itemjoin={{Show;}}, % Join with semicolons
              itemjoin*={{Show{; and}}}, % Last join has "; and "
              label={}, % No label
              after=., % Period at end of last item
              }

              newlist{displayitem}{itemize*}{1}
              setlist[displayitem]{ % Customize itemize* environ
              before={unskipShow:NextLine}, % Colon before list
              itemjoin={Show;NextLine}, % Join with semicolons
              itemjoin*={Show{; and}NextLine}, % Last join has "; and "
              label={$bullet$}, % Label
              after={unskipShow.endgrafnoindent}, % Period at end of last item
              }

              pagecolor{white}
              begin{document}
              noindent
              Here is some text in a verb|inlineitem|
              begin{inlineitem}
              item a list item that could go first but also last
              item another list item that I'm not sure about
              item this one should go last unless I think of another one
              end{inlineitem}
              Some text after verb|inlineitem|.

              bigskip

              noindent
              Here is the same text in a verb|displayitem|
              begin{displayitem}
              item a list item that could go first but also last
              item another list item that I'm not sure about
              item this one should go last unless I think of another one
              end{displayitem}
              Some text after verb|displayitem|.

              bigskip

              noindent
              Here is the same text in an verb|itemize|
              begin{itemize}
              item a list item that could go first but also last
              item another list item that I'm not sure about
              item this one should go last unless I think of another one
              end{itemize}
              Some text after regular verb|itemize|.
              end{document}





              share|improve this answer




























                6














                Here is a version that sort of reproduces a display itemize allowing for the features of an itemize*. Below is the same content using inlineitem (provided in question), displayitem and a regular itemize for comparison purposes:



                enter image description here



                Notes:





                • The color red has been added to make it easier to compare the three versions. You can replace the definition of Show with



                  newcommand*{Show}[1]{#1}


                  to eliminate the highlighting or simply remove all references to the Show macro.



                • The "sort of" is because I wasn't able to get the vertical spacing of the very first item to match what itemize yields.



                Code:



                documentclass{article}
                usepackage{enumitem}
                usepackage{xcolor}

                newcommand*{NextLine}{%
                newline
                vspace*{0.5baselineskip}%
                hspace*{dimexprlabelindent+labelwidth-labelseprelax}%
                }%
                newcommand*{Show}[1]{textcolor{red}{bfseries#1}}% Make it easier to see difference



                newlist{inlineitem}{itemize*}{1}
                setlist[inlineitem]{ % Customize itemize* environ
                before={unskipShow:}, % Colon before list
                itemjoin={{Show;}}, % Join with semicolons
                itemjoin*={{Show{; and}}}, % Last join has "; and "
                label={}, % No label
                after=., % Period at end of last item
                }

                newlist{displayitem}{itemize*}{1}
                setlist[displayitem]{ % Customize itemize* environ
                before={unskipShow:NextLine}, % Colon before list
                itemjoin={Show;NextLine}, % Join with semicolons
                itemjoin*={Show{; and}NextLine}, % Last join has "; and "
                label={$bullet$}, % Label
                after={unskipShow.endgrafnoindent}, % Period at end of last item
                }

                pagecolor{white}
                begin{document}
                noindent
                Here is some text in a verb|inlineitem|
                begin{inlineitem}
                item a list item that could go first but also last
                item another list item that I'm not sure about
                item this one should go last unless I think of another one
                end{inlineitem}
                Some text after verb|inlineitem|.

                bigskip

                noindent
                Here is the same text in a verb|displayitem|
                begin{displayitem}
                item a list item that could go first but also last
                item another list item that I'm not sure about
                item this one should go last unless I think of another one
                end{displayitem}
                Some text after verb|displayitem|.

                bigskip

                noindent
                Here is the same text in an verb|itemize|
                begin{itemize}
                item a list item that could go first but also last
                item another list item that I'm not sure about
                item this one should go last unless I think of another one
                end{itemize}
                Some text after regular verb|itemize|.
                end{document}





                share|improve this answer


























                  6












                  6








                  6







                  Here is a version that sort of reproduces a display itemize allowing for the features of an itemize*. Below is the same content using inlineitem (provided in question), displayitem and a regular itemize for comparison purposes:



                  enter image description here



                  Notes:





                  • The color red has been added to make it easier to compare the three versions. You can replace the definition of Show with



                    newcommand*{Show}[1]{#1}


                    to eliminate the highlighting or simply remove all references to the Show macro.



                  • The "sort of" is because I wasn't able to get the vertical spacing of the very first item to match what itemize yields.



                  Code:



                  documentclass{article}
                  usepackage{enumitem}
                  usepackage{xcolor}

                  newcommand*{NextLine}{%
                  newline
                  vspace*{0.5baselineskip}%
                  hspace*{dimexprlabelindent+labelwidth-labelseprelax}%
                  }%
                  newcommand*{Show}[1]{textcolor{red}{bfseries#1}}% Make it easier to see difference



                  newlist{inlineitem}{itemize*}{1}
                  setlist[inlineitem]{ % Customize itemize* environ
                  before={unskipShow:}, % Colon before list
                  itemjoin={{Show;}}, % Join with semicolons
                  itemjoin*={{Show{; and}}}, % Last join has "; and "
                  label={}, % No label
                  after=., % Period at end of last item
                  }

                  newlist{displayitem}{itemize*}{1}
                  setlist[displayitem]{ % Customize itemize* environ
                  before={unskipShow:NextLine}, % Colon before list
                  itemjoin={Show;NextLine}, % Join with semicolons
                  itemjoin*={Show{; and}NextLine}, % Last join has "; and "
                  label={$bullet$}, % Label
                  after={unskipShow.endgrafnoindent}, % Period at end of last item
                  }

                  pagecolor{white}
                  begin{document}
                  noindent
                  Here is some text in a verb|inlineitem|
                  begin{inlineitem}
                  item a list item that could go first but also last
                  item another list item that I'm not sure about
                  item this one should go last unless I think of another one
                  end{inlineitem}
                  Some text after verb|inlineitem|.

                  bigskip

                  noindent
                  Here is the same text in a verb|displayitem|
                  begin{displayitem}
                  item a list item that could go first but also last
                  item another list item that I'm not sure about
                  item this one should go last unless I think of another one
                  end{displayitem}
                  Some text after verb|displayitem|.

                  bigskip

                  noindent
                  Here is the same text in an verb|itemize|
                  begin{itemize}
                  item a list item that could go first but also last
                  item another list item that I'm not sure about
                  item this one should go last unless I think of another one
                  end{itemize}
                  Some text after regular verb|itemize|.
                  end{document}





                  share|improve this answer













                  Here is a version that sort of reproduces a display itemize allowing for the features of an itemize*. Below is the same content using inlineitem (provided in question), displayitem and a regular itemize for comparison purposes:



                  enter image description here



                  Notes:





                  • The color red has been added to make it easier to compare the three versions. You can replace the definition of Show with



                    newcommand*{Show}[1]{#1}


                    to eliminate the highlighting or simply remove all references to the Show macro.



                  • The "sort of" is because I wasn't able to get the vertical spacing of the very first item to match what itemize yields.



                  Code:



                  documentclass{article}
                  usepackage{enumitem}
                  usepackage{xcolor}

                  newcommand*{NextLine}{%
                  newline
                  vspace*{0.5baselineskip}%
                  hspace*{dimexprlabelindent+labelwidth-labelseprelax}%
                  }%
                  newcommand*{Show}[1]{textcolor{red}{bfseries#1}}% Make it easier to see difference



                  newlist{inlineitem}{itemize*}{1}
                  setlist[inlineitem]{ % Customize itemize* environ
                  before={unskipShow:}, % Colon before list
                  itemjoin={{Show;}}, % Join with semicolons
                  itemjoin*={{Show{; and}}}, % Last join has "; and "
                  label={}, % No label
                  after=., % Period at end of last item
                  }

                  newlist{displayitem}{itemize*}{1}
                  setlist[displayitem]{ % Customize itemize* environ
                  before={unskipShow:NextLine}, % Colon before list
                  itemjoin={Show;NextLine}, % Join with semicolons
                  itemjoin*={Show{; and}NextLine}, % Last join has "; and "
                  label={$bullet$}, % Label
                  after={unskipShow.endgrafnoindent}, % Period at end of last item
                  }

                  pagecolor{white}
                  begin{document}
                  noindent
                  Here is some text in a verb|inlineitem|
                  begin{inlineitem}
                  item a list item that could go first but also last
                  item another list item that I'm not sure about
                  item this one should go last unless I think of another one
                  end{inlineitem}
                  Some text after verb|inlineitem|.

                  bigskip

                  noindent
                  Here is the same text in a verb|displayitem|
                  begin{displayitem}
                  item a list item that could go first but also last
                  item another list item that I'm not sure about
                  item this one should go last unless I think of another one
                  end{displayitem}
                  Some text after verb|displayitem|.

                  bigskip

                  noindent
                  Here is the same text in an verb|itemize|
                  begin{itemize}
                  item a list item that could go first but also last
                  item another list item that I'm not sure about
                  item this one should go last unless I think of another one
                  end{itemize}
                  Some text after regular verb|itemize|.
                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 30 at 21:47









                  Peter GrillPeter Grill

                  165k25438752




                  165k25438752






























                      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%2f450715%2fvertical-list-customization-like-enumitems-itemjoin%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

                      How to send String Array data to Server using php in android

                      Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                      Is anime1.com a legal site for watching anime?