texlive[52086] Master/texmf-dist/tex/generic/tex4ht: set image

commits+karl at tug.org commits+karl at tug.org
Thu Sep 12 23:04:16 CEST 2019


Revision: 52086
          http://tug.org/svn/texlive?view=revision&revision=52086
Author:   karl
Date:     2019-09-12 23:04:16 +0200 (Thu, 12 Sep 2019)
Log Message:
-----------
set image dimensions explicitly, use -dusecropbox with gs, tex4ht r602-603

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=602

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/generic/tex4ht/graphics.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/graphics.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/graphics.4ht	2019-09-12 20:30:12 UTC (rev 52085)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/graphics.4ht	2019-09-12 21:04:16 UTC (rev 52086)
@@ -1,6 +1,6 @@
-% graphics.4ht (2017-03-13-16:10), generated from tex4ht-4ht.tex
+% graphics.4ht (2019-09-12-14:02), generated from tex4ht-4ht.tex
 % Copyright 1997-2009 Eitan M. Gurari
-% Copyright 2009-2017 TeX Users Group
+% Copyright 2009-2019 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -51,6 +51,7 @@
 
 \let\old:GreadEps\Gread at eps
 \def\Gread at eps#1{\old:GreadEps{"#1"}}
+\def\if:boundingbox#1#2{\ifdim\Gin at req@width=\Gin at nat@width\ifx\noBoundingBox\UnDefined#1\else#2\fi\else#1\fi}
 
 \Hinput{graphics}
 \endinput

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2019-09-12 20:30:12 UTC (rev 52085)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2019-09-12 21:04:16 UTC (rev 52086)
@@ -1,4 +1,4 @@
-% html4.4ht (2019-09-03-14:08), generated from tex4ht-html4.tex
+% html4.4ht (2019-09-12-14:02), generated from tex4ht-html4.tex
 % Copyright 2009-2019 TeX Users Group
 % Copyright 1997-2009 Eitan M. Gurari
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2019-09-03-14:08}
+\immediate\write-1{version 2019-09-12-14:02}
 
 \exit:ifnot{8859-6,% 
 CJK,% 
@@ -11367,7 +11367,7 @@
 % it is better to use the following command. pdf2svg must be installed separately.
 \Configure{EpsConvert}{"epstopdf "\Gin at base.eps"  && pdf2svg "\Gin at base.pdf" "\Gin at base.svg""}
 \else
-\Configure{PdfConvert}{png}{"\a:Ghostscript\space -q -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r300 \ifx\Gin at page\@empty\else -dFirstPage="\Gin at page"  -dLastPage="\Gin at page"\fi\space -sOutputFile="\Gin at base-\Gin at page.\a:PdfConvert" "\Gin at base.pdf" "}
+\Configure{PdfConvert}{png}{"\a:Ghostscript\space -q -dNOPAUSE -dBATCH -dusecropbox -sDEVICE=pngalpha -r300 \ifx\Gin at page\@empty\else -dFirstPage="\Gin at page"  -dLastPage="\Gin at page"\fi\space -sOutputFile="\Gin at base-\Gin at page.\a:PdfConvert" "\Gin at base.pdf" "}
 \Configure{EpsConvert}{"\a:Ghostscript\space -dSAFER    -dBATCH    -dNOPAUSE    -dEPSCrop    -r120  -sDEVICE=pngalpha -sOutputFile="\Gin at base.png" "\Gin at base.eps" "}
 \fi
 \Configure{graphics*}
@@ -11429,12 +11429,9 @@
        `Gin-dim'; for key dimensions when bounding box is unavailable
        try `Gin-dim+'; neither is recommended}
    \Configure{Gin-dim}
-     {\ifx\noBoundingBox\UnDefined
-        width="\expandafter\int:pt\the\Gin at req@width!*?: "
+   {\if:boundingbox{width="\expandafter\int:pt\the\Gin at req@width!*?: "
 height="\expandafter\int:pt\the\Gin at req@height!*?: "
-%
-      \fi
-     }
+}{}}
 \fi \fi
 
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht	2019-09-12 20:30:12 UTC (rev 52085)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/ooffice.4ht	2019-09-12 21:04:16 UTC (rev 52086)
@@ -1,4 +1,4 @@
-% ooffice.4ht (2019-09-03-14:08), generated from tex4ht-ooffice.tex
+% ooffice.4ht (2019-09-12-14:02), generated from tex4ht-ooffice.tex
 % Copyright 2009-2019 TeX Users Group
 % Copyright 2001-2009 Maarten Wisse, James Naughton, Eitan M. Gurari
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2019-09-03-14:08}
+\immediate\write-1{version 2019-09-12-14:02}
 
   \exit:ifnot{Preamble,% 
 algorithmicx,% 
@@ -6911,34 +6911,22 @@
 \Configure{graphics*}
    {gif}
    {\expandafter\getImgFile\expandafter{\Gin at base}{\Gin at ext}
-\Picture[IMG]{\imgBase.gif \ifx\noBoundingBox\UnDefined
-   svg:width="\the\Gin at req@width"
-   svg:height="\the\Gin at req@height"
-\fi
+\Picture[IMG]{\imgBase.gif \if:boundingbox{svg:width="\the\Gin at req@width" svg:height="\the\Gin at req@height"}{}
  }}
 \Configure{graphics*}
    {png}
    {\expandafter\getImgFile\expandafter{\Gin at base}{\Gin at ext}
-\Picture[IMG]{\imgBase.png \ifx\noBoundingBox\UnDefined
-   svg:width="\the\Gin at req@width"
-   svg:height="\the\Gin at req@height"
-\fi
+\Picture[IMG]{\imgBase.png \if:boundingbox{svg:width="\the\Gin at req@width" svg:height="\the\Gin at req@height"}{}
  }}
 \Configure{graphics*}
    {jpg}
    {\expandafter\getImgFile\expandafter{\Gin at base}{\Gin at ext}
-\Picture[IMG]{\imgBase.jpg  \ifx\noBoundingBox\UnDefined
-   svg:width="\the\Gin at req@width"
-   svg:height="\the\Gin at req@height"
-\fi
+\Picture[IMG]{\imgBase.jpg  \if:boundingbox{svg:width="\the\Gin at req@width" svg:height="\the\Gin at req@height"}{}
  }}
 \Configure{graphics*}
    {jpeg}
    {\expandafter\getImgFile\expandafter{\Gin at base}{\Gin at ext}
-\Picture[IMG]{\imgBase.jpeg \ifx\noBoundingBox\UnDefined
-   svg:width="\the\Gin at req@width"
-   svg:height="\the\Gin at req@height"
-\fi
+\Picture[IMG]{\imgBase.jpeg \if:boundingbox{svg:width="\the\Gin at req@width" svg:height="\the\Gin at req@height"}{}
  }}
 
 
@@ -6960,14 +6948,11 @@
    \closein15%
    \def\Gin at ext{\PictExt}% fix to get correct extension for the generated png file
    \expandafter\getImgFile\expandafter{\Gin at base}{\PictExt}
-   \Picture[IMG]{{\imgBase\PictExt} \ifx\noBoundingBox\UnDefined
-   svg:width="\the\Gin at req@width"
-   svg:height="\the\Gin at req@height"
-\fi
+   \Picture[IMG]{{\imgBase\PictExt} \if:boundingbox{svg:width="\the\Gin at req@width" svg:height="\the\Gin at req@height"}{}
 }}
 
 \NewConfigure{PdfConvert}{2}
-\Configure{PdfConvert}{png}{"\a:Ghostscript\space -q -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r300 \ifx\Gin at page\@empty\else -dFirstPage="\Gin at page"  -dLastPage="\Gin at page"\fi\space -sOutputFile="\Gin at base-\Gin at page.\a:PdfConvert" "\Gin at base.pdf""}
+\Configure{PdfConvert}{png}{"\a:Ghostscript\space -q -dNOPAUSE -dusecropbox -dBATCH -sDEVICE=pngalpha -r300 \ifx\Gin at page\@empty\else -dFirstPage="\Gin at page"  -dLastPage="\Gin at page"\fi\space -sOutputFile="\Gin at base-\Gin at page.\a:PdfConvert" "\Gin at base.pdf""}
 
 \Configure{graphics*}
    {pdf}
@@ -6982,10 +6967,7 @@
       \def\Gin at ext{.\a:PdfConvert}% fix to get correct extension for the generated png file
     \expandafter\getImgFile\expandafter{\Gin at base-\Gin at page}{\a:PdfConvert}%
     \edef\Gin at base{\Gin at base-\Gin at page}% the generated file contains page number
-    \Picture[IMG]{{\imgBase.\a:PdfConvert} \ifx\noBoundingBox\UnDefined
-   svg:width="\the\Gin at req@width"
-   svg:height="\the\Gin at req@height"
-\fi
+    \Picture[IMG]{{\imgBase.\a:PdfConvert} \if:boundingbox{svg:width="\the\Gin at req@width" svg:height="\the\Gin at req@height"}{}
 }}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex-live-commits mailing list