Difference between revisions of "Verbatim with line breaks"

From Wiki
Jump to navigation Jump to search
 
(only half of the answer)
Line 1: Line 1:
 
< [[From LaTeX to ConTeXt]]
 
< [[From LaTeX to ConTeXt]]
  
LaTeX:
+
===In LaTeX===
<pre>
+
<texcode>
 
\documentclass[frenchb]{article}% in french texts, : ; ? and ! are active
 
\documentclass[frenchb]{article}% in french texts, : ; ? and ! are active
 
\usepackage[latin9]{inputenc}
 
\usepackage[latin9]{inputenc}
Line 10: Line 10:
 
\hsize8cm\noindent\lstinline{hööah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohalölo}
 
\hsize8cm\noindent\lstinline{hööah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohalölo}
 
\end{document}
 
\end{document}
</pre>
+
</texcode>
  
ConTeXt: Perhaps with <tt>\hyphenatedfile</tt>?
+
===In ConTeXt===
 +
 
 +
<texcode>
 +
\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
 +
}
 +
</texcode>
 +
 
 +
<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
 +
}
 +
</context>
 +
 
 +
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.

Revision as of 11:58, 29 July 2005

< 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.