[l2h] verbatim does not work when having a math equation nearby in a table with '+' in it.

Ross Moore ross.moore at mq.edu.au
Mon Feb 13 05:08:38 CET 2012


Hello Nasser,

On 13/02/2012, at 12:50 PM, Nasser M. Abbasi wrote:

 ... and I got your 2nd email too, and have looked
at the contents of the .zip  file.

> On 2/12/2012 7:20 PM, Ross Moore wrote:
>> Hello Nasser,
>> 
>> On 12/02/2012, at 9:56 AM, Nasser M. Abbasi wrote:
>> 
>>> When I run this:
>>> 
>>> -----------------------------------
>>> \documentclass[12pt]{article}
>>> \usepackage{html}
>>> \usepackage{verbatim}
>>> \begin{document}
>>> \begin{verbatim}test\end{verbatim}
>> 
>>> \begin{tabular}{|l | }
>>> $f(x) = x^3 d$\\
>>> \end{tabular}
>>> \end{document}
>>> -------------------------
>>> 
>>> It works. Expected output. Verbatim displays 'test' and
>>> the math fine.


> ...
>> or
>> 
>> \verb|test|
>> 
> 
> This does NOT work. I just tried it.

Very strange.

> 
> ---------------------------
> \documentclass[12pt]{article}
> \usepackage{html}
> \usepackage{verbatim}
> \begin{document}
> \verb|test|
> \end{document}
> -----------------------
> 
> latex2html t.tex
> 
> produces an empty web page. no 'test' text in it. I always had
> problems getting \verb to work like this, that is what I
> use \begin{verbstim} and \end{verbatim}. Does the above
> work on your end? i.e generate 'test' in the HTML?

Yes, it does.

I'm using version 1.67 (2002)  installed many years ago
on a Mac, via  fink .
I've not tested later versions for Linux or Unix; but with 
such a simple document there should not be any significant difference.
That there seems to be, for you, puzzles me greatly.

> 
>> 
>> Can you run your failing job with  -debug   within a directory
>> that can be accessed across the web, and save the console messages
>> into a file. Make this directory and its siblings listable, and send me
>> the URL. I can then try to get an idea of what is going wrong, by
>> studying the temporary files that normally get deleted.
>> 
> 
> Sure, I am working now to generate these things you wanted,
> and will make new page and summarize these issues.

Please also add the option   -verbosity 10 
which generates significantly more screen messages.

In particular, you should have a block such as:

>>>  *** End-of-partition ***\documentclass[12pt]<<1>>article<<1>>
>>> \usepackage<<2>>html<<2>>
>>> \usepackage<<3>>verbatim<<3>>
>>> \begin<<4>>document<<4>>
>>> <tex2html_verb_mark>1<tex2html_verb_mark>
>>> \begin<<5>>tabular<<5>><<6>>|l | <<6>>
>>> \begin<<9>>tex2html_wrap_inline<<9>>$f(x) = x^3 +  d$\end<<10>>tex2html_wrap_inline<<10>>\\     <tex2html_comment_mark>2
>>> \end<<7>>tabular<<7>>
>>> \end<<8>>document<<8>>


notice in particular:

   <tex2html_verb_mark>1<tex2html_verb_mark>

which has replaced   \verb|test|
or similar with the  {verbatim}  environment.

and   <tex2html_comment_mark>2    replacing the comment.

At a later stage of processing, the verbatim stuff
should get replaced inside  <code>...</code>  tags,
using the string stored in a file:

   .../verb_with_math_issue/TMP/verbatim

When this happens there is a message:

  *** replace markers *** 

but no further processing messages are written.


To see what is happening here for you, find the appropriate
place in the  latex2html  script, and put in more print commands,
to see what is happening in detail.

 sub replace_markers

at line  roughly  7620  and

 sub replace_sensitive_markers   at  ~7670

which calls

 sub replace_verbatim_marks    at  ~8550

and/or

 sub replace_verb_marks     at ~8590


Trace what is actually happening by putting in extra lines like

    print STDOUT $_;

at strategic places.


> 
> Please give couple of 2 hrs will be done and will give
> a link.
> 
> thanks for your help.
> 
> --Nasser


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross.moore at mq.edu.au 
Mathematics Department                           office: E7A-419      
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------






More information about the latex2html mailing list