1

Here is my code

\documentclass[12pt,oneside,letterpaper,chapterprefix=on,numbers=noenddot,
]{scrbook}

%%%page set-up
\usepackage[none]{hyphenat} %to get rid of hyphenation
\usepackage[margin=1in,includefoot,heightrounded]{geometry}
\usepackage{mathptmx}%times new roman
\usepackage[doublespacing]{setspace}% <- changed
\usepackage{indentfirst} %indent first paragraph 
\setlength{\parindent}{2em} %adjust indentation
\usepackage[document]{ragged2e} %ragged right
\setlength{\RaggedRightParindent}{\parindent}
\pagestyle{plain}

\begin{document}
standard LaTeX commands to change the text alignment. Alternativaly you can use therrrrrrrrrrrrrrrttttttttttttttt

\end{document}

I need the latex to start the long word from the new line and do not exceed the right margin of 1 inch. Could you give me some help. thank you

2
  • 1
    Why are you loading package ragged2e? It allows hyphenated ragged documents, but you disallowed hyphenation completely.
    – Johannes_B
    Commented Jun 11, 2017 at 6:16
  • 1
    Just put \raggedright in your preamble and don't listen to the sharelatex stuff. en.wikibooks.org/wiki/LaTeX/…
    – Johannes_B
    Commented Jun 11, 2017 at 6:19

1 Answer 1

2

Since you suppressing all hyphenation, there's not much of a point in loading the ragged2e package and using its \RaggedRight mode (which is enabled via the option document).

Instead, I'd like to suggest you use the instruction \raggedright and run \setlength{\parindent}{2em} after executing \raggedright.

enter image description here

\documentclass[12pt,oneside,letterpaper,chapterprefix=on,numbers=noenddot]{scrbook}

%%% document setup
\usepackage[none]{hyphenat} % no hyphenation
\raggedright
\setlength{\parindent}{2em} % *after* "\raggedright"

\usepackage[margin=1in,includefoot,heightrounded]{geometry}
\usepackage{mathptmx}%times new roman
\usepackage[doublespacing]{setspace}% <- changed
\usepackage{indentfirst} %indent first line after a sectioning header

\begin{document}

standard LaTeX commands to change the text alignment. 
Alternativaly you can use therrrrrrrrrrrrrrrttttttttttttttt

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .