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

  • 1
    Why are you loading package ragged2e? It allows hyphenated ragged documents, but you disallowed hyphenation completely. – Johannes_B Jun 11 '17 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 Jun 11 '17 at 6:19
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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.