8

Normally Latex puts hyphens inside the text:

------------------------------------
Lorem ipsum dolor  sit amet, consec-
tetuer adipiscing elit.  Aenean com-
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-
tuer adipiscing elit. Aenean commodo
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.

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

2 Answers 2

3

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}

enter image description here

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

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

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

\setupalign[hanging]

\starttext
\input tufte
\stoptext

enter image description here

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.