[l2h] Re: verbatim-like environments
Igor Pechtchanski
pechtcha at cs.nyu.edu
Thu Nov 11 23:42:21 CET 2004
For the record, I managed to fix this using
\newenvironment{AAApreform}[1]{%
\begin{tabular}{|l|}\hline%
#1
\begin{alltt}
}{\end{alltt}% This has to be on the same line as the braces
\hline\end{tabular}%
}
\newenvironment{BBBpreform}{%
\begin{AAApreform}{\color[rgb]{1.0,0.0,0.0}}{\end{AAApreform}%
}
And adding the following
$alltt_rx = 'AAApreform|BBBpreform';
1;
to .latex2html-init.
Hope this helps someone.
Igor
On Wed, 13 Oct 2004, Igor Pechtchanski wrote:
> 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!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
More information about the latex2html
mailing list