Mercurial > hg > Papers > 2014 > kaito_sigos
annotate mediabb.sty @ 8:8976027e6b91
section 5 evaluation
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 20 Apr 2014 17:13:52 +0900 |
parents | 146e08fa7fd4 |
children |
rev | line source |
---|---|
0
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 \NeedsTeXFormat{LaTeX2e} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 \ProvidesPackage{mediabb}[2006/10/26 v1.9 iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp>] |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 \@ifpackageloaded{graphics}{}{\RequirePackage[dvipdfm]{graphicx}} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 \define@key{Gin}{usebb}[true]{\expandafter\let\expandafter\if@usebb\csname if#1\endcsname} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 \let\if@usebb\iffalse |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 \define@key{Gin}{mediaboxonly}[/MediaBox]{\@ifundefined{Gread@find@#1}% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 {\def\Gread@rect@box{/MediaBox}\expandafter\let\expandafter\if@Gread@find@only\csname if#1\endcsname}% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 {\def\Gread@rect@box{#1}\let\if@Gread@find@only\iftrue}} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 \let\if@Gread@find@only\iffalse |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 \def\Gread@rect@box{/MediaBox} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 \define@key{Gin}{autoebb}[always]{\csname Gread@ebb@#1\endcsname} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 \def\Gread@ebb@always{\let\if@Gread@ebb@always\iftrue} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 \let\if@Gread@ebb@always\iffalse |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 \let\Gread@ebb@true\Gread@ebb@always |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 \def\Gread@ebb@never{\let\if@Gread@ebb@never\iftrue} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 \let\Gread@ebb@false\Gread@ebb@never |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 \let\if@Gread@ebb@never\iffalse |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 \let\Ginclude@pdf\Ginclude@eps |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 \def\Gread@pdf#1{% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 \begingroup |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 \if@usebb\else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 \@tempcnta\z@ |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 \loop |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 \ifnum\@tempcnta<\@xxxii |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 \catcode\@tempcnta14 |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 \advance\@tempcnta\@ne |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 \repeat |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
28 \@tempcnta127 |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
29 \loop |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 \ifnum\@tempcnta<\@cclvi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 \catcode\@tempcnta14 |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 \advance\@tempcnta\@ne |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 \repeat |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 \let\do\@makeother\dospecials\catcode`\ 10 |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 \catcode\endlinechar10 |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 \immediate\openin\@inputcheck#1 |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 \ifeof\@inputcheck |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
38 \@latex@error{File `#1' not found}\@ehc |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
39 \else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 \Gread@true |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
41 \let\@tempa\@empty |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 \let\@tempb\@empty |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 \loop |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
44 \read\@inputcheck to\@tempc |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
45 \ifeof\@inputcheck |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 \Gread@false |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 \else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
48 \edef\@tempa{\@tempb\@tempc}\let\@tempb\@tempc |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
49 \edef\@tempc{\@tempa\Gread@rect@box}% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
50 \csname Gread@find@\Gread@rect@box\expandafter\endcsname\@tempc[\@nnil]\\% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
51 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
52 \ifGread@ |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
53 \repeat |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
54 \immediate\closein\@inputcheck |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
55 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
56 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
57 \ifGin@bbox |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58 \else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
59 \Gread@bmp{\Gin@base.bb}% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61 \endgroup |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
62 \expandafter\Gread@parse@bb\@gtempa\\} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
63 \def\def@Gread@find#1#2{\ifx\@nnil#2\expandafter\@gobble\else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
64 \@namedef{Gread@find@#1}##1#1##2[##3##4]##5\\{% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65 \ifx\@nnil##3\else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
66 \gdef\@gtempa{##3##4 }% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67 \if@Gread@find@only |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
68 \Gread@false |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
69 \else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
70 \def\Gread@rect@box{#1}% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
71 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
72 \Gin@bboxtrue |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
73 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
74 \if@Gread@find@only\else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
75 \csname Gread@find@#2\expandafter\endcsname\@tempa#2[\@nnil]\\% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
76 \fi}% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
77 \expandafter\def@Gread@find\fi{#2}} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
78 \def@Gread@find{/MediaBox}{/CropBox}{/BleedBox}{/TrimBox}{/ArtBox}\@nnil |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
79 \@namedef{Gread@find@/ArtBox}#1/ArtBox#2[#3#4]#5\\{% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
80 \ifx\@nnil#3\else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
81 \gdef\@gtempa{#3#4 }% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
82 \Gread@false |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
83 \Gin@bboxtrue |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
84 \fi} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
85 \def\Gread@bmp#1{% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
86 \if@Gread@ebb@never\else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
87 \if@Gread@ebb@always\else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
88 \immediate\openin\@inputcheck#1 % |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
89 \ifeof\@inputcheck |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
90 \Gread@ebb@always |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
91 \else |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
92 \immediate\closein\@inputcheck |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
93 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
94 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
95 \immediate\write18{\if@Gread@ebb@always\else[ '\Gin@base\Gin@ext' -nt '\Gin@base.bb' ] && \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
96 \ifx\@nnil\filename@area\@nnil\else cd '\filename@area' && \fi ebb '\filename@base\Gin@ext'}% |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
97 \fi |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
98 \Gread@eps{#1}} |
146e08fa7fd4
1st commit. only title
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
99 \DeclareGraphicsRule{.pdf}{pdf}{*}{} |