Closed aminophen closed 7 years ago
Current graphics.sty has the following definition \Gread@generic@aux:
\Gread@generic@aux
\def\Gread@generic@aux#1#2{% \begingroup \@tempcnta\z@ \loop\ifnum\@tempcnta<\@xxxii \catcode\@tempcnta14 % \advance\@tempcnta\@ne \repeat \catcode`\^^?14 % \let\do\@makeother \dospecials \catcode`\ 10 % \catcode`\^^I10 % \catcode\endlinechar5 % \@makeother\:% \@makeother\-% \immediate\openin\@inputcheck"#1" % #2{#1}% \ifGin@bbox\else \@latex@error {Cannot determine size of graphic in #1 (no BoundingBox)}% \@ehc \gdef\@gtempa{0 0 72 72 }% \fi \endgroup }
However, when the definition of \Gread@generic is taken into account, it should be
\Gread@generic
\def\Gread@generic@aux#1#2{% \begingroup \@tempcnta\z@ \loop\ifnum\@tempcnta<\@xxxii \catcode\@tempcnta14 % \advance\@tempcnta\@ne \repeat \catcode`\^^?14 % \let\do\@makeother \dospecials \catcode`\ 10 % \catcode`\^^I10 % \catcode\endlinechar5 % \@makeother\:% \@makeother\-% \immediate\openin\@inputcheck"#1" % #2{#1}% \ifGin@bbox \expandafter\xdef\csname #1 bbox\Gread@attr@hash\endcsname{\@gtempa}% \else \@latex@error {Cannot determine size of graphic in #1 (no BoundingBox)}% \@ehc \gdef\@gtempa{0 0 72 72 }% \fi \endgroup }
By applying this change, the following code works very fast:
\documentclass{article} \usepackage[dvipdfmx]{graphicx} \begin{document} \newcount\NUMBER \loop\ifnum\NUMBER<100\relax \includegraphics[scale=0.3]{test0.pdf}\newpage \advance\NUMBER 1\relax \repeat \end{document}
Oops: forgot about that (having put in the mechanism). I'll update later today (will wait and see what else is wrong first).
Fixed in the SVN.
Checked r1501; Thanks!
Current graphics.sty has the following definition
\Gread@generic@aux
:However, when the definition of
\Gread@generic
is taken into account, it should beBy applying this change, the following code works very fast: