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?

1

2 Answers 2

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

2
  • @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. Sep 29, 2018 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, 2018 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.

3
  • 1
    I presume OP's actually seeing an over/underfull box and is assuming that the text is not justified, thus I asked for a MWE. Sep 28, 2018 at 15:12
  • @!Phelype Oleinik. Perfect! Thanks. I'd enjoy learning how you got the specific html page location. Sep 28, 2018 at 15:13
  • 1
    Right below the post there is a share button. Click it and a link to the specific answer will appear :) Sep 28, 2018 at 15:24

You must log in to answer this question.

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