[l2h] Inline math symbol with no descender
Raphael Clifford
raphael.clifford@jesus.ox.ac.uk
Thu, 14 Feb 2002 17:16:01 +0000 (GMT)
On Thu, 14 Feb 2002, Ross Moore wrote:
Ross
Your suggestion produces a very nice output. Thanks!
The line to "hack" in imgtoimg is around 1120
if(&do_cmd_norename("$PNMCROP -bot < $in",$tmp)) {
my ($type,$width,$height2) = get_image_geometry($tmp);
if($type && ($height - $height2) < 3 ) {
# command succeeded and shaved less than 3 row
The number 3 needs to be replaced by some function of x
and y where x=MATH_SCALE_FACTOR and y=EXTRA_IMAGE_SCALE
(both defined in l2hconf.pm). The function is something like:
double the product and then add some, but that's just trial
error. For example, with x=1.3 and y=2.0 the value 6 works OK.
Raf
>
> OK; here it is:
>
> Image "/tmp/l2h2225/p2252.pnm" is PPM, 47x49
> Running "/usr/bin/pnmcrop -bot < /tmp/l2h2225/p2252.pnm > /tmp/l2h2225/p2252.t02"
> pnmcrop: cropping 9 rows off the bottom
>
> This 9 rows is too much for the 'shaving' logic.
> It's expecting to remove only 1 or 2 lines.
> (Perhaps something else is wrong too.)
>
> So it keeps the unshaved /tmp/l2h2225/p2252.pnm for the final
> image, rather than the shaved /tmp/l2h2225/p2252.t02 .
>
> So a quick fix (i.e. hack) is to find where this logic is
> encoded in pstoimg (it's just a Perl script).
> Find where the test is done and increase the number of lines
> allowed to be shaved.
>
> Of course you cannot set an arbitrary number, else this will make
> a real hash of $-$.
>
>
> Give that a try, if you are prepared to make small edits
> in the script.
>
>
> Cheers,
>
> Ross
>
>
>
> > and the lthconf.pm file at
> > http://www.jesus.ox.ac.uk/~rcliffor/scaled/l2hconf.pm
> > along with the tex file at
> > http://www.jesus.ox.ac.uk/~rcliffor/scaled/scaled.tex.
> >
> > Thanks again
> >
> > Raf
> >
> > > >
> > > > I apologise for asking this simple question but I cannot find the
> > > > answer. I'm using Version 99.2beta8(1.46) and if the solution is
> > > > to upgrade please let me know.
> > > >
> > > > The problem occurs when I include a math symbol that has no
> > > > descender (ie a symbol that does not descend below the base line of
> > > > the text)
> > > >
> > > > For example, when Latex2html processes the line:
> > > >
> > > > > Let $X$ be a random variable
> > > >
> > > > it consistently locates the image for X above the line. This is
> > > > when viewed with both Netscape and IE. IE is slightly better than
> > > > Netscape.
> > >
> > > That should not happen.
> > > The image should be placed with <IMG ALIGN="Bottom" ....
> > > so that the base aligns with the bottom of adjacent text.
> > >
> > > If this is not happening with your HTML files, then there
> > > is something wrong with your installation of LaTeX2HTML.
> > >
> > > How much above the baseline is it located ?
> > > A large amount, or just a point or two?
> > >
> > > If it's just a point or two, then the "shaving" step is not
> > > being performed correctly, during image-processing with pstoimg .
> > >
> > > Can you post a URL to an example, so that I can get a better view
> > > of what is happening. Put a copy of the screen log output into the
> > > same (or parent) directory, with a name that can be easily guessed
> > > from the document name.
> > > Preferably run the job with -debug so that more messages are
> > > displayed.
> > >
> > >
> > > >
> > > > Any help would be appreciated
> > >
> > > Hope this helps,
> > >
> > > Ross Moore
> > >
> > > >
> > > > Raf
> > > > _______________________________________________
> > > > latex2html mailing list
> > > > latex2html@tug.org
> > > > http://tug.org/mailman/listinfo/latex2html
> > >
> > >
> >
> > _______________________________________________
> > latex2html mailing list
> > latex2html@tug.org
> > http://tug.org/mailman/listinfo/latex2html
>
>