\documentclass[a4paper]{article}
\def\cs#1{{\normalfont\ttfamily\textbackslash#1}}
\font\orm=ocmr10

\def\testpar{``bla bla bla'' bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla? 
`bla bla bla' bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla\-bla bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla bla 
bla bla bla\discretionary{!}{`}{!{}`}bla bla bla' 
bla bla bla bla bla bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla: bla: 
bla: bla bla 
bla bla bla bla bla bla bla bla bla bla bla bla 
bla bla bla bla bla bla bla bla; bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla bla\-bla. 
bla bla bla bla bla bla bla bla bla bla bla bla 
bla bla bla bla bla bla bla bla; bla bla bla bla 
bla bla bla bla bla bla bla bla bla bla bla bla. 
}

\begin{document}
\hyphenpenalty=-1000 % to show a hyphen

This document demonstrates the use of \cs{marginchar} kerning
for hanging punktuation and hyphenation. The same method can
be used to achieve optical margin correction (a font can provide
more than one \cs{marginchar}).

Note that the algorithm deals properly with ligatures (``), 
\cs{parindent}, hanging indentation and complex discretionaries 
(\cs{discretionary}\texttt{\{!\}\{`\}\{!{}`\}}).
 
The different break in the penultimate line demonstrates that
the \cs{margin\-char} kerning is in fact taken into account during
line-breaking.

\subsection*{\cs{marginchar}$=-1$} \marginchar\orm=-1
\parindent=0pt
\hangindent=1cm
\hangafter=-3
\orm\testpar

\subsection*{\cs{marginchar}$=128$, hanging indentation and \cs{parindent}} \marginchar\orm=128
\parindent=0pt
\hangindent=1cm
\hangafter=-3
\orm\testpar

\subsection*{\cs{marginchar}$=128$, hanging indentation and \cs{noindent}} \marginchar\orm=128
\noindent
\parindent=0pt
\hangindent=1cm
\hangafter=-3
\orm\testpar

\end{document}
