summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3experimental/l3graphics.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3experimental/l3graphics.dtx')
-rw-r--r--macros/latex/contrib/l3experimental/l3graphics.dtx23
1 files changed, 18 insertions, 5 deletions
diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx
index cf4a70983d..0a3556c5be 100644
--- a/macros/latex/contrib/l3experimental/l3graphics.dtx
+++ b/macros/latex/contrib/l3experimental/l3graphics.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2022-04-10}
+% \date{Released 2022-04-20}
%
% \maketitle
%
@@ -185,13 +185,14 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3graphics}{2022-04-10}{}
+\ProvidesExplPackage{l3graphics}{2022-04-20}{}
{L3 Experimental graphics inclusion support}
% \end{macrocode}
%
-% \begin{variable}{\l_@@_internal_ior, \l_@@_internal_tl}
+% \begin{variable}{\l_@@_internal_dim, \l_@@_internal_ior, \l_@@_internal_tl}
% Scratch space.
% \begin{macrocode}
+\dim_new:N \l_@@_internal_dim
\ior_new:N \l_@@_internal_ior
\tl_new:N \l_@@_internal_tl
% \end{macrocode}
@@ -631,7 +632,9 @@
% \begin{macro}{\graphics_get_full_name:nN}
% \begin{macro}[TF]{\graphics_get_full_name:nN}
% \begin{macro}{\@@_get_full_name:n}
-% A simple search.
+% As well as searching by path, etc., there is a need here to check that
+% we do not trip over |foo.bar| if |.bar| is not a known extension for
+% the current backend.
% \begin{macrocode}
\cs_new_protected:Npn \graphics_get_full_name:nN #1#2
{
@@ -645,8 +648,18 @@
\seq_set_eq:NN \l_file_search_path_seq \l_graphics_search_path_seq
\file_get_full_name:nNTF {#1} \l_@@_full_name_str
{
- \str_if_eq:eeT { \l_@@_full_name_str } { #1 .tex }
+ \str_if_eq:eeTF { \l_@@_full_name_str } { #1 .tex }
{ \@@_get_full_name:n {#1} }
+ {
+ \file_parse_full_name:VNNN \l_@@_full_name_str
+ \l_@@_dir_str \l_@@_name_str \l_@@_ext_str
+ \seq_map_inline:Nn \l_graphics_search_ext_seq
+ {
+ \str_if_eq:nVT {##1} \l_@@_ext_str
+ { \seq_map_break:n { \use_none:nn } }
+ }
+ \@@_get_full_name:n {#1}
+ }
}
{ \@@_get_full_name:n {#1} }
\exp_args:NNNV \group_end: