| 1 |
%% |
| 2 |
%% This is file `graphics.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% graphics.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% The source is maintained by the LaTeX Project team and bug |
| 10 |
%% reports for it can be opened at https://latex-project.org/bugs/ |
| 11 |
%% (but please observe conditions on bug reports sent to that address!) |
| 12 |
%% |
| 13 |
%% |
| 14 |
%% graphics.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz |
| 15 |
%% Copyright (C) 1995-2026 LaTeX Project |
| 16 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 17 |
%% in this file. |
| 18 |
%% |
| 19 |
%% This file is part of the Standard LaTeX `Graphics Bundle'. |
| 20 |
%% It may be distributed under the terms of the LaTeX Project Public |
| 21 |
%% License, as described in lppl.txt in the base LaTeX distribution. |
| 22 |
%% Either version 1.3c or, at your option, any later version. |
| 23 |
%% |
| 24 |
%% This file has the LPPL maintenance status "maintained". |
| 25 |
%% |
| 26 |
\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 27 |
|
| 28 |
\DeclareRelease{}{1994-06-01}{graphics-2017-06-25.sty} |
| 29 |
\DeclareRelease{}{2017-06-25}{graphics-2017-06-25.sty} |
| 30 |
\DeclareCurrentRelease{}{2019-10-01} |
| 31 |
|
| 32 |
\ProvidesPackage{graphics} |
| 33 |
[2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR)] |
| 34 |
\edef\Gin@codes{% |
| 35 |
\catcode`\noexpand\^^A\the\catcode`\^^A\relax |
| 36 |
\catcode`\noexpand\"\the\catcode`\"\relax |
| 37 |
\catcode`\noexpand\*\the\catcode`\*\relax |
| 38 |
\catcode`\noexpand\!\the\catcode`\!\relax |
| 39 |
\catcode`\noexpand\:\the\catcode`\:\relax} |
| 40 |
\catcode`\^^A=\catcode`\% |
| 41 |
\@makeother\"% |
| 42 |
\catcode`\*=11 |
| 43 |
\@makeother\!% |
| 44 |
\@makeother\:% |
| 45 |
\RequirePackage{trig} |
| 46 |
\providecommand\Grot@start{\@latex@error{Rotation not supported}\@ehc |
| 47 |
\global\let\Grot@start\relax} |
| 48 |
\providecommand\Grot@end{} |
| 49 |
\providecommand\Gscale@start{\@latex@error{Scaling not supported}\@ehc |
| 50 |
\global\let\Gscale@start\relax} |
| 51 |
\providecommand\Gscale@end{} |
| 52 |
\edef\Gread@BBox{\@percentchar\@percentchar BoundingBox} |
| 53 |
\DeclareOption{draft}{\Gin@drafttrue} |
| 54 |
\DeclareOption{final}{\Gin@draftfalse} |
| 55 |
\newif\ifGin@draft |
| 56 |
\DeclareOption{hiresbb}{% |
| 57 |
\edef\Gread@BBox{\@percentchar\@percentchar HiResBoundingBox}} |
| 58 |
\DeclareOption{demo}{% |
| 59 |
\AtBeginDocument{% |
| 60 |
\def\Ginclude@graphics#1{% |
| 61 |
\rule{\@ifundefined{Gin@@ewidth}{150pt}{\Gin@@ewidth}}% |
| 62 |
{\@ifundefined{Gin@@eheight}{100pt}{\Gin@@eheight}}}}} |
| 63 |
\newif\ifGin@setpagesize\Gin@setpagesizetrue |
| 64 |
\DeclareOption{setpagesize}{\Gin@setpagesizetrue} |
| 65 |
\DeclareOption{nosetpagesize}{\Gin@setpagesizefalse} |
| 66 |
\providecommand\Gin@driver{} |
| 67 |
\DeclareOption{dvips}{\def\Gin@driver{dvips.def}} |
| 68 |
\DeclareOption{xdvi}{\ExecuteOptions{dvips}} |
| 69 |
\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}} |
| 70 |
\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfmx.def}} |
| 71 |
\DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}} |
| 72 |
\DeclareOption{xetex}{\def\Gin@driver{xetex.def}} |
| 73 |
\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}} |
| 74 |
\DeclareOption{luatex}{\def\Gin@driver{luatex.def}} |
| 75 |
\DeclareOption{dvisvgm}{\def\Gin@driver{dvisvgm.def}} |
| 76 |
\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}} |
| 77 |
\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}} |
| 78 |
\DeclareOption{emtex}{\def\Gin@driver{emtex.def}} |
| 79 |
\DeclareOption{dviwin}{\def\Gin@driver{dviwin.def}} |
| 80 |
\DeclareOption{oztex}{\ExecuteOptions{dvips}} |
| 81 |
\DeclareOption{textures}{\def\Gin@driver{textures.def}} |
| 82 |
\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}} |
| 83 |
\DeclareOption{pctexwin}{\def\Gin@driver{pctexwin.def}} |
| 84 |
\DeclareOption{pctexhp}{\def\Gin@driver{pctexhp.def}} |
| 85 |
\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}} |
| 86 |
\DeclareOption{truetex}{\def\Gin@driver{truetex.def}} |
| 87 |
\DeclareOption{tcidvi}{\def\Gin@driver{tcidvi.def}} |
| 88 |
\DeclareOption{vtex}{\def\Gin@driver{vtex.def}} |
| 89 |
\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout} |
| 90 |
\InputIfFileExists{graphics.cfg}{}{} |
| 91 |
\DeclareOption{hiderotate}{% |
| 92 |
\def\Grot@start{\begingroup\setbox\z@\hbox\bgroup} |
| 93 |
\def\Grot@end{\egroup\endgroup}} |
| 94 |
\DeclareOption{hidescale}{% |
| 95 |
\def\Gscale@start{\begingroup\setbox\z@\hbox\bgroup} |
| 96 |
\def\Gscale@end{\egroup\endgroup}} |
| 97 |
\ProcessOptions |
| 98 |
\if!\Gin@driver! |
| 99 |
\PackageError{graphics} |
| 100 |
{No driver specified} |
| 101 |
{You should make a default driver option in a file \MessageBreak |
| 102 |
graphics.cfg\MessageBreak |
| 103 |
eg: \protect\ExecuteOptions{textures}% |
| 104 |
} |
| 105 |
\else |
| 106 |
\PackageInfo{graphics}{Driver file: \Gin@driver} |
| 107 |
\@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{} |
| 108 |
\fi |
| 109 |
\def\Gin@llx{0} |
| 110 |
\let\Gin@lly\Gin@llx |
| 111 |
\let\Gin@urx\Gin@llx |
| 112 |
\let\Gin@ury\Gin@llx |
| 113 |
\let\Gin@nat@width\leftmarginv |
| 114 |
\let\Gin@nat@height\leftmarginvi |
| 115 |
\newif\ifGin@clip |
| 116 |
\newcommand\DeclareGraphicsExtensions[1]{% |
| 117 |
\edef\Gin@extensions{\zap@space#1 \@empty}} |
| 118 |
\providecommand\Gin@extensions{} |
| 119 |
\protected\def\includegraphics{% |
| 120 |
\leavevmode |
| 121 |
\@ifstar |
| 122 |
{\Gin@cliptrue\Gin@i}% |
| 123 |
{\Gin@clipfalse\Gin@i}} |
| 124 |
\def\Gin@i{% |
| 125 |
\@ifnextchar[%] |
| 126 |
\Gin@ii |
| 127 |
{\Gin@bboxfalse\Ginclude@graphics}} |
| 128 |
\def\Gin@ii[#1]{% |
| 129 |
\@ifnextchar[%] |
| 130 |
{\Gin@iii[#1]} |
| 131 |
{\Gin@iii[0,0][#1]}} |
| 132 |
\def\Gin@iii[#1,#2][#3,#4]#5{% |
| 133 |
\begingroup |
| 134 |
\Gin@bboxtrue |
| 135 |
\Gin@defaultbp\Gin@llx{#1}% |
| 136 |
\Gin@defaultbp\Gin@lly{#2}% |
| 137 |
\Gin@defaultbp\Gin@urx{#3}% |
| 138 |
\Gin@defaultbp\Gin@ury{#4}% |
| 139 |
\Ginclude@graphics{#5}% |
| 140 |
\endgroup} |
| 141 |
\def\Gin@defaultbp#1#2{% |
| 142 |
\afterassignment\Gin@def@bp\dimen@#2bp\relax{#1}{#2}} |
| 143 |
\def\Gin@def@bp#1\relax#2#3{% |
| 144 |
\if!#1!% |
| 145 |
\def#2{#3}% |
| 146 |
\else |
| 147 |
\[email protected]\dimen@ |
| 148 |
\edef#2{\strip@pt\dimen@}% |
| 149 |
\fi} |
| 150 |
\def\DeclareGraphicsRule#1#2#3#4{% |
| 151 |
\edef\@tempa{\string *}\def\@tempb{#3}% |
| 152 |
\expandafter\edef\csname Gin@rule@#1\endcsname##1% |
| 153 |
{{#2}% |
| 154 |
{\ifx\@tempa\@tempb\noexpand\Gin@ext\else#3\fi}% |
| 155 |
{\ifx\indent#4\indent##1\else#4\fi}}} |
| 156 |
\def\graphicspath#1{\def\Ginput@path{#1}} |
| 157 |
\ifx\Ginput@path\@undefined |
| 158 |
\let\Ginput@path\input@path |
| 159 |
\fi |
| 160 |
\def\Gin@getbase#1{% |
| 161 |
\edef\Gin@tempa{% |
| 162 |
\def\noexpand\@tempa####1#1\space{% |
| 163 |
\def\noexpand\Gin@base{####1}}}% |
| 164 |
\IfFileExists{\filename@area\filename@base#1}% |
| 165 |
{\Gin@tempa |
| 166 |
\edef\uq@filef@und{\expandafter\unquote@name |
| 167 |
\expandafter{\@filef@und}}% |
| 168 |
\expandafter\@tempa\uq@filef@und |
| 169 |
\edef\Gin@ext{#1}}{}}% |
| 170 |
\let\Gin@ext\relax |
| 171 |
\def\Gin@sepdefault{.} |
| 172 |
\edef\Gin@gzext{\detokenize{gz}} |
| 173 |
\def\Gin@set@curr@file#1{% |
| 174 |
\begingroup |
| 175 |
\escapechar\m@ne |
| 176 |
\xdef\@curr@file{\expandafter\string\csname\@firstofone#1\@empty\endcsname}% |
| 177 |
\endgroup} |
| 178 |
\ifx\set@curr@file@nosearch\@undefined |
| 179 |
\ifx\set@curr@file\@undefined |
| 180 |
\def\quote@name#1{"\quote@@name#1\@gobble""} |
| 181 |
\def\quote@@name#1"{#1\quote@@name} |
| 182 |
\def\unquote@name#1{\quote@@name#1\@gobble"} |
| 183 |
\else |
| 184 |
\let\Gin@set@curr@file\set@curr@file |
| 185 |
\fi |
| 186 |
\else |
| 187 |
\let\Gin@set@curr@file\set@curr@file@nosearch |
| 188 |
\fi |
| 189 |
\def\Ginclude@graphics#1{% |
| 190 |
\ifx\detokenize\@undefined\else |
| 191 |
\edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}% |
| 192 |
\fi |
| 193 |
\begingroup |
| 194 |
\let\input@path\Ginput@path |
| 195 |
\Gin@set@curr@file{#1}% |
| 196 |
\expandafter\filename@parse\expandafter{\@curr@file}% |
| 197 |
\ifx\filename@ext\Gin@gzext |
| 198 |
\expandafter\filename@parse\expandafter{\filename@base}% |
| 199 |
\ifx\filename@ext\relax |
| 200 |
\let\filename@ext\Gin@gzext |
| 201 |
\else |
| 202 |
\edef\filename@ext{\filename@ext\Gin@sepdefault\Gin@gzext}% |
| 203 |
\fi |
| 204 |
\fi |
| 205 |
\ifx\filename@ext\relax |
| 206 |
\@for\Gin@temp:=\Gin@extensions\do{% |
| 207 |
\ifx\Gin@ext\relax |
| 208 |
\Gin@getbase\Gin@temp |
| 209 |
\fi}% |
| 210 |
\else |
| 211 |
\Gin@getbase{\Gin@sepdefault\filename@ext}% |
| 212 |
\ifnum0% |
| 213 |
\ifx\Gin@ext\relax 1% |
| 214 |
\else \@ifundefined{Gin@rule@\Gin@ext}{1}{0}% |
| 215 |
\fi >0 |
| 216 |
\let\Gin@extsaved\Gin@ext |
| 217 |
\let\Gin@savedbase\filename@base |
| 218 |
\let\Gin@savedext\filename@ext |
| 219 |
\let\Gin@ext\relax |
| 220 |
\edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}% |
| 221 |
\let\filename@ext\relax |
| 222 |
\@for\Gin@temp:=\Gin@extensions\do{% |
| 223 |
\ifx\Gin@ext\relax |
| 224 |
\Gin@getbase\Gin@temp |
| 225 |
\fi}% |
| 226 |
\ifx\Gin@ext\relax |
| 227 |
\let\Gin@ext\Gin@extsaved |
| 228 |
\let\filename@base\Gin@savedbase |
| 229 |
\let\filename@ext\Gin@savedext |
| 230 |
\fi |
| 231 |
\fi |
| 232 |
\ifx\Gin@ext\relax |
| 233 |
\@warning{File `#1' not found}% |
| 234 |
\def\Gin@base{\filename@area\filename@base}% |
| 235 |
\edef\Gin@ext{\Gin@sepdefault\filename@ext}% |
| 236 |
\fi |
| 237 |
\fi |
| 238 |
\ifx\Gin@ext\relax |
| 239 |
\@latex@error{File `#1' not found}% |
| 240 |
{I could not locate the file with any of these extensions:^^J% |
| 241 |
\Gin@extensions^^J\@ehc}% |
| 242 |
\else |
| 243 |
\@ifundefined{Gin@rule@\Gin@ext}% |
| 244 |
{\ifx\Gin@rule@*\@undefined |
| 245 |
\@latex@error{Unknown graphics extension: \Gin@ext}\@ehc |
| 246 |
\else |
| 247 |
\expandafter\Gin@setfile\Gin@rule@*{\Gin@base\Gin@ext}% |
| 248 |
\fi}% |
| 249 |
{\expandafter\expandafter\expandafter\Gin@setfile |
| 250 |
\csname Gin@rule@\Gin@ext\endcsname{\Gin@base\Gin@ext}}% |
| 251 |
\fi |
| 252 |
\endgroup} |
| 253 |
\newif\ifGread@\Gread@true |
| 254 |
\def\Gin@setfile#1#2#3{% |
| 255 |
\ifx\\#2\\\Gread@false\fi |
| 256 |
\ifGin@bbox\else |
| 257 |
\ifGread@ |
| 258 |
\csname Gread@% |
| 259 |
\expandafter\ifx\csname Gread@#1\endcsname\relax |
| 260 |
eps% |
| 261 |
\else |
| 262 |
#1% |
| 263 |
\fi |
| 264 |
\endcsname{\Gin@base#2}% |
| 265 |
\else |
| 266 |
\Gin@nosize{#3}% |
| 267 |
\fi |
| 268 |
\fi |
| 269 |
\Gin@viewport@code |
| 270 |
\Gin@nat@height\Gin@ury bp% |
| 271 |
\advance\Gin@nat@height-\Gin@lly bp% |
| 272 |
\Gin@nat@width\Gin@urx bp% |
| 273 |
\advance\Gin@nat@width-\Gin@llx bp% |
| 274 |
\Gin@req@sizes |
| 275 |
\expandafter\ifx\csname Ginclude@#1\endcsname\relax |
| 276 |
\Gin@drafttrue |
| 277 |
\expandafter\ifx\csname Gread@#1\endcsname\relax |
| 278 |
\@latex@error{Can not include graphics of type: #1}\@ehc |
| 279 |
\global\expandafter\let\csname Gread@#1\endcsname\@empty |
| 280 |
\fi |
| 281 |
\fi |
| 282 |
\leavevmode |
| 283 |
\ifGin@draft |
| 284 |
\hb@xt@\Gin@req@width{% |
| 285 |
\vrule\hss |
| 286 |
\vbox to \Gin@req@height{% |
| 287 |
\hrule \@width \Gin@req@width |
| 288 |
\vss |
| 289 |
\edef\@tempa{#3}% |
| 290 |
\rlap{ \ttfamily\expandafter\strip@prefix\meaning\@tempa}% |
| 291 |
\vss |
| 292 |
\hrule}% |
| 293 |
\hss\vrule}% |
| 294 |
\else |
| 295 |
\@addtofilelist{#3}% |
| 296 |
\ProvidesFile{#3}[Graphic file (type #1)]% |
| 297 |
\setbox\z@\hbox{\csname Ginclude@#1\endcsname{#3}}% |
| 298 |
\dp\z@\z@ |
| 299 |
\ht\z@\Gin@req@height |
| 300 |
\wd\z@\Gin@req@width |
| 301 |
\box\z@ |
| 302 |
\fi} |
| 303 |
\let\Gin@decode\@empty |
| 304 |
\def\Gin@exclamation{!} |
| 305 |
\let\Gin@page\@empty |
| 306 |
\def\Gin@pagebox{cropbox} |
| 307 |
\newif\ifGin@interpolate |
| 308 |
\let\Gin@log\wlog |
| 309 |
\let\Gin@req@sizes\relax |
| 310 |
\def\Gin@scalex{1}% |
| 311 |
\let\Gin@scaley\Gin@exclamation |
| 312 |
\let\Gin@req@height\Gin@nat@height |
| 313 |
\let\Gin@req@width\Gin@nat@width |
| 314 |
\let\Gin@viewport@code\relax |
| 315 |
\def\Gin@nosize#1{% |
| 316 |
\@latex@error |
| 317 |
{Cannot determine size of graphic in #1 (no size specified)}% |
| 318 |
\@ehc} |
| 319 |
\newif\ifGin@bbox |
| 320 |
\def\Gread@generic#1#2{% |
| 321 |
\edef\Gread@attr@hash{% |
| 322 |
\ifx\Gin@pagebox\@empty\else |
| 323 |
:\Gin@pagebox |
| 324 |
\fi |
| 325 |
\ifx\Gin@page\@empty\else |
| 326 |
:P\Gin@page |
| 327 |
\fi |
| 328 |
}% |
| 329 |
\@ifundefined{#1 bbox\Gread@attr@hash}% |
| 330 |
{\Gread@generic@aux{#1}{#2}} |
| 331 |
{% |
| 332 |
\expandafter\global\expandafter\let\expandafter\@gtempa |
| 333 |
\csname #1 bbox\Gread@attr@hash\endcsname |
| 334 |
}% |
| 335 |
\expandafter\Gread@parse@bb\@gtempa\\% |
| 336 |
} |
| 337 |
\def\Gread@generic@aux#1#2{% |
| 338 |
\begingroup |
| 339 |
\@tempcnta\z@ |
| 340 |
\loop\ifnum\@tempcnta<\@xxxii |
| 341 |
\catcode\@tempcnta14 % |
| 342 |
\advance\@tempcnta\@ne |
| 343 |
\repeat |
| 344 |
\catcode`\^^?14 % |
| 345 |
\let\do\@makeother |
| 346 |
\dospecials |
| 347 |
\catcode`\ 10 % |
| 348 |
\catcode`\^^I10 % |
| 349 |
\endlinechar13 % |
| 350 |
\catcode\endlinechar5 % |
| 351 |
\@makeother\:% |
| 352 |
\@makeother\-% |
| 353 |
\immediate\openin\@inputcheck\quote@name{#1} % |
| 354 |
#2{#1}% |
| 355 |
\ifGin@bbox |
| 356 |
\expandafter\xdef\csname #1 bbox\Gread@attr@hash\endcsname{\@gtempa}% |
| 357 |
\else |
| 358 |
\@latex@error |
| 359 |
{Cannot determine size of graphic in #1 (no BoundingBox)}% |
| 360 |
\@ehc |
| 361 |
\gdef\@gtempa{0 0 72 72 }% |
| 362 |
\fi |
| 363 |
\endgroup |
| 364 |
} |
| 365 |
\def\Gread@eps#1{% |
| 366 |
\Gread@generic{#1}\Gread@eps@aux |
| 367 |
} |
| 368 |
\def\Gread@eps@aux#1{% |
| 369 |
\ifeof\@inputcheck |
| 370 |
\@latex@error{File `#1' not found}\@ehc |
| 371 |
\else |
| 372 |
\Gread@true |
| 373 |
\let\@tempb\Gread@false |
| 374 |
\loop |
| 375 |
\read\@inputcheck to\@tempa |
| 376 |
\ifeof\@inputcheck |
| 377 |
\Gread@false |
| 378 |
\else |
| 379 |
\expandafter\Gread@find@bb\@tempa:.\\% |
| 380 |
\fi |
| 381 |
\ifGread@ |
| 382 |
\repeat |
| 383 |
\immediate\closein\@inputcheck |
| 384 |
\fi |
| 385 |
} |
| 386 |
\long\def\Gread@find@bb#1:#2#3\\{% |
| 387 |
\def\@tempa{#1}% |
| 388 |
\ifx\@tempa\Gread@BBox |
| 389 |
\Gread@test@atend#2#3()\\% |
| 390 |
\fi} |
| 391 |
\def\Gread@test@atend#1(#2)#3\\{% |
| 392 |
\def\@tempa{#2}% |
| 393 |
\ifx\@tempa\Gread@atend |
| 394 |
\Gread@true |
| 395 |
\let\@tempb\relax |
| 396 |
\else |
| 397 |
\gdef\@gtempa{#1}% |
| 398 |
\@tempb |
| 399 |
\Gin@bboxtrue |
| 400 |
\fi} |
| 401 |
\def\Gread@parse@bb#1 #2 #3 #4 #5\\{% |
| 402 |
\Gin@defaultbp\Gin@llx{#1}% |
| 403 |
\Gin@defaultbp\Gin@lly{#2}% |
| 404 |
\Gin@defaultbp\Gin@urx{#3}% |
| 405 |
\Gin@defaultbp\Gin@ury{#4}}% |
| 406 |
\def\Gread@atend{atend} |
| 407 |
\def\Gin@viewport{% |
| 408 |
\let\Gin@ollx\Gin@llx |
| 409 |
\let\Gin@olly\Gin@lly |
| 410 |
\let\Gin@ourx\Gin@urx |
| 411 |
\let\Gin@oury\Gin@ury |
| 412 |
\dimen@\Gin@llx\p@\advance\dimen@ \Gin@vurx\p@ |
| 413 |
\edef\Gin@urx{\strip@pt\dimen@}% |
| 414 |
\dimen@\Gin@lly\p@\advance\dimen@ \Gin@vury\p@ |
| 415 |
\edef\Gin@ury{\strip@pt\dimen@}% |
| 416 |
\dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@ |
| 417 |
\edef\Gin@llx{\strip@pt\dimen@}% |
| 418 |
\dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@ |
| 419 |
\edef\Gin@lly{\strip@pt\dimen@}} |
| 420 |
\def\Gin@trim{% |
| 421 |
\let\Gin@ollx\Gin@llx |
| 422 |
\let\Gin@olly\Gin@lly |
| 423 |
\let\Gin@ourx\Gin@urx |
| 424 |
\let\Gin@oury\Gin@ury |
| 425 |
\dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@ |
| 426 |
\edef\Gin@llx{\strip@pt\dimen@}% |
| 427 |
\dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@ |
| 428 |
\edef\Gin@lly{\strip@pt\dimen@}% |
| 429 |
\dimen@\Gin@urx\p@\advance\dimen@ -\Gin@vurx\p@ |
| 430 |
\edef\Gin@urx{\strip@pt\dimen@}% |
| 431 |
\dimen@\Gin@ury\p@\advance\dimen@ -\Gin@vury\p@ |
| 432 |
\edef\Gin@ury{\strip@pt\dimen@}} |
| 433 |
\let\Gin@vllx\Gin@llx\let\Gin@vlly\Gin@llx |
| 434 |
\let\Gin@vurx\Gin@llx\let\Gin@vury\Gin@llx |
| 435 |
\let\Grot@height\@ovxx |
| 436 |
\let\Grot@left\@ovyy |
| 437 |
\let\Grot@right\@ovdx |
| 438 |
\let\Grot@depth\@ovdy |
| 439 |
\let\Grot@l\@ovro |
| 440 |
\let\Grot@r\@ovri |
| 441 |
\let\Grot@h\@xdim |
| 442 |
\let\Grot@d\@ydim |
| 443 |
\let\Grot@x\@linelen |
| 444 |
\let\Grot@y\@dashdim |
| 445 |
\protected\long\def\rotatebox#1#2{% |
| 446 |
\leavevmode |
| 447 |
\Grot@setangle{#1}% |
| 448 |
\setbox\z@\hbox{{#2}}% |
| 449 |
\Grot@x\z@ |
| 450 |
\Grot@y\z@ |
| 451 |
\Grot@box} |
| 452 |
\def\Grot@setangle#1{\edef\Grot@angle{#1}} |
| 453 |
\def\Grot@Px#1#2#3{% |
| 454 |
#1\Grot@cos#2% |
| 455 |
\advance#1-\Grot@sin#3} |
| 456 |
\def\Grot@Py#1#2#3{% |
| 457 |
#1\Grot@sin#2% |
| 458 |
\advance#1\Grot@cos#3} |
| 459 |
\def\Grot@box{% |
| 460 |
\begingroup |
| 461 |
\CalculateSin\Grot@angle |
| 462 |
\CalculateCos\Grot@angle |
| 463 |
\edef\Grot@sin{\UseSin\Grot@angle}% |
| 464 |
\edef\Grot@cos{\UseCos\Grot@angle}% |
| 465 |
^^A \GDebug{Rotate: angle \Grot@angle, sine is \Grot@sin, |
| 466 |
^^A cosine is \Grot@cos}% |
| 467 |
\Grot@r\wd\z@ \advance\Grot@r-\Grot@x |
| 468 |
\Grot@l\z@ \advance\Grot@l-\Grot@x |
| 469 |
\Grot@h\ht\z@ \advance\Grot@h-\Grot@y |
| 470 |
\Grot@d-\dp\z@ \advance\Grot@d-\Grot@y |
| 471 |
\ifdim\Grot@sin\p@>\z@ |
| 472 |
\ifdim\Grot@cos\p@>\z@ |
| 473 |
\Grot@Py\Grot@height \Grot@r\Grot@h%B |
| 474 |
\Grot@Px\Grot@right \Grot@r\Grot@d%E |
| 475 |
\Grot@Px\Grot@left \Grot@l\Grot@h%C |
| 476 |
\Grot@Py\Grot@depth \Grot@l\Grot@d%D |
| 477 |
\else |
| 478 |
\Grot@Py\Grot@height \Grot@r\Grot@d%E |
| 479 |
\Grot@Px\Grot@right \Grot@l\Grot@d%D |
| 480 |
\Grot@Px\Grot@left \Grot@r\Grot@h%B |
| 481 |
\Grot@Py\Grot@depth \Grot@l\Grot@h%C |
| 482 |
\fi |
| 483 |
\else |
| 484 |
\ifdim\Grot@cos\p@<\z@ |
| 485 |
\Grot@Py\Grot@height \Grot@l\Grot@d%D |
| 486 |
\Grot@Px\Grot@right \Grot@l\Grot@h%C |
| 487 |
\Grot@Px\Grot@left \Grot@r\Grot@d%E |
| 488 |
\Grot@Py\Grot@depth \Grot@r\Grot@h%B |
| 489 |
\else |
| 490 |
\Grot@Py\Grot@height \Grot@l\Grot@h%C |
| 491 |
\Grot@Px\Grot@right \Grot@r\Grot@h%B |
| 492 |
\Grot@Px\Grot@left \Grot@l\Grot@d%D |
| 493 |
\Grot@Py\Grot@depth \Grot@r\Grot@d%E |
| 494 |
\fi |
| 495 |
\fi |
| 496 |
\advance\Grot@height\Grot@y |
| 497 |
\advance\Grot@depth\Grot@y |
| 498 |
\Grot@Px\dimen@ \Grot@x\Grot@y |
| 499 |
\Grot@Py\dimen@ii \Grot@x\Grot@y |
| 500 |
\dimen@-\dimen@ \advance\dimen@-\Grot@left |
| 501 |
\dimen@ii-\dimen@ii \advance\dimen@ii\Grot@y |
| 502 |
^^A \GDebug{Rotate: (l,r,h,d)^^J% |
| 503 |
^^A Original \the\Grot@l,\the\Grot@r,\the\Grot@h,\the\Grot@d,^^J% |
| 504 |
^^A New..... \the\Grot@left,\the\Grot@right,% |
| 505 |
^^A \the\Grot@height,\the\Grot@depth}% |
| 506 |
\setbox\z@\hbox{% |
| 507 |
\kern\dimen@ |
| 508 |
\raise\dimen@ii\hbox{\Grot@start\box\z@\Grot@end}}% |
| 509 |
\ht\z@\Grot@height |
| 510 |
\dp\z@-\Grot@depth |
| 511 |
\advance\Grot@right-\Grot@left\wd\z@\Grot@right |
| 512 |
\leavevmode\box\z@ |
| 513 |
\endgroup} |
| 514 |
\protected\def\scalebox#1{% |
| 515 |
\@ifnextchar[{\Gscale@box{#1}}{\Gscale@box{#1}[#1]}} |
| 516 |
\long\def\Gscale@box#1[#2]#3{% |
| 517 |
\leavevmode |
| 518 |
\def\Gscale@x{#1}\def\Gscale@y{#2}% |
| 519 |
\setbox\z@\hbox{{#3}}% |
| 520 |
\setbox\tw@\hbox{\Gscale@start\rlap{\copy\z@}\Gscale@end}% |
| 521 |
\ifdim#2\p@<\z@ |
| 522 |
\ht\tw@-#2\dp\z@ |
| 523 |
\dp\tw@-#2\ht\z@ |
| 524 |
\else |
| 525 |
\ht\tw@#2\ht\z@ |
| 526 |
\dp\tw@#2\dp\z@ |
| 527 |
\fi |
| 528 |
\ifdim#1\p@<\z@ |
| 529 |
\hb@xt@-#1\wd\z@{\kern-#1\wd\z@\box\tw@\hss}% |
| 530 |
\else |
| 531 |
\hb@xt@#1\wd\z@{\box\tw@\kern#1\wd\z@\hss}% |
| 532 |
\fi} |
| 533 |
\protected\def\reflectbox{\Gscale@box-1[1]} |
| 534 |
\protected\def\resizebox{% |
| 535 |
\leavevmode |
| 536 |
\@ifstar{\Gscale@@box\totalheight}{\Gscale@@box\height}} |
| 537 |
\def\Gscale@@box#1#2#3{% |
| 538 |
\let\@tempa\Gin@exclamation |
| 539 |
\expandafter\def\expandafter\@tempb\expandafter{\string#2}% |
| 540 |
\expandafter\def\expandafter\@tempc\expandafter{\string#3}% |
| 541 |
\ifx\@tempb\@tempa |
| 542 |
\ifx\@tempc\@tempa |
| 543 |
\toks@{\mbox}% |
| 544 |
\else |
| 545 |
\toks@{\Gscale@box@dd{#3}#1}% |
| 546 |
\fi |
| 547 |
\else |
| 548 |
\ifx\@tempc\@tempa |
| 549 |
\toks@{\Gscale@box@dd{#2}\width}% |
| 550 |
\else |
| 551 |
\toks@{\Gscale@box@dddd{#2}\width{#3}#1}% |
| 552 |
\fi |
| 553 |
\fi |
| 554 |
\the\toks@} |
| 555 |
\long\def\Gscale@box@dd#1#2#3{% |
| 556 |
\@begin@tempboxa\hbox{#3}% |
| 557 |
\setlength\@tempdima{#1}% |
| 558 |
\setlength\@tempdimb{#2}% |
| 559 |
\Gscale@div\@tempa\@tempdima\@tempdimb |
| 560 |
\Gscale@box\@tempa[\@tempa]{\box\@tempboxa}% |
| 561 |
\@end@tempboxa} |
| 562 |
\long\def\Gscale@box@dddd#1#2#3#4#5{% |
| 563 |
\@begin@tempboxa\hbox{#5}% |
| 564 |
\setlength\@tempdima{#1}% |
| 565 |
\setlength\@tempdimb{#2}% |
| 566 |
\Gscale@div\@tempa\@tempdima\@tempdimb |
| 567 |
\setlength\@tempdima{#3}% |
| 568 |
\setlength\@tempdimb{#4}% |
| 569 |
\Gscale@div\@tempb\@tempdima\@tempdimb |
| 570 |
\ifGin@iso |
| 571 |
\ifdim\@tempa\p@>\@tempb\p@ |
| 572 |
\let\@tempa\@tempb |
| 573 |
\else |
| 574 |
\let\@tempb\@tempa |
| 575 |
\fi |
| 576 |
\fi |
| 577 |
\Gscale@box\@tempa[\@tempb]{\box\@tempboxa}% |
| 578 |
\@end@tempboxa} |
| 579 |
\newif\ifGin@iso |
| 580 |
\def\Gscale@div#1#2#3{% |
| 581 |
\setlength\dimen@{#3}% |
| 582 |
\ifdim\dimen@=\z@ |
| 583 |
\PackageError{graphics}{Division by 0}\@eha |
| 584 |
\dimen@#2% |
| 585 |
\fi |
| 586 |
\edef\@tempd{\the\dimen@}% |
| 587 |
\setlength\dimen@{#2}% |
| 588 |
\count@65536\relax |
| 589 |
\ifdim\dimen@<\z@ |
| 590 |
\dimen@-\dimen@ |
| 591 |
\count@-\count@ |
| 592 |
\fi |
| 593 |
\ifdim\dimen@>\z@ |
| 594 |
\loop |
| 595 |
\ifdim\ifnum\count@<\tw@\maxdimen\else\dimen@\fi<8192\p@ |
| 596 |
\dimen@\tw@\dimen@ |
| 597 |
\divide\count@\tw@ |
| 598 |
\repeat |
| 599 |
\dimen@ii\@tempd\relax |
| 600 |
\divide\dimen@ii\count@ |
| 601 |
\divide\dimen@\dimen@ii |
| 602 |
\fi |
| 603 |
\edef#1{\strip@pt\dimen@}} |
| 604 |
\Gin@codes |
| 605 |
\let\Gin@codes\relax |
| 606 |
\endinput |
| 607 |
%% |
| 608 |
%% End of file `graphics.sty'. |