shige 02/25 2020
----------------

I send some patches at 2019-12-29 and 2020-02-17, but I made some
mistakes. Also I found a new patch.

1) order of lines

I wrote at 2019-12-29:
| 1) On windows, 2 or more commands cannot connect ';' in 
| L2hos->syswait().
| 
| ----- from here -----
| --- latex2html.pin.ORG  2019-12-29 21:03:41.052544000 +0900
| +++ latex2html.pin      2019-12-29 21:28:53.738308000 +0900
| @@ -3870,7 +3870,9 @@
=====
|                 print "\nTransforming PDF images to postscript using 
gs/ps2write ...\n";
| -               $dvips_call .= "-sDEVICE=ps2write 
-sOutputFile=$TMPDIR$dd$IMAGE_PREFIX%.3d.ps .${dd}${PREFIX}images-crop.pdf\n";
| +               # $dvips_call .= "-sDEVICE=ps2write 
-sOutputFile=$TMPDIR$dd$IMAGE_PREFIX%.3d.ps .${dd}${PREFIX}images-crop.pdf\n";
| +               # 2019-12-27 shige: 2-44)
| +               $dvips_call = "$PDFCROP --hires " . ($DEBUG ? '--debug ' : '')
| +                   . ".${dd}${PREFIX}images.pdf";
| +               $dvips_call2 = $dvips_call . "-sDEVICE=ps2write 
-sOutputFile=$TMPDIR$dd$IMAGE_PREFIX%.3d.ps .${dd}${PREFIX}images-crop.pdf";

The order of last 2 lines is incorrect. The reverse order is correct
(the correct patch is already applied to github version).


2) ';' at the end

I wrote at 2019-12-29:
| 2) In Windows, there are no tee command and alternatives.
| 
| ----- from here -----
| --- latex2html.pin.ORG  2019-12-29 21:03:41.052544000 +0900
| +++ latex2html.pin      2019-12-29 21:33:45.524136000 +0900
| @@ -4264,10 +4264,16 @@
=====
|          if ($name =~ /figure|table/) {
| -         L2hos->syswait("$PNGTOPNM $p.png|tee $p.ppm|$PPMTO --quiet 
$transparent >${PREFIX}img$new_num.$IMAGE_TYPE;");
| +         #L2hos->syswait("$PNGTOPNM $p.png|tee $p.ppm|$PPMTO --quiet 
$transparent >${PREFIX}img$new_num.$IMAGE_TYPE;");
| +         # 2019-12-12: 2-44)
| +         L2hos->syswait("$PNGTOPNM $p.png >$p.ppm");
| +         L2hos->syswait("$PPMTO --quiet $transparent $p.ppm 
>${PREFIX}img$new_num.$IMAGE_TYPE;");
|         } else {
|             #     L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides|tee 
$p.ppm|$PNMCUT -top $millimeter |$PNMCROP -left -right|tee $p-.ppm|$PPMTO 
--quiet $transparent >img$new_num.$IMAGE_TYPE;");
| -           L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides|tee 
$p.ppm|$PPMTO --quiet $transparent >${PREFIX}img$new_num.$IMAGE_TYPE;");
| +           # L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides|tee 
$p.ppm|$PPMTO --quiet $transparent >${PREFIX}img$new_num.$IMAGE_TYPE;");
| +           # 2019-12-12: 2-44)
| +           L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides >$p.ppm");
| +           L2hos->syswait("$PPMTO --quiet $transparent $p.ppm 
>${PREFIX}img$new_num.$IMAGE_TYPE;");

Two ';' remain at ends of strings in L2hos->syswait() for $PPMTO,
but they cause error on Windows. They must be removed.


3) #if

I wrote at 2020-02-17:
| | I found other problems of config/config.pl of current latex2html
| | (github version) for Windows.
| 
| I also found another problem for treatment of absolute path for 
| Windows.
| 
| ----- from here -----
| --- latex2html.pin.ORG  2019-12-29 21:03:41.052544000 +0900
| +++ latex2html.pin      2020-02-17 10:16:42.075647000 +0900
| @@ -9440,7 +9440,9 @@
|      $print_dir = $this_dir.$dd unless ($print_dir);
|      if (-f "$this_dir$dd${PREFIX}images.pl") {
|         print STDOUT "Reusing directory $print_dir:\n";
| -       if ($this_dir !~ /^\Q$dd\E/) {
| +       #if ($this_dir !~ /^\Q$dd\E/) {
| +       # 2020-02-17 shige

'#if' is not treated as start of comment line. It may be as 
PREPROCESSER directive. It must be '# if'.


4) '#FFFFFF'

'string' is not equal "string" on Windows command line. So, 
[-transparent #FFFFFF] and [-transparent "#FFFFFF"] are acceptable,
but [-transparent '#FFFFFF'] is not.

----- From here -----
--- latex2html.pin.ORG  2019-12-29 21:03:41.052544000 +0900
+++ latex2html.pin      2020-02-25 09:47:28.510115000 +0900
@@ -4257,7 +4257,9 @@
         if ($TRANSPARENT_FIGURES) {
            my $TRANSPARENT_COLOR=
                $ENV{'TRANSPARENT_COLOR'} || '#FFFFFF';
-           $transparent= "-transparent '$TRANSPARENT_COLOR'";
+           # $transparent= "-transparent '$TRANSPARENT_COLOR'";
+           # 2020-20-22 shige: 2-44)
+           $transparent= "-transparent \"$TRANSPARENT_COLOR\"";
        } else {
            $transparent ='';
        }
----- To here -----

+========================================================+
 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 sh...@iee.niit.ac.jp   TEL(&FAX): +81-257-22-8161
+========================================================+
_______________________________________________
latex2html mailing list
latex2html@tug.org
https://tug.org/mailman/listinfo/latex2html

Reply via email to