Re: [ROOT] Bug in THtml

From: axel@fnal.gov
Date: Sat Jul 06 2002 - 08:55:51 MEST


Hi,

* <pre> tags within Begin_html and End_html are ignored as THtml 
generates enclosing pre tags for documentation found in sources / 
headers automatically. If THtml would allow additional contained pre 
layers some browsers can't display the page properly anymore. I will 
add a little bit of brain to THtml to allow it to see if there's 
another layer of pres opened (in which case the pre /pre tags are 
removed) or if the Begin/End_html's pres are closed (in which case 
they'll make it into the html output).

* The use of pre in documentation output is somewhat bad style, 
concerning the way it looks (yes, personal opinion), the html code 
generated and the ease of use. The reason it exists is THtml's history. 
Christian H Christensen and I are dealing with a rewrite of THtml, and 
I hope we will have a new implementation in a few months. Which won't 
force pres on you anymore.

* There is NO reason to use Begin_html / End_html for e.g. class doc 
(as in your example) if you don't have html tags. Just start every line 
of the documentation with a "//". If you do have html tags, then you're 
right, you really want ot close THtml's pre tag.

Thus, the corrected example would be:
//______________________________________________________________________
________
//
// The class TMuster defines all the properties of the materials 
// used by Litrani. Notice that calling the constructor of the 
// class is not enough for defining all the properties. The 
// constructor defines name, title, sensibility characteristics 
// (detector or not), magnetic permeability, absorption length(s), 
// A, Z, and density, the 3 last ones being not used by Litrani for 
// the time being. The constructor does not define index of 
// refraction or the components of the dielectric tensor, neither 
// fluorescent characteristics of the material, nor dE/dx deposit, 
// nor diffusion characteristics, no radiation length, no Moliere 
// radius, no critical energy. See below how to define these 
// characteristics.
//

Anyway, thanks for pointing it out. I'll add the patch some time during 
the weekend.

Cheers, Axel.


----- Original Message -----
From: GENTIT Francois-Xavier DAPNIA <GENTIT@dapnia.cea.fr>
Date: Friday, July 5, 2002 3:38 pm
Subject: [ROOT] Bug in THtml

>  Dear rooters,
>  Since a long time, I had found that inserting </pre> just after
> //Begin_Html was required, although not documented. This is 
> confirmed by the
> code in the sources of ROOT, see for example the code of 
> TMinuit.cxx. If one
> forgot it, a whole paragraph was displayed on a single very very 
> long line.
> This is because THtml inserts a <pre> (why?) just before inserting 
> the html
> comprised between Begin_Html and End_Html.
>  With the new version of ROOT (tested 3.03/06 on Windows and 
> Linux), the
> things have become worse : the </pre> is no more taken into 
> account. THtml
> simply drops it. So that I had to manually open all my html files 
> to throw
> away the spurious <pre>
>  I join with this mail a minimum program (with a makefile for 
> Windows)showing the problem. If you unpack it, you will find 2 
> directories:  (1) - A directory Muster3 containing the minimum program
>  (2) - A directory html, containing the file TMuster3.html 
> produced by
> THtml, and containing the file TMuster3_corrected.html, which is 
> identical,except that the spurious <pre> inserted by THtml has 
> been taken out. You can
> look at those 2 files with Internet Explorer, and you will see the 
> problem!
>  Thanks for either saying to me what I am doing wrong, or 
> correcting the
> bug if it is a bug.
> 
> François-Xavier Gentit
> DAPNIA/SPP CEA Saclay
> http://gentit.home.cern.ch/gentit/
> 
> 
> <<BugHtml.ZIP>> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:59 MET