Verbatim with line breaks

From Wiki
Revision as of 11:58, 29 July 2005 by Mojca Miklavec (talk | contribs) (only half of the answer)
Jump to navigation Jump to search

< From LaTeX to ConTeXt

In LaTeX

\documentclass[frenchb]{article}% in french texts, : ; ? and ! are active
\usepackage[latin9]{inputenc}
\usepackage{listings,babel}
\lstset{breaklines=true,basicstyle=\ttfamily}
\begin{document}
\hsize8cm\noindent\lstinline{hööah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohalölo}
\end{document}

In ConTeXt

\mainlanguage[fr]
\framed
   [width=8cm,
    align=flushleft]{%
\starttyping[lines=hyphenated]
hööah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohalölo
\stoptyping
}

To the one who wrote this question: the ConTeXt example above shows how to hyphenate verbatim text (you can't really notice that from the example), but not how to hyphenate French verbatim with active characters. You have to ask on the mailing list for that if you are still interested.