| 1 |
%% |
| 2 |
%% This is file `l3backend-testphase-luatex.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% l3backend-pdfmanagement.dtx (with options: `drivers,luatex') |
| 8 |
%% |
| 9 |
%% Copyright (C) 2019-2026 The LaTeX Project |
| 10 |
%% |
| 11 |
%% It may be distributed and/or modified under the conditions of |
| 12 |
%% the LaTeX Project Public License (LPPL), either version 1.3c of |
| 13 |
%% this license or (at your option) any later version. The latest |
| 14 |
%% version of this license is in the file: |
| 15 |
%% |
| 16 |
%% https://www.latex-project.org/lppl.txt |
| 17 |
%% |
| 18 |
%% This file is part of the "LaTeX PDF management bundle" (The Work in LPPL) |
| 19 |
%% and all files in that bundle must be distributed together. |
| 20 |
%% |
| 21 |
%% File: l3backend-pdfmanagement.dtx |
| 22 |
\ProvidesExplFile |
| 23 |
{l3backend-pdf-luatex.def}{2026-05-26}{0.97c} |
| 24 |
{LaTeX~PDF~management~bundle~backend~support:~PDF~output~(LuaTeX)} |
| 25 |
\cs_generate_variant:Nn \__kernel_backend_literal_page:n { e } |
| 26 |
\cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 |
| 27 |
{ \tex_special:D~shipout { #1} } |
| 28 |
\cs_new_protected:Npn \__kernel_backend_shipout_literal_pdf:e #1 |
| 29 |
{ |
| 30 |
\tex_pdfextension:D ~ literal ~ shipout ~ |
| 31 |
{ #1 } |
| 32 |
} |
| 33 |
\cs_new_protected:Npn \__kernel_backend_shipout_literal_page:e #1 |
| 34 |
{ |
| 35 |
\tex_pdfextension:D ~ literal ~ shipout ~ |
| 36 |
page { #1 } |
| 37 |
} |
| 38 |
|
| 39 |
\cs_new_protected:Npn \__pdf_backend_record_abspage:n #1 |
| 40 |
{ |
| 41 |
\@bsphack |
| 42 |
\property_record:nn{#1}{abspage} |
| 43 |
\@esphack |
| 44 |
} |
| 45 |
\cs_new:Npn \__pdf_backend_ref_abspage:n #1 |
| 46 |
{ |
| 47 |
\property_ref:nn{#1}{abspage} |
| 48 |
} |
| 49 |
|
| 50 |
\cs_generate_variant:Nn \__pdf_backend_record_abspage:n {e} |
| 51 |
\cs_generate_variant:Nn \__pdf_backend_ref_abspage:n {e} |
| 52 |
\prop_new:N \g__pdf_tmpa_prop |
| 53 |
\tl_new:N \l__pdf_tmpa_tl |
| 54 |
\box_new:N \l__pdf_backend_tmpa_box |
| 55 |
\box_new:N \l__pdf_backend_tmpb_box |
| 56 |
|
| 57 |
\int_new:N \g__pdf_backend_resourceid_int |
| 58 |
\int_new:N \g__pdf_backend_name_int |
| 59 |
\int_new:N \g__pdf_backend_page_int |
| 60 |
\directlua { require("l3backend-pdf.lua") } |
| 61 |
\cs_new:Npn \__kernel_pdf_name_from_unicode_e:n #1 |
| 62 |
{ |
| 63 |
/ \str_convert_pdfname:e { \text_expand:n { #1 } } |
| 64 |
} |
| 65 |
\tl_gput_right:Nn \@kernel@after@enddocument@afterlastpage |
| 66 |
{ |
| 67 |
\g__kernel_pdfmanagement_end_run_code_tl |
| 68 |
} |
| 69 |
\tl_if_exist:NTF \@kernel@after@shipout@background |
| 70 |
{ |
| 71 |
\g@addto@macro \@kernel@before@shipout@background{\relax} |
| 72 |
\g@addto@macro \@kernel@after@shipout@background |
| 73 |
{ |
| 74 |
\g__kernel_pdfmanagement_thispage_shipout_code_tl |
| 75 |
} |
| 76 |
} |
| 77 |
{ |
| 78 |
\hook_gput_code:nnn{shipout/background}{pdf} |
| 79 |
{ |
| 80 |
\g__kernel_pdfmanagement_thispage_shipout_code_tl |
| 81 |
} |
| 82 |
} |
| 83 |
|
| 84 |
\cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1 |
| 85 |
{ |
| 86 |
\tex_directlua:D |
| 87 |
{ |
| 88 |
pdf.setpagesattributes( \__pdf_backend_luastring:n { #1 } ) |
| 89 |
} |
| 90 |
} |
| 91 |
\cs_new:Npn \__pdf_backend_luastring:n #1 |
| 92 |
{ |
| 93 |
"\tex_luaescapestring:D { \tex_unexpanded:D { #1 } }" |
| 94 |
} |
| 95 |
%not used, only there for consistency |
| 96 |
\cs_new_protected:Npn \__pdf_backend_Page_primitive:n #1 |
| 97 |
{ |
| 98 |
\tex_latelua:D |
| 99 |
{ |
| 100 |
pdf.setpageattributes(\__pdf_backend_luastring:n { #1 }) |
| 101 |
} |
| 102 |
} |
| 103 |
% the command to store default values. |
| 104 |
% Uses a prop with pdflatex + dvi, |
| 105 |
% sets a lua table with lualatex |
| 106 |
\cs_new_protected:Npn \__pdf_backend_Page_gput:nn #1 #2 |
| 107 |
{ |
| 108 |
\tex_directlua:D |
| 109 |
{ |
| 110 |
ltx.__pdf.backend_Page_gput |
| 111 |
( |
| 112 |
\__pdf_backend_luastring:n { #1 }, |
| 113 |
\__pdf_backend_luastring:n { #2 } |
| 114 |
) |
| 115 |
} |
| 116 |
} |
| 117 |
% the command to remove a default value. |
| 118 |
% Uses a prop with pdflatex + dvi, |
| 119 |
% changes a lua table with lualatex |
| 120 |
\cs_new_protected:Npn \__pdf_backend_Page_gremove:n #1 |
| 121 |
{ |
| 122 |
\tex_directlua:D |
| 123 |
{ |
| 124 |
ltx.__pdf.backend_Page_gremove (\__pdf_backend_luastring:n { #1 }) |
| 125 |
} |
| 126 |
} |
| 127 |
% the command used in the document. |
| 128 |
% direct call of the primitive special with dvips/dvipdfmx |
| 129 |
% \latelua: fill a page related table with lualatex, merge it with the page |
| 130 |
% table and push it directly |
| 131 |
% write to aux and store in prop with pdflatex |
| 132 |
\cs_new_protected:Npn \__pdf_backend_ThisPage_gput:nn #1 #2 |
| 133 |
{ |
| 134 |
\tex_latelua:D |
| 135 |
{ |
| 136 |
ltx.__pdf.backend_ThisPage_gput |
| 137 |
( |
| 138 |
tex.count["g_shipout_readonly_int"], |
| 139 |
\__pdf_backend_luastring:n { #1 }, |
| 140 |
\__pdf_backend_luastring:n { #2 } |
| 141 |
) |
| 142 |
ltx.__pdf.backend_ThisPage_gpush (tex.count["g_shipout_readonly_int"]) |
| 143 |
} |
| 144 |
} |
| 145 |
%the code to push the values, used in shipout |
| 146 |
%merges the two props and then fills the register in pdflatex |
| 147 |
%merges the two tables (the one is probably still empty) and then fills (in lua) in luatex |
| 148 |
%issues the values stored in the global prop with dvi |
| 149 |
\cs_new_protected:Npn \__pdf_backend_ThisPage_gpush:n #1 |
| 150 |
{ |
| 151 |
\tex_latelua:D |
| 152 |
{ |
| 153 |
ltx.__pdf.backend_ThisPage_gpush (tex.count["g_shipout_readonly_int"]) |
| 154 |
} |
| 155 |
} |
| 156 |
|
| 157 |
\cs_generate_variant:Nn \__pdf_backend_Page_primitive:n { e } |
| 158 |
\clist_const:Nn \c__pdf_backend_PageResources_clist |
| 159 |
{ |
| 160 |
ExtGState, |
| 161 |
ColorSpace, |
| 162 |
Pattern, |
| 163 |
Shading, |
| 164 |
} |
| 165 |
\clist_map_inline:Nn \c__pdf_backend_PageResources_clist |
| 166 |
{ |
| 167 |
\pdf_object_new:n {__pdf/Page/Resources/#1} |
| 168 |
\cs_if_exist:NT \tex_directlua:D |
| 169 |
{ |
| 170 |
\tex_directlua:D |
| 171 |
{ |
| 172 |
ltx.__pdf.object["__pdf/Page/Resources/#1"] |
| 173 |
= |
| 174 |
"\pdf_object_ref:n{__pdf/Page/Resources/#1}" |
| 175 |
} |
| 176 |
} |
| 177 |
} |
| 178 |
\cs_new_protected:Npn \__pdf_backend_PageResources_gput:nnn #1 #2 #3 |
| 179 |
{ |
| 180 |
\pdfdict_gput:nnn {g__pdf_Core/Page/Resources/#1} { #2 }{ #3 } |
| 181 |
\tex_directlua:D{ltx.__pdf.Page.Resources.#1=true} |
| 182 |
\tex_directlua:D |
| 183 |
{ |
| 184 |
ltx.pdf.Page_Resources_gpush(tex.count["g_shipout_readonly_int"]) |
| 185 |
} |
| 186 |
} |
| 187 |
\cs_new_protected:Npn \__pdf_backend_PageResources_obj_gpush: |
| 188 |
{ |
| 189 |
\clist_map_inline:Nn \c__pdf_backend_PageResources_clist |
| 190 |
{ |
| 191 |
\pdf_object_write:nne |
| 192 |
{ __pdf/Page/Resources/##1 } { dict } |
| 193 |
{ \pdfdict_use:n { g__pdf_Core/Page/Resources/##1} } |
| 194 |
} |
| 195 |
} |
| 196 |
\bool_new:N \l__pdf_backend_xform_bool |
| 197 |
\cs_set_protected:Npn \__pdf_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name |
| 198 |
{ |
| 199 |
\int_gincr:N \g__pdf_backend_name_int |
| 200 |
\__kernel_backend_literal_page:e |
| 201 |
{ /#1 ~ /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } |
| 202 |
\bool_if:NTF \l__pdf_backend_xform_bool |
| 203 |
{ |
| 204 |
\pdfdict_gput:nee |
| 205 |
{ g__pdf_Core/Xform/Resources/Properties } |
| 206 |
{ l3pdf\int_use:N\g__pdf_backend_name_int } |
| 207 |
{ \pdf_object_ref:n { #2 } } |
| 208 |
} |
| 209 |
{ |
| 210 |
\exp_args:Ne \tex_latelua:D |
| 211 |
{ |
| 212 |
ltx.pdf.Page_Resources_Properties_gput |
| 213 |
( |
| 214 |
tex.count["g_shipout_readonly_int"], |
| 215 |
"l3pdf\int_use:N\g__pdf_backend_name_int", |
| 216 |
"\pdf_object_ref:n { #2 }" |
| 217 |
) |
| 218 |
} |
| 219 |
} |
| 220 |
} |
| 221 |
\cs_set_protected:Npn \__pdf_backend_bdcobject:n #1% #1 eg. Span |
| 222 |
{ |
| 223 |
\int_gincr:N \g__pdf_backend_name_int |
| 224 |
\__kernel_backend_literal_page:e |
| 225 |
{ /\exp_not:n{#1} ~ /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } |
| 226 |
\bool_if:NTF \l__pdf_backend_xform_bool |
| 227 |
{ |
| 228 |
\pdfdict_gput:nee %no handler needed |
| 229 |
{ g__pdf_Core/Xform/Resources/Properties } |
| 230 |
{ l3pdf\int_use:N\g__pdf_backend_name_int } |
| 231 |
{ \__pdf_backend_object_last: } |
| 232 |
} |
| 233 |
{ |
| 234 |
\exp_args:Ne \tex_latelua:D |
| 235 |
{ |
| 236 |
ltx.pdf.Page_Resources_Properties_gput |
| 237 |
( |
| 238 |
tex.count["g_shipout_readonly_int"], |
| 239 |
"l3pdf\int_use:N\g__pdf_backend_name_int", |
| 240 |
"\__pdf_backend_object_last:" |
| 241 |
) |
| 242 |
} |
| 243 |
} |
| 244 |
} |
| 245 |
\cs_set_protected:Npn \__pdf_backend_bmc:n #1 |
| 246 |
{ |
| 247 |
\__kernel_backend_literal_page:n { /#1~BMC } |
| 248 |
} |
| 249 |
\cs_set_protected:Npn \__pdf_backend_bdc_contobj:nn #1 #2 |
| 250 |
{ |
| 251 |
\pdf_object_unnamed_write:nn { dict } { #2 } |
| 252 |
\__pdf_backend_bdcobject:n { #1 } |
| 253 |
} |
| 254 |
\cs_set_protected:Npn \__pdf_backend_bdc_contstream:nn #1 #2 |
| 255 |
{ |
| 256 |
\__kernel_backend_literal_page:n { /#1~<<#2>>~BDC } |
| 257 |
} |
| 258 |
|
| 259 |
\cs_set_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contstream:nn |
| 260 |
|
| 261 |
\cs_set_protected:Npn \__pdf_backend_bdc_shipout_contstream:ee #1 #2 |
| 262 |
{ |
| 263 |
\__kernel_backend_shipout_literal_page:e { /#1~<<#2>>~BDC } |
| 264 |
} |
| 265 |
\cs_set_eq:NN \__pdf_backend_bdc_shipout:ee \__pdf_backend_bdc_shipout_contstream:ee |
| 266 |
|
| 267 |
\cs_set_protected:Npn \__pdf_backend_emc: |
| 268 |
{ |
| 269 |
\__kernel_backend_literal_page:n { EMC } |
| 270 |
} |
| 271 |
|
| 272 |
\cs_new_protected:Npn \__pdf_backend_PageResources_gpush:n #1 {} |
| 273 |
\cs_new_protected:Npn \__pdf_backend_Names_gpush:nn #1 #2 %#1 name of name tree, #2 array content |
| 274 |
{ |
| 275 |
\pdf_object_unnamed_write:nn {dict} {/Names [#2] } |
| 276 |
\tex_pdfextension:D~names~ {/#1~\pdf_object_ref_last:} |
| 277 |
} |
| 278 |
|
| 279 |
\cs_new_protected:Npn \__pdf_backend_NamesEmbeddedFiles_add:nn #1 #2 {} |
| 280 |
\lua_load_module:n{lualinksplit} |
| 281 |
\NewSocketPlug{build/column/footnotes}{lualinksplit}{% |
| 282 |
\setbox\footins=\vbox{\pdfextension linkstate-2\unvbox\footins}% |
| 283 |
} |
| 284 |
\AssignSocketPlug{build/column/footnotes}{lualinksplit} |
| 285 |
\cs_new_protected:Npn \__pdf_backend_xform_new:nnnn #1 #2 #3 #4 |
| 286 |
{ |
| 287 |
\hbox_set:Nn \l__pdf_backend_tmpa_box |
| 288 |
{ |
| 289 |
\bool_set_true:N \l__pdf_backend_xform_bool |
| 290 |
\prop_gclear:c { \__kernel_pdfdict_name:n { g__pdf_Core/Xform/Resources/Properties } } |
| 291 |
#4 |
| 292 |
} |
| 293 |
\tl_const:ce |
| 294 |
{ c__pdf_backend_xform_wd_ \tl_to_str:n {#1} _tl } |
| 295 |
{ \tex_the:D \box_wd:N \l__pdf_backend_tmpa_box } |
| 296 |
\tl_const:ce |
| 297 |
{ c__pdf_backend_xform_ht_ \tl_to_str:n {#1} _tl } |
| 298 |
{ \tex_the:D \box_ht:N \l__pdf_backend_tmpa_box } |
| 299 |
\tl_const:ce |
| 300 |
{ c__pdf_backend_xform_dp_ \tl_to_str:n {#1} _tl } |
| 301 |
{ \tex_the:D \box_dp:N \l__pdf_backend_tmpa_box } |
| 302 |
%% do we need to test if #2 and #3 are empty?? |
| 303 |
\tex_immediate:D \tex_pdfxform:D |
| 304 |
~ attr ~ { #2 } |
| 305 |
%% which resources should be default? Is an argument actually needed? |
| 306 |
~ resources ~ |
| 307 |
{ |
| 308 |
#3 |
| 309 |
\int_compare:nNnT |
| 310 |
{\prop_count:c { \__kernel_pdfdict_name:n { g__pdf_Core/Xform/Resources/Properties } }} |
| 311 |
> |
| 312 |
{ 0 } |
| 313 |
{ |
| 314 |
/Properties~ |
| 315 |
<< |
| 316 |
\pdfdict_use:n { g__pdf_Core/Xform/Resources/Properties } |
| 317 |
>> |
| 318 |
} |
| 319 |
\prop_if_empty:cF |
| 320 |
{ \__kernel_pdfdict_name:n { g__pdf_Core/Page/Resources/ExtGState } } |
| 321 |
{ |
| 322 |
/ExtGState~ \pdf_object_ref:n { __pdf/Page/Resources/ExtGState } |
| 323 |
} |
| 324 |
\prop_if_empty:cF |
| 325 |
{ \__kernel_pdfdict_name:n { g__pdf_Core/Page/Resources/Pattern } } |
| 326 |
{ |
| 327 |
/Pattern~ \pdf_object_ref:n { __pdf/Page/Resources/Pattern } |
| 328 |
} |
| 329 |
\prop_if_empty:cF |
| 330 |
{ \__kernel_pdfdict_name:n { g__pdf_Core/Page/Resources/Shading } } |
| 331 |
{ |
| 332 |
/Shading~ \pdf_object_ref:n { __pdf/Page/Resources/Shading } |
| 333 |
} |
| 334 |
\prop_if_empty:cF |
| 335 |
{ \__kernel_pdfdict_name:n { g__pdf_Core/Page/Resources/ColorSpace } } |
| 336 |
{ |
| 337 |
/ColorSpace~ \pdf_object_ref:n { __pdf/Page/Resources/ColorSpace } |
| 338 |
} |
| 339 |
} |
| 340 |
\l__pdf_backend_tmpa_box |
| 341 |
\int_const:cn |
| 342 |
{ c__pdf_backend_xform_ \tl_to_str:n {#1} _int } |
| 343 |
{ \tex_pdflastxform:D } |
| 344 |
} |
| 345 |
|
| 346 |
\cs_new_protected:Npn \__pdf_backend_xform_use:n #1 %protected as with xelatex |
| 347 |
{ |
| 348 |
\tex_pdfrefxform:D \int_use:c |
| 349 |
{ |
| 350 |
c__pdf_backend_xform_ \tl_to_str:n {#1} _int |
| 351 |
} |
| 352 |
\scan_stop: |
| 353 |
} |
| 354 |
|
| 355 |
\cs_new:Npn \__pdf_backend_xform_ref:n #1 |
| 356 |
{ \int_use:c { c__pdf_backend_xform_ \tl_to_str:n {#1} _int } ~ 0 ~ R } |
| 357 |
|
| 358 |
%% all |
| 359 |
\prg_new_conditional:Npnn \__pdf_backend_xform_if_exist:n #1 { p , T , F , TF } |
| 360 |
{ |
| 361 |
\int_if_exist:cTF { c__pdf_backend_xform_ \tl_to_str:n {#1} _int } |
| 362 |
{ \prg_return_true: } |
| 363 |
{ \prg_return_false:} |
| 364 |
} |
| 365 |
\prg_new_eq_conditional:NNn \pdfxform_if_exist:n\__pdf_backend_xform_if_exist:n |
| 366 |
{ TF , T , F , p } |
| 367 |
\tl_new:N \l_pdf_current_structure_destination_tl |
| 368 |
\cs_new_protected:Npn \pdf_activate_structure_destination: |
| 369 |
{ |
| 370 |
\cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn |
| 371 |
\cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn |
| 372 |
\cs_gset_eq:NN \__pdfannot_backend_link_begin_goto:nnw \__pdfannot_backend_link_begin_structure_goto:nnw |
| 373 |
} |
| 374 |
\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: |
| 375 |
{ |
| 376 |
\cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_indexed_structure_destination:nn |
| 377 |
\cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_indexed_structure_destination:nnnn |
| 378 |
\cs_gset_eq:NN \__pdfannot_backend_link_begin_goto:nnw \__pdfannot_backend_link_begin_structure_goto:nnw |
| 379 |
} |
| 380 |
\cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn |
| 381 |
\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn |
| 382 |
\cs_set_eq:NN \__pdfannot_backend_link_begin_structure_goto:nnw \__pdfannot_backend_link_begin_goto:nnw |
| 383 |
\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nn \__pdf_backend_destination:nn |
| 384 |
\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nnnn \__pdf_backend_destination:nnnn |
| 385 |
\int_compare:nNnT {\directlua{tex.print(status.list()["development_id"])} } > {7468} |
| 386 |
{ |
| 387 |
\cs_set_protected:Npn \__pdf_backend_structure_destination:nn #1#2 |
| 388 |
{ |
| 389 |
\tex_pdfextension:D dest |
| 390 |
name {#1} |
| 391 |
\str_case:nnF {#2} |
| 392 |
{ |
| 393 |
{ xyz } { xyz } |
| 394 |
{ fit } { fit } |
| 395 |
{ fitb } { fitb } |
| 396 |
{ fitbh } { fitbh } |
| 397 |
{ fitbv } { fitbv } |
| 398 |
{ fith } { fith } |
| 399 |
{ fitv } { fitv } |
| 400 |
{ fitr } { fitr } |
| 401 |
} |
| 402 |
{ xyz ~ zoom \fp_eval:n { #2 * 10 } } |
| 403 |
\scan_stop: |
| 404 |
\exp_args:Ne \pdf_object_if_exist:nT { \l_pdf_current_structure_destination_tl } |
| 405 |
{ |
| 406 |
\tex_pdfextension:D dest |
| 407 |
struct~ |
| 408 |
\int_use:c |
| 409 |
{ c__pdf_object_ \exp_args:Ne \tl_to_str:n {\l_pdf_current_structure_destination_tl} _int }~ |
| 410 |
name {#1} |
| 411 |
\str_case:nnF {#2} |
| 412 |
{ |
| 413 |
{ xyz } { xyz } |
| 414 |
{ fit } { fit } |
| 415 |
{ fitb } { fitb } |
| 416 |
{ fitbh } { fitbh } |
| 417 |
{ fitbv } { fitbv } |
| 418 |
{ fith } { fith } |
| 419 |
{ fitv } { fitv } |
| 420 |
{ fitr } { fitr } |
| 421 |
} |
| 422 |
{ xyz ~ zoom \fp_eval:n { #2 * 10 } } |
| 423 |
\scan_stop: |
| 424 |
} |
| 425 |
} |
| 426 |
\cs_set_protected:Npn \__pdf_backend_structure_destination:nnnn #1#2#3#4 |
| 427 |
{ |
| 428 |
\tex_pdfextension:D dest |
| 429 |
name {#1} |
| 430 |
fitr ~ |
| 431 |
width \dim_eval:n {#2} ~ |
| 432 |
height \dim_eval:n {#3} ~ |
| 433 |
depth \dim_eval:n {#4} \scan_stop: |
| 434 |
\exp_args:Ne \pdf_object_if_exist:nT { \l_pdf_current_structure_destination_tl } |
| 435 |
{ |
| 436 |
\tex_pdfextension:D dest |
| 437 |
struct~ |
| 438 |
\int_use:c |
| 439 |
{ c__pdf_object_ \exp_args:Ne \tl_to_str:n {\l_pdf_current_structure_destination_tl} _int }~ |
| 440 |
name {#1} |
| 441 |
fitr ~ |
| 442 |
width \dim_eval:n {#2} ~ |
| 443 |
height \dim_eval:n {#3} ~ |
| 444 |
depth \dim_eval:n {#4} \scan_stop: |
| 445 |
} |
| 446 |
} |
| 447 |
\cs_set_protected:Npn \__pdfannot_backend_link_begin_structure_goto:nnw #1#2 |
| 448 |
{ |
| 449 |
\__pdfannot_backend_link_begin:nnnw {#1} { goto~struct~name~{#2}~name } {#2} |
| 450 |
} |
| 451 |
} |
| 452 |
\int_compare:nNnT {\directlua{tex.print(status.list()["development_id"])} } > {7468} |
| 453 |
{ |
| 454 |
\cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nn #1#2 |
| 455 |
{ |
| 456 |
\tex_pdfextension:D dest |
| 457 |
name {#1} |
| 458 |
\str_case:nnF {#2} |
| 459 |
{ |
| 460 |
{ xyz } { xyz } |
| 461 |
{ fit } { fit } |
| 462 |
{ fitb } { fitb } |
| 463 |
{ fitbh } { fitbh } |
| 464 |
{ fitbv } { fitbv } |
| 465 |
{ fith } { fith } |
| 466 |
{ fitv } { fitv } |
| 467 |
{ fitr } { fitr } |
| 468 |
} |
| 469 |
{ xyz ~ zoom \fp_eval:n { #2 * 10 } } |
| 470 |
\scan_stop: |
| 471 |
\tex_pdfextension:D dest |
| 472 |
struct~ |
| 473 |
\exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ |
| 474 |
name {#1} |
| 475 |
\str_case:nnF {#2} |
| 476 |
{ |
| 477 |
{ xyz } { xyz } |
| 478 |
{ fit } { fit } |
| 479 |
{ fitb } { fitb } |
| 480 |
{ fitbh } { fitbh } |
| 481 |
{ fitbv } { fitbv } |
| 482 |
{ fith } { fith } |
| 483 |
{ fitv } { fitv } |
| 484 |
{ fitr } { fitr } |
| 485 |
} |
| 486 |
{ xyz ~ zoom \fp_eval:n { #2 * 10 } } |
| 487 |
\scan_stop: |
| 488 |
} |
| 489 |
\cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nnnn #1#2#3#4 |
| 490 |
{ |
| 491 |
\tex_pdfextension:D dest |
| 492 |
name {#1} |
| 493 |
fitr ~ |
| 494 |
width \dim_eval:n {#2} ~ |
| 495 |
height \dim_eval:n {#3} ~ |
| 496 |
depth \dim_eval:n {#4} \scan_stop: |
| 497 |
\tex_pdfextension:D dest |
| 498 |
struct~ |
| 499 |
\exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl~ |
| 500 |
name {#1} |
| 501 |
fitr ~ |
| 502 |
width \dim_eval:n {#2} ~ |
| 503 |
height \dim_eval:n {#3} ~ |
| 504 |
depth \dim_eval:n {#4} \scan_stop: |
| 505 |
} |
| 506 |
\cs_set_protected:Npn \__pdfannot_backend_link_begin_structure_goto:nnw #1#2 |
| 507 |
{ |
| 508 |
\__pdfannot_backend_link_begin:nnnw {#1} { goto~struct~name~{#2}~name } {#2} |
| 509 |
} |
| 510 |
} |
| 511 |
\cs_new_protected:Npn \__pdf_backend_set_regression_data: |
| 512 |
{ |
| 513 |
\sys_gset_rand_seed:n{1000} |
| 514 |
\pdfmanagement_add:nnn{Info}{Creator}{(TeX)} |
| 515 |
\pdfmanagement_add:nnn{Info}{Producer}{(LuaTeX)} |
| 516 |
\tex_pdfvariable:D suppressoptionalinfo 7\relax |
| 517 |
\tex_pdfvariable:D trailerid |
| 518 |
{[~ |
| 519 |
<2350CAD05F8A7AF0AA4058486855344F>~ |
| 520 |
<2350CAD05F8A7AF0AA4058486855344F>~ |
| 521 |
]} |
| 522 |
\pdfdict_put:nne {l_pdffile/Params} {ModDate}{(\c_sys_timestamp_str)} |
| 523 |
\AddToDocumentProperties[hyperref]{pdfinstanceid}{uuid:0a57c455-157a-4141-8c19-6237d832fc80} |
| 524 |
\AddToDocumentProperties[hyperref]{pdfproducer}{\c_sys_engine_exec_str-NN.NN.NN} |
| 525 |
} |
| 526 |
\cs_new_protected:Npn \__pdf_backend_metadata_stream:n #1 |
| 527 |
{ |
| 528 |
\AddToHook{enddocument/end} |
| 529 |
{ |
| 530 |
\tex_immediate:D \tex_pdfextension:D obj ~ |
| 531 |
useobjnum ~ \int_eval:n{\__pdf_object_retrieve:n {__pdfmeta/xmp}}~uncompressed~ |
| 532 |
\__pdf_backend_object_write:nn {stream} |
| 533 |
{{/Type~/Metadata~/Subtype~/XML}{#1}} |
| 534 |
} |
| 535 |
} |
| 536 |
\cs_new_protected:Npn \__pdf_backend_omit_charset:n #1 %#1 number |
| 537 |
{ |
| 538 |
\tex_pdfvariable:D omitcharset = #1 \scan_stop: |
| 539 |
} |
| 540 |
\int_compare:nNnTF {\directlua{tex.print(status.list()["development_id"])} } > {7560} |
| 541 |
{ |
| 542 |
\cs_new_protected:Npn \__pdf_backend_omit_info:n #1 %#1 number |
| 543 |
{ |
| 544 |
\tex_pdfvariable:D omitinfodict = #1 \scan_stop: |
| 545 |
} |
| 546 |
} |
| 547 |
{ |
| 548 |
\cs_new_protected:Npn \__pdf_backend_omit_info:n #1 {} %#1 number |
| 549 |
} |
| 550 |
\cs_new_protected:Npn \__pdf_backend_omit_cidset:n #1 %#1 number |
| 551 |
{ |
| 552 |
\tex_pdfvariable:D omitcidset = #1 \scan_stop: |
| 553 |
} |
| 554 |
\cs_new_protected:Npn \__pdf_backend_action:nnnnnnn #1#2#3#4#5#6#7 |
| 555 |
{ |
| 556 |
\tex_pdfextension:D~outline~attr |
| 557 |
{ |
| 558 |
/F~#5~ |
| 559 |
\tl_if_blank:nF { #4 }{/C~[#4]} |
| 560 |
}~ |
| 561 |
user~{<<\exp_not:n{#6}>>}~ |
| 562 |
count~\bool_if:nF{#3}{-}#2~ |
| 563 |
{\exp_not:n{#7}} |
| 564 |
} |
| 565 |
\cs_new_protected:Npn \__pdf_backend_goto:nnnnnnn #1#2#3#4#5#6#7 |
| 566 |
{ |
| 567 |
\tex_pdfextension:D~outline~attr |
| 568 |
{ |
| 569 |
/F~#5~ |
| 570 |
\tl_if_blank:nF { #4 }{/Color~[#4]} |
| 571 |
}~ |
| 572 |
\tag_if_active:TF |
| 573 |
{goto~struct~name~{#6}~name~{#6}} |
| 574 |
{goto~name~{#6}}~ |
| 575 |
count~\bool_if:nF{#3}{-}#2~ |
| 576 |
{\exp_not:n{#7}} |
| 577 |
} |
| 578 |
%% |
| 579 |
%% |
| 580 |
%% End of file `l3backend-testphase-luatex.def'. |