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?
Asked
Active
Viewed 6,595 times
6
-
2Welcome to TeX.SX! Could you please show us how the text does not adjust to the margins? It should. Show us a minimal working example (MWE) with an example paragraph that is not justified. – Phelype Oleinik Sep 28 '18 at 14:38
2 Answers
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:
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 issnipping toolin 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.
Let's see if this addresses what you're asking.
Phelype Oleinik
- 70,814
Saphar Koshet
- 371
-
1I presume OP's actually seeing an over/underfull box and is assuming that the text is not justified, thus I asked for a MWE. – Phelype Oleinik Sep 28 '18 at 15:12
-
@!Phelype Oleinik. Perfect! Thanks. I'd enjoy learning how you got the specific html page location. – Saphar Koshet Sep 28 '18 at 15:13
-
1Right below the post there is a
sharebutton. Click it and a link to the specific answer will appear :) – Phelype Oleinik Sep 28 '18 at 15:24

