| 1 |
%% |
| 2 |
%% This is file `figlatex.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% figlatex.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% IMPORTANT NOTICE: |
| 10 |
%% |
| 11 |
%% For the copyright see the source file. |
| 12 |
%% |
| 13 |
%% Any modified versions of this file must be renamed |
| 14 |
%% with new filenames distinct from figlatex.sty. |
| 15 |
%% |
| 16 |
%% For distribution of the original source see the terms |
| 17 |
%% for copying and modification in the file figlatex.dtx. |
| 18 |
%% |
| 19 |
%% This generated file may be distributed as long as the |
| 20 |
%% original source files, as listed above, are part of the |
| 21 |
%% same distribution. (The sources need not necessarily be |
| 22 |
%% in the same archive or directory.) |
| 23 |
%% |
| 24 |
%% File: figlatex.dtx Copyright (C) 2002--2005 V. Danjean, A. Legrand |
| 25 |
%% [email protected] |
| 26 |
%% [email protected] |
| 27 |
%% |
| 28 |
%% This program is free software; you can redistribute it and/or |
| 29 |
%% modify it under the terms of the GNU General Public License |
| 30 |
%% as published by the Free Software Foundation; either version 2 |
| 31 |
%% of the License, or (at your option) any later version. |
| 32 |
%% |
| 33 |
%% This program is distributed in the hope that it will be useful, |
| 34 |
%% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 35 |
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 36 |
%% GNU General Public License for more details. |
| 37 |
%% |
| 38 |
%% You should have received a copy of the GNU General Public License |
| 39 |
%% along with this program; if not, write to the Free Software |
| 40 |
%% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 41 |
%% |
| 42 |
\NeedsTeXFormat{LaTeX2e}% |
| 43 |
\ProvidesPackage{figlatex}% |
| 44 |
[2021/10/26 v2.4.3 No changes in figlatex] |
| 45 |
\newif\ifFL@debug |
| 46 |
\DeclareOption{debug}{% |
| 47 |
\global\FL@debugtrue% |
| 48 |
} |
| 49 |
{ |
| 50 |
\def\debug{% |
| 51 |
\ExecuteOptions{debug}% |
| 52 |
} |
| 53 |
\InputIfFileExists{figlatex.cfg}{% |
| 54 |
\typeout{***************************************^^J% |
| 55 |
* Local config file figlatex.cfg used *^^J% |
| 56 |
***************************************} |
| 57 |
}{% |
| 58 |
\typeout{Found no configuration file for figlatex} |
| 59 |
} |
| 60 |
} |
| 61 |
\ProcessOptions |
| 62 |
\RequirePackage{ifthen} |
| 63 |
\RequirePackage{ifpdf} |
| 64 |
\RequirePackage{graphicx} |
| 65 |
\RequirePackage{xstring} |
| 66 |
\RequirePackage{color} |
| 67 |
\RequirePackage{epstopdf} |
| 68 |
\def\FL@dmessage#1{% |
| 69 |
\ifFL@debug% |
| 70 |
\message{#1}% |
| 71 |
\fi% |
| 72 |
} |
| 73 |
\def\Ginclude@rawtex#1{% |
| 74 |
\FL@dmessage{<#1>}% |
| 75 |
\bgroup% |
| 76 |
\def\@tempa{!}% |
| 77 |
\ifx\Gin@scaley\@tempa% |
| 78 |
\let\Gin@scaley\Gin@scalex% |
| 79 |
\else% |
| 80 |
\ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi% |
| 81 |
\fi% |
| 82 |
\hbox{% |
| 83 |
\Gscale@box{\Gin@scalex}[\Gin@scaley]{% |
| 84 |
\def\Gin@scalex{1}% |
| 85 |
\let\Gin@scaley\Gin@exclamation% needed for pdflatex |
| 86 |
\FL@dmessage{<loading rawtex #1>}% |
| 87 |
\input{#1}}}% |
| 88 |
\egroup} |
| 89 |
\def\Ginclude@figtex#1{% |
| 90 |
\message{<#1>}% |
| 91 |
\bgroup% |
| 92 |
\xdef\FL@filename{#1}% |
| 93 |
\filename@parse{\FL@filename}% |
| 94 |
\xdef\FL@filename{\filename@area\filename@base.\FL@figext}% |
| 95 |
\FL@dmessage{<****loading fig \FL@filename>}% |
| 96 |
\FL@includerawtexgraphics[]{\FL@filename}% |
| 97 |
\egroup} |
| 98 |
\newcommand{\Gread@figtex}[1]{% |
| 99 |
%\typeout{Oh, file exists #1}% |
| 100 |
\Gread@rawtex{#1}% |
| 101 |
} |
| 102 |
\def\Ginclude@svgtex#1{% |
| 103 |
\message{<#1>}% |
| 104 |
\bgroup% |
| 105 |
\xdef\FL@filename{#1}% |
| 106 |
\filename@parse{\FL@filename}% |
| 107 |
\xdef\FL@filename{\filename@area\filename@base.\FL@svgext}% |
| 108 |
\FL@dmessage{<****loading svg \FL@filename>}% |
| 109 |
\FL@includerawtexgraphics[]{\FL@filename}% |
| 110 |
\egroup} |
| 111 |
\newcommand{\Gread@svgtex}[1]{% |
| 112 |
%\typeout{Oh, file exists #1}% |
| 113 |
\Gread@rawtex{#1}% |
| 114 |
} |
| 115 |
\ifpdf |
| 116 |
\def\FL@figext{pdftex_t}% |
| 117 |
\def\FL@svgext{pdftex_t}% |
| 118 |
\let\Gread@rawtex\Gread@pdf% |
| 119 |
\DeclareGraphicsRule{.pdftex}{pdf}{*}{}% |
| 120 |
\DeclareGraphicsRule{.pdftex_t}{rawtex}{.pdftex}{}% |
| 121 |
\DeclareGraphicsRule{.fig}{figtex}{.pdftex}{}% |
| 122 |
\DeclareGraphicsRule{.svg}{svgtex}{.pdftex}{}% |
| 123 |
\else |
| 124 |
\def\FL@figext{pstex_t}% |
| 125 |
\def\FL@svgext{pstex_t}% |
| 126 |
\let\Gread@rawtex\Gread@eps% |
| 127 |
\DeclareGraphicsRule{.pstex}{eps}{*}{}% |
| 128 |
\DeclareGraphicsRule{.pstex_t}{rawtex}{.pstex}{}% |
| 129 |
\DeclareGraphicsRule{.fig}{figtex}{.pstex}{}% |
| 130 |
\DeclareGraphicsRule{.svg}{svgtex}{.pstex}{}% |
| 131 |
\fi |
| 132 |
\newcommand{\FL@includerawtexgraphics}[2][]{% |
| 133 |
\includegraphics[#1]{#2}% |
| 134 |
} |
| 135 |
\def\FL@exclamation{!}% |
| 136 |
\let\FL@subfig@name\FL@exclamation% |
| 137 |
\define@key{Gin}{subfig}{% |
| 138 |
\typeout{using subfig #1}% |
| 139 |
\def\FL@subfig@name{#1}% |
| 140 |
} |
| 141 |
\def\FL@sepdefault{_}% |
| 142 |
\def\FL@subfig@check#1{% |
| 143 |
} |
| 144 |
\def\FL@Gin@getbase#1{% |
| 145 |
\typeout{In getbase #1 with \FL@subfig@name / \FL@exclamation}% |
| 146 |
\ifx\FL@subfig@name\FL@exclamation% |
| 147 |
\else% |
| 148 |
\typeout{getbase lets go (\filename@area)(\filename@base)(#1)}% |
| 149 |
\IfStrEq*{#1}{.fig}{% |
| 150 |
% If we're including a subfig |
| 151 |
\IfFileExists{\filename@area\filename@base#1}{% |
| 152 |
% If the original .fig file exists, just change the name so that |
| 153 |
% it comprises the full path (file has been looked into |
| 154 |
% texgraphics, etc.) |
| 155 |
% Warning: the found filename is quoted :-( |
| 156 |
\StrBetween[1,2]{\@filef@und}{"}{"}[\FL@filename@unquoted] |
| 157 |
\filename@parse{\FL@filename@unquoted}% |
| 158 |
% Check if the subfig file exists |
| 159 |
\FL@subfig@check{\filename@area\[email protected]}% |
| 160 |
}{% |
| 161 |
% Else, write a warning (LaTeX will warn as well but it doesn't |
| 162 |
% hurt) |
| 163 |
\PackageWarning{figlatex}{No file |
| 164 |
'\filename@area\filename@base#1'}% |
| 165 |
} |
| 166 |
% Add the subfig suffix to the fig name. |
| 167 |
\edef\filename@base{\filename@base\FL@sepdefault\FL@subfig@name}% |
| 168 |
}{% |
| 169 |
}% |
| 170 |
\IfStrEq*{#1}{.svg}{% |
| 171 |
% If we're including a subfig |
| 172 |
\IfFileExists{\filename@area\filename@base#1}{% |
| 173 |
% If the original .svg file exists, just change the name so that |
| 174 |
% it comprises the full path (file has been looked into |
| 175 |
% texgraphics, etc.) |
| 176 |
% Warning: the found filename is quoted :-( |
| 177 |
\StrBetween[1,2]{\@filef@und}{"}{"}[\FL@filename@unquoted] |
| 178 |
\filename@parse{\FL@filename@unquoted}% |
| 179 |
% Check if the subfig file exists |
| 180 |
\FL@subfig@check{\filename@area\[email protected]}% |
| 181 |
}{% |
| 182 |
% Else, write a warning (LaTeX will warn as well but it doesn't |
| 183 |
% hurt) |
| 184 |
\PackageWarning{figlatex}{No file |
| 185 |
'\filename@area\filename@base#1'}% |
| 186 |
} |
| 187 |
% Add the subfig suffix to the svg name. |
| 188 |
\edef\filename@base{\filename@base\FL@sepdefault\FL@subfig@name}% |
| 189 |
}{% |
| 190 |
}% |
| 191 |
\fi% |
| 192 |
\FL@orig@Gin@getbase{#1}% |
| 193 |
} |
| 194 |
\let\FL@orig@Gin@getbase\Gin@getbase |
| 195 |
\let\Gin@getbase\FL@Gin@getbase |
| 196 |
|
| 197 |
|
| 198 |
\endinput |
| 199 |
%% |
| 200 |
%% End of file `figlatex.sty'. |