> 
> In using latex2html 98.1p1, I discovered that the following latex:
> 
> -\,-
> 
> translates to only one dash in html, rather than two dashes.  Apparently, since html 
>does not support a thin space, latex2html ignores the \, and treats the construct as 
>-- (a medium dash for number ranges), which is represented in html as a single dash.  
>Can this problem be patched?
 
Yes, it can be patched -- it's a 2-liner.
But that is just treating the symptom rather than attacking the real cause
of the disease.

The disease:
basically you are using the combination  -\,-  to have a special meaning.
Better is to use a macro e.g. \ddl whithin your source.
When processed by LaTeX, this expands to what you want there.
When processed by LaTeX2HTML it expands to what you think is best
for HTML pages:
 e.g.

%begin{latexonly}
 \newcommand{\ddl}{-\,-}
%end{latexonly}
\begin{latexonly}
 \newcommand{\ddl}{- -}
\end{latexonly}

In fact a better expansion in the LaTeX case is:
 \nexcommand{\ddl}{\hbox{-\,-}}
since this will give the same result in either text-mode or math-mode
and it suppresses the flexible glue that is otherwise used by \, .


Treating the symptom:

Find the place in the latex2html script which handles ignored commands:
specifically the line:
            } elsif ($ignore{$cmd}) { # Ignored command

You'll see that the folowing line handles the special case of '\ '
by inserting a space.
Add the following lines:

                $pc_after = join(''," ", $pc_after)
                    if (($cmd eq ',')&&($pc_after =~ /^\-/s)&&($ref_before =~/\-$/s));

which test specifically for  -\,-  and insert a space for the \, .
Ordinarily \, is ignored completely within text-mode.


Hope this helps,

        Ross Moore



> -- Steve Sherman
> -- Irvine Compiler Corporation
> 
> 

Reply via email to