Custom itemize alignment












4















I intend to combine the itemize environment with the minipage environment to prevent paragraphs from appearing on separate pages, but as a result the alignment of the bullet and the text changes from
Desired result

to
Actual result

To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.



documentclass{article}
begin{document}
begin{itemize}
item
begin{minipage}{textwidth}
Lorem\
Ipsum
end{minipage}
end{itemize}
end{document}


EDIT:
The option [t] for minipage has been suggested, and generally works, but is not fully compatible with other environments. When pairing it with the array environment as follows, the bullet resets to a centered position.



documentclass{article}
begin{document}
begin{itemize}
item
begin{minipage}[t]{textwidth}
$begin{array}{rcl}
x &=& y\
y &=& x\
2x &neq& 5y
end{array}$
end{minipage}
end{itemize}
end{document}


Array doesn't respect option t










share|improve this question









New contributor




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

























    4















    I intend to combine the itemize environment with the minipage environment to prevent paragraphs from appearing on separate pages, but as a result the alignment of the bullet and the text changes from
    Desired result

    to
    Actual result

    To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.



    documentclass{article}
    begin{document}
    begin{itemize}
    item
    begin{minipage}{textwidth}
    Lorem\
    Ipsum
    end{minipage}
    end{itemize}
    end{document}


    EDIT:
    The option [t] for minipage has been suggested, and generally works, but is not fully compatible with other environments. When pairing it with the array environment as follows, the bullet resets to a centered position.



    documentclass{article}
    begin{document}
    begin{itemize}
    item
    begin{minipage}[t]{textwidth}
    $begin{array}{rcl}
    x &=& y\
    y &=& x\
    2x &neq& 5y
    end{array}$
    end{minipage}
    end{itemize}
    end{document}


    Array doesn't respect option t










    share|improve this question









    New contributor




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























      4












      4








      4


      1






      I intend to combine the itemize environment with the minipage environment to prevent paragraphs from appearing on separate pages, but as a result the alignment of the bullet and the text changes from
      Desired result

      to
      Actual result

      To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.



      documentclass{article}
      begin{document}
      begin{itemize}
      item
      begin{minipage}{textwidth}
      Lorem\
      Ipsum
      end{minipage}
      end{itemize}
      end{document}


      EDIT:
      The option [t] for minipage has been suggested, and generally works, but is not fully compatible with other environments. When pairing it with the array environment as follows, the bullet resets to a centered position.



      documentclass{article}
      begin{document}
      begin{itemize}
      item
      begin{minipage}[t]{textwidth}
      $begin{array}{rcl}
      x &=& y\
      y &=& x\
      2x &neq& 5y
      end{array}$
      end{minipage}
      end{itemize}
      end{document}


      Array doesn't respect option t










      share|improve this question









      New contributor




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












      I intend to combine the itemize environment with the minipage environment to prevent paragraphs from appearing on separate pages, but as a result the alignment of the bullet and the text changes from
      Desired result

      to
      Actual result

      To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.



      documentclass{article}
      begin{document}
      begin{itemize}
      item
      begin{minipage}{textwidth}
      Lorem\
      Ipsum
      end{minipage}
      end{itemize}
      end{document}


      EDIT:
      The option [t] for minipage has been suggested, and generally works, but is not fully compatible with other environments. When pairing it with the array environment as follows, the bullet resets to a centered position.



      documentclass{article}
      begin{document}
      begin{itemize}
      item
      begin{minipage}[t]{textwidth}
      $begin{array}{rcl}
      x &=& y\
      y &=& x\
      2x &neq& 5y
      end{array}$
      end{minipage}
      end{itemize}
      end{document}


      Array doesn't respect option t







      spacing enumerate itemize






      share|improve this question









      New contributor




      Iter niam 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




      Iter niam 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 10 hours ago







      Iter niam













      New contributor




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









      asked 11 hours ago









      Iter niamIter niam

      233




      233




      New contributor




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





      New contributor





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






      Iter niam 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


















          3














          Using option [t] for minipage does the trick:



          documentclass{article}
          usepackage[showframe]{geometry}
          usepackage{lipsum}
          usepackage{enumerate}
          begin{document}
          begin{itemize}
          item
          begin{minipage}[t]{linewidth} % Thanks to Bernard
          lipsum[1]

          lipsum[2]
          end{minipage}
          end{itemize}
          lipsum[3]
          end{document}


          enter image description here



          Note: The usepackage[showframe]{geometry} is only for showing margin, you can delete it in actual document.



          Edit:



          As for the conflict:



          The reason for the conflicts is that the whole array environment is considered to be an element, like a letter in the line, which means the array environment will be "centerized" with the first line.



          A quick and tricky way to solve this:



          documentclass{article}
          usepackage{listings}
          begin{document}
          begin{itemize}
          item
          begin{minipage}[t]{linewidth}
          raisebox{-baselineskip}{$begin{array}{rcl}
          x &=& y\
          y &=& x\
          2x &neq& 5y
          end{array}$}
          end{minipage}
          end{itemize}
          end{document}


          enter image description here



          A standard solution for the array: We use [t] once again (thanks to koleygr):



          documentclass{article}
          usepackage{listings}
          begin{document}
          begin{itemize}
          item
          begin{minipage}[t]{linewidth}
          $begin{array}[t]{rcl}
          x &=& y\
          y &=& x\
          2x &neq& 5y
          end{array}$
          end{minipage}
          end{itemize}
          end{document}


          enter image description here






          share|improve this answer


























          • Even with the simpler begin{minipage}[t]{textwidth}, it works.

            – Bernard
            11 hours ago











          • @Bernard Yes, but for the OP's example only. If he/she has a paragraph in the item, we have to do some calculations so that it doesn't get "Overfull hbox...". Warnings are not fatal, but they annoy me ;-) and the output is bad then.

            – JouleV
            11 hours ago













          • That's right, but check what happens replacing textwidth with linewidth. No dimexpr necessary.

            – Bernard
            11 hours ago








          • 1





            For the array a begin{array}[t] should work too

            – koleygr
            10 hours ago






          • 1





            welcome... We all learn every day... (You already have my +1)

            – koleygr
            10 hours ago



















          3














          What I would do is this:



          documentclass{article}
          usepackage{lipsum}
          newsavebox{mybottombox} % Box to save the text of the command
          newlength{mybottomlength} % The length of our text inside the command
          newlength{availafter} % The available length left on the page after placing our text


          % Optional argument is the minimum length after the nobottom text for not pagebreak. Change it to your needs
          newcommand{mnobreak}[2][0pt]{savebox{mybottombox}{vbox{#2}}setlength{mybottomlength}{htmybottombox}%
          setlength{availafter}{dimexprtextheight-mybottomlength-pagetotalrelax}ifdimavailafter<#1%
          pagebreaknoindentusebox{mybottombox}%
          else%
          noindentusebox{mybottombox}%
          fi%
          }%

          begin{document}
          lipsum[1-4]

          To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example. To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.

          begin{itemize}
          item mnobreak{Lorem\Lipsum\Lorem\Lipsum\Lorem}
          end{itemize}
          end{document}


          Remove the last Lorem to see that the item would break with it.



          Source: my old answer here



          Output:



          enter image description here






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "85"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            Iter niam 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%2f477703%2fcustom-itemize-alignment%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









            3














            Using option [t] for minipage does the trick:



            documentclass{article}
            usepackage[showframe]{geometry}
            usepackage{lipsum}
            usepackage{enumerate}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth} % Thanks to Bernard
            lipsum[1]

            lipsum[2]
            end{minipage}
            end{itemize}
            lipsum[3]
            end{document}


            enter image description here



            Note: The usepackage[showframe]{geometry} is only for showing margin, you can delete it in actual document.



            Edit:



            As for the conflict:



            The reason for the conflicts is that the whole array environment is considered to be an element, like a letter in the line, which means the array environment will be "centerized" with the first line.



            A quick and tricky way to solve this:



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            raisebox{-baselineskip}{$begin{array}{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$}
            end{minipage}
            end{itemize}
            end{document}


            enter image description here



            A standard solution for the array: We use [t] once again (thanks to koleygr):



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            $begin{array}[t]{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$
            end{minipage}
            end{itemize}
            end{document}


            enter image description here






            share|improve this answer


























            • Even with the simpler begin{minipage}[t]{textwidth}, it works.

              – Bernard
              11 hours ago











            • @Bernard Yes, but for the OP's example only. If he/she has a paragraph in the item, we have to do some calculations so that it doesn't get "Overfull hbox...". Warnings are not fatal, but they annoy me ;-) and the output is bad then.

              – JouleV
              11 hours ago













            • That's right, but check what happens replacing textwidth with linewidth. No dimexpr necessary.

              – Bernard
              11 hours ago








            • 1





              For the array a begin{array}[t] should work too

              – koleygr
              10 hours ago






            • 1





              welcome... We all learn every day... (You already have my +1)

              – koleygr
              10 hours ago
















            3














            Using option [t] for minipage does the trick:



            documentclass{article}
            usepackage[showframe]{geometry}
            usepackage{lipsum}
            usepackage{enumerate}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth} % Thanks to Bernard
            lipsum[1]

            lipsum[2]
            end{minipage}
            end{itemize}
            lipsum[3]
            end{document}


            enter image description here



            Note: The usepackage[showframe]{geometry} is only for showing margin, you can delete it in actual document.



            Edit:



            As for the conflict:



            The reason for the conflicts is that the whole array environment is considered to be an element, like a letter in the line, which means the array environment will be "centerized" with the first line.



            A quick and tricky way to solve this:



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            raisebox{-baselineskip}{$begin{array}{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$}
            end{minipage}
            end{itemize}
            end{document}


            enter image description here



            A standard solution for the array: We use [t] once again (thanks to koleygr):



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            $begin{array}[t]{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$
            end{minipage}
            end{itemize}
            end{document}


            enter image description here






            share|improve this answer


























            • Even with the simpler begin{minipage}[t]{textwidth}, it works.

              – Bernard
              11 hours ago











            • @Bernard Yes, but for the OP's example only. If he/she has a paragraph in the item, we have to do some calculations so that it doesn't get "Overfull hbox...". Warnings are not fatal, but they annoy me ;-) and the output is bad then.

              – JouleV
              11 hours ago













            • That's right, but check what happens replacing textwidth with linewidth. No dimexpr necessary.

              – Bernard
              11 hours ago








            • 1





              For the array a begin{array}[t] should work too

              – koleygr
              10 hours ago






            • 1





              welcome... We all learn every day... (You already have my +1)

              – koleygr
              10 hours ago














            3












            3








            3







            Using option [t] for minipage does the trick:



            documentclass{article}
            usepackage[showframe]{geometry}
            usepackage{lipsum}
            usepackage{enumerate}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth} % Thanks to Bernard
            lipsum[1]

            lipsum[2]
            end{minipage}
            end{itemize}
            lipsum[3]
            end{document}


            enter image description here



            Note: The usepackage[showframe]{geometry} is only for showing margin, you can delete it in actual document.



            Edit:



            As for the conflict:



            The reason for the conflicts is that the whole array environment is considered to be an element, like a letter in the line, which means the array environment will be "centerized" with the first line.



            A quick and tricky way to solve this:



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            raisebox{-baselineskip}{$begin{array}{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$}
            end{minipage}
            end{itemize}
            end{document}


            enter image description here



            A standard solution for the array: We use [t] once again (thanks to koleygr):



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            $begin{array}[t]{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$
            end{minipage}
            end{itemize}
            end{document}


            enter image description here






            share|improve this answer















            Using option [t] for minipage does the trick:



            documentclass{article}
            usepackage[showframe]{geometry}
            usepackage{lipsum}
            usepackage{enumerate}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth} % Thanks to Bernard
            lipsum[1]

            lipsum[2]
            end{minipage}
            end{itemize}
            lipsum[3]
            end{document}


            enter image description here



            Note: The usepackage[showframe]{geometry} is only for showing margin, you can delete it in actual document.



            Edit:



            As for the conflict:



            The reason for the conflicts is that the whole array environment is considered to be an element, like a letter in the line, which means the array environment will be "centerized" with the first line.



            A quick and tricky way to solve this:



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            raisebox{-baselineskip}{$begin{array}{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$}
            end{minipage}
            end{itemize}
            end{document}


            enter image description here



            A standard solution for the array: We use [t] once again (thanks to koleygr):



            documentclass{article}
            usepackage{listings}
            begin{document}
            begin{itemize}
            item
            begin{minipage}[t]{linewidth}
            $begin{array}[t]{rcl}
            x &=& y\
            y &=& x\
            2x &neq& 5y
            end{array}$
            end{minipage}
            end{itemize}
            end{document}


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 10 hours ago

























            answered 11 hours ago









            JouleVJouleV

            4,76111039




            4,76111039













            • Even with the simpler begin{minipage}[t]{textwidth}, it works.

              – Bernard
              11 hours ago











            • @Bernard Yes, but for the OP's example only. If he/she has a paragraph in the item, we have to do some calculations so that it doesn't get "Overfull hbox...". Warnings are not fatal, but they annoy me ;-) and the output is bad then.

              – JouleV
              11 hours ago













            • That's right, but check what happens replacing textwidth with linewidth. No dimexpr necessary.

              – Bernard
              11 hours ago








            • 1





              For the array a begin{array}[t] should work too

              – koleygr
              10 hours ago






            • 1





              welcome... We all learn every day... (You already have my +1)

              – koleygr
              10 hours ago



















            • Even with the simpler begin{minipage}[t]{textwidth}, it works.

              – Bernard
              11 hours ago











            • @Bernard Yes, but for the OP's example only. If he/she has a paragraph in the item, we have to do some calculations so that it doesn't get "Overfull hbox...". Warnings are not fatal, but they annoy me ;-) and the output is bad then.

              – JouleV
              11 hours ago













            • That's right, but check what happens replacing textwidth with linewidth. No dimexpr necessary.

              – Bernard
              11 hours ago








            • 1





              For the array a begin{array}[t] should work too

              – koleygr
              10 hours ago






            • 1





              welcome... We all learn every day... (You already have my +1)

              – koleygr
              10 hours ago

















            Even with the simpler begin{minipage}[t]{textwidth}, it works.

            – Bernard
            11 hours ago





            Even with the simpler begin{minipage}[t]{textwidth}, it works.

            – Bernard
            11 hours ago













            @Bernard Yes, but for the OP's example only. If he/she has a paragraph in the item, we have to do some calculations so that it doesn't get "Overfull hbox...". Warnings are not fatal, but they annoy me ;-) and the output is bad then.

            – JouleV
            11 hours ago







            @Bernard Yes, but for the OP's example only. If he/she has a paragraph in the item, we have to do some calculations so that it doesn't get "Overfull hbox...". Warnings are not fatal, but they annoy me ;-) and the output is bad then.

            – JouleV
            11 hours ago















            That's right, but check what happens replacing textwidth with linewidth. No dimexpr necessary.

            – Bernard
            11 hours ago







            That's right, but check what happens replacing textwidth with linewidth. No dimexpr necessary.

            – Bernard
            11 hours ago






            1




            1





            For the array a begin{array}[t] should work too

            – koleygr
            10 hours ago





            For the array a begin{array}[t] should work too

            – koleygr
            10 hours ago




            1




            1





            welcome... We all learn every day... (You already have my +1)

            – koleygr
            10 hours ago





            welcome... We all learn every day... (You already have my +1)

            – koleygr
            10 hours ago











            3














            What I would do is this:



            documentclass{article}
            usepackage{lipsum}
            newsavebox{mybottombox} % Box to save the text of the command
            newlength{mybottomlength} % The length of our text inside the command
            newlength{availafter} % The available length left on the page after placing our text


            % Optional argument is the minimum length after the nobottom text for not pagebreak. Change it to your needs
            newcommand{mnobreak}[2][0pt]{savebox{mybottombox}{vbox{#2}}setlength{mybottomlength}{htmybottombox}%
            setlength{availafter}{dimexprtextheight-mybottomlength-pagetotalrelax}ifdimavailafter<#1%
            pagebreaknoindentusebox{mybottombox}%
            else%
            noindentusebox{mybottombox}%
            fi%
            }%

            begin{document}
            lipsum[1-4]

            To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example. To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.

            begin{itemize}
            item mnobreak{Lorem\Lipsum\Lorem\Lipsum\Lorem}
            end{itemize}
            end{document}


            Remove the last Lorem to see that the item would break with it.



            Source: my old answer here



            Output:



            enter image description here






            share|improve this answer






























              3














              What I would do is this:



              documentclass{article}
              usepackage{lipsum}
              newsavebox{mybottombox} % Box to save the text of the command
              newlength{mybottomlength} % The length of our text inside the command
              newlength{availafter} % The available length left on the page after placing our text


              % Optional argument is the minimum length after the nobottom text for not pagebreak. Change it to your needs
              newcommand{mnobreak}[2][0pt]{savebox{mybottombox}{vbox{#2}}setlength{mybottomlength}{htmybottombox}%
              setlength{availafter}{dimexprtextheight-mybottomlength-pagetotalrelax}ifdimavailafter<#1%
              pagebreaknoindentusebox{mybottombox}%
              else%
              noindentusebox{mybottombox}%
              fi%
              }%

              begin{document}
              lipsum[1-4]

              To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example. To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.

              begin{itemize}
              item mnobreak{Lorem\Lipsum\Lorem\Lipsum\Lorem}
              end{itemize}
              end{document}


              Remove the last Lorem to see that the item would break with it.



              Source: my old answer here



              Output:



              enter image description here






              share|improve this answer




























                3












                3








                3







                What I would do is this:



                documentclass{article}
                usepackage{lipsum}
                newsavebox{mybottombox} % Box to save the text of the command
                newlength{mybottomlength} % The length of our text inside the command
                newlength{availafter} % The available length left on the page after placing our text


                % Optional argument is the minimum length after the nobottom text for not pagebreak. Change it to your needs
                newcommand{mnobreak}[2][0pt]{savebox{mybottombox}{vbox{#2}}setlength{mybottomlength}{htmybottombox}%
                setlength{availafter}{dimexprtextheight-mybottomlength-pagetotalrelax}ifdimavailafter<#1%
                pagebreaknoindentusebox{mybottombox}%
                else%
                noindentusebox{mybottombox}%
                fi%
                }%

                begin{document}
                lipsum[1-4]

                To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example. To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.

                begin{itemize}
                item mnobreak{Lorem\Lipsum\Lorem\Lipsum\Lorem}
                end{itemize}
                end{document}


                Remove the last Lorem to see that the item would break with it.



                Source: my old answer here



                Output:



                enter image description here






                share|improve this answer















                What I would do is this:



                documentclass{article}
                usepackage{lipsum}
                newsavebox{mybottombox} % Box to save the text of the command
                newlength{mybottomlength} % The length of our text inside the command
                newlength{availafter} % The available length left on the page after placing our text


                % Optional argument is the minimum length after the nobottom text for not pagebreak. Change it to your needs
                newcommand{mnobreak}[2][0pt]{savebox{mybottombox}{vbox{#2}}setlength{mybottomlength}{htmybottombox}%
                setlength{availafter}{dimexprtextheight-mybottomlength-pagetotalrelax}ifdimavailafter<#1%
                pagebreaknoindentusebox{mybottombox}%
                else%
                noindentusebox{mybottombox}%
                fi%
                }%

                begin{document}
                lipsum[1-4]

                To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example. To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.

                begin{itemize}
                item mnobreak{Lorem\Lipsum\Lorem\Lipsum\Lorem}
                end{itemize}
                end{document}


                Remove the last Lorem to see that the item would break with it.



                Source: my old answer here



                Output:



                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 11 hours ago

























                answered 11 hours ago









                koleygrkoleygr

                11.7k11038




                11.7k11038






















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










                    draft saved

                    draft discarded


















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













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












                    Iter niam 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%2f477703%2fcustom-itemize-alignment%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 label and detect the document text images

                    Vallis Paradisi

                    Tabula Rosettana