|
25 | 25 | %<driver> \ProvidesFile{graphics.drv}
|
26 | 26 | % \fi
|
27 | 27 | % \ProvidesFile{graphics.dtx}
|
28 |
| - [2020/08/09 v1.4b Standard LaTeX Graphics (DPC,SPQR)] |
| 28 | + [2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR)] |
29 | 29 | %
|
30 | 30 | % \iffalse
|
31 | 31 | %<*driver>
|
|
1134 | 1134 | \else
|
1135 | 1135 | \Gin@getbase{\Gin@sepdefault\filename@ext}%
|
1136 | 1136 | % \end{macrocode}
|
1137 |
| -% At this point try adding an extension, even if the filename has one so |
1138 |
| -% that \verb|a.b| may find \verb|a.b.png| if no file is found then revert |
1139 |
| -% to the extension as given to get better error reporting. |
| 1137 | +% At this point try adding an extension, either if the given file name |
| 1138 | +% has none, or if the extension matches no existing graphics inclusion |
| 1139 | +% rule, so that \verb|a.b| may find \verb|a.b.png|, if only the latter |
| 1140 | +% or if both files exist. If no file is found then revert to the |
| 1141 | +% extension as given to get better error reporting. |
1140 | 1142 | %
|
1141 | 1143 | % \changes{v1.3d}{2019/11/01}
|
1142 |
| -% {Try adding an extension even if the filenam had a dot.} |
1143 |
| -% \begin{macrocode} |
1144 |
| -\ifx\Gin@ext\relax |
1145 |
| -\let\Gin@savedbase\filename@base |
1146 |
| -\let\Gin@savedext\filename@ext |
1147 |
| - \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}% |
1148 |
| - \let\filename@ext\relax |
1149 |
| - \@for\Gin@temp:=\Gin@extensions\do{% |
1150 |
| - \ifx\Gin@ext\relax |
1151 |
| - \Gin@getbase\Gin@temp |
1152 |
| - \fi}% |
1153 |
| -% \end{macrocode} |
1154 |
| -% Restore if no file found using theknown extensions. |
| 1144 | +% {Try adding an extension even if the filename had a dot.} |
| 1145 | +% \changes{v1.4c}{2020/08/30} |
| 1146 | +% {Try adding an extension even if the filename had a dot AND |
| 1147 | +% if the filename without the extension exists (but doesn't have |
| 1148 | +% a known extension).} |
| 1149 | +% \begin{macrocode} |
| 1150 | + \ifnum0% |
| 1151 | + \ifx\Gin@ext\relax 1% |
| 1152 | + \else \@ifundefined{Gin@rule@\Gin@ext}{1}{0}% |
| 1153 | + \fi >0 |
| 1154 | + \let\Gin@ext\relax |
| 1155 | + \let\Gin@savedbase\filename@base |
| 1156 | + \let\Gin@savedext\filename@ext |
| 1157 | + \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}% |
| 1158 | + \let\filename@ext\relax |
| 1159 | + \@for\Gin@temp:=\Gin@extensions\do{% |
| 1160 | + \ifx\Gin@ext\relax |
| 1161 | + \Gin@getbase\Gin@temp |
| 1162 | + \fi}% |
| 1163 | +% \end{macrocode} |
| 1164 | +% Restore if no file found using the known extensions. |
1155 | 1165 | % \begin{macrocode}
|
1156 |
| - \ifx\Gin@ext\relax |
1157 |
| - \let\filename@base\Gin@savedbase |
1158 |
| - \let\filename@ext\Gin@savedext |
1159 |
| - \fi |
1160 |
| -\fi |
| 1166 | + \ifx\Gin@ext\relax |
| 1167 | + \let\filename@base\Gin@savedbase |
| 1168 | + \let\filename@ext\Gin@savedext |
| 1169 | + \fi |
| 1170 | + \fi |
1161 | 1171 | % \end{macrocode}
|
1162 | 1172 | %
|
1163 | 1173 | % \begin{macrocode}
|
|
0 commit comments