summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def')
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def103
1 files changed, 71 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
index 9ef6db2e4ef..c98a097818a 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
@@ -26,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-luatex.def}{2022-02-07}{}
+ {l3backend-luatex.def}{2022-04-10}{}
{L3 backend support: PDF output (LuaTeX)}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -535,72 +535,97 @@
\__kernel_backend_scope_end:
}
%% File: l3backend-graphics.dtx
+\cs_new_protected:Npn \__graphics_backend_loaded:n #1
+ {
+ \cs_if_exist:NTF \hook_gput_code:nnn
+ {
+ \hook_gput_code:nnn
+ { file / l3graphics.sty / after }
+ { backend }
+ {#1}
+ }
+ {#1}
+ }
+\__graphics_backend_loaded:n
+ {
+ \seq_set_from_clist:Nn
+ \l_graphics_search_ext_seq
+ { .pdf , .eps , .png , .jpg , .jpeg }
+ }
\tl_new:N \l__graphics_graphics_attr_tl
\cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
{
- \int_zero:N \l_graphics_page_int
- \tl_clear:N \l_graphics_pagebox_tl
+ \int_zero:N \l__graphics_page_int
+ \tl_clear:N \l__graphics_pagebox_tl
\tl_set:Nx \l__graphics_graphics_attr_tl
{
- \tl_if_empty:NF \l_graphics_decodearray_tl
- { :D \l_graphics_decodearray_tl }
- \bool_if:NT \l_graphics_interpolate_bool
+ \tl_if_empty:NF \l__graphics_decodearray_str
+ { :D \l__graphics_decodearray_str }
+ \bool_if:NT \l__graphics_interpolate_bool
{ :I }
}
\tl_clear:N \l__graphics_graphics_attr_tl
\__graphics_backend_getbb_auxi:n {#1}
}
+\cs_new_eq:NN \__graphics_backend_getbb_jpeg:n \__graphics_backend_getbb_jpg:n
\cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n
\cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1
{
- \tl_clear:N \l_graphics_decodearray_tl
- \bool_set_false:N \l_graphics_interpolate_bool
+ \tl_clear:N \l__graphics_decodearray_str
+ \bool_set_false:N \l__graphics_interpolate_bool
\tl_set:Nx \l__graphics_graphics_attr_tl
{
- : \l_graphics_pagebox_tl
- \int_compare:nNnT \l_graphics_page_int > 1
- { :P \int_use:N \l_graphics_page_int }
+ : \l__graphics_pagebox_tl
+ \int_compare:nNnT \l__graphics_page_int > 1
+ { :P \int_use:N \l__graphics_page_int }
}
\__graphics_backend_getbb_auxi:n {#1}
}
\cs_new_protected:Npn \__graphics_backend_getbb_auxi:n #1
{
- \graphics_bb_restore:xF { #1 \l__graphics_graphics_attr_tl }
+ \__graphics_bb_restore:xF { #1 \l__graphics_graphics_attr_tl }
{ \__graphics_backend_getbb_auxii:n {#1} }
}
\cs_new_protected:Npn \__graphics_backend_getbb_auxii:n #1
{
+ \exp_args:Ne \__graphics_backend_getbb_auxiii:n
+ { \__graphics_backend_dequote:w #1 " #1 " \s__graphics_stop }
+ \int_const:cn { c__graphics_ #1 \l__graphics_graphics_attr_tl _int }
+ { \tex_the:D \tex_pdflastximage:D }
+ \__graphics_bb_save:x { #1 \l__graphics_graphics_attr_tl }
+ }
+\cs_new_protected:Npn \__graphics_backend_getbb_auxiii:n #1
+ {
\tex_immediate:D \tex_pdfximage:D
\bool_lazy_or:nnT
- { \l_graphics_interpolate_bool }
- { ! \tl_if_empty_p:N \l_graphics_decodearray_tl }
+ { \l__graphics_interpolate_bool }
+ { ! \tl_if_empty_p:N \l__graphics_decodearray_str }
{
attr ~
{
- \tl_if_empty:NF \l_graphics_decodearray_tl
- { /Decode~[ \l_graphics_decodearray_tl ] }
- \bool_if:NT \l_graphics_interpolate_bool
+ \tl_if_empty:NF \l__graphics_decodearray_str
+ { /Decode~[ \l__graphics_decodearray_str ] }
+ \bool_if:NT \l__graphics_interpolate_bool
{ /Interpolate~true }
}
}
- \int_compare:nNnT \l_graphics_page_int > 0
- { page ~ \int_use:N \l_graphics_page_int }
- \tl_if_empty:NF \l_graphics_pagebox_tl
- { \l_graphics_pagebox_tl }
+ \int_compare:nNnT \l__graphics_page_int > 0
+ { page ~ \int_use:N \l__graphics_page_int }
+ \tl_if_empty:NF \l__graphics_pagebox_tl
+ { \l__graphics_pagebox_tl }
{#1}
\hbox_set:Nn \l__graphics_internal_box
{ \tex_pdfrefximage:D \tex_pdflastximage:D }
- \dim_set:Nn \l_graphics_urx_dim { \box_wd:N \l__graphics_internal_box }
- \dim_set:Nn \l_graphics_ury_dim { \box_ht:N \l__graphics_internal_box }
- \int_const:cn { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int }
- { \tex_the:D \tex_pdflastximage:D }
- \graphics_bb_save:x { #1 \l__graphics_graphics_attr_tl }
+ \dim_set:Nn \l__graphics_urx_dim { \box_wd:N \l__graphics_internal_box }
+ \dim_set:Nn \l__graphics_ury_dim { \box_ht:N \l__graphics_internal_box }
}
+\cs_new:Npn \__graphics_backend_dequote:w #1 " #2 " #3 \s__graphics_stop {#2}
\cs_new_protected:Npn \__graphics_backend_include_jpg:n #1
{
\tex_pdfrefximage:D
- \int_use:c { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int }
+ \int_use:c { c__graphics_ #1 \l__graphics_graphics_attr_tl _int }
}
+\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_jpg:n
\cs_new_eq:NN \__graphics_backend_include_pdf:n \__graphics_backend_include_jpg:n
\cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_jpg:n
\sys_if_shell:T
@@ -616,8 +641,12 @@
\l__graphics_backend_ext_str
\exp_args:Nx \__graphics_backend_getbb_eps:nn
{
- \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str
- -converted-to.pdf
+ \exp_args:Ne \__kernel_file_name_quote:n
+ {
+ \l__graphics_backend_name_str
+ - \str_tail:N \l__graphics_backend_ext_str
+ -converted-to.pdf
+ }
}
{#1}
}
@@ -628,7 +657,7 @@
\sys_shell_now:n
{ repstopdf ~ #2 ~ #1 }
}
- \tl_set:Nn \l_graphics_name_tl {#1}
+ \tl_set:Nn \l__graphics_final_name_str {#1}
\__graphics_backend_getbb_pdf:n {#1}
}
\cs_new_protected:Npn \__graphics_backend_include_eps:n #1
@@ -637,11 +666,21 @@
\l__graphics_backend_dir_str \l__graphics_backend_name_str \l__graphics_backend_ext_str
\exp_args:Nx \__graphics_backend_include_pdf:n
{
- \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str
- -converted-to.pdf
+ \exp_args:Ne \__kernel_file_name_quote:n
+ {
+ \l__graphics_backend_name_str
+ - \str_tail:N \l__graphics_backend_ext_str
+ -converted-to.pdf
+ }
}
}
}
+\cs_new_protected:Npn \__graphics_backend_get_pagecount:n #1
+ {
+ \tex_immediate:D \tex_pdfximage:D {#1}
+ \int_const:cn { c__graphics_ #1 _pages_int }
+ { \int_use:N \tex_pdflastximagepages:D }
+ }
%% File: l3backend-pdf.dtx
\box_new:N \l__pdf_internal_box
\cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4