summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:03:43 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:03:43 +0000
commit42b23d14529347f13dc3bee278f53018fd5dba6f (patch)
treebfa0a01c94da0e75c155a9887b47b7835f908d3c /Master
parente2249e594592b4eef09d58106109fe438e77400e (diff)
psfragx
git-svn-id: svn://tug.org/texlive/trunk@1228 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/latex/psfragx/psfragx.cfg57
-rw-r--r--Master/texmf-dist/tex/latex/psfragx/psfragx.sty323
2 files changed, 380 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/psfragx/psfragx.cfg b/Master/texmf-dist/tex/latex/psfragx/psfragx.cfg
new file mode 100644
index 00000000000..72c2e4399cd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/psfragx/psfragx.cfg
@@ -0,0 +1,57 @@
+%%
+%% This is file `psfragx.cfg',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% psfragx.dtx (with options: `cfg,version')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2003, 2004 Pascal Kockaert
+%% Pascal.Kockaert ad ulb.ac.be
+%% Note that ''ad´´ is often replaced by the ''@´´ sign.
+%% ----------------------------------------------------------
+%%
+%% This package may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+\ProvidesFile{psfragx.cfg}
+ [2004/12/10 v1.0 psfragx (Pascal Kockaert)]
+\newcommand{\providecolorcommands}
+ {\def\pfx@gobble@two##1##2{\typeout{Some psfragx
+ replacement would appear
+ in color ##1{##2}
+ if the color package was
+ loaded!!!}}%
+ \def\pfx@gobble@three@fbox##1##2##3{\typeout{Some psfragx
+ replacement would
+ appear
+ in color ##1{##2}
+ and others
+ in color ##1{##3}
+ if the color package
+ was loaded!!!}%
+ \fbox}%
+ \def\pfx@fm@to@mm##1##2##{\csname ##1\endcsname{##2}}%
+ \expandafter\ifx\csname textcolor\endcsname\relax
+ \def\textcolor{\pfx@fm@to@mm{pfx@gobble@two}}\fi
+ \expandafter\ifx\csname color\endcsname\relax
+ \def\color{\pfx@fm@to@mm{pfx@gobble@two}}\fi
+ \expandafter\ifx\csname colorbox\endcsname\relax
+ \def\colorbox{\pfx@fm@to@mm{pfx@gobble@two}}\fi
+ \expandafter\ifx\csname fcolorbox\endcsname\relax
+ \def\fcolorbox{\pfx@fm@to@mm{pfx@gobble@three@fbox}}\fi
+ }
+\def\Beforepfxinput{\providecolorcommands}
+\def\Afterpfxinput{}
+\def\Beforeovpinput{\providecolorcommands}
+\def\Afterovpinput{}
+\endinput
+%%
+%% End of file `psfragx.cfg'.
diff --git a/Master/texmf-dist/tex/latex/psfragx/psfragx.sty b/Master/texmf-dist/tex/latex/psfragx/psfragx.sty
new file mode 100644
index 00000000000..db5203e0f83
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/psfragx/psfragx.sty
@@ -0,0 +1,323 @@
+%%
+%% This is file `psfragx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% psfragx.dtx (with options: `package,version')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2003, 2004 Pascal Kockaert
+%% Pascal.Kockaert ad ulb.ac.be
+%% Note that ''ad´´ is often replaced by the ''@´´ sign.
+%% ----------------------------------------------------------
+%%
+%% This package may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[2001/06/01]
+\ProvidesPackage{psfragx}
+ [2004/12/10 v1.0 psfragx (Pascal Kockaert)]
+\DeclareOption{sub}{\pfx@subtrue}
+\DeclareOption{nosub}{\pfx@subfalse}
+\DeclareOption{allcom}{\allmetacomments}
+\DeclareOption{selcom}{\selectedmetacomments}
+\DeclareOption{ovp}{\pfx@ovptrue}
+\DeclareOption{noovp}{\pfx@ovpfalse}
+ \newif\ifpfx@sub\pfx@subfalse
+ \newif\ifpfx@ovp\pfx@ovptrue
+ \newif\ifpfx@metacomments
+ \pfx@metacommentsfalse
+ \def\allmetacomments{\pfx@metacommentstrue}
+ \def\selectedmetacomments{\pfx@metacommentsfalse}
+\ExecuteOptions{sub,ovp,selcom}
+\ProcessOptions*
+\RequirePackage{graphicx}
+\RequirePackage{psfrag}
+\ifpfx@ovp \RequirePackage[percent]{overpic} \fi
+\def\pfx@gobble#1{}
+{\catcode`\%=12
+ \gdef\pfx@percent{%}
+ \gdef\pfx@doublepercent{%%}
+}
+\let\pfx@metaprefix\pfx@doublepercent
+\def\pfx@tag{pfx}
+\def\pfx@ext{pfx}
+\def\pfx@tmp{}
+\edef\pfx@endinput
+ {\pfx@percent\expandafter\pfx@gobble\string\\endinput}
+\def\pfx@makeother#1{\catcode`#1=12\relax}
+\def\pfx@iden#1{#1}
+\newif\ifpfx@continue
+\newif\ifpfx@outputtofile
+\def\setpfxinput#1{\gdef\pfx@infile{#1}}
+\def\setpfxoutput#1{\gdef\pfx@outfile{#1}}
+\gdef\pfx@infile{} \gdef\pfx@outfile{}
+\newread\pfx@in
+\newwrite\pfx@out
+\def\copypfxfromto#1#2{%
+\setpfxinput{#1}%
+\setpfxoutput{#2}%
+\copypfxlines%
+}
+\def\pfx@ignorespaces{\ignorespaces}%
+\def\copypfxlines{% input and output files are global names
+\immediate\openin\pfx@in\pfx@infile\relax \ifeof\pfx@in
+ \errmessage{psfragx tried to read from a file that
+ does not exist. This seems to be a bug!}%
+\else
+ \immediate\openout\pfx@out=\pfx@outfile\relax
+ \immediate\write\pfx@out{\pfx@ignorespaces}
+ \ifeof\pfx@out
+ \begingroup
+ \pfx@makeother\ \pfx@makeother\\\pfx@makeother\$%
+ \pfx@makeother\#\pfx@makeother\^\pfx@makeother\^^K%
+ \pfx@makeother\_\pfx@makeother\^^A\pfx@makeother\%%
+ \pfx@makeother\~\pfx@makeother\{\pfx@makeother\}%
+ \pfx@makeother\&\endlinechar-1\relax
+ \loop
+ \read\pfx@in to \pfx@inline
+ \ifx\pfx@inline\pfx@endinput
+ \pfx@continuefalse
+ \typeout{psfragx: \pfx@percent
+ \expandafter\pfx@gobble
+ \string\\endinput was
+ found in \pfx@infile.}%
+ \else
+ \ifeof\pfx@in
+ \pfx@continuefalse
+ \typeout{psfragx: End of file
+ \pfx@infile was reached.}%
+ \else
+ \pfx@continuetrue
+ \expandafter\pfx@processline
+ \pfx@inline\pfx@endline
+ \fi%
+ \fi%
+ \ifpfx@continue
+ \repeat
+ \endgroup
+ \else
+ \errmessage{psfragx: output file already exists!}%
+ \fi %\pfx@out
+ \immediate\closeout\pfx@out
+\fi %\pfx@in
+\immediate\closein\pfx@in
+}
+\def\pfx@normalline#1\pfx@endline{%
+ \def\pfx@inline{#1}%
+ \ifpfx@outputtofile%
+ \immediate\write\pfx@out{\pfx@inline}%
+ \fi%
+}
+\def\pfx@removecomment#1\pfx@endline{%
+ \def\pfx@inline{#1}%
+ \ifpfx@outputtofile%
+ \immediate\write\pfx@out{\pfx@inline}%
+ \fi%
+}
+\bgroup\catcode`\%=12 \pfx@iden{\egroup
+\def\pfx@putmetacomment%}#1\pfx@endline{%
+ \edef\pfx@inline{\pfx@metaprefix#1}%
+ \ifpfx@metacomments
+ \immediate\write\pfx@out{\pfx@inline}%
+ \else
+ \ifpfx@outputtofile
+ \immediate\write\pfx@out{\pfx@inline}%
+ \fi
+ \fi
+}
+\begingroup
+\catcode`\%=12 \catcode`\*=14 \gdef\pfx@processline#1{*
+ \ifx%#1*
+ \expandafter\pfx@processlinex
+ \else
+ \expandafter\pfx@normalline
+ \fi
+#1}
+\endgroup
+\begingroup
+\catcode`\%=12 \catcode`\*=14
+\gdef\pfx@processlinex%#1{*
+ \ifcase\ifx%#10\else
+ \ifx<#11\else2\fi\fi\relax
+ \expandafter\pfx@putmetacomment\or
+ \expandafter\pfx@checkoption\or
+ \expandafter\pfx@removecomment\fi
+#1}
+\endgroup
+\def\pfx@checkoption<#1{%
+ \ifcase\ifx*#10\else
+ \ifx/#11\else2\fi\fi\relax
+ \expandafter\pfx@staroption\or
+ \expandafter\pfx@slashoption\or
+ \expandafter\pfx@tagoption\fi
+#1}
+\def\pfx@staroption*#1>#2\pfx@endline{%
+ \def\pfx@tmp{#1}%
+ \ifx\pfx@tmp\pfx@tag
+ \pfx@outputtofiletrue
+ \fi
+}
+\def\pfx@slashoption/#1>#2\pfx@endline{%
+ \def\pfx@tmp{#1}%
+ \ifx\pfx@tmp\pfx@tag\relax
+ \pfx@outputtofilefalse
+ \fi
+}
+\def\pfx@tagoption#1>#2\pfx@endline{%
+ \def\pfx@tmp{#1}%
+ \ifx\pfx@tmp\pfx@tag\relax
+ \def\pfx@inline{#2}%
+ \immediate\write\pfx@out{\pfx@inline}%
+ \fi
+}
+\let\pfx@includegraphics=\includegraphics
+\let\pfx@overpic=\overpic
+\let\pfx@endoverpic=\endoverpic
+\@ifundefined{pfx@overpic}{%
+ \newcommand*{\pfx@overpic}[2][]
+ {\sbox{\z@}{\includegraphics[#1]{#2}}%
+ \settodepth{\@tempcnta}{\usebox{\z@}}%
+ \settoheight{\@tempcntb}{\usebox{\z@}}%
+ \advance\@tempcntb\@tempcnta%
+ \settowidth{\@tempcnta}{\usebox{\z@}}%
+ \begin{picture}(\@tempcnta,\@tempcntb)%
+ \put(0,0){\makebox(0,0)[bl]{\usebox{\z@}}}}%
+ }{}
+\@ifundefined{pfx@endoverpic}{\def\pfx@endoverpic{\end{input}}}{}
+\long\def\pfx@firstoftwo#1#2{#1\ignorespaces}%
+\long\def\pfx@secondoftwo#1#2{#2\ignorespaces}%
+\def\pfx@iflanguage#1{%
+ \ifnum\csname l@#1\endcsname=\language
+ \expandafter\pfx@firstoftwo
+ \else
+ \expandafter\pfx@secondoftwo
+ \fi}
+\long\def\onlylanguage#1#2\endonlylanguage{\pfx@iflanguage{#1}{#2}{}\ignorespaces}
+\def\pfx@save@iflanguage{\let\save@pfx@iflanguage=\iflanguage%
+ \let\iflanguage=\pfx@iflanguage}
+\def\pfx@restore@iflanguage{\let\iflanguage=\save@pfx@iflanguage}
+\newif\ifpfx@generate
+\newif\ifovp@generate
+\newcommand*\pfx@add{}
+\newcommand*\ovp@add@bgd{}
+\newcommand*\ovp@add@fgd{}
+\newif\ifGin@pfx
+\newif\ifGin@overwritepfx
+\newif\ifGin@ovp
+\newif\ifGin@overwriteovp
+\define@key{Gin}{pfx}[true]%
+ {\lowercase{\Gin@boolkey{#1}}{pfx}}
+\define@key{Gin}{overwritepfx}[true]%
+ {\lowercase{\Gin@boolkey{#1}}{overwritepfx}}
+\define@key{Gin}{pfxadd}[]%
+ {\def\pfx@add{#1}}
+\define@key{Gin}{ovp}[true]%
+ {\lowercase{\Gin@boolkey{#1}}{ovp}}
+\define@key{Gin}{overwriteovp}[true]%
+ {\lowercase{\Gin@boolkey{#1}}{overwriteovp}}
+\define@key{Gin}{ovpbgd}[]%
+ {\def\ovp@add@bgd{#1}}
+\define@key{Gin}{ovpfgd}[]%
+ {\def\ovp@add@fgd{#1}}
+\newcommand*{\pfxinput}[1]{%
+ \filename@parse{#1}%
+ \IfFileExists{\filename@base.\pfx@ext}
+ {\pfx@generatefalse}
+ {\pfx@generatetrue}%
+ \ifGin@overwritepfx\pfx@generatetrue\fi
+ \IfFileExists{#1}{}{\pfx@generatefalse}%
+ \ifpfx@generate%
+ \copypfxfromto{\filename@area\filename@base.\filename@ext}
+ {\filename@base.\pfx@ext}%
+ \fi%
+ \pfx@save@iflanguage
+ \csname Before\pfx@tag input\endcsname
+ \InputIfFileExists{\filename@base.\pfx@ext}
+ {\typeout{psfragx: reading commands from
+ \filename@base.\pfx@ext}}
+ {\typeout{psfragx: I was not able to read psfrag
+ definitions from
+ \filename@base.\pfx@ext}}%
+ \csname After\pfx@tag input\endcsname
+ \pfx@restore@iflanguage
+}
+\newcommand*{\ovpinput}[1]{%
+\begingroup
+ \def\pfx@ext{ovp}%
+ \def\pfx@tag{ovp}%
+ \ifGin@overwriteovp\Gin@overwritepfxtrue
+ \else\Gin@overwritepfxfalse\fi
+ \pfxinput{#1}%
+\endgroup}
+\def\pfx@includegraphicx#1#2{%
+ \mbox{\pfx@overpix{#1}{#2}\endpfx@overpix}}
+\newbox{\ovp@box@tmp}%
+\def\pfx@overpix#1#2{%
+ \begingroup%
+ \begin{lrbox}{\ovp@box@tmp}%
+ \let\includegraphics=\pfx@includegraphics%
+ \Gin@pfxtrue%
+ \Gin@overwritepfxfalse%
+ \def\pfx@add{}%
+ \setkeys{Gin}{#1}%
+ \ifGin@pfx%
+ \pfxinput{#2}%
+ \fi%
+ \pfx@add
+ \pfx@overpic[#1]{#2}
+ \Gin@ovptrue
+ \Gin@overwriteovpfalse
+ \def\ovp@add@bgd{}%
+ \def\ovp@add@fgd{}%
+ \setkeys{Gin}{#1}%
+ \ovp@add@bgd
+ \ifGin@ovp
+ \ovpinput{#2}%
+ \fi
+ }% \pfx@overpix
+\def\endpfx@overpix{%
+ \ovp@add@fgd%
+ \pfx@endoverpic
+ \end{lrbox}%
+ \usebox{\ovp@box@tmp}%
+ \endgroup%
+ }%
+\def\overpix{\@ifnextchar[{\@overpix}%
+ {\@overpix[]}}%
+\def\@overpix[#1]{\@ifnextchar<{\@@overpix[#1]}%
+ {\@@overpix[#1]<>}}%
+\def\@@overpix[#1]<#2>%
+ {\@ifnextchar[{\@@@overpix[#1]<#2>}%
+ {\@@@overpix[#1]<#2>[]}}%
+\def\@@@overpix[#1]<#2>[#3]#4%
+ {\pfx@overpix{#1,ovpfgd={#2},ovpbgd={#3}}{#4}}
+\def\endoverpix{\endpfx@overpix}
+\def\includegraphicx{\@ifnextchar[{\@igx}%
+ {\@igx[]}}%
+\def\@igx[#1]{\@ifnextchar({\@@igx[#1]}%
+ {\@@igx[#1]()}}%
+\def\@@igx[#1](#2){\@ifnextchar<{\@@@igx[#1](#2)}%
+ {\@@@igx[#1](#2)<>}}%
+\def\@@@igx[#1](#2)<#3>{\@ifnextchar[{\@@@@igx[#1](#2)<#3>}%
+ {\@@@@igx[#1](#2)<#3>[]}}%
+\def\@@@@igx[#1](#2)<#3>[#4]#5%
+ {\pfx@includegraphicx{#1,pfxadd={#2},ovpfgd={#3},ovpbgd={#4}}{#5}}
+\ifpfx@sub
+ \let\includegraphics=\includegraphicx
+ \ifpfx@ovp
+ \let\overpic=\overpix
+ \let\endoverpic=\endoverpix
+ \fi
+\fi
+\InputIfFileExists{psfragx.cfg}{}{}
+\endinput
+%%
+%% End of file `psfragx.sty'.