>       Can someone tell me what to kick to stop the tops of some of
> my figures from being clipped?   I've checked the PS files and
> the graphical elements are contained within the BoundingBox lines.
> But for some reason, for the largest portratit-shaped plots, the
> tops are cut off.  It seems to be that something along the way
> "decides" how big a page is (even though the concept of "page"
> is completely irrelevant) and crops stuff.  

I have a similar problem, but it happens for all my images, and they
are cropped incorrectly (too much) on all sides.  I'm not expert
enough to determine if this is a result of misconfiguration of
external programs (ghostscript for example) or an actual bug in
latex2html.  The error first shows up in the .ps generated using
ghostcript.  I've "solved" the problem by munging the arguments sent
to pstoimg in extract_image.  This involves multiplying the
${width}x${height} argument by $scale, and '-margins' argument by
1/$scale.  (My ugly hack is included below for your perusal).  This
results in perfectly cropped figures on my system (latex2html98.1p1,
Aladdin Ghostscript 4.03, Netpbm 1 March 1994, all running on either
a Solaris-sparc or Solaris-x86 box).

To those in the know: are these symptoms indicative of some other
higher-level configuration problem, or a bug in latex2html?  I would
expect that if it were a bug, others would have this problem, and it
would show up in the archives or in the FAQ, but I could find it in
neither.  Thanks in advance for any help.

-syam

*** latex2html  Wed Mar  4 21:10:05 1998
--- latex2html.syam     Thu Apr 30 15:01:16 1998
***************
*** 3469,3474 ****
--- 3469,3479 ----
                    $height = int($height{$name}+$depth{$name}+.5);
                    $width = int($width{$name}-.5);
                }
+               # XXX [SG]
+               $myscale = $scale;
+                 $myscale = $FIGURE_SCALE_FACTOR unless ($myscale);
+               (($width *= $myscale) && ($height *= $myscale)) if $myscale;
+               # XXX end [SG]
                $custom_size = "${width}x$height";
                $custom_size .= " -crop $crop{$name}"
                    if ($crop{$name});
***************
*** 3481,3494 ****
--- 3486,3515 ----
                      $height = int($height{$name}+$depth{$name}+.5);
                    $width = int($width{$name}+.5);
                  }
+               # XXX [SG]
+               $myscale = $scale ? $scale : $FIGURE_SCALE_FACTOR;
+               (($width *= $myscale) && ($height *= $myscale)) if $myscale;
+               # XXX end [SG]
                $custom_size = "${width}x$height";
                $custom_size .= " -crop $crop{$name}"
                    if ($crop{$name});
            } else { $custom_size = '' }
            $page_num  =~ s/^\d+#//o;
+ #         $custom_size .= " -margins " .
+ #             (($page_num % 2) ? $ODD_HMARGIN:$EVEN_HMARGIN) .
+ #                 ",$VMARGIN" if ($custom_size);
+           # XXX [SG]
+           $myscale = $scale ? $scale : $FIGURE_SCALE_FACTOR;
+           if ($myscale) {
            $custom_size .= " -margins " .
+               (($page_num % 2) ? int($ODD_HMARGIN/$myscale +0.5) : 
+int($EVEN_HMARGIN/$myscale +0.5)) .
+                   "," . int($VMARGIN/$myscale +0.5) if ($custom_size);
+           } else {
+           $custom_size .= " -margins " .
                (($page_num % 2) ? $ODD_HMARGIN:$EVEN_HMARGIN) .
                    ",$VMARGIN" if ($custom_size);
+           }
+           # XXX end [SG]
  
            #RRM: \special commands may place ink outside the expected bounds:
            $custom_size = '' if ($tex_specials{$name});

Reply via email to