[l2h] verbatim-like environments

Igor Pechtchanski pechtcha at cs.nyu.edu
Thu Oct 14 04:09:28 CEST 2004


Hi,

I'm attempting to define a verbatim-like environment, like so:

\newenvironment{AAA}{%
\begin{tabular}{|l|}\hline%
\color[rgb]{1.0,0.0,0.0}%
\begin{rawhtml}<PRE>\end{rawhtml}%
}{%
\begin{rawhtml}</PRE>\end{rawhtml}%
\hline\end{tabular}%
}

and then use it:

\begin{AAA}
  Hello
    there,
      hi?

  Well,
     goodbye!
\end{AAA}

I'm getting the following output (approximated in ASCII art), the red
color is properly set:

.--------------.
|              |
|Hello         |
|    there     |
|      hi?     |
|              |
|              |
|              |
|Well,         |
|     goodbye! |
|              |
`--------------'

As I see it, there are two problems with the above picture:

1) the first line after every double line break loses its leading spaces
2) there are extra lines on every double line break and at the start and
   end of the <PRE>..</PRE> block

The expected output would be something like

.--------------.
|  Hello       |
|    there     |
|      hi?     |
|              |
|  Well,       |
|     goodbye! |
`--------------'

Is there a way of fixing this?  I'm not using the actual verbatim
environment because I'd like to be able to change colors in the middle of
those pseudo-verbatim blocks.

$ /usr/bin/latex2html --version
 [english]This is jLaTeX2HTML Version 2002 (1.62) JA patch-1.4
by Kenshi Muto, Debian Project.

Original LaTeX2HTML Version 2002 (1.62)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

$ rpm -qf /usr/bin/latex2html
tetex-latex-1.0.7-66

$ uname -srvmpio
Linux 2.4.20-18.9 #1 Thu May 29 07:08:16 EDT 2003 i686 i386 GNU/Linux

Any ideas and help would be appreciated.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw



More information about the latex2html mailing list