0

How can I disable word breaks in the whole document? I don't want any of my words broken and hyphenated across 2 lines.

I have tried to use the package:

\usepackage[none]{hyphenat}

But then my margin gets weird. This is all my preamble:

\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{float}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage[english, danish]{babel}
\usepackage[table,xcdraw]{xcolor}
\usepackage{multicol}
\usepackage{adjustbox}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{tabu}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage{indentfirst}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{graphicx}
\linespread{1.5}

And in my main I have:

\documentclass{article}
\usepackage[a4paper, total={6in, 9in}]{geometry}
\input{z.preamble/preamble.tex}
  • 2
    Weird margins?! Can you show us what you mean by that? Instead, provide code starting with \documentclass and ending with \end{document} that the community can copy-and-paste-and-compile and see exactly what you mean. We don't have access to your z.preamble/preamble.tex, which currently makes your code somewhat useless. – Werner Oct 31 '18 at 20:21
  • 1
    If you disable hyphenation you need to allow something else, either over-stretched white space (use \sloppy) or stop justification and use \raggedright Trying to justify both margins while disabling hyphenation can not produce reasonable results. – David Carlisle Oct 31 '18 at 20:45
  • @DavidCarlisle Would you like to convert your comment into an answer? It seems it fixed the problem. – user36296 Jan 7 at 16:12
  • @samcarter done – David Carlisle Jan 7 at 16:13
1

If you disable hyphenation you need to allow something else, either over-stretched white space (use \sloppy) or stop justification and use \raggedright.

Trying to justify both margins while disabling hyphenation can not produce reasonable results.

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.