Ross very speedily fixed an alltt related problem for me a few months
ago by introducing the $alltt_rx variable. This works fine in most
cases but I've just come across a very strange case that I am at a
loss to explain. Take the following file

\documentclass[a4paper,12pt]{article}
\usepackage{alltt}

%begin{latexonly}
\newcommand{\chcol}[1]{}
\newenvironment{doutput}{\begin{alltt}}{\end{alltt}}
%end{latexonly}

\begin{htmlonly}
\usepackage{color}
\pagecolor[white]{1}
\newcommand{\chcol}[1]{\color{#1}}
\newenvironment{doutput}{\begin{alltt}\color{firebrick4}}{\end{alltt}\\}
\end{htmlonly}

\begin{document}

%\chcol{firebrick4}
\begin{doutput}
Enter a key: john
No information about `john'
Enter a key: John
Info for `John' is 
        Name: John Latham Phone: 6250 Room: CB-2.113
Enter a key: ^D
\end{doutput}
\end{document}

This (using l2h982b8) produces a <TT> environment but without the
<BR>'s at the end of each line, which was the problem I reported to
you in the first place. However, if I delete the **comment** line
%\chcol{firebrick4} 
that occurs before the start of the douput environment everything
works fine!

Any ideas what's going on here?

Thanks

Graham

Reply via email to