summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-03 22:30:06 +0000
committerKarl Berry <karl@freefriends.org>2019-05-03 22:30:06 +0000
commit6c87d764952f4d6eb0d273c68f6033a0b5536fdb (patch)
tree548aa554eae6bc4f978cd66f64ab45874a3d3bd5 /Master/texmf-dist/tex/latex/l3kernel
parent5139fa11fc380bdb1d620afffda047044c55ef7a (diff)
l3 (3may19)
git-svn-id: svn://tug.org/texlive/trunk@50972 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex275
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex2
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def60
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3dvips.def174
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def3
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def57
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def60
8 files changed, 457 insertions, 176 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
index 0710918dfaf..d4f679dc452 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
@@ -48,6 +48,7 @@
%% l3luatex.dtx (with options: `package,tex')
%% l3unicode.dtx (with options: `package')
%% l3candidates.dtx (with options: `package')
+%% l3legacy.dtx (with options: `package')
%% l3deprecation.dtx (with options: `package')
%%
%% Copyright (C) 1990-2019 The LaTeX3 Project
@@ -63,7 +64,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2019-04-21}%
+\def\ExplFileDate{2019-05-03}%
\begingroup
\def\next{\endgroup}%
\expandafter\ifx\csname PackageError\endcsname\relax
@@ -744,6 +745,7 @@
\__kernel_primitive:NN \pdfoutline \tex_pdfoutline:D
\__kernel_primitive:NN \pdfoutput \tex_pdfoutput:D
\__kernel_primitive:NN \pdfpageattr \tex_pdfpageattr:D
+ \__kernel_primitive:NN \pdfpagesattr \tex_pdfpagesattr:D
\__kernel_primitive:NN \pdfpagebox \tex_pdfpagebox:D
\__kernel_primitive:NN \pdfpageref \tex_pdfpageref:D
\__kernel_primitive:NN \pdfpageresources \tex_pdfpageresources:D
@@ -1223,6 +1225,8 @@
\__kernel_primitive:NN \Usuperscript \tex_Usuperscript:D
\__kernel_primitive:NN \Uunderdelimiter \tex_Uunderdelimiter:D
\__kernel_primitive:NN \Uvextensible \tex_Uvextensible:D
+ \__kernel_primitive:NN \harftexrevision \tex_harftexrevision:D
+ \__kernel_primitive:NN \harftexversion \tex_harftexversion:D
\__kernel_primitive:NN \autospacing \tex_autospacing:D
\__kernel_primitive:NN \autoxspacing \tex_autoxspacing:D
\__kernel_primitive:NN \dtou \tex_dtou:D
@@ -8979,6 +8983,47 @@
{ \exp_not:c { peek_#1:NF } ##1 {##2} }
}
}
+\group_begin:
+ \cs_set_protected:Npn \__peek_tmp:w #1 \q_stop
+ {
+ \cs_new_protected:Npn \__peek_execute_branches_N_type:
+ {
+ \if_int_odd:w
+ \if_catcode:w \exp_not:N \l_peek_token { 0 \exp_stop_f: \fi:
+ \if_catcode:w \exp_not:N \l_peek_token } 0 \exp_stop_f: \fi:
+ \if_meaning:w \l_peek_token \c_space_token 0 \exp_stop_f: \fi:
+ 1 \exp_stop_f:
+ \exp_after:wN \__peek_N_type:w
+ \token_to_meaning:N \l_peek_token
+ \q_mark \__peek_N_type_aux:nnw
+ #1 \q_mark \use_none_delimit_by_q_stop:w
+ \q_stop
+ \exp_after:wN \__peek_true:w
+ \else:
+ \exp_after:wN \__peek_false:w
+ \fi:
+ }
+ \cs_new_protected:Npn \__peek_N_type:w ##1 #1 ##2 \q_mark ##3
+ { ##3 {##1} {##2} }
+ }
+ \exp_after:wN \__peek_tmp:w \tl_to_str:n { outer } \q_stop
+\group_end:
+\cs_new_protected:Npn \__peek_N_type_aux:nnw #1 #2 #3 \fi:
+ {
+ \fi:
+ \tl_if_in:noTF {#1} { \tl_to_str:n {ma} }
+ { \__peek_true:w }
+ { \tl_if_empty:nTF {#2} { \__peek_true:w } { \__peek_false:w } }
+ }
+\cs_new_protected:Npn \peek_N_type:TF
+ {
+ \__peek_token_generic:NNTF
+ \__peek_execute_branches_N_type: \scan_stop:
+ }
+\cs_new_protected:Npn \peek_N_type:T
+ { \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: }
+\cs_new_protected:Npn \peek_N_type:F
+ { \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: }
%% File: l3prop.dtx
\scan_new:N \s__prop
\cs_new:Npn \__prop_pair:wn #1 \s__prop #2
@@ -11012,12 +11057,101 @@
\__kernel_ior_open:No \g__file_internal_ior \l__file_full_name_tl
\ior_if_eof:NF \g__file_internal_ior { #2 { \prg_break: } }
}
+\cs_new_protected:Npn \file_get_mdfive_hash:nN #1#2
+ { \file_get_mdfive_hash:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } }
+\cs_new_protected:Npn \file_get_size:nN #1#2
+ { \file_get_size:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } }
+\cs_new_protected:Npn \file_get_timestamp:nN #1#2
+ { \file_get_timestamp:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } }
+\prg_new_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2 { T , F , TF }
+ { \__file_get_details:nnN {#1} { mdfivesum } {#2} }
+\prg_new_protected_conditional:Npnn \file_get_size:nN #1#2 { T , F , TF }
+ { \__file_get_details:nnN {#1} { size } {#2} }
+\prg_new_protected_conditional:Npnn \file_get_timestamp:nN #1#2 { T , F , TF }
+ { \__file_get_details:nnN {#1} { moddate } {#2} }
+\cs_new_protected:Npn \__file_get_details:nnN #1#2#3
+ {
+ \file_get_full_name:nNTF {#1} \l__file_full_name_tl
+ {
+ \tl_set:Nx #3
+ {
+ \use:c { tex_file #2 :D } \exp_after:wN
+ { \l__file_full_name_tl }
+ }
+ \prg_return_true:
+ }
+ { \prg_return_false: }
+ }
+\sys_if_engine_luatex:TF
+ {
+ \cs_set_protected:Npn \__file_get_details:nnN #1#2#3
+ {
+ \file_get_full_name:nNTF {#1} \l__file_full_name_tl
+ {
+ \tl_set:Nx #3
+ {
+ \lua_now:e
+ {
+ l3kernel.file#2
+ ( " \lua_escape:e { \l__file_full_name_tl } " )
+ }
+ }
+ \prg_return_true:
+ }
+ { \prg_return_false: }
+ }
+ }
+ {
+ \prg_set_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2
+ { T , F , TF }
+ {
+ \file_get_full_name:nNTF {#1} \l__file_full_name_tl
+ {
+ \tl_set:Nx #2
+ {
+ \tex_mdfivesum:D file \exp_after:wN
+ { \l__file_full_name_tl }
+ }
+ \prg_return_true:
+ }
+ { \prg_return_false: }
+ }
+ \cs_if_exist:NF \tex_filesize:D
+ {
+ \cs_set_protected:Npn \__file_get_details:nnN #1#2#3
+ {
+ \tl_clear:N #3
+ \__kernel_msg_error:nnx
+ { kernel } { primitive-not-available }
+ { \exp_not:c { (pdf)file #2 } }
+ \prg_return_false:
+ }
+ }
+ }
+\__kernel_msg_new:nnnn { kernel } { primitive-not-available }
+ { Primitive~\token_to_str:N #1 not~available }
+ {
+ The~version~of~XeTeX~in~use~does~not~provide~functionality~equivalent~to~
+ the~\token_to_str:N #1 primitive.
+ }
\prg_new_protected_conditional:Npnn \file_if_exist:n #1 { T , F , TF }
{
\file_get_full_name:nNTF {#1} \l__file_full_name_tl
{ \prg_return_true: }
{ \prg_return_false: }
}
+\cs_new_protected:Npn \file_if_exist_input:n #1
+ {
+ \file_get_full_name:nNT {#1} \l__file_full_name_tl
+ { \__file_input:V \l__file_full_name_tl }
+ }
+\cs_new_protected:Npn \file_if_exist_input:nF #1#2
+ {
+ \file_get_full_name:nNTF {#1} \l__file_full_name_tl
+ { \__file_input:V \l__file_full_name_tl }
+ {#2}
+ }
+\cs_new_protected:Npn \file_input_stop: { \tex_endinput:D }
\cs_new_protected:Npn \__kernel_file_missing:n #1
{
\__kernel_file_name_sanitize:nN {#1} \l__file_base_name_tl
@@ -25830,95 +25964,6 @@
}
\cs_new:Npn \fp_sign:n #1
{ \fp_to_decimal:n { sign \__fp_parse:n {#1} } }
-\cs_new_protected:Npn \file_get_mdfive_hash:nN #1#2
- { \file_get_mdfive_hash:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } }
-\cs_new_protected:Npn \file_get_size:nN #1#2
- { \file_get_size:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } }
-\cs_new_protected:Npn \file_get_timestamp:nN #1#2
- { \file_get_timestamp:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } }
-\prg_new_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2 { T , F , TF }
- { \__file_get_details:nnN {#1} { mdfivesum } {#2} }
-\prg_new_protected_conditional:Npnn \file_get_size:nN #1#2 { T , F , TF }
- { \__file_get_details:nnN {#1} { size } {#2} }
-\prg_new_protected_conditional:Npnn \file_get_timestamp:nN #1#2 { T , F , TF }
- { \__file_get_details:nnN {#1} { moddate } {#2} }
-\cs_new_protected:Npn \__file_get_details:nnN #1#2#3
- {
- \file_get_full_name:nNTF {#1} \l__file_full_name_tl
- {
- \tl_set:Nx #3
- {
- \use:c { tex_file #2 :D } \exp_after:wN
- { \l__file_full_name_tl }
- }
- \prg_return_true:
- }
- { \prg_return_false: }
- }
-\sys_if_engine_luatex:TF
- {
- \cs_set_protected:Npn \__file_get_details:nnN #1#2#3
- {
- \file_get_full_name:nNTF {#1} \l__file_full_name_tl
- {
- \tl_set:Nx #3
- {
- \lua_now:e
- {
- l3kernel.file#2
- ( " \lua_escape:e { \l__file_full_name_tl } " )
- }
- }
- \prg_return_true:
- }
- { \prg_return_false: }
- }
- }
- {
- \prg_set_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2
- { T , F , TF }
- {
- \file_get_full_name:nNTF {#1} \l__file_full_name_tl
- {
- \tl_set:Nx #2
- {
- \tex_mdfivesum:D file \exp_after:wN
- { \l__file_full_name_tl }
- }
- \prg_return_true:
- }
- { \prg_return_false: }
- }
- \cs_if_exist:NF \tex_filesize:D
- {
- \cs_set_protected:Npn \__file_get_details:nnN #1#2#3
- {
- \tl_clear:N #3
- \__kernel_msg_error:nnx
- { kernel } { primitive-not-available }
- { \exp_not:c { (pdf)file #2 } }
- \prg_return_false:
- }
- }
- }
-\__kernel_msg_new:nnnn { kernel } { primitive-not-available }
- { Primitive~\token_to_str:N #1 not~available }
- {
- The~version~of~XeTeX~in~use~does~not~provide~functionality~equivalent~to~
- the~\token_to_str:N #1 primitive.
- }
-\cs_new_protected:Npn \file_if_exist_input:n #1
- {
- \file_get_full_name:nNT {#1} \l__file_full_name_tl
- { \__file_input:V \l__file_full_name_tl }
- }
-\cs_new_protected:Npn \file_if_exist_input:nF #1#2
- {
- \file_get_full_name:nNTF {#1} \l__file_full_name_tl
- { \__file_input:V \l__file_full_name_tl }
- {#2}
- }
-\cs_new_protected:Npn \file_input_stop: { \tex_endinput:D }
\__kernel_patch:nnNNpn { \__flag_chk_exist:n {#1} } { }
\cs_new:Npn \flag_raise_if_clear:n #1
{
@@ -27549,47 +27594,6 @@
\char_set_lccode:nn { `* } { `\ }
\tex_lowercase:D { \tl_const:Nn \c_catcode_active_space_tl { * } }
\group_end:
-\group_begin:
- \cs_set_protected:Npn \__peek_tmp:w #1 \q_stop
- {
- \cs_new_protected:Npn \__peek_execute_branches_N_type:
- {
- \if_int_odd:w
- \if_catcode:w \exp_not:N \l_peek_token { 0 \exp_stop_f: \fi:
- \if_catcode:w \exp_not:N \l_peek_token } 0 \exp_stop_f: \fi:
- \if_meaning:w \l_peek_token \c_space_token 0 \exp_stop_f: \fi:
- 1 \exp_stop_f:
- \exp_after:wN \__peek_N_type:w
- \token_to_meaning:N \l_peek_token
- \q_mark \__peek_N_type_aux:nnw
- #1 \q_mark \use_none_delimit_by_q_stop:w
- \q_stop
- \exp_after:wN \__peek_true:w
- \else:
- \exp_after:wN \__peek_false:w
- \fi:
- }
- \cs_new_protected:Npn \__peek_N_type:w ##1 #1 ##2 \q_mark ##3
- { ##3 {##1} {##2} }
- }
- \exp_after:wN \__peek_tmp:w \tl_to_str:n { outer } \q_stop
-\group_end:
-\cs_new_protected:Npn \__peek_N_type_aux:nnw #1 #2 #3 \fi:
- {
- \fi:
- \tl_if_in:noTF {#1} { \tl_to_str:n {ma} }
- { \__peek_true:w }
- { \tl_if_empty:nTF {#2} { \__peek_true:w } { \__peek_false:w } }
- }
-\cs_new_protected:Npn \peek_N_type:TF
- {
- \__peek_token_generic:NNTF
- \__peek_execute_branches_N_type: \scan_stop:
- }
-\cs_new_protected:Npn \peek_N_type:T
- { \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: }
-\cs_new_protected:Npn \peek_N_type:F
- { \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: }
\tl_new:N \l__peek_collect_tl
\cs_new_protected:Npn \peek_catcode_collect_inline:Nn
{ \__peek_collect:NNn \__peek_execute_branches_catcode: }
@@ -27637,6 +27641,15 @@
\tl_put_right:Nn \l__peek_collect_tl {#1}
\exp_after:wN \__peek_true_remove:w
}
+%% File: l3legacy.dtx
+\prg_new_conditional:Npnn \legacy_if:n #1 { p , T , F , TF }
+ {
+ \exp_args:Nc \if_meaning:w { if#1 } \iftrue
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
%% File: l3deprecation.dtx
\bool_new:N \l__deprecation_grace_period_bool
\cs_new:Npn \__deprecation_date_compare:nNnTF #1#2#3
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
index 81c56d71765..26c183ef620 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2019-04-21}%
+\def\ExplFileDate{2019-05-03}%
\let\ExplLoaderFileDate\ExplFileDate
\begingroup
\def\tempa{LaTeX2e}%
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
index d084dafa2fe..fd5e7fa0e6c 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2019-04-21}%
+\def\ExplFileDate{2019-05-03}%
\let\ExplLoaderFileDate\ExplFileDate
\ProvidesPackage{expl3}
[%
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
index 7071cac3a1f..720da5d79c7 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
@@ -437,9 +437,14 @@
%% File: l3drivers-pdf.dtx
\tl_const:Nn \c__driver_pdf_AR_fix_tl
{ /Ff ~ 65537 /FT /Btn /Subtype /Widget }
+\box_new:N \l__driver_pdf_tmp_box
\cs_new_protected:Npx \__driver_pdf:n #1
{ \__driver_literal:n { pdf: #1 } }
\cs_generate_variant:Nn \__driver_pdf:n { x }
+\cs_new_protected:Npn \driver_pdf_catalog_gput:nn #1#2
+ { \__driver_pdf:n { put ~ @catalog << /#1 ~ #2 >> } }
+\cs_new_protected:Npn \driver_pdf_info_gput:nn #1#2
+ { \__driver_pdf:n { docinfo << /#1 ~ #2 >> } }
\int_new:N \g__driver_pdf_object_int
\prop_new:N \g__driver_pdf_object_prop
\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2
@@ -557,7 +562,60 @@
\cs_new_protected:Npn \driver_pdf_link_end:
{ \__driver_pdf:n { eann } }
\cs_new:Npn \driver_pdf_link_last: { }
-\cs_new_protected:Npn \driver_pdf_link_margin:n #1 { }
+\cs_new_protected:Npn \driver_pdf_link_margin:n #1
+ { \__driver_literal:x { dvipdfmx:config~g~ \dim_eval:n {#1} } }
+\cs_new_protected:Npn \driver_pdf_destination:nn #1#2
+ {
+ \__driver_pdf: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 }
+ }
+ { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
+ ]
+ }
+ }
+\cs_new_protected:Npn \driver_pdf_destination_rectangle:nn #1#2
+ {
+ \group_begin:
+ \hbox_set:Nn \l__driver_pdf_tmp_box {#2}
+ \box_move_down:nn { \box_dp:N \l__driver_pdf_tmp_box }
+ {
+ \hbox:n
+ {
+ \__driver_pdf:n { obj ~ @driver_#1_llx ~ @xpos }
+ \__driver_pdf:n { obj ~ @driver_#1_lly ~ @ypos }
+ }
+ }
+ \box_use:N \l__driver_pdf_tmp_box
+ \box_move_up:nn { \box_ht:N \l__driver_pdf_tmp_box }
+ {
+ \hbox:n
+ {
+ \__driver_pdf:n
+ {
+ dest ~ (#1)
+ [
+ @thispage
+ /FitR ~
+ @driver_#1_llx ~ @driver_#1_lly ~
+ @xpos ~ @ypos
+ ]
+ }
+ }
+ }
+ \group_end:
+ }
\cs_new_protected:Npn \driver_pdf_compresslevel:n #1
{ \__driver_literal:x { dvipdfmx:config~z~ \int_eval:n {#1} } }
\cs_new_protected:Npn \driver_pdf_objects_enable: { }
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
index bc9cdcd2874..feb19384f46 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
@@ -39,8 +39,13 @@
\cs_new_protected:Npn \__driver_postscript:n #1
{ \__driver_literal:n { ps: SDict ~ begin ~ #1 ~ end } }
\cs_generate_variant:Nn \__driver_postscript:n { x }
-\cs_new_protected:Npn \__driver_postscript_header:n #1
- { \__driver_literal:n { ! #1 } }
+\cs_new_protected:Npx \__driver_postscript_header:n #1
+ {
+ \cs_if_exist:NTF \AtBeginDvi
+ { \exp_not:N \AtBeginDvi }
+ { \use:n }
+ { \__driver_literal:n { ! #1 } }
+ }
\cs_new_protected:Npn \__driver_align_currentpoint_begin:
{
\__driver_literal:n { ps::[begin] }
@@ -413,23 +418,31 @@
%% File: l3drivers-pdf.dtx
\tl_const:Nn \c__driver_pdf_AR_fix_tl
{ /Ff ~ 65537 /FT /Btn /Subtype /Widget }
+\box_new:N \l__driver_pdf_tmp_box
+\cs_new_protected:Npn \__driver_pdfmark:n #1
+ { \__driver_postscript:n { mark #1 ~ pdfmark } }
+\cs_generate_variant:Nn \__driver_pdfmark:n { x }
+\cs_new_protected:Npn \driver_pdf_catalog_gput:nn #1#2
+ { \__driver_pdfmark:n { { Catalog } << /#1 ~ #2 >> /PUT } }
+\cs_new_protected:Npn \driver_pdf_info_gput:nn #1#2
+ { \__driver_pdfmark:n { /#1 ~ #2 /DOCINFO } }
\int_new:N \g__driver_pdf_object_int
\prop_new:N \g__driver_pdf_object_prop
\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2
{
\int_gincr:N \g__driver_pdf_object_int
\int_const:cn
- { g__driver_pdf_object_ \tl_to_str:n {#1} _int }
+ { c__driver_pdf_object_ \tl_to_str:n {#1} _int }
{ \g__driver_pdf_object_int }
\prop_gput:Nnn \g__driver_pdf_object_prop {#1} {#2}
}
\cs_new:Npn \driver_pdf_object_ref:n #1
- { { driver.obj \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } } }
+ { { driver.obj \int_use:c { c__driver_pdf_object_ \tl_to_str:n {#1} _int } } }
\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2
{
- \__driver_postscript:x
+ \__driver_pdfmark:x
{
- mark /_objdef ~ \driver_pdf_object_ref:n {#1}
+ /_objdef ~ \driver_pdf_object_ref:n {#1}
/type
\str_case_e:nn
{ \prop_item:Nn \g__driver_pdf_object_prop {#1} }
@@ -439,7 +452,7 @@
{ fstream } { /stream }
{ stream } { /stream }
}
- /OBJ ~ pdfmark
+ /OBJ
}
\use:c
{ __driver_pdf_object_write_ \prop_item:Nn \g__driver_pdf_object_prop {#1} :nn }
@@ -447,18 +460,18 @@
}
\cs_new_protected:Npn \__driver_pdf_object_write_array:nn #1#2
{
- \__driver_postscript:x
+ \__driver_pdfmark:x
{
- mark ~ \driver_pdf_object_ref:n {#1}
- [ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL ~ pdfmark
+ \driver_pdf_object_ref:n {#1}
+ [ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL
}
}
\cs_new_protected:Npn \__driver_pdf_object_write_dict:nn #1#2
{
- \__driver_postscript:x
+ \__driver_pdfmark:x
{
- mark ~ \driver_pdf_object_ref:n {#1}
- << \exp_not:n {#2} >> /PUT ~ pdfmark
+ \driver_pdf_object_ref:n {#1}
+ << \exp_not:n {#2} >> /PUT
}
}
\cs_new_protected:Npn \__driver_pdf_object_write_stream:nn #1#2
@@ -486,6 +499,7 @@
\__driver_postscript_header:n
{
/driver.cvs { 65534 ~ string ~ cvs } def
+ /driver.dvi.pt { 72.27 ~ mul ~ Resolution ~ div } def
/driver.pt.dvi { 72.27 ~ div ~ Resolution ~ mul } def
/driver.rect.ht { dup ~ 1 ~ get ~ neg ~ exch ~ 3 ~ get ~ add } def
}
@@ -497,23 +511,23 @@
}
\__driver_postscript_header:n
{
- /driver.annotation.border
+ /driver.rect
{ /Rect [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ] } def
- /driver.annotation.ll
+ /driver.save.ll
{
currentpoint
/driver.lly ~ exch ~ def
/driver.llx ~ exch ~ def
}
def
- /driver.annotation.ur
+ /driver.save.ur
{
currentpoint
/driver.ury ~ exch ~ def
/driver.urx ~ exch ~ def
}
def
- /driver.link.ll
+ /driver.save.linkll
{
currentpoint ~
driver.linkmargin ~ add ~
@@ -523,7 +537,7 @@
/driver.llx ~ exch ~ def
}
def
- /driver.link.ur
+ /driver.save.linkur
{
currentpoint ~
driver.linkmargin ~ sub ~
@@ -536,6 +550,44 @@
}
\__driver_postscript_header:n
{
+ /driver.dest.anchor
+ {
+ currentpoint ~ exch ~
+ driver.dvi.pt ~ 72 ~ add ~
+ /driver.dest.x ~ exch ~ def ~
+ driver.dvi.pt ~
+ vsize ~ 72 ~ sub ~ exch ~ sub ~
+ /driver.dest.y ~ exch ~ def
+ }
+ def
+ /driver.dest.point
+ { driver.dest.x ~ driver.dest.y } def
+ /driver.dest2device
+ {
+ /driver.dest.y ~ exch ~ def
+ /driver.dest.x ~ exch ~ def ~
+ matrix ~ currentmatrix ~
+ matrix ~ defaultmatrix ~
+ matrix ~ invertmatrix ~
+ matrix ~ concatmatrix ~
+ cvx ~ exec
+ /driver.dev.y ~ exch ~ def
+ /driver.dev.x ~ exch ~ def
+ /driver.tmpd ~ exch ~ def
+ /driver.tmpc ~ exch ~ def
+ /driver.tmpb ~ exch ~ def
+ /driver.tmpa ~ exch ~ def ~
+ driver.dest.x ~ driver.tmpa ~ mul ~
+ driver.dest.y ~ driver.tmpc ~ mul ~ add ~
+ driver.dev.x ~ add ~
+ driver.dest.x ~ driver.tmpb ~ mul ~
+ driver.dest.y ~ driver.tmpd ~ mul ~ add ~
+ driver.dev.y ~ add
+ }
+ def
+ }
+\__driver_postscript_header:n
+ {
/driver.bordertracking ~ false ~ def
/driver.bordertracking.begin
{
@@ -640,7 +692,7 @@
currentpoint ~ driver.originy ~ ne ~ exch ~
driver.originx ~ ne ~ or
{
- driver.link.ll
+ driver.save.linkll
/driver.lly ~
driver.lly ~ driver.outerbox ~ 1 ~ get ~ sub ~ def ~
driver.bordertracking.begin
@@ -661,7 +713,7 @@
currentpoint ~
driver.originy ~ ne ~ exch ~ driver.originx ~ ne ~ or
{
- driver.link.ll
+ driver.save.linkll
/driver.lly ~
driver.lly ~ driver.outerbox ~ 1 ~ get ~ sub ~ def ~
driver.bordertracking.begin
@@ -838,37 +890,36 @@
\__driver_pdf_annotation:nnnn {#1} {#2} {#3} {#4}
\int_gincr:N \g__driver_pdf_object_int
\int_gset_eq:NN \g__driver_pdf_annotation_int \g__driver_pdf_object_int
- \__driver_postscript:x
+ \__driver_pdfmark:x
{
- mark
- /_objdef { driver.obj \int_use:N \g__driver_pdf_object_int }
- driver.annotation.border ~
- #4 ~
- /ANN ~ pdfmark
+
+ /_objdef { driver.obj \int_use:N \g__driver_pdf_object_int }
+ driver.rect ~
+ #4 ~
+ /ANN
}
}
\cs_new_protected:Npn \__driver_pdf_annotation:nnnn #1#2#3#4
{
\box_move_down:nn {#3}
- { \hbox:n { \__driver_postscript:n { driver.annotation.ll } } }
+ { \hbox:n { \__driver_postscript:n { driver.save.ll } } }
\hbox:n {#4}
\box_move_up:nn {#2}
{
\hbox:n
{
\tex_kern:D \dim_eval:n {#1} \scan_stop:
- \__driver_postscript:n { driver.annotation.ur }
+ \__driver_postscript:n { driver.save.ur }
}
}
\int_gincr:N \g__driver_pdf_object_int
\int_gset_eq:NN \g__driver_pdf_annotation_int \g__driver_pdf_object_int
- \__driver_postscript:x
+ \__driver_pdfmark:x
{
- mark
- /_objdef { driver.obj \int_use:N \g__driver_pdf_object_int }
- driver.annotation.border ~
- \c__driver_pdf_AR_fix_tl
- /ANN ~ pdfmark
+ /_objdef { driver.obj \int_use:N \g__driver_pdf_object_int }
+ driver.rect ~
+ \c__driver_pdf_AR_fix_tl
+ /ANN
}
}
\cs_new:Npn \driver_pdf_annotation_last:
@@ -933,20 +984,20 @@
{ \evensidemargin }
}
\box_move_down:nn { \box_dp:N \l__driver_pdf_content_box }
- { \hbox:n { \__driver_postscript:n { driver.link.ll } } }
+ { \hbox:n { \__driver_postscript:n { driver.save.linkll } } }
\__driver_postscript:n { driver.bordertracking.begin }
\hbox_unpack:N \l__driver_pdf_content_box
\__driver_postscript:n { driver.bordertracking.end }
\box_move_up:nn { \box_ht:N \l__driver_pdf_content_box }
{
\hbox:n
- { \__driver_postscript:n { driver.link.ur } }
+ { \__driver_postscript:n { driver.save.linkur } }
}
\__driver_postscript:x
{
mark
\g__driver_pdf_link_dict_tl /Subtype /Link ~
- driver.annotation.border
+ driver.rect
/ANN ~ driver.pdfmark
}
\__driver_pdf_link_sf_restore:
@@ -1044,6 +1095,55 @@
/driver.linkmargin { \dim_to_decimal:n {#1} ~ driver.pt.dvi } def
}
}
+\cs_new_protected:Npn \driver_pdf_destination:nn #1#2
+ {
+ \__driver_postscript:n { driver.dest.anchor }
+ \__driver_pdfmark:x
+ {
+ /View
+ [
+ \str_case:nnF {#2}
+ {
+ { xyz } { /XYZ ~ driver.dest.point ~ null }
+ { fit } { /Fit }
+ { fitb } { /FitB }
+ { fitbh } { /FitBH ~ driver.dest.y }
+ { fitbv } { /FitBV ~ driver.dest.x }
+ { fith } { /FitH ~ driver.dest.y }
+ { fitv } { /FitV ~ driver.dest.x }
+ }
+ {
+ /XYZ ~ driver.dest.point ~ \fp_eval:n { (#2) / 100 }
+ }
+ ]
+ /Dest ( \exp_not:n {#1} ) cvn
+ /DEST
+ }
+ }
+\cs_new_protected:Npn \driver_pdf_destination_rectangle:nn #1#2
+ {
+ \group_begin:
+ \hbox_set:Nn \l__driver_pdf_tmp_box {#2}
+ \box_move_down:nn
+ { \box_dp:N \l__driver_pdf_tmp_box }
+ { \hbox:n { \__driver_postscript:n { driver.save.ll } } }
+ \box_use:N \l__driver_pdf_tmp_box
+ \box_move_up:nn
+ { \box_ht:N \l__driver_pdf_tmp_box }
+ { \hbox:n { \__driver_postscript:n { driver.save.ur } } }
+ \__driver_pdfmark:n
+ {
+ /View
+ [
+ /FitR ~
+ driver.llx ~ driver.lly ~ driver.dest2device ~
+ driver.urx ~ driver.ury ~ driver.dest2device
+ ]
+ /Dest ( #1 ) cvn
+ /DEST
+ }
+ \group_end:
+ }
\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 { }
\cs_new_protected:Npn \driver_pdf_objects_enable: { }
\cs_new_protected:Npn \driver_pdf_objects_disable: { }
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def
index 8594ca95919..ffb86659911 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def
@@ -469,6 +469,9 @@
%% File: l3drivers-pdf.dtx
\tl_const:Nn \c__driver_pdf_AR_fix_tl
{ /Ff ~ 65537 /FT /Btn /Subtype /Widget }
+\box_new:N \l__driver_pdf_tmp_box
+\cs_new_protected:Npn \driver_pdf_catalog_gput:nn #1#2 { }
+\cs_new_protected:Npn \driver_pdf_info_gput:nn #1#2 { }
\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2 { }
\cs_new:Npn \driver_pdf_object_ref:n #1 { }
\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 { }
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
index 1f1d6f61676..7bfb6d120ad 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
@@ -424,6 +424,7 @@
%% File: l3drivers-pdf.dtx
\tl_const:Nn \c__driver_pdf_AR_fix_tl
{ /Ff ~ 65537 /FT /Btn /Subtype /Widget }
+\box_new:N \l__driver_pdf_tmp_box
\cs_new_protected:Npx \__driver_pdf_AR_fix:
{
\cs_if_exist:NTF \tex_pdfextension:D
@@ -485,6 +486,54 @@
{ \exp_not:N \tex_pdflinkmargin:D }
\exp_not:N \dim_eval:n {#1} \scan_stop:
}
+\cs_new_protected:Npx \driver_pdf_destination:nn #1#2
+ {
+ \cs_if_exist:NTF \tex_pdfextension:D
+ { \exp_not:N \tex_pdfextension:D dest ~ }
+ { \exp_not:N \tex_pdfdest:D }
+ name {#1}
+ \exp_not:N \str_case:nnF {#2}
+ {
+ { xyz } { xyz }
+ { fit } { fit }
+ { fitb } { fitb }
+ { fitbh } { fitbh }
+ { fitbv } { fitbv }
+ { fith } { fith }
+ { fitv } { fitv }
+ }
+ { xyz ~ zoom \exp_not:N \fp_eval:n { #2 * 10 } }
+ \scan_stop:
+ }
+\cs_new_protected:Npx \driver_pdf_destination_rectangle:nn #1#2
+ {
+ \group_begin:
+ \hbox_set:Nn \l__driver_pdf_tmp_box {#2}
+ \cs_if_exist:NTF \tex_pdfextension:D
+ { \exp_not:N \tex_pdfextension:D dest ~ }
+ { \exp_not:N \tex_pdfdest:D }
+ name {#1}
+ fitr ~
+ width \exp_not:N \box_wd:N \l__driver_pdf_tmp_box
+ height \exp_not:N \box_ht:N \l__driver_pdf_tmp_box
+ depth \exp_not:N \box_dp:N \l__driver_pdf_tmp_box
+ \box_use:N \l__driver_pdf_tmp_box
+ \group_end:
+ }
+\cs_new_protected:Npx \driver_pdf_catalog_gput:nn #1#2
+ {
+ \cs_if_exist:NTF \tex_pdfextension:D
+ { \tex_pdfextension:D catalog }
+ { \tex_pdfcatalog:D }
+ { / #1 ~ #2 }
+ }
+\cs_new_protected:Npx \driver_pdf_info_gput:nn #1#2
+ {
+ \cs_if_exist:NTF \tex_pdfextension:D
+ { \tex_pdfextension:D info }
+ { \tex_pdfinfo:D }
+ { / #1 ~ #2 }
+ }
\prop_new:N \g__driver_pdf_object_prop
\group_begin:
\cs_set_protected:Npn \__driver_tmp:w #1#2
@@ -493,7 +542,7 @@
{
#1 reserveobjnum ~
\int_const:cn
- { g__driver_pdf_object_ \exp_not:N \tl_to_str:n {##1} _int }
+ { c__driver_pdf_object_ \exp_not:N \tl_to_str:n {##1} _int }
{#2}
\prop_gput:Nnn \exp_not:N \g__driver_pdf_object_prop {##1} {##2}
}
@@ -502,12 +551,12 @@
{
\__driver_tmp:w
{ \tex_pdfextension:D obj ~ }
- { \tex_pdffeedback:D lastobj \scan_stop: }
+ { \exp_not:N \tex_pdffeedback:D lastobj \scan_stop: }
}
{ \__driver_tmp:w { \tex_pdfobj:D } { \tex_pdflastobj:D } }
\group_end:
\cs_new:Npn \driver_pdf_object_ref:n #1
- { \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R }
+ { \int_use:c { c__driver_pdf_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R }
\group_begin:
\cs_set_protected:Npn \__driver_tmp:w #1
{
@@ -515,7 +564,7 @@
{
\tex_immediate:D #1 useobjnum ~
\int_use:c
- { g__driver_pdf_object_ \tl_to_str:n {##1} _int }
+ { c__driver_pdf_object_ \tl_to_str:n {##1} _int }
\str_case_e:nn
{ \prop_item:Nn \g__driver_pdf_object_prop {##1} }
{
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def
index 17fd5e7aff5..b5256daff29 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def
@@ -480,9 +480,14 @@
%% File: l3drivers-pdf.dtx
\tl_const:Nn \c__driver_pdf_AR_fix_tl
{ /Ff ~ 65537 /FT /Btn /Subtype /Widget }
+\box_new:N \l__driver_pdf_tmp_box
\cs_new_protected:Npx \__driver_pdf:n #1
{ \__driver_literal:n { pdf: #1 } }
\cs_generate_variant:Nn \__driver_pdf:n { x }
+\cs_new_protected:Npn \driver_pdf_catalog_gput:nn #1#2
+ { \__driver_pdf:n { put ~ @catalog << /#1 ~ #2 >> } }
+\cs_new_protected:Npn \driver_pdf_info_gput:nn #1#2
+ { \__driver_pdf:n { docinfo << /#1 ~ #2 >> } }
\int_new:N \g__driver_pdf_object_int
\prop_new:N \g__driver_pdf_object_prop
\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2
@@ -600,7 +605,60 @@
\cs_new_protected:Npn \driver_pdf_link_end:
{ \__driver_pdf:n { eann } }
\cs_new:Npn \driver_pdf_link_last: { }
-\cs_new_protected:Npn \driver_pdf_link_margin:n #1 { }
+\cs_new_protected:Npn \driver_pdf_link_margin:n #1
+ { \__driver_literal:x { dvipdfmx:config~g~ \dim_eval:n {#1} } }
+\cs_new_protected:Npn \driver_pdf_destination:nn #1#2
+ {
+ \__driver_pdf: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 }
+ }
+ { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
+ ]
+ }
+ }
+\cs_new_protected:Npn \driver_pdf_destination_rectangle:nn #1#2
+ {
+ \group_begin:
+ \hbox_set:Nn \l__driver_pdf_tmp_box {#2}
+ \box_move_down:nn { \box_dp:N \l__driver_pdf_tmp_box }
+ {
+ \hbox:n
+ {
+ \__driver_pdf:n { obj ~ @driver_#1_llx ~ @xpos }
+ \__driver_pdf:n { obj ~ @driver_#1_lly ~ @ypos }
+ }
+ }
+ \box_use:N \l__driver_pdf_tmp_box
+ \box_move_up:nn { \box_ht:N \l__driver_pdf_tmp_box }
+ {
+ \hbox:n
+ {
+ \__driver_pdf:n
+ {
+ dest ~ (#1)
+ [
+ @thispage
+ /FitR ~
+ @driver_#1_llx ~ @driver_#1_lly ~
+ @xpos ~ @ypos
+ ]
+ }
+ }
+ }
+ \group_end:
+ }
\cs_new_protected:Npn \driver_pdf_compresslevel:n #1
{ \__driver_literal:x { dvipdfmx:config~z~ \int_eval:n {#1} } }
\cs_new_protected:Npn \driver_pdf_objects_enable: { }