Not start a new page with scanty number of words, lines [duplicate]












0
















This question already has an answer here:




  • How do I prevent widow/orphan lines?

    6 answers




This script



documentclass{article}
usepackage{lipsum}
begin{document}
lipsum[1-5]
lipsum[6][1-2]
end{document}


produces the output



enter image description here



How can I avoid starting page 2 with such a scanty number of words, lines?










share|improve this question













marked as duplicate by Skillmon, JouleV, Kurt, Phelype Oleinik, Stefan Pinnow 10 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.























    0
















    This question already has an answer here:




    • How do I prevent widow/orphan lines?

      6 answers




    This script



    documentclass{article}
    usepackage{lipsum}
    begin{document}
    lipsum[1-5]
    lipsum[6][1-2]
    end{document}


    produces the output



    enter image description here



    How can I avoid starting page 2 with such a scanty number of words, lines?










    share|improve this question













    marked as duplicate by Skillmon, JouleV, Kurt, Phelype Oleinik, Stefan Pinnow 10 hours ago


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      0












      0








      0









      This question already has an answer here:




      • How do I prevent widow/orphan lines?

        6 answers




      This script



      documentclass{article}
      usepackage{lipsum}
      begin{document}
      lipsum[1-5]
      lipsum[6][1-2]
      end{document}


      produces the output



      enter image description here



      How can I avoid starting page 2 with such a scanty number of words, lines?










      share|improve this question















      This question already has an answer here:




      • How do I prevent widow/orphan lines?

        6 answers




      This script



      documentclass{article}
      usepackage{lipsum}
      begin{document}
      lipsum[1-5]
      lipsum[6][1-2]
      end{document}


      produces the output



      enter image description here



      How can I avoid starting page 2 with such a scanty number of words, lines?





      This question already has an answer here:




      • How do I prevent widow/orphan lines?

        6 answers








      page-breaking






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 hours ago









      ViestursViesturs

      1,93141227




      1,93141227




      marked as duplicate by Skillmon, JouleV, Kurt, Phelype Oleinik, Stefan Pinnow 10 hours ago


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by Skillmon, JouleV, Kurt, Phelype Oleinik, Stefan Pinnow 10 hours ago


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes


















          2














          You can use TeX's looseness parameter. If you say looseness=<number> for a paragraph, TeX will try to make it <number> lines longer than what would have been done otherwise, without exceeding the current tolerance. <number> may be negative, so in your case, setting looseness=-1 for one of the paragraphs does the trick:



          documentclass{article}
          usepackage{lipsum}
          begin{document}
          looseness=-1 % make the next paragraph one line shorter than usual
          lipsum[1-5]

          lipsum[6][1-2]
          end{document}


          According to the TeXbook, looseness is reset to zero at the same time as hangindent, hangafter, and parshape are reset to their normal values, which is




          at the end of every paragraph, and (by local definitions) whenever it
          enters internal vertical mode.




          (TeXbook p. 103)



          Therefore, the looseness=-1 in the above example affects only the first of the five paragraphs produced by lipsum[1-5]. There is no need to do this assignment in a group.



          If I remember correctly, the TeXbook also mentions a trick to spread some looseness among several paragraphs. I could probably find it if you're interested.



          As suggested in Skillmon's comment, another way would be to play with penalties, in particular with widowpenalty (to avoid page breaking before the last line of a paragraph) and linepenalty (to make TeX's line breaking algorithm more reluctant to add lines to a paragraph: this penalty defines the “base cost” of each line).






          share|improve this answer
































            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            You can use TeX's looseness parameter. If you say looseness=<number> for a paragraph, TeX will try to make it <number> lines longer than what would have been done otherwise, without exceeding the current tolerance. <number> may be negative, so in your case, setting looseness=-1 for one of the paragraphs does the trick:



            documentclass{article}
            usepackage{lipsum}
            begin{document}
            looseness=-1 % make the next paragraph one line shorter than usual
            lipsum[1-5]

            lipsum[6][1-2]
            end{document}


            According to the TeXbook, looseness is reset to zero at the same time as hangindent, hangafter, and parshape are reset to their normal values, which is




            at the end of every paragraph, and (by local definitions) whenever it
            enters internal vertical mode.




            (TeXbook p. 103)



            Therefore, the looseness=-1 in the above example affects only the first of the five paragraphs produced by lipsum[1-5]. There is no need to do this assignment in a group.



            If I remember correctly, the TeXbook also mentions a trick to spread some looseness among several paragraphs. I could probably find it if you're interested.



            As suggested in Skillmon's comment, another way would be to play with penalties, in particular with widowpenalty (to avoid page breaking before the last line of a paragraph) and linepenalty (to make TeX's line breaking algorithm more reluctant to add lines to a paragraph: this penalty defines the “base cost” of each line).






            share|improve this answer






























              2














              You can use TeX's looseness parameter. If you say looseness=<number> for a paragraph, TeX will try to make it <number> lines longer than what would have been done otherwise, without exceeding the current tolerance. <number> may be negative, so in your case, setting looseness=-1 for one of the paragraphs does the trick:



              documentclass{article}
              usepackage{lipsum}
              begin{document}
              looseness=-1 % make the next paragraph one line shorter than usual
              lipsum[1-5]

              lipsum[6][1-2]
              end{document}


              According to the TeXbook, looseness is reset to zero at the same time as hangindent, hangafter, and parshape are reset to their normal values, which is




              at the end of every paragraph, and (by local definitions) whenever it
              enters internal vertical mode.




              (TeXbook p. 103)



              Therefore, the looseness=-1 in the above example affects only the first of the five paragraphs produced by lipsum[1-5]. There is no need to do this assignment in a group.



              If I remember correctly, the TeXbook also mentions a trick to spread some looseness among several paragraphs. I could probably find it if you're interested.



              As suggested in Skillmon's comment, another way would be to play with penalties, in particular with widowpenalty (to avoid page breaking before the last line of a paragraph) and linepenalty (to make TeX's line breaking algorithm more reluctant to add lines to a paragraph: this penalty defines the “base cost” of each line).






              share|improve this answer




























                2












                2








                2







                You can use TeX's looseness parameter. If you say looseness=<number> for a paragraph, TeX will try to make it <number> lines longer than what would have been done otherwise, without exceeding the current tolerance. <number> may be negative, so in your case, setting looseness=-1 for one of the paragraphs does the trick:



                documentclass{article}
                usepackage{lipsum}
                begin{document}
                looseness=-1 % make the next paragraph one line shorter than usual
                lipsum[1-5]

                lipsum[6][1-2]
                end{document}


                According to the TeXbook, looseness is reset to zero at the same time as hangindent, hangafter, and parshape are reset to their normal values, which is




                at the end of every paragraph, and (by local definitions) whenever it
                enters internal vertical mode.




                (TeXbook p. 103)



                Therefore, the looseness=-1 in the above example affects only the first of the five paragraphs produced by lipsum[1-5]. There is no need to do this assignment in a group.



                If I remember correctly, the TeXbook also mentions a trick to spread some looseness among several paragraphs. I could probably find it if you're interested.



                As suggested in Skillmon's comment, another way would be to play with penalties, in particular with widowpenalty (to avoid page breaking before the last line of a paragraph) and linepenalty (to make TeX's line breaking algorithm more reluctant to add lines to a paragraph: this penalty defines the “base cost” of each line).






                share|improve this answer















                You can use TeX's looseness parameter. If you say looseness=<number> for a paragraph, TeX will try to make it <number> lines longer than what would have been done otherwise, without exceeding the current tolerance. <number> may be negative, so in your case, setting looseness=-1 for one of the paragraphs does the trick:



                documentclass{article}
                usepackage{lipsum}
                begin{document}
                looseness=-1 % make the next paragraph one line shorter than usual
                lipsum[1-5]

                lipsum[6][1-2]
                end{document}


                According to the TeXbook, looseness is reset to zero at the same time as hangindent, hangafter, and parshape are reset to their normal values, which is




                at the end of every paragraph, and (by local definitions) whenever it
                enters internal vertical mode.




                (TeXbook p. 103)



                Therefore, the looseness=-1 in the above example affects only the first of the five paragraphs produced by lipsum[1-5]. There is no need to do this assignment in a group.



                If I remember correctly, the TeXbook also mentions a trick to spread some looseness among several paragraphs. I could probably find it if you're interested.



                As suggested in Skillmon's comment, another way would be to play with penalties, in particular with widowpenalty (to avoid page breaking before the last line of a paragraph) and linepenalty (to make TeX's line breaking algorithm more reluctant to add lines to a paragraph: this penalty defines the “base cost” of each line).







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 11 hours ago

























                answered 12 hours ago









                frougonfrougon

                756611




                756611















                    Popular posts from this blog

                    Contact image not getting when fetch all contact list from iPhone by CNContact

                    count number of partitions of a set with n elements into k subsets

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks