summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-01-13 21:05:04 +0000
committerKarl Berry <karl@freefriends.org>2022-01-13 21:05:04 +0000
commit031d7dac6f41c0c635cb8e8fa08cf794a1cc80c1 (patch)
tree16758e614639acf9cd63d4db4f4a618ffe99e853 /Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
parentd34f367554fea0310b29e2b530b4b1939e21b92b (diff)
pdfmanagement-testphase (13jan22)
git-svn-id: svn://tug.org/texlive/trunk@61599 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def')
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def111
1 files changed, 110 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
index 45a1a0f8b87..160d37b9882 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
@@ -20,7 +20,7 @@
%%
%% File: l3backend-testphase.dtx
\ProvidesExplFile
- {l3backend-testphase-xetex.def}{2021-08-28}{}
+ {l3backend-testphase-xetex.def}{2022-01-13}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
\RequirePackage{l3ref-tmp}
\cs_generate_variant:Nn \ref_label:nn {en}
@@ -351,6 +351,115 @@
}
\prg_new_eq_conditional:NNn \pdfxform_if_exist:n\__pdf_backend_xform_if_exist:n
{ TF , T , F , p }
+\tl_new:N \l_pdf_current_structure_destination_tl
+\cs_new_protected:Npn \pdf_activate_structure_destination:
+ {
+ \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn
+ \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn
+ \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw
+ }
+\cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn
+\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn
+\cs_set_eq:NN \__pdf_backend_link_begin_structure_goto:nnw \__pdf_backend_link_begin_goto:nnw
+\cs_set_protected:Npn \__pdf_backend_structure_destination:nn #1#2
+ {
+ \__pdf_backend:x
+ {
+ dest ~ ( \exp_not:n {#1} )
+ [
+ @thispage
+ \str_case:nnF {#2}
+ {
+ { xyz } { /XYZ ~ @xpos ~ @ypos ~ null }
+ { fit } { /Fit }
+ { fitb } { /FitB }
+ { fitbh } { /FitBH }
+ { fitbv } { /FitBV ~ @xpos }
+ { fith } { /FitH ~ @ypos }
+ { fitv } { /FitV ~ @xpos }
+ { fitr } { /Fit }
+ }
+ { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
+ ]
+ }
+ \exp_args:Ne \pdf_object_if_exist:nT { \l_pdf_current_structure_destination_tl }
+ {
+ \__pdf_backend:x
+ {
+ obj ~ @pdf.SDest.\exp_not:n{#1}
+ [
+ \exp_args:Ne \pdf_object_ref:n { \l_pdf_current_structure_destination_tl }
+ \str_case:nnF {#2}
+ {
+ { xyz } { /XYZ ~ @xpos ~ @ypos ~ null }
+ { fit } { /Fit }
+ { fitb } { /FitB }
+ { fitbh } { /FitBH }
+ { fitbv } { /FitBV ~ @xpos }
+ { fith } { /FitH ~ @ypos }
+ { fitv } { /FitV ~ @xpos }
+ { fitr } { /Fit }
+ }
+ { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
+ ]
+ }
+ }
+ }
+\cs_new_protected:Npn \__pdf_backend_structure_destination_aux:nnnn #1#2#3#4
+ {
+ \vbox_to_zero:n
+ {
+ \__kernel_kern:n {#4}
+ \hbox:n
+ {
+ \__pdf_backend:n { obj ~ @pdf_ #2 _llx ~ @xpos }
+ \__pdf_backend:n { obj ~ @pdf_ #2 _lly ~ @ypos }
+ }
+ \tex_vss:D
+ }
+ \__kernel_kern:n {#1}
+ \vbox_to_zero:n
+ {
+ \__kernel_kern:n { -#3 }
+ \hbox:n
+ {
+ \__pdf_backend:n
+ {
+ dest ~ (#2)
+ [
+ @thispage
+ /FitR ~
+ @pdf_ #2 _llx ~ @pdf_ #2 _lly ~
+ @xpos ~ @ypos
+ ]
+ }
+ \exp_args:Ne \pdf_object_if_exist:nT { \l_pdf_current_structure_destination_tl }
+ {
+ \__pdf_backend:x
+ {
+ obj ~ @pdf.SDest.\exp_not:n{#2}
+ [
+ \exp_args:Ne \pdf_object_ref:n { \l_pdf_current_structure_destination_tl }
+ /FitR ~
+ @pdf_ #2 _llx ~ @pdf_ #2 _lly ~
+ @xpos ~ @ypos
+ ]
+ }
+ }
+ }
+ \tex_vss:D
+ }
+ \__kernel_kern:n { -#1 }
+ }
+\cs_set_protected:Npn \__pdf_backend_structure_destination:nnnn #1#2#3#4
+ {
+ \exp_args:Ne \__pdf_backend_structure_destination_aux:nnnn
+ { \dim_eval:n {#2} } {#1} {#3} {#4}
+ }
+\cs_set_protected:Npn \__pdf_backend_link_begin_structure_goto:nnw #1#2
+ {
+ \__pdf_backend_link_begin:n { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) /SD~@pdf.SDest.#2 >> }
+ }
%%
%%
%% End of file `l3backend-testphase-xetex.def'.