# Put hyphen on the margin, not in the text

Normally Latex puts hyphens inside the text:

------------------------------------
Lorem ipsum dolor  sit amet, consec-
modo ligula eget dolor.  Aenean mas-
sa. Cum sociis natoque  penatibus et
magnis dis parturient montes, nasce-
tur ridiculus mus. Donec quam felis,
ultricies nec, pellentesque eu, pre-
tium quis, sem. Nulla consequat mas-
sa  quis  enim.  Donec  pede  justo,
fringilla vel, aliquet nec, vulputa-
te eget, arcu.
------------------------------------


But I want to put it beside the text, because it is easier on the eyes and better for the reading flow:

------------------------------------
Lorem ipsum dolor sit amet, consecte-
ligula eget dolor. Aenean massa. Cum
sociis natoque penatibus  et  magnis
dis parturient montes, nascetur ridi-
culus mus. Donec quam felis, ultrici-
es  nec,  pellentesque  eu,  pretium
quis,  sem.  Nulla  consequat  massa
quis enim. Donec pede justo, fringil-
la vel, aliquet nec, vulputate eget,
arcu.
------------------------------------


I know that it is possible because I have seen it in some PDFs which were most likely created using Latex, but I did not find out how it is done.

• +1 for the challenge, but not for the visual effect. Jun 15, 2015 at 15:30
• @Kay - The easiest way is to \usepackage[protrusion=true]{microtype}. Check its excellent documentation for all the details. Jun 15, 2015 at 15:32

I dislike the idea of having the dashes in the margin, but you could do so by increasing the protrusion factor of microtype.

This will also push other stuff like periods and the little hook of the "t" into the margin, but this would just be consistent. Have a look, if this is what you want:

% arara: pdflatex

\documentclass{article}
\usepackage[factor=2100]{microtype}
\usepackage{blindtext}
\setlength{\textwidth}{6cm}
\usepackage{showframe}

\begin{document}
\Blindtext
\end{document}


• Thank you very much Arash Esbat and LaRiFaRi! microtype was exactly what I was looking for.
– kay
Jun 15, 2015 at 15:49

In ConTeXt it's relatively easy with protrusion=pure:

\definefontfeature[default][default][protrusion=pure]

\setupalign[hanging]

\starttext
\input tufte
\stoptext