Overhanging lines











up vote
1
down vote

favorite












I am new to LaTeX and I am trying to write my dissertation using LaTeX. Recently, I was working on this tutorial with Lipsum to create random text. Upon compiling, I see that some of these lines are overhanging. Is there a simple way to avoid this?



documentclass[12pt,letterpaper,oneside]{article}
usepackage[margin=1in]{geometry}
usepackage{fontspec} % Allows to choose any system font with XeLaTeX
setmainfont{Palatino} % Sets main font to Arial, Book Antiqua, Helvetica Neue
usepackage{lipsum} % To generate test text, use lipsum[#numoflines#] in body
usepackage{tocloft} % Package for Table of Contents, Lists of Figures and Tables
renewcommand{contentsname}{Table of Contents} % Changes the 'Contents' to 'Table of Contents'
renewcommand{cftsecleader}{cftdotfill{cftdotsep}} % Sets the dots in the section leader in Table of Contents; See PDF
renewcommand{cftdot}{.} % Renews the Dots in the TOC to user chosen symbols
renewcommand{cfttoctitlefont}{Huge} % Renews the TOC title font. Can set the size or font type

title{Interesting Tutorial}
author{John Doe}
date{today}

begin{document}

maketitle
thispagestyle{empty}
setcounter{page}{1}
pagenumbering{roman}
newpage
tableofcontents

clearpage
pagenumbering{arabic}
section{TeX Tutorial 1}
subsection{Your First Document}
lipsum[10]
section{TeX Tutorial 2}
subsection{Make Title Command}
lipsum[11-20]

end{document}


enter image description hereenter image description here










share|improve this question




























    up vote
    1
    down vote

    favorite












    I am new to LaTeX and I am trying to write my dissertation using LaTeX. Recently, I was working on this tutorial with Lipsum to create random text. Upon compiling, I see that some of these lines are overhanging. Is there a simple way to avoid this?



    documentclass[12pt,letterpaper,oneside]{article}
    usepackage[margin=1in]{geometry}
    usepackage{fontspec} % Allows to choose any system font with XeLaTeX
    setmainfont{Palatino} % Sets main font to Arial, Book Antiqua, Helvetica Neue
    usepackage{lipsum} % To generate test text, use lipsum[#numoflines#] in body
    usepackage{tocloft} % Package for Table of Contents, Lists of Figures and Tables
    renewcommand{contentsname}{Table of Contents} % Changes the 'Contents' to 'Table of Contents'
    renewcommand{cftsecleader}{cftdotfill{cftdotsep}} % Sets the dots in the section leader in Table of Contents; See PDF
    renewcommand{cftdot}{.} % Renews the Dots in the TOC to user chosen symbols
    renewcommand{cfttoctitlefont}{Huge} % Renews the TOC title font. Can set the size or font type

    title{Interesting Tutorial}
    author{John Doe}
    date{today}

    begin{document}

    maketitle
    thispagestyle{empty}
    setcounter{page}{1}
    pagenumbering{roman}
    newpage
    tableofcontents

    clearpage
    pagenumbering{arabic}
    section{TeX Tutorial 1}
    subsection{Your First Document}
    lipsum[10]
    section{TeX Tutorial 2}
    subsection{Make Title Command}
    lipsum[11-20]

    end{document}


    enter image description hereenter image description here










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am new to LaTeX and I am trying to write my dissertation using LaTeX. Recently, I was working on this tutorial with Lipsum to create random text. Upon compiling, I see that some of these lines are overhanging. Is there a simple way to avoid this?



      documentclass[12pt,letterpaper,oneside]{article}
      usepackage[margin=1in]{geometry}
      usepackage{fontspec} % Allows to choose any system font with XeLaTeX
      setmainfont{Palatino} % Sets main font to Arial, Book Antiqua, Helvetica Neue
      usepackage{lipsum} % To generate test text, use lipsum[#numoflines#] in body
      usepackage{tocloft} % Package for Table of Contents, Lists of Figures and Tables
      renewcommand{contentsname}{Table of Contents} % Changes the 'Contents' to 'Table of Contents'
      renewcommand{cftsecleader}{cftdotfill{cftdotsep}} % Sets the dots in the section leader in Table of Contents; See PDF
      renewcommand{cftdot}{.} % Renews the Dots in the TOC to user chosen symbols
      renewcommand{cfttoctitlefont}{Huge} % Renews the TOC title font. Can set the size or font type

      title{Interesting Tutorial}
      author{John Doe}
      date{today}

      begin{document}

      maketitle
      thispagestyle{empty}
      setcounter{page}{1}
      pagenumbering{roman}
      newpage
      tableofcontents

      clearpage
      pagenumbering{arabic}
      section{TeX Tutorial 1}
      subsection{Your First Document}
      lipsum[10]
      section{TeX Tutorial 2}
      subsection{Make Title Command}
      lipsum[11-20]

      end{document}


      enter image description hereenter image description here










      share|improve this question















      I am new to LaTeX and I am trying to write my dissertation using LaTeX. Recently, I was working on this tutorial with Lipsum to create random text. Upon compiling, I see that some of these lines are overhanging. Is there a simple way to avoid this?



      documentclass[12pt,letterpaper,oneside]{article}
      usepackage[margin=1in]{geometry}
      usepackage{fontspec} % Allows to choose any system font with XeLaTeX
      setmainfont{Palatino} % Sets main font to Arial, Book Antiqua, Helvetica Neue
      usepackage{lipsum} % To generate test text, use lipsum[#numoflines#] in body
      usepackage{tocloft} % Package for Table of Contents, Lists of Figures and Tables
      renewcommand{contentsname}{Table of Contents} % Changes the 'Contents' to 'Table of Contents'
      renewcommand{cftsecleader}{cftdotfill{cftdotsep}} % Sets the dots in the section leader in Table of Contents; See PDF
      renewcommand{cftdot}{.} % Renews the Dots in the TOC to user chosen symbols
      renewcommand{cfttoctitlefont}{Huge} % Renews the TOC title font. Can set the size or font type

      title{Interesting Tutorial}
      author{John Doe}
      date{today}

      begin{document}

      maketitle
      thispagestyle{empty}
      setcounter{page}{1}
      pagenumbering{roman}
      newpage
      tableofcontents

      clearpage
      pagenumbering{arabic}
      section{TeX Tutorial 1}
      subsection{Your First Document}
      lipsum[10]
      section{TeX Tutorial 2}
      subsection{Make Title Command}
      lipsum[11-20]

      end{document}


      enter image description hereenter image description here







      article tutorials






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 hours ago









      Zarko

      118k865155




      118k865155










      asked 2 hours ago









      Shah Saud Alam

      82




      82






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          The lines are overhanging into the right-hand margin because there are no hyphenation patterns for some of the words to properly break them. You can try adding sloppy at the beginning of the document; this loosens the restrictions on stretch for lines that have protruding text, like in your case. Compare the below with/without sloppy:



          documentclass{article}

          usepackage{lipsum}

          begin{document}

          sloppylipsum[1-50]

          end{document}


          Alternatively, use a different text generator, like kantlipsum or blindtext.



          kant[1-50]

          blindtext





          share|improve this answer





















          • wow. Thanks a ton. The sloppy works like a charm. However, the spacing between words is loose (as you have mentioned). kant still suffers from the original problem but the random text is more english (so that is good to know).
            – Shah Saud Alam
            1 hour ago












          • @ShahSaudAlam: Sure... but you're not submitting a dissertation with lipsum text, surely. You're just wanting to generate a template that showcases a specific layout.
            – Werner
            55 mins ago










          • oh yeah, definitely. I am just trying to create a template that can accept chapter files (.tex) later and take care of all of the formatting for me.
            – Shah Saud Alam
            30 mins ago











          Your Answer








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

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

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


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464616%2foverhanging-lines%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          The lines are overhanging into the right-hand margin because there are no hyphenation patterns for some of the words to properly break them. You can try adding sloppy at the beginning of the document; this loosens the restrictions on stretch for lines that have protruding text, like in your case. Compare the below with/without sloppy:



          documentclass{article}

          usepackage{lipsum}

          begin{document}

          sloppylipsum[1-50]

          end{document}


          Alternatively, use a different text generator, like kantlipsum or blindtext.



          kant[1-50]

          blindtext





          share|improve this answer





















          • wow. Thanks a ton. The sloppy works like a charm. However, the spacing between words is loose (as you have mentioned). kant still suffers from the original problem but the random text is more english (so that is good to know).
            – Shah Saud Alam
            1 hour ago












          • @ShahSaudAlam: Sure... but you're not submitting a dissertation with lipsum text, surely. You're just wanting to generate a template that showcases a specific layout.
            – Werner
            55 mins ago










          • oh yeah, definitely. I am just trying to create a template that can accept chapter files (.tex) later and take care of all of the formatting for me.
            – Shah Saud Alam
            30 mins ago















          up vote
          0
          down vote



          accepted










          The lines are overhanging into the right-hand margin because there are no hyphenation patterns for some of the words to properly break them. You can try adding sloppy at the beginning of the document; this loosens the restrictions on stretch for lines that have protruding text, like in your case. Compare the below with/without sloppy:



          documentclass{article}

          usepackage{lipsum}

          begin{document}

          sloppylipsum[1-50]

          end{document}


          Alternatively, use a different text generator, like kantlipsum or blindtext.



          kant[1-50]

          blindtext





          share|improve this answer





















          • wow. Thanks a ton. The sloppy works like a charm. However, the spacing between words is loose (as you have mentioned). kant still suffers from the original problem but the random text is more english (so that is good to know).
            – Shah Saud Alam
            1 hour ago












          • @ShahSaudAlam: Sure... but you're not submitting a dissertation with lipsum text, surely. You're just wanting to generate a template that showcases a specific layout.
            – Werner
            55 mins ago










          • oh yeah, definitely. I am just trying to create a template that can accept chapter files (.tex) later and take care of all of the formatting for me.
            – Shah Saud Alam
            30 mins ago













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          The lines are overhanging into the right-hand margin because there are no hyphenation patterns for some of the words to properly break them. You can try adding sloppy at the beginning of the document; this loosens the restrictions on stretch for lines that have protruding text, like in your case. Compare the below with/without sloppy:



          documentclass{article}

          usepackage{lipsum}

          begin{document}

          sloppylipsum[1-50]

          end{document}


          Alternatively, use a different text generator, like kantlipsum or blindtext.



          kant[1-50]

          blindtext





          share|improve this answer












          The lines are overhanging into the right-hand margin because there are no hyphenation patterns for some of the words to properly break them. You can try adding sloppy at the beginning of the document; this loosens the restrictions on stretch for lines that have protruding text, like in your case. Compare the below with/without sloppy:



          documentclass{article}

          usepackage{lipsum}

          begin{document}

          sloppylipsum[1-50]

          end{document}


          Alternatively, use a different text generator, like kantlipsum or blindtext.



          kant[1-50]

          blindtext






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          Werner

          435k619531641




          435k619531641












          • wow. Thanks a ton. The sloppy works like a charm. However, the spacing between words is loose (as you have mentioned). kant still suffers from the original problem but the random text is more english (so that is good to know).
            – Shah Saud Alam
            1 hour ago












          • @ShahSaudAlam: Sure... but you're not submitting a dissertation with lipsum text, surely. You're just wanting to generate a template that showcases a specific layout.
            – Werner
            55 mins ago










          • oh yeah, definitely. I am just trying to create a template that can accept chapter files (.tex) later and take care of all of the formatting for me.
            – Shah Saud Alam
            30 mins ago


















          • wow. Thanks a ton. The sloppy works like a charm. However, the spacing between words is loose (as you have mentioned). kant still suffers from the original problem but the random text is more english (so that is good to know).
            – Shah Saud Alam
            1 hour ago












          • @ShahSaudAlam: Sure... but you're not submitting a dissertation with lipsum text, surely. You're just wanting to generate a template that showcases a specific layout.
            – Werner
            55 mins ago










          • oh yeah, definitely. I am just trying to create a template that can accept chapter files (.tex) later and take care of all of the formatting for me.
            – Shah Saud Alam
            30 mins ago
















          wow. Thanks a ton. The sloppy works like a charm. However, the spacing between words is loose (as you have mentioned). kant still suffers from the original problem but the random text is more english (so that is good to know).
          – Shah Saud Alam
          1 hour ago






          wow. Thanks a ton. The sloppy works like a charm. However, the spacing between words is loose (as you have mentioned). kant still suffers from the original problem but the random text is more english (so that is good to know).
          – Shah Saud Alam
          1 hour ago














          @ShahSaudAlam: Sure... but you're not submitting a dissertation with lipsum text, surely. You're just wanting to generate a template that showcases a specific layout.
          – Werner
          55 mins ago




          @ShahSaudAlam: Sure... but you're not submitting a dissertation with lipsum text, surely. You're just wanting to generate a template that showcases a specific layout.
          – Werner
          55 mins ago












          oh yeah, definitely. I am just trying to create a template that can accept chapter files (.tex) later and take care of all of the formatting for me.
          – Shah Saud Alam
          30 mins ago




          oh yeah, definitely. I am just trying to create a template that can accept chapter files (.tex) later and take care of all of the formatting for me.
          – Shah Saud Alam
          30 mins ago


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f464616%2foverhanging-lines%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

          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