Text Formatting ⇒ text in margin
text in margin
Trying to format a paper in report mode and I manually set the margins using the geometry package. I didn't like how latex was hyphenating so many words so I used the hyphenat package with the "none" option so that there was no automatic hyphenation. But now, some words are overlapping the predefined margins (on the right side of the pages). Does anyone know how to maintain uniform margins without hyphenating at line breaks? Thanks.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
text in margin
Code: Select all
\sloppy- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
text in margin
Please explain that by means of an example (MWE).howard wrote:[…] I didn't like how latex was hyphenating so many words so I used the hyphenat package with the "none" option so that there was no automatic hyphenation. […]
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
text in margin
text in margin
text text text text text text text text text text text te-
xt text text text text text text text text text text text
text text text text text text text text text text text te-
xt text text text text text text text text text text text
text text text text text text text text text text text te-
xt text text text ...
It just seemed that latex was hyphenating at nearly every line break. I did find a solution (not sure of how robust it is) using the
Code: Select all
\hyphenpenalty=5000 \tolerance=1000Re: text in margin
Like te-
xt?
Or just, a lot of the time?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
text in margin
Provide a small, complete and compilable minimal working example (MWE). This example has to reproduce the undesired behaviour clearly. In your case a MWE would at least consist of your preamble and the critical part of your text.howard wrote:[…] Of course any better advice would be greatly appreciated. […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
text in margin
Code: Select all
\documentclass[12pt,letterpaper]{report}
\usepackage[T1]{fontenc}
%\usepackage[none]{hyphenat}
\usepackage{ae,aecompl,amsmath,amsfonts}
\usepackage{pslatex}
\usepackage[left=1.5in,top=0.8in,right=1in,bottom=1in,nohead,nofoot]{geometry}
\begin{document}
\noindent Presented in this chapter are some fundamental theoretical considerations relevant to crystal structures and x-ray diffraction studies. These include crystal systems, symmetry operations, Miller indices, the Bragg and Laue conditions, and basics of x-ray scattering theory.
\end{document}
Code: Select all
\hypenpenalty=5000
\tolerance=1000- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
text in margin
If you want to use another font, try the Latin Modern font package.
Code: Select all
\documentclass[12pt,letterpaper]{report}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsfonts}
\usepackage[left=1.5in,top=0.8in,right=1in,bottom=1in,nohead,nofoot]{geometry}
\usepackage{lmodern}
\begin{document}
\noindent Presented in this chapter are some fundamental theoretical considerations relevant to crystal structures and x-ray diffraction studies. These include crystal systems, symmetry operations, Miller indices, the Bragg and Laue conditions, and basics of x-ray scattering theory.
\end{document}Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10