diff options
author | Karl Berry <karl@freefriends.org> | 2006-08-27 22:38:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-08-27 22:38:54 +0000 |
commit | 2607d53137ede06e9780342b225218743e100bb4 (patch) | |
tree | c6c88c805dd21a5bbb6ad6f26d3d53c517f4b866 /Master/texmf-dist/tex/latex/oberdiek/grffile.sty | |
parent | fb0d58de45c0fc32bab09a839c186de46f75628e (diff) |
oberdiek update from tds zip (28aug06)
git-svn-id: svn://tug.org/texlive/trunk@2054 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/grffile.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/grffile.sty | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/grffile.sty b/Master/texmf-dist/tex/latex/oberdiek/grffile.sty new file mode 100644 index 00000000000..f0b07a4e51e --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/grffile.sty @@ -0,0 +1,207 @@ +%% +%% This is file `grffile.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% grffile.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Heiko Oberdiek. +%% +%% This work consists of the main source file grffile.dtx +%% and the derived files +%% grffile.sty, grffile.pdf, grffile.ins, grffile.drv. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{grffile}% + [2006/08/17 v1.1 Extended file name support for graphics (HO)] +\edef\grffile@RestoreCatcodes{% + \catcode`\noexpand\=\the\catcode`\=\relax + \catcode`\noexpand\:\the\catcode`\:\relax + \catcode`\noexpand\.\the\catcode`\.\relax + \catcode`\noexpand\'\the\catcode`\'\relax + \catcode`\noexpand\<\the\catcode`\<\relax + \catcode`\noexpand\>\the\catcode`\>\relax + \catcode`\noexpand\*\the\catcode`\*\relax + \catcode`\noexpand\^\the\catcode`\^\relax + \catcode`\noexpand\~\the\catcode`\~\relax +} +\@makeother\= +\@makeother\: +\@makeother\. +\@makeother\' +\@makeother\< +\@makeother\> +\@makeother\* +\catcode`\^=7 % +\catcode`\~=\active +\RequirePackage{ifpdf} +\RequirePackage{kvoptions}[2006/08/17] +\SetupKeyvalOptions{ + family=Gin, + prefix=grffile@ +} +\DeclareBoolOption[true]{multidot} +\DeclareBoolOption[false]{extendedchars} +\DeclareBoolOption{space} +\DeclareDefaultOption{% + \PassOptionsToPackage\CurrentOption{graphics}% +} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdffilesize\endcsname\relax + \grffile@spacefalse + \let\grffile@space@disabled\@empty + \def\grffile@spacetrue{% + \PackageWarning{grffile}{% + Option `space' is not available,\MessageBreak + because it needs pdfTeX >= 1.30% + }% + }% +\else + \ifpdf + \grffile@spacetrue + \else + \grffile@spacefalse + \fi +\fi +\ProcessKeyvalOptions* +\RequirePackage{graphics} +\newcommand*{\grffilesetup}{% + \setkeys{Gin}% +} +\let\grffile@org@Ginclude@graphics\Ginclude@graphics +\renewcommand*{\Ginclude@graphics}{% + \ifgrffile@extendedchars + \begingroup + \csname @safe@activestrue\endcsname + \edef~{\string~}% + \grffile@inputenc@loop\^^A\^^H% + \grffile@inputenc@loop\^^K\^^K% + \grffile@inputenc@loop\^^N\^^_% + \grffile@inputenc@loop\^^?\^^ff% + \expandafter\grffile@extchar@Ginclude@graphics + \else + \expandafter\grffile@Ginclude@graphics + \fi +} +\def\grffile@extchar@Ginclude@graphics#1{% + \edef\x{\endgroup + \noexpand\grffile@Ginclude@graphics{#1}% + }% + \x +} +\def\grffile@inputenc@loop#1#2{% + \count@=`#1\relax + \loop + \begingroup + \uccode`\~=\count@ + \uppercase{% + \endgroup + \edef~{\string~}% + }% + \ifnum\count@<`#2\relax + \advance\count@\@ne + \repeat +} +\def\grffile@space@getbase#1{% + \edef\grffile@tempa{% + \def\noexpand\@tempa####1#1\noexpand\@nil{% + \def\noexpand\Gin@base{####1}% + }% + }% + \grffile@IfFileExists{\filename@area\filename@base#1}{% + \grffile@tempa + \expandafter\@tempa\grffile@file@found\@nil + \edef\Gin@ext{#1}% + }{% + }% +} +\def\grffile@IfFileExists#1{% + \expandafter\ifx\expandafter\\\pdffilesize{#1}\\% + \let\reserved@a\@secondoftwo + \ifx\input@path\@undefined + \else + \expandafter\@tfor\expandafter\reserved@b\expandafter + :\expandafter=\input@path\do{% + \expandafter\ifx\expandafter\\\pdffilesize{\reserved@b#1}\\% + \else + \edef\grffile@file@found{\reserved@b#1}% + \let\reserved@a\@firstoftwo + \@break@tfor + \fi + }% + \fi + \expandafter\reserved@a + \else + \edef\grffile@file@found{#1}% + \expandafter\@firstoftwo + \fi +} + +\def\grffile@Ginclude@graphics#1{% + \begingroup + \ifgrffile@space + \let\Gin@getbase\grffile@space@getbase + \fi + \ifgrffile@multidot + \let\filename@base\@empty + \let\filename@simple\grffile@filename@simple + \fi + \grffile@org@Ginclude@graphics{#1}% + \endgroup +}% + +\def\grffile@filename@simple#1.#2\\{% + \ifx\\#2\\% + \let\filename@ext\relax + \else + \expandafter\ifx\csname + Gin@rule@.\filename@dot #2\\\endcsname\relax + \edef\filename@base{\filename@base #1.}% + \grffile@ReturnAfterFiFiBase{\grffile@filename@simple #2\\}% + \else + \edef\filename@ext{\filename@dot #2\\}% + \fi + \fi + \edef\filename@base{\filename@base #1}% +} +\def\grffile@ReturnAfterFiFiBase#1#2\filename@base#3{\fi\fi#1} +\def\grffile@option@status#1{% + \begingroup + \let\on@line\@empty + \PackageInfo{grffile}{% + Option `#1' is % + \expandafter\ifx\csname ifgrffile@#1\expandafter\endcsname + \csname iftrue\endcsname + set to `true'% + \else + \expandafter\ifx\csname grffile@#1@disabled\endcsname\@empty + not available% + \else + set to `false'% + \fi + \fi + }% + \endgroup +} +\grffile@option@status{multidot} +\grffile@option@status{extendedchars} +\grffile@option@status{space} +\grffile@RestoreCatcodes +\endinput +%% +%% End of file `grffile.sty'. |