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}
article tutorials
add a comment |
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}
article tutorials
add a comment |
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}
article tutorials
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}
article tutorials
article tutorials
edited 2 hours ago
Zarko
118k865155
118k865155
asked 2 hours ago
Shah Saud Alam
82
82
add a comment |
add a comment |
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
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 withlipsum
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
add a comment |
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
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 withlipsum
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
add a comment |
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
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 withlipsum
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
add a comment |
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
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
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 withlipsum
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
add a comment |
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 withlipsum
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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