6

For write a text without hyphenation I use \package[none]{hyphenation}. When I apply this package, the text does not adjust to the page margins. What command I should apply for justify text?

Sigur
  • 37,330

2 Answers2

7

You need to use \sloppy. For example:

\documentclass{article}
\usepackage{lipsum}
\usepackage[none]{hyphenat}
\begin{document}
Text that fills up a line but with a long unhyphenatble word,
abababababababababab, at the end of the first line.

\lipsum[1]

\sloppy

Text that fills up a line but with a long unhyphenatble word,
abababababababababab, at the end of the first line.

\lipsum[1]
\end{document}

I have tried to post an image of the result but failed (I've failed before. I tried the post image icon for my file hyphenatprob.pdf but it does nothing). Run the MWE to see what the result is.

i took a liberty and add image of result of above mwe:

enter image description here

Zarko
  • 296,517
Peter Wilson
  • 28,066
  • @Zarko Thanks for adding the output of the MWE. How did you do it? I have tried on several occasions, also for external MWE code, but failed. I work on the Ubuntu OS but am not adept at moving file contents around. – Peter Wilson Sep 29 '18 at 18:09
  • first i compile your mwe and from sumatra (my pdf previewer) with sipping tool cut area of interest, locally store it as png image. then i add it to answer with clicking on icon for image (right of {} icon), which guide me further to load stored file. unfortunately i'm not familiar with ubunto os, so i don't know the name for similar tool as is snipping tool in windows os. – Zarko Sep 29 '18 at 18:21
3

Welcome to programmable typesetting. Just a couple of quick questions/observations. I expect the package name is improved by using \usepackage[none]{hyphenat}, see CTAN page for {hyphenat}. \LaTeX presumes "full justification" as the desired formatting.

Very brief example here:

\documentclass{article}

\usepackage[none]{hyphenat}
\usepackage{lipsum} 

\begin{document}

\lipsum[25]

\end{document}

This is "borrowed" from Joel Berger's Tex Stack Exchange Answer.

This is the output.

enter image description here

Let's see if this addresses what you're asking.