[l2h] listings- set a line in a different color

Claus Behl claus at bempf.de
Sun Jan 8 12:51:21 CET 2006


im using the package listings to set source code.
I want to get some words in a different color.
Thats what i do in my tex-file:

\lstset{moredelim =*[is][\color{red}]{|}{|}}

//Holds the Focus

Now C_dialog is in red. But this dosnt work with latex2html.

For html output i remove the |. Here is my .latex2html-init file to do this.

$HTML_VERSION = "4.0"; 
sub do_env_lstlisting {
    local ($_) = @_;
    my $env_id = ++$global{'max_id'};
    $_ =~ s/\\par/\n\n/g;
    $_ =~ s/\|//g;
    &process_undefined_environment('lstlisting', $env_id, $_);

But of course it would be great if i can get the word in html in red too.
Is there a way to do this?

Claus Behl

More information about the latex2html mailing list