diff options
author | Karl Berry <karl@freefriends.org> | 2011-08-29 00:08:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-08-29 00:08:58 +0000 |
commit | 62ea3c38421c330e364e1b53c366715efe3c7554 (patch) | |
tree | f323abbf0bd2346b481fc35187c6ec2d50ce2d1a /Master/texmf-dist/tex/latex/l3kernel | |
parent | 0a90bbc7d05e8e767bb8992e0ed6180206ae2bc7 (diff) |
l3kernel 2678 (28aug11)
git-svn-id: svn://tug.org/texlive/trunk@23738 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
21 files changed, 1292 insertions, 222 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 117c5ca5b4f..610d2b169ca 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -48,8 +48,8 @@ \RequirePackage{l3names} \def\ExplFileName{expl3} \def\ExplFileDescription{L3 Experimental code bundle wrapper} -\def\ExplFileDate{2011/08/17} -\def\ExplFileVersion{2607} +\def\ExplFileDate{2011/08/28} +\def\ExplFileVersion{2678} \RequirePackage{etex} \reserveinserts{32} \RequirePackage{calc} @@ -118,10 +118,10 @@ l3file, l3skip, l3box, - l3keyval, l3keys, l3fp, - l3luatex + l3luatex, + l3coffins } \RequirePackage{l3toks} \bool_if:nT { \@l@expl@check@declarations@bool } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty b/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty index edecb52c1c7..4d82350bb19 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3basics.dtx 2493 2011-07-04 09:50:22Z bruno $ +\GetIdInfo$Id: l3basics.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental basic definitions} \ProvidesExplPackage diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3box.sty b/Master/texmf-dist/tex/latex/l3kernel/l3box.sty index c6bd2936aae..57415ec278d 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3box.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3box.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3box.dtx 2595 2011-08-16 00:58:34Z bruno $ +\GetIdInfo$Id: l3box.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental boxes} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty index ab92e649563..1f19e3490e0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty @@ -47,7 +47,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3clist.dtx 2498 2011-07-09 17:51:47Z joseph $ +\GetIdInfo$Id: l3clist.dtx 2666 2011-08-26 06:10:09Z joseph $ {L3 Experimental comma separated lists} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty b/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty new file mode 100644 index 00000000000..6e4116ee770 --- /dev/null +++ b/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty @@ -0,0 +1,988 @@ +%% +%% This is file `l3coffins.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% l3coffins.dtx (with options: `package') +%% +%% EXPERIMENTAL CODE +%% +%% Do not distribute this file without also distributing the +%% source files specified above. +%% +%% Do not distribute a modified version of this file. +%% +%% File: l3coffins.dtx Copyright(C) 2010,2011 The LaTeX3 Project +%% +%% It may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License (LPPL), either version 1.3c of this +%% license or (at your option) any later version. The latest version +%% of this license is in the file +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This file is part of the "l3kernel bundle" (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% +%% The released version of this bundle is available from CTAN. +%% +%% ----------------------------------------------------------------------- +%% +%% The development version of the bundle can be found at +%% +%% http://www.latex-project.org/svnroot/experimental/trunk/ +%% +%% for those people who are interested. +%% +%%%%%%%%%%% +%% NOTE: %% +%%%%%%%%%%% +%% +%% Snapshots taken from the repository represent work in progress and may +%% not work or may contain conflicting material! We therefore ask +%% people _not_ to put them into distributions, archives, etc. without +%% prior consultation with the LaTeX Project Team. +%% +%% ----------------------------------------------------------------------- +%% +\RequirePackage{l3names,graphicx,color} +\GetIdInfo$Id: l3coffins.dtx 2624 2011-08-18 19:02:45Z joseph $ + {L3 Experimental coffin code layer} +\ProvidesExplPackage + {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\package_check_loaded_expl: +\box_new:N \l_coffin_tmp_box +\dim_new:N \l_coffin_tmp_dim +\fp_new:N \l_coffin_tmp_fp +\tl_new:N \l_coffin_tmp_tl +\prop_new:N \c_coffin_corners_prop +\prop_put:Nnn \c_coffin_corners_prop { tl } { { 0 pt } { 0 pt } } +\prop_put:Nnn \c_coffin_corners_prop { tr } { { 0 pt } { 0 pt } } +\prop_put:Nnn \c_coffin_corners_prop { bl } { { 0 pt } { 0 pt } } +\prop_put:Nnn \c_coffin_corners_prop { br } { { 0 pt } { 0 pt } } +\prop_new:N \c_coffin_poles_prop +\tl_set:Nn \l_coffin_tmp_tl { { 0 pt } { 0 pt } { 0 pt } { 1000 pt } } +\prop_put:Nno \c_coffin_poles_prop { l } { \l_coffin_tmp_tl } +\prop_put:Nno \c_coffin_poles_prop { hc } { \l_coffin_tmp_tl } +\prop_put:Nno \c_coffin_poles_prop { r } { \l_coffin_tmp_tl } +\tl_set:Nn \l_coffin_tmp_tl { { 0 pt } { 0 pt } { 1000 pt } { 0 pt } } +\prop_put:Nno \c_coffin_poles_prop { b } { \l_coffin_tmp_tl } +\prop_put:Nno \c_coffin_poles_prop { vc } { \l_coffin_tmp_tl } +\prop_put:Nno \c_coffin_poles_prop { t } { \l_coffin_tmp_tl } +\prop_put:Nno \c_coffin_poles_prop { B } { \l_coffin_tmp_tl } +\prop_put:Nno \c_coffin_poles_prop { H } { \l_coffin_tmp_tl } +\prop_put:Nno \c_coffin_poles_prop { T } { \l_coffin_tmp_tl } +\fp_new:N \l_coffin_calc_a_fp +\fp_new:N \l_coffin_calc_b_fp +\fp_new:N \l_coffin_calc_c_fp +\fp_new:N \l_coffin_calc_d_fp +\fp_new:N \l_coffin_calc_result_fp +\bool_new:N \l_coffin_error_bool +\dim_new:N \l_coffin_offset_x_dim +\dim_new:N \l_coffin_offset_y_dim +\tl_new:N \l_coffin_pole_a_tl +\tl_new:N \l_coffin_pole_b_tl +\fp_new:N \l_coffin_sin_fp +\fp_new:N \l_coffin_cos_fp +\dim_new:N \l_coffin_x_dim +\dim_new:N \l_coffin_y_dim +\dim_new:N \l_coffin_x_prime_dim +\dim_new:N \l_coffin_y_prime_dim +\fp_new:N \l_coffin_x_fp +\fp_new:N \l_coffin_y_fp +\fp_new:N \l_coffin_x_prime_fp +\fp_new:N \l_coffin_y_prime_fp +\dim_new:N \l_coffin_Depth_dim +\dim_new:N \l_coffin_Height_dim +\dim_new:N \l_coffin_TotalHeight_dim +\dim_new:N \l_coffin_Width_dim +\cs_new_nopar:Npn \coffin_saved_Depth: { } +\cs_new_nopar:Npn \coffin_saved_Height: { } +\cs_new_nopar:Npn \coffin_saved_TotalHeight: { } +\cs_new_nopar:Npn \coffin_saved_Width: { } +\cs_new_protected:Npn \coffin_if_exist:NT #1#2 + { + \cs_if_exist:NTF #1 + { + \cs_if_exist:cTF { l_coffin_poles_ \int_value:w #1 _prop } + { #2 } + { + \msg_kernel_error:nnx { coffin } { unknown-coffin } + { \token_to_str:N #1 } + } + } + { + \msg_kernel_error:nnx { coffin } { unknown-coffin } + { \token_to_str:N #1 } + } + } +\cs_new_protected_nopar:Npn \coffin_clear:N #1 + { + \coffin_if_exist:NT #1 + { + \box_clear:N #1 + \coffin_reset_structure:N #1 + } + } +\cs_generate_variant:Nn \coffin_clear:N { c } +\cs_new_protected_nopar:Npn \coffin_new:N #1 + { + \box_new:N #1 + \prop_clear_new:c { l_coffin_corners_ \int_value:w #1 _prop } + \prop_clear_new:c { l_coffin_poles_ \int_value:w #1 _prop } + \prop_gset_eq:cN { l_coffin_corners_ \int_value:w #1 _prop } + \c_coffin_corners_prop + \prop_gset_eq:cN { l_coffin_poles_ \int_value:w #1 _prop } + \c_coffin_poles_prop + } +\cs_generate_variant:Nn \coffin_new:N { c } +\cs_new_protected:Npn \hcoffin_set:Nn #1#2 + { + \coffin_if_exist:NT #1 + { + \hbox_set:Nn #1 + { + \group_begin: + \set@color + #2 + \group_end: + } + \coffin_reset_structure:N #1 + \coffin_update_poles:N #1 + \coffin_update_corners:N #1 + } + } +\cs_generate_variant:Nn \hcoffin_set:Nn { c } +\cs_new_protected:Npn \vcoffin_set:Nnn #1#2#3 + { + \coffin_if_exist:NT #1 + { + \vbox_set:Nn #1 + { + \dim_set:Nn \tex_hsize:D {#2} + \group_begin: + \set@color + #3 + \group_end: + } + \coffin_reset_structure:N #1 + \coffin_update_poles:N #1 + \coffin_update_corners:N #1 + \vbox_set_top:Nn \l_coffin_tmp_box { \vbox_unpack:N #1 } + \coffin_set_pole:Nnx #1 { T } + { + { 0 pt } + { \dim_eval:n { \box_ht:N #1 - \box_ht:N \l_coffin_tmp_box } } + { 1000 pt } + { 0 pt } + } + \box_clear:N \l_coffin_tmp_box + } + } +\cs_generate_variant:Nn \vcoffin_set:Nnn { c } +\cs_new_protected_nopar:Npn \coffin_set_eq:NN #1#2 + { + \coffin_if_exist:NT #1 + { + \box_set_eq:NN #1 #2 + \coffin_set_eq_structure:NN #1 #2 + } + } +\cs_generate_variant:Nn \coffin_set_eq:NN { c , Nc , cc } +\coffin_new:N \c_empty_coffin +\hbox_set:Nn \c_empty_coffin { } +\coffin_new:N \l_coffin_aligned_coffin +\coffin_new:N \l_coffin_aligned_internal_coffin +\cs_new_protected_nopar:Npn \coffin_get_pole:NnN #1#2#3 + { + \prop_get:cnNF + { l_coffin_poles_ \int_value:w #1 _prop } {#2} #3 + { + \msg_kernel_error:nnxx { coffin } { unknown-coffin-pole } + {#2} { \token_to_str:N #1 } + \tl_set:Nn #3 { { 0 pt } { 0 pt } { 0 pt } { 0 pt } } + } + } +\cs_new_protected_nopar:Npn \coffin_reset_structure:N #1 + { + \prop_set_eq:cN { l_coffin_corners_ \int_value:w #1 _prop } + \c_coffin_corners_prop + \prop_set_eq:cN { l_coffin_poles_ \int_value:w #1 _prop } + \c_coffin_poles_prop + } +\cs_new_protected_nopar:Npn \coffin_set_eq_structure:NN #1#2 + { + \prop_set_eq:cc { l_coffin_corners_ \int_value:w #1 _prop } + { l_coffin_corners_ \int_value:w #2 _prop } + \prop_set_eq:cc { l_coffin_poles_ \int_value:w #1 _prop } + { l_coffin_poles_ \int_value:w #2 _prop } + } +\cs_new_protected_nopar:Npn \coffin_set_user_dimensions:N #1 + { + \cs_set_eq:NN \coffin_saved_Height: \Height + \cs_set_eq:NN \coffin_saved_Depth: \Depth + \cs_set_eq:NN \coffin_saved_TotalHeight: \TotalHeight + \cs_set_eq:NN \coffin_saved_Width: \Width + \cs_set_eq:NN \Height \l_coffin_Height_dim + \cs_set_eq:NN \Depth \l_coffin_Depth_dim + \cs_set_eq:NN \TotalHeight \l_coffin_TotalHeight_dim + \cs_set_eq:NN \Width \l_coffin_Width_dim + \dim_set:Nn \Height { \box_ht:N #1 } + \dim_set:Nn \Depth { \box_dp:N #1 } + \dim_set:Nn \TotalHeight { \box_ht:N #1 - \box_dp:N #1 } + \dim_set:Nn \Width { \box_wd:N #1 } + } +\cs_new_protected_nopar:Npn \coffin_end_user_dimensions: + { + \cs_set_eq:NN \Height \coffin_saved_Height: + \cs_set_eq:NN \Depth \coffin_saved_Depth: + \cs_set_eq:NN \TotalHeight \coffin_saved_TotalHeight: + \cs_set_eq:NN \Width \coffin_saved_Width: + } +\cs_new_protected_nopar:Npn \coffin_set_horizontal_pole:Nnn #1#2#3 + { + \coffin_if_exist:NT #1 + { + \coffin_set_user_dimensions:N #1 + \coffin_set_pole:Nnx #1 {#2} + { + { 0 pt } { \dim_eval:n {#3} } + { 1000 pt } { 0 pt } + } + \coffin_end_user_dimensions: + } + } +\cs_new_protected_nopar:Npn \coffin_set_vertical_pole:Nnn #1#2#3 + { + \coffin_if_exist:NT #1 + { + \coffin_set_user_dimensions:N #1 + \coffin_set_pole:Nnx #1 {#2} + { + { \dim_eval:n {#3} } { 0 pt } + { 0 pt } { 1000 pt } + } + \coffin_end_user_dimensions: + } + } +\cs_new_protected_nopar:Npn \coffin_set_pole:Nnn #1#2#3 + { \prop_put:cnn { l_coffin_poles_ \int_value:w #1 _prop } {#2} {#3} } +\cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c } +\cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c } +\cs_generate_variant:Nn \coffin_set_pole:Nnn { Nnx } +\cs_new_protected_nopar:Npn \coffin_update_corners:N #1 + { + \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { tl } + { { 0 pt } { \dim_use:N \box_ht:N #1 } } + \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { tr } + { { \dim_use:N \box_wd:N #1 } { \dim_use:N \box_ht:N #1 } } + \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { bl } + { { 0 pt } { \dim_eval:n { - \box_dp:N #1 } } } + \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { br } + { { \dim_use:N \box_wd:N #1 } { \dim_eval:n { - \box_dp:N #1 } } } + } +\cs_new_protected_nopar:Npn \coffin_update_poles:N #1 + { + \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { hc } + { + { \dim_eval:n { 0.5 \box_wd:N #1 } } + { 0 pt } { 0 pt } { 1000 pt } + } + \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { r } + { + { \dim_use:N \box_wd:N #1 } + { 0 pt } { 0 pt } { 1000 pt } + } + \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { vc } + { + { 0 pt } + { \dim_eval:n { ( \box_ht:N #1 - \box_dp:N #1 ) / 2 } } + { 1000 pt } + { 0 pt } + } + \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { t } + { + { 0 pt } + { \dim_use:N \box_ht:N #1 } + { 1000 pt } + { 0 pt } + } + \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { b } + { + { 0 pt } + { \dim_eval:n { - \box_dp:N #1 } } + { 1000 pt } + { 0 pt } + } + } +\cs_new_protected_nopar:Npn \coffin_calculate_intersection:Nnn #1#2#3 + { + \coffin_get_pole:NnN #1 {#2} \l_coffin_pole_a_tl + \coffin_get_pole:NnN #1 {#3} \l_coffin_pole_b_tl + \bool_set_false:N \l_coffin_error_bool + \exp_last_two_unbraced:Noo + \coffin_calculate_intersection:nnnnnnnn + \l_coffin_pole_a_tl \l_coffin_pole_b_tl + \bool_if:NT \l_coffin_error_bool + { + \msg_kernel_error:nn { coffin } { no-pole-intersection } + \dim_zero:N \l_coffin_x_dim + \dim_zero:N \l_coffin_y_dim + } + } +\cs_new_protected_nopar:Npn \coffin_calculate_intersection:nnnnnnnn + #1#2#3#4#5#6#7#8 + { + \dim_compare:nNnTF {#3} = { \c_zero_dim } + { + \dim_set:Nn \l_coffin_x_dim {#1} + \dim_compare:nNnTF {#7} = \c_zero_dim + { \bool_set_true:N \l_coffin_error_bool } + { + \dim_compare:nNnTF {#8} = \c_zero_dim + { \dim_set:Nn \l_coffin_y_dim {#6} } + { + \coffin_calculate_intersection_aux:nnnnnN + {#1} {#5} {#6} {#7} {#8} \l_coffin_y_dim + } + } + } + { + \dim_compare:nNnTF {#4} = \c_zero_dim + { + \dim_set:Nn \l_coffin_y_dim {#2} + \dim_compare:nNnTF {#8} = { \c_zero_dim } + { \bool_set_true:N \l_coffin_error_bool } + { + \dim_compare:nNnTF {#7} = \c_zero_dim + { \dim_set:Nn \l_coffin_x_dim {#5} } + { + \coffin_calculate_intersection_aux:nnnnnN + {#2} {#6} {#5} {#8} {#7} \l_coffin_x_dim + } + } + } + { + \dim_compare:nNnTF {#7} = \c_zero_dim + { + \dim_set:Nn \l_coffin_x_dim {#5} + \coffin_calculate_intersection_aux:nnnnnN + {#5} {#1} {#2} {#3} {#4} \l_coffin_y_dim + } + { + \dim_compare:nNnTF {#8} = \c_zero_dim + { + \dim_set:Nn \l_coffin_x_dim {#6} + \coffin_calculate_intersection_aux:nnnnnN + {#6} {#2} {#1} {#4} {#3} \l_coffin_x_dim + } + { + \fp_set_from_dim:Nn \l_coffin_calc_a_fp {#3} + \fp_set_from_dim:Nn \l_coffin_calc_b_fp {#4} + \fp_set_from_dim:Nn \l_coffin_calc_c_fp {#7} + \fp_set_from_dim:Nn \l_coffin_calc_d_fp {#8} + \fp_div:Nn \l_coffin_calc_b_fp \l_coffin_calc_a_fp + \fp_div:Nn \l_coffin_calc_d_fp \l_coffin_calc_c_fp + \fp_compare:nNnTF + \l_coffin_calc_b_fp = \l_coffin_calc_d_fp + { \bool_set_true:N \l_coffin_error_bool } + { + \fp_set_from_dim:Nn \l_coffin_calc_result_fp {#6} + \fp_set_from_dim:Nn \l_coffin_calc_a_fp {#2} + \fp_sub:Nn \l_coffin_calc_result_fp + { \l_coffin_calc_a_fp } + \fp_set_from_dim:Nn \l_coffin_calc_a_fp {#1} + \fp_mul:Nn \l_coffin_calc_a_fp + { \l_coffin_calc_b_fp } + \fp_add:Nn \l_coffin_calc_result_fp + { \l_coffin_calc_a_fp } + \fp_set_from_dim:Nn \l_coffin_calc_a_fp {#5} + \fp_mul:Nn \l_coffin_calc_a_fp + { \l_coffin_calc_d_fp } + \fp_sub:Nn \l_coffin_calc_result_fp + { \l_coffin_calc_a_fp } + \fp_sub:Nn \l_coffin_calc_b_fp + { \l_coffin_calc_d_fp } + \fp_div:Nn \l_coffin_calc_result_fp + { \l_coffin_calc_b_fp } + \dim_set:Nn \l_coffin_x_dim + { \fp_to_dim:N \l_coffin_calc_result_fp } + \coffin_calculate_intersection_aux:nnnnnN + { \l_coffin_x_dim } + {#5} {#6} {#8} {#7} \l_coffin_y_dim + } + } + } + } + } + } +\cs_new_protected_nopar:Npn \coffin_calculate_intersection_aux:nnnnnN + #1#2#3#4#5#6 + { + \fp_set_from_dim:Nn \l_coffin_calc_result_fp {#1} + \fp_set_from_dim:Nn \l_coffin_calc_a_fp {#2} + \fp_set_from_dim:Nn \l_coffin_calc_b_fp {#3} + \fp_set_from_dim:Nn \l_coffin_calc_c_fp {#4} + \fp_set_from_dim:Nn \l_coffin_calc_d_fp {#5} + \fp_sub:Nn \l_coffin_calc_result_fp { \l_coffin_calc_a_fp } + \fp_div:Nn \l_coffin_calc_result_fp { \l_coffin_calc_d_fp } + \fp_mul:Nn \l_coffin_calc_result_fp { \l_coffin_calc_c_fp } + \fp_add:Nn \l_coffin_calc_result_fp { \l_coffin_calc_b_fp } + \dim_set:Nn #6 { \fp_to_dim:N \l_coffin_calc_result_fp } + } +\cs_new_protected_nopar:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8 + { + \coffin_align:NnnNnnnnN + #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin + \hbox_set:Nn \l_coffin_aligned_coffin + { + \dim_compare:nNnT { \l_coffin_offset_x_dim } < \c_zero_dim + { \tex_kern:D -\l_coffin_offset_x_dim } + \hbox_unpack:N \l_coffin_aligned_coffin + \dim_set:Nn \l_coffin_tmp_dim + { \l_coffin_offset_x_dim - \box_wd:N #1 + \box_wd:N #4 } + \dim_compare:nNnT \l_coffin_tmp_dim < \c_zero_dim + { \tex_kern:D -\l_coffin_tmp_dim } + } + \coffin_reset_structure:N \l_coffin_aligned_coffin + \prop_clear:c + { l_coffin_corners_ \int_value:w \l_coffin_aligned_coffin _ prop } + \coffin_update_poles:N \l_coffin_aligned_coffin + \dim_compare:nNnTF \l_coffin_offset_x_dim < \c_zero_dim + { + \coffin_offset_poles:Nnn #1 { -\l_coffin_offset_x_dim } { 0 pt } + \coffin_offset_poles:Nnn #4 { 0 pt } { \l_coffin_offset_y_dim } + \coffin_offset_corners:Nnn #1 { -\l_coffin_offset_x_dim } { 0 pt } + \coffin_offset_corners:Nnn #4 { 0 pt } { \l_coffin_offset_y_dim } + } + { + \coffin_offset_poles:Nnn #1 { 0 pt } { 0 pt } + \coffin_offset_poles:Nnn #4 + { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim } + \coffin_offset_corners:Nnn #1 { 0 pt } { 0 pt } + \coffin_offset_corners:Nnn #4 + { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim } + } + \coffin_update_vertical_poles:NNN #1 #4 \l_coffin_aligned_coffin + \coffin_set_eq:NN #1 \l_coffin_aligned_coffin + } +\cs_generate_variant:Nn \coffin_join:NnnNnnnn { c , Nnnc , cnnc } +\cs_new_protected_nopar:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8 + { + \coffin_align:NnnNnnnnN + #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin + \box_set_ht:Nn \l_coffin_aligned_coffin { \box_ht:N #1 } + \box_set_dp:Nn \l_coffin_aligned_coffin { \box_dp:N #1 } + \box_set_wd:Nn \l_coffin_aligned_coffin { \box_wd:N #1 } + \coffin_reset_structure:N \l_coffin_aligned_coffin + \prop_set_eq:cc + { l_coffin_corners_ \int_value:w \l_coffin_aligned_coffin _prop } + { l_coffin_corners_ \int_value:w #1 _prop } + \coffin_update_poles:N \l_coffin_aligned_coffin + \coffin_offset_poles:Nnn #1 { 0 pt } { 0 pt } + \coffin_offset_poles:Nnn #4 + { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim } + \coffin_update_vertical_poles:NNN #1 #4 \l_coffin_aligned_coffin + \coffin_set_eq:NN #1 \l_coffin_aligned_coffin + } +\cs_new_protected_nopar:Npn \coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8 + { + \coffin_align:NnnNnnnnN + #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin + \box_set_ht:Nn \l_coffin_aligned_coffin { \box_ht:N #1 } + \box_set_dp:Nn \l_coffin_aligned_coffin { \box_dp:N #1 } + \box_set_wd:Nn \l_coffin_aligned_coffin { \box_wd:N #1 } + \box_set_eq:NN #1 \l_coffin_aligned_coffin + } +\cs_generate_variant:Nn \coffin_attach:NnnNnnnn { c , Nnnc , cnnc } +\cs_new_protected_nopar:Npn \coffin_align:NnnNnnnnN #1#2#3#4#5#6#7#8#9 + { + \coffin_calculate_intersection:Nnn #4 {#5} {#6} + \dim_set:Nn \l_coffin_x_prime_dim { \l_coffin_x_dim } + \dim_set:Nn \l_coffin_y_prime_dim { \l_coffin_y_dim } + \coffin_calculate_intersection:Nnn #1 {#2} {#3} + \dim_set:Nn \l_coffin_offset_x_dim + { \l_coffin_x_dim - \l_coffin_x_prime_dim + #7 } + \dim_set:Nn \l_coffin_offset_y_dim + { \l_coffin_y_dim - \l_coffin_y_prime_dim + #8 } + \hbox_set:Nn \l_coffin_aligned_internal_coffin + { + \box_use:N #1 + \tex_kern:D -\box_wd:N #1 + \tex_kern:D \l_coffin_offset_x_dim + \box_move_up:nn { \l_coffin_offset_y_dim } { \box_use:N #4 } + } + \coffin_set_eq:NN #9 \l_coffin_aligned_internal_coffin + } +\cs_new_protected_nopar:Npn \coffin_offset_poles:Nnn #1#2#3 + { + \prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop } + { \coffin_offset_pole:Nnnnnnn #1 {##1} ##2 {#2} {#3} } + } +\cs_new_protected_nopar:Npn \coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 + { + \dim_set:Nn \l_coffin_x_dim { #3 + #7 } + \dim_set:Nn \l_coffin_y_dim { #4 + #8 } + \tl_if_in:nnTF {#2} { - } + { \tl_set:Nn \l_coffin_tmp_tl { {#2} } } + { \tl_set:Nn \l_coffin_tmp_tl { { #1 - #2 } } } + \exp_last_unbraced:NNo \coffin_set_pole:Nnx \l_coffin_aligned_coffin + { \l_coffin_tmp_tl } + { + { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } + {#5} {#6} + } + } +\cs_new_protected_nopar:Npn \coffin_offset_corners:Nnn #1#2#3 + { + \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } + { \coffin_offset_corner:Nnnnn #1 {##1} ##2 {#2} {#3} } + } +\cs_new_protected_nopar:Npn \coffin_offset_corner:Nnnnn #1#2#3#4#5#6 + { + \prop_put:cnx + { l_coffin_corners_ \int_value:w \l_coffin_aligned_coffin _prop } + { #1 - #2 } + { + { \dim_eval:n { #3 + #5 } } + { \dim_eval:n { #4 + #6 } } + } + } +\cs_new_protected_nopar:Npn \coffin_update_vertical_poles:NNN #1#2#3 + { + \coffin_get_pole:NnN #3 { #1 -T } \l_coffin_pole_a_tl + \coffin_get_pole:NnN #3 { #2 -T } \l_coffin_pole_b_tl + \exp_last_two_unbraced:Noo \coffin_update_T:nnnnnnnnN + \l_coffin_pole_a_tl \l_coffin_pole_b_tl #3 + \coffin_get_pole:NnN #3 { #1 -B } \l_coffin_pole_a_tl + \coffin_get_pole:NnN #3 { #2 -B } \l_coffin_pole_b_tl + \exp_last_two_unbraced:Noo \coffin_update_B:nnnnnnnnN + \l_coffin_pole_a_tl \l_coffin_pole_b_tl #3 + } +\cs_new_protected_nopar:Npn \coffin_update_T:nnnnnnnnN #1#2#3#4#5#6#7#8#9 + { + \dim_compare:nNnTF {#2} < {#6} + { + \coffin_set_pole:Nnx #9 { T } + { { 0 pt } {#6} { 1000 pt } { 0 pt } } + } + { + \coffin_set_pole:Nnx #9 { T } + { { 0 pt } {#2} { 1000 pt } { 0 pt } } + } + } +\cs_new_protected_nopar:Npn \coffin_update_B:nnnnnnnnN #1#2#3#4#5#6#7#8#9 + { + \dim_compare:nNnTF {#2} < {#6} + { + \coffin_set_pole:Nnx #9 { B } + { { 0 pt } {#2} { 1000 pt } { 0 pt } } + } + { + \coffin_set_pole:Nnx #9 { B } + { { 0 pt } {#6} { 1000 pt } { 0 pt } } + } + } +\cs_new_protected_nopar:Npn \coffin_typeset:Nnnnn #1#2#3#4#5 + { + \coffin_align:NnnNnnnnN \c_empty_coffin { H } { l } + #1 {#2} {#3} {#4} {#5} \l_coffin_aligned_coffin + \hbox_set:Nn \l_coffin_aligned_coffin + { + \dim_compare:nNnT { \l_coffin_offset_x_dim } < \c_zero_dim + { \tex_kern:D -\l_coffin_offset_x_dim } + \hbox_unpack:N \l_coffin_aligned_coffin + \dim_set:Nn \l_coffin_tmp_dim + { \l_coffin_offset_x_dim + \box_wd:N #1 } + \dim_compare:nNnT { \l_coffin_tmp_dim } < \c_zero_dim + { \tex_kern:D -\l_coffin_tmp_dim } + } + \hbox_unpack:N \c_empty_box + \box_use:N \l_coffin_aligned_coffin + } +\cs_generate_variant:Nn \coffin_typeset:Nnnnn { c } +\prop_new:N \l_coffin_bounding_prop +\dim_new:N \l_coffin_bounding_shift_dim +\dim_new:N \l_coffin_left_corner_dim +\dim_new:N \l_coffin_right_corner_dim +\dim_new:N \l_coffin_bottom_corner_dim +\dim_new:N \l_coffin_top_corner_dim +\cs_new_protected_nopar:Npn \coffin_rotate:Nn #1#2 + { + \fp_set:Nn \l_coffin_tmp_fp {#2} + \fp_div:Nn \l_coffin_tmp_fp { 180 } + \fp_mul:Nn \l_coffin_tmp_fp { \c_pi_fp } + \fp_sin:Nn \l_coffin_sin_fp { \l_coffin_tmp_fp } + \fp_cos:Nn \l_coffin_cos_fp { \l_coffin_tmp_fp } + \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } + { \coffin_rotate_corner:Nnnn #1 {##1} ##2 } + \prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop } + { \coffin_rotate_pole:Nnnnnn #1 {##1} ##2 } + \coffin_set_bounding:N #1 + \prop_map_inline:Nn \l_coffin_bounding_prop + { \coffin_rotate_bounding:nnn {##1} ##2 } + \coffin_find_corner_maxima:N #1 + \coffin_find_bounding_shift: + \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } + \hbox_set:Nn #1 + { + \tex_kern:D \l_coffin_bounding_shift_dim + \tex_kern:D -\l_coffin_left_corner_dim + \box_move_down:nn { \l_coffin_bottom_corner_dim } + { \box_use:N #1 } + } + \box_set_ht:Nn #1 + { \l_coffin_top_corner_dim - \l_coffin_bottom_corner_dim } + \box_set_dp:Nn #1 { 0 pt } + \box_set_wd:Nn #1 + { \l_coffin_right_corner_dim - \l_coffin_left_corner_dim } + \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } + { \coffin_shift_corner:Nnnn #1 {##1} ##2 } + \prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop } + { \coffin_shift_pole:Nnnnnn #1 {##1} ##2 } + } +\cs_generate_variant:Nn \coffin_rotate:Nn { c } +\cs_new_protected_nopar:Npn \coffin_set_bounding:N #1 + { + \prop_put:Nnx \l_coffin_bounding_prop { tl } + { { 0 pt } { \dim_use:N \box_ht:N #1 } } + \prop_put:Nnx \l_coffin_bounding_prop { tr } + { { \dim_use:N \box_wd:N #1 } { \dim_use:N \box_ht:N #1 } } + \dim_set:Nn \l_coffin_tmp_dim { - \box_dp:N #1 } + \prop_put:Nnx \l_coffin_bounding_prop { bl } + { { 0 pt } { \dim_use:N \l_coffin_tmp_dim } } + \prop_put:Nnx \l_coffin_bounding_prop { br } + { { \dim_use:N \box_wd:N #1 } { \dim_use:N \l_coffin_tmp_dim } } + } +\cs_new_protected_nopar:Npn \coffin_rotate_bounding:nnn #1#2#3 + { + \coffin_rotate_vector:nnNN {#2} {#3} \l_coffin_x_dim \l_coffin_y_dim + \prop_put:Nnx \l_coffin_bounding_prop {#1} + { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } } + } +\cs_new_protected_nopar:Npn \coffin_rotate_corner:Nnnn #1#2#3#4 + { + \coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim + \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} + { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } } + } +\cs_new_protected_nopar:Npn \coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 + { + \coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim + \coffin_rotate_vector:nnNN {#5} {#6} + \l_coffin_x_prime_dim \l_coffin_y_prime_dim + \coffin_set_pole:Nnx #1 {#2} + { + { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } + { \dim_use:N \l_coffin_x_prime_dim } + { \dim_use:N \l_coffin_y_prime_dim } + } + } +\cs_new_protected_nopar:Npn \coffin_rotate_vector:nnNN #1#2#3#4 + { + \fp_set_from_dim:Nn \l_coffin_x_fp {#1} + \fp_set_from_dim:Nn \l_coffin_y_fp {#2} + \fp_set_eq:NN \l_coffin_x_prime_fp \l_coffin_x_fp + \fp_set_eq:NN \l_coffin_tmp_fp \l_coffin_y_fp + \fp_mul:Nn \l_coffin_x_prime_fp { \l_coffin_cos_fp } + \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_sin_fp } + \fp_sub:Nn \l_coffin_x_prime_fp { \l_coffin_tmp_fp } + \fp_set_eq:NN \l_coffin_y_prime_fp \l_coffin_y_fp + \fp_set_eq:NN \l_coffin_tmp_fp \l_coffin_x_fp + \fp_mul:Nn \l_coffin_y_prime_fp { \l_coffin_cos_fp } + \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_sin_fp } + \fp_add:Nn \l_coffin_y_prime_fp { \l_coffin_tmp_fp } + \dim_set:Nn #3 { \fp_to_dim:N \l_coffin_x_prime_fp } + \dim_set:Nn #4 { \fp_to_dim:N \l_coffin_y_prime_fp } + } +\cs_new_protected_nopar:Npn \coffin_find_corner_maxima:N #1 + { + \dim_set:Nn \l_coffin_top_corner_dim { -\c_max_dim } + \dim_set:Nn \l_coffin_right_corner_dim { -\c_max_dim } + \dim_set:Nn \l_coffin_bottom_corner_dim { \c_max_dim } + \dim_set:Nn \l_coffin_left_corner_dim { \c_max_dim } + \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } + { \coffin_find_corner_maxima_aux:nn ##2 } + } +\cs_new_protected_nopar:Npn \coffin_find_corner_maxima_aux:nn #1#2 + { + \dim_set_min:Nn \l_coffin_left_corner_dim {#1} + \dim_set_max:Nn \l_coffin_right_corner_dim {#1} + \dim_set_min:Nn \l_coffin_bottom_corner_dim {#2} + \dim_set_max:Nn \l_coffin_top_corner_dim {#2} + } +\cs_new_protected_nopar:Npn \coffin_find_bounding_shift: + { + \dim_set:Nn \l_coffin_bounding_shift_dim { \c_max_dim } + \prop_map_inline:Nn \l_coffin_bounding_prop + { \coffin_find_bounding_shift_aux:nn ##2 } + } +\cs_new_protected_nopar:Npn \coffin_find_bounding_shift_aux:nn #1#2 + { \dim_set_min:Nn \l_coffin_bounding_shift_dim {#1} } +\cs_new_protected_nopar:Npn \coffin_shift_corner:Nnnn #1#2#3#4 + { + \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _ prop } {#2} + { + { \dim_eval:n { #3 - \l_coffin_left_corner_dim } } + { \dim_eval:n { #4 - \l_coffin_bottom_corner_dim } } + } + } +\cs_new_protected_nopar:Npn \coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 + { + \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _ prop } {#2} + { + { \dim_eval:n { #3 - \l_coffin_left_corner_dim } } + { \dim_eval:n { #4 - \l_coffin_bottom_corner_dim } } + {#5} {#6} + } + } +\coffin_new:N \l_coffin_display_coffin +\coffin_new:N \l_coffin_display_coord_coffin +\coffin_new:N \l_coffin_display_pole_coffin +\prop_new:N \l_coffin_display_handles_prop +\prop_put:Nnn \l_coffin_display_handles_prop { tl } + { { b } { r } { -1 } { 1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { thc } + { { b } { hc } { 0 } { 1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { tr } + { { b } { l } { 1 } { 1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { vcl } + { { vc } { r } { -1 } { 0 } } +\prop_put:Nnn \l_coffin_display_handles_prop { vchc } + { { vc } { hc } { 0 } { 0 } } +\prop_put:Nnn \l_coffin_display_handles_prop { vcr } + { { vc } { l } { 1 } { 0 } } +\prop_put:Nnn \l_coffin_display_handles_prop { bl } + { { t } { r } { -1 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { bhc } + { { t } { hc } { 0 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { br } + { { t } { l } { 1 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Tl } + { { t } { r } { -1 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Thc } + { { t } { hc } { 0 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Tr } + { { t } { l } { 1 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Hl } + { { vc } { r } { -1 } { 1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Hhc } + { { vc } { hc } { 0 } { 1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Hr } + { { vc } { l } { 1 } { 1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Bl } + { { b } { r } { -1 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Bhc } + { { b } { hc } { 0 } { -1 } } +\prop_put:Nnn \l_coffin_display_handles_prop { Br } + { { b } { l } { 1 } { -1 } } +\dim_new:N \l_coffin_display_offset_dim +\dim_set:Nn \l_coffin_display_offset_dim { 2 pt } +\dim_new:N \l_coffin_display_x_dim +\dim_new:N \l_coffin_display_y_dim +\prop_new:N \l_coffin_display_poles_prop +\tl_new:N \l_coffin_display_font_tl +\tl_set:Nn \l_coffin_display_font_tl { \sffamily \tiny } +\prop_new:N \l_coffin_handles_tmp_prop +\cs_new_protected_nopar:Npn \coffin_mark_handle:Nnnn #1#2#3#4 + { + \hcoffin_set:Nn \l_coffin_display_pole_coffin + { + \color {#4} + \rule { 1 pt } { 1 pt } + } + \coffin_attach_mark:NnnNnnnn #1 {#2} {#3} + \l_coffin_display_pole_coffin { hc } { vc } { 0 pt } { 0 pt } + \hcoffin_set:Nn \l_coffin_display_coord_coffin + { + \color {#4} + \l_coffin_display_font_tl + ( \tl_to_str:n { #2 , #3 } ) + } + \prop_get:NnN \l_coffin_display_handles_prop + { #2 #3 } \l_coffin_tmp_tl + \quark_if_no_value:NTF \l_coffin_tmp_tl + { + \prop_get:NnN \l_coffin_display_handles_prop + { #3 #2 } \l_coffin_tmp_tl + \quark_if_no_value:NTF \l_coffin_tmp_tl + { + \coffin_attach_mark:NnnNnnnn #1 {#2} {#3} + \l_coffin_display_coord_coffin { l } { vc } + { 1 pt } { 0 pt } + } + { + \exp_last_unbraced:No \coffin_mark_handle_aux:nnnnNnn + \l_coffin_tmp_tl #1 {#2} {#3} + } + } + { + \exp_last_unbraced:No \coffin_mark_handle_aux:nnnnNnn + \l_coffin_tmp_tl #1 {#2} {#3} + } + } +\cs_new_protected_nopar:Npn \coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7 + { + \coffin_attach_mark:NnnNnnnn #5 {#6} {#7} + \l_coffin_display_coord_coffin {#1} {#2} + { #3 \l_coffin_display_offset_dim } + { #4 \l_coffin_display_offset_dim } + } +\cs_generate_variant:Nn \coffin_mark_handle:Nnnn { c } +\cs_new_protected_nopar:Npn \coffin_display_handles:Nn #1#2 + { + \hcoffin_set:Nn \l_coffin_display_pole_coffin + { + \color {#2} + \rule { 1 pt } { 1 pt } + } + \prop_set_eq:Nc \l_coffin_display_poles_prop + { l_coffin_poles_ \int_value:w #1 _prop } + \coffin_get_pole:NnN #1 { H } \l_coffin_pole_a_tl + \coffin_get_pole:NnN #1 { T } \l_coffin_pole_b_tl + \tl_if_eq:NNT \l_coffin_pole_a_tl \l_coffin_pole_b_tl + { \prop_del:Nn \l_coffin_display_poles_prop { T } } + \coffin_get_pole:NnN #1 { B } \l_coffin_pole_b_tl + \tl_if_eq:NNT \l_coffin_pole_a_tl \l_coffin_pole_b_tl + { \prop_del:Nn \l_coffin_display_poles_prop { B } } + \coffin_set_eq:NN \l_coffin_display_coffin #1 + \prop_clear:N \l_coffin_handles_tmp_prop + \prop_map_inline:Nn \l_coffin_display_poles_prop + { + \prop_del:Nn \l_coffin_display_poles_prop {##1} + \coffin_display_handles_aux:nnnnnn {##1} ##2 {#2} + } + \box_use:N \l_coffin_display_coffin + } +\cs_new_protected_nopar:Npn \coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 + { + \prop_map_inline:Nn \l_coffin_display_poles_prop + { + \bool_set_false:N \l_coffin_error_bool + \coffin_calculate_intersection:nnnnnnnn {#2} {#3} {#4} {#5} ##2 + \bool_if:NF \l_coffin_error_bool + { + \dim_set:Nn \l_coffin_display_x_dim { \l_coffin_x_dim } + \dim_set:Nn \l_coffin_display_y_dim { \l_coffin_y_dim } + \coffin_display_attach:Nnnnn + \l_coffin_display_pole_coffin { hc } { vc } + { 0 pt } { 0 pt } + \hcoffin_set:Nn \l_coffin_display_coord_coffin + { + \color {#6} + \l_coffin_display_font_tl + ( \tl_to_str:n { #1 , ##1 } ) + } + \prop_get:NnN \l_coffin_display_handles_prop + { #1 ##1 } \l_coffin_tmp_tl + \quark_if_no_value:NTF \l_coffin_tmp_tl + { + \prop_get:NnN \l_coffin_display_handles_prop + { ##1 #1 } \l_coffin_tmp_tl + \quark_if_no_value:NTF \l_coffin_tmp_tl + { + \coffin_display_attach:Nnnnn + \l_coffin_display_coord_coffin { l } { vc } + { 1 pt } { 0 pt } + } + { + \exp_last_unbraced:No + \coffin_display_handles_aux:nnnn + \l_coffin_tmp_tl + } + } + { + \exp_last_unbraced:No \coffin_display_handles_aux:nnnn + \l_coffin_tmp_tl + } + } + } + } +\cs_new_protected_nopar:Npn \coffin_display_handles_aux:nnnn #1#2#3#4 + { + \coffin_display_attach:Nnnnn + \l_coffin_display_coord_coffin {#1} {#2} + { #3 \l_coffin_display_offset_dim } + { #4 \l_coffin_display_offset_dim } + } +\cs_generate_variant:Nn \coffin_display_handles:Nn { c } +\cs_new_protected_nopar:Npn \coffin_display_attach:Nnnnn #1#2#3#4#5 + { + \coffin_calculate_intersection:Nnn #1 {#2} {#3} + \dim_set:Nn \l_coffin_x_prime_dim { \l_coffin_x_dim } + \dim_set:Nn \l_coffin_y_prime_dim { \l_coffin_y_dim } + \dim_set:Nn \l_coffin_offset_x_dim + { \l_coffin_display_x_dim - \l_coffin_x_prime_dim + #4 } + \dim_set:Nn \l_coffin_offset_y_dim + { \l_coffin_display_y_dim - \l_coffin_y_prime_dim + #5 } + \hbox_set:Nn \l_coffin_aligned_coffin + { + \box_use:N \l_coffin_display_coffin + \tex_kern:D -\box_wd:N \l_coffin_display_coffin + \tex_kern:D \l_coffin_offset_x_dim + \box_move_up:nn { \l_coffin_offset_y_dim } { \box_use:N #1 } + } + \box_set_ht:Nn \l_coffin_aligned_coffin + { \box_ht:N \l_coffin_display_coffin } + \box_set_dp:Nn \l_coffin_aligned_coffin + { \box_dp:N \l_coffin_display_coffin } + \box_set_wd:Nn \l_coffin_aligned_coffin + { \box_wd:N \l_coffin_display_coffin } + \box_set_eq:NN \l_coffin_display_coffin \l_coffin_aligned_coffin + } +\cs_new_protected_nopar:Npn \coffin_show_structure:N #1 + { + \cs_if_exist:cTF { l_coffin_poles_ \int_value:w #1 _prop } + { + \iow_term:x + { + \iow_newline: + Size~of~coffin~\token_to_str:N #1 : \iow_newline: + > ~ ht~=~\dim_use:N \box_ht:N #1 \iow_newline: + > ~ dp~=~\dim_use:N \box_dp:N #1 \iow_newline: + > ~ wd~=~\dim_use:N \box_wd:N #1 \iow_newline: + } + \iow_term:x { Poles~of~coffin~\token_to_str:N #1 : } + \tl_set:Nx \l_coffin_tmp_tl + { + \prop_map_function:cN + { l_coffin_poles_ \int_value:w #1 _prop } + \coffin_show_aux:nn + } + \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN + { \exp_after:wN \coffin_show_aux:w \l_coffin_tmp_tl } + } + { + \iow_term:x { ---~No~poles~found~--- } + \tl_show:n { Is~this~really~a~coffin? } + } + } +\cs_new:Npn \coffin_show_aux:nn #1#2 + { + \iow_newline: > \c_space_tl \c_space_tl + #1 \c_space_tl \c_space_tl => \c_space_tl \c_space_tl \exp_not:n {#2} + } +\cs_new_nopar:Npn \coffin_show_aux:w #1 > ~ { } +\cs_generate_variant:Nn \coffin_show_structure:N { c } +\msg_kernel_new:nnnn { coffin } { no-pole-intersection } + { No~intersection~between~coffin~poles. } + { + \c_msg_coding_error_text_tl + LaTeX~was~asked~to~find~the~intersection~between~two~poles,~ + but~they~do~not~have~a~unique~meeting~point:~ + the~value~(0~pt,~0~pt)~will~be~used. + } +\msg_kernel_new:nnnn { coffin } { unknown-coffin } + { Unknown~coffin~'#1'. } + { The~coffin~'#1'~was~never~defined. } +\msg_kernel_new:nnnn { coffin } { unknown-coffin-pole } + { Pole~'#1'~unknown~for~coffin~'#2'. } + { + \c_msg_coding_error_text_tl + LaTeX~was~asked~to~find~a~typesetting~pole~for~a~coffin,~ + but~either~the~coffin~does~not~exist~or~the~pole~name~is~wrong. + } +%% +%% +%% End of file `l3coffins.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 8f91c9a54f6..e7c0b14659e 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -6,6 +6,7 @@ %% %% l3doc.dtx (with options: `class') %% +%% %% EXPERIMENTAL CODE %% %% Do not distribute this file without also distributing the @@ -13,6 +14,7 @@ %% %% Do not distribute a modified version of this file. %% +%% %% File: l3doc.dtx Copyright (C) 1990-2011 The LaTeX3 project %% %% It may be distributed and/or modified under the conditions of the @@ -50,7 +52,7 @@ \let \filedateOld \ExplFileDate \let \fileversionOld \ExplFileVersion \let \filedescriptionOld \ExplFileDescription -\GetIdInfo$Id: l3doc.dtx 2601 2011-08-16 23:20:27Z bruno $ +\GetIdInfo$Id: l3doc.dtx 2674 2011-08-27 19:43:44Z mittelba $ {L3 Experimental documentation class} \ProvidesExplClass {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -64,7 +66,7 @@ Frank~Mittelbach,~Denys~Duchier,~Chris~Rowley,~ Rainer~Sch\"opf,~Johannes~Braams,~Michael~Downes,~ David~Carlisle,~Alan~Jeffrey,~Morten~H\o{}gholm,~Thomas~Lotze,~ - Javier~Bezos,~Will~Robertson,~Joseph~Wright}} + Javier~Bezos,~Will~Robertson,~Joseph~Wright,~Bruno~Le~Floch}} \DeclareOption{a5paper}{\@latexerr{Option not supported}{}} \bool_new:N \g_doc_full_bool \bool_new:N \g_doc_lmodern_bool @@ -136,6 +138,22 @@ \setlength \parindent { 0pt } \setlength \itemindent { 0pt } \setlength \parskip { \medskipamount } +\cs_set_nopar:Npn \l@section #1#2 { + \ifnum \c@tocdepth >\z@ + \addpenalty\@secpenalty + \addvspace{1.0em \@plus\p@} + \setlength\@tempdima{2.5em} % was 1.5em + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \endgroup + \fi} +\cs_set_nopar:Npn\l@subsection{\@dottedtocline{2}{2.5em}{2.3em}} % #2 = 1.5em + \AtBeginDocument { \MakeShortVerb \" \MakeShortVerb \| diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3file.sty b/Master/texmf-dist/tex/latex/l3kernel/l3file.sty index e8272cde35f..a0c3041c822 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3file.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3file.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3file.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3file.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental file operations} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty b/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty index d3f98d4353a..ae8c42f0e1e 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3fp.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3fp.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental floating-point operations} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty index 070c9a3a6e6..26c0e19a66b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3int.dtx 2600 2011-08-16 22:31:24Z bruno $ +\GetIdInfo$Id: l3int.dtx 2666 2011-08-26 06:10:09Z joseph $ {L3 Experimental integers} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3io.sty b/Master/texmf-dist/tex/latex/l3kernel/l3io.sty index b3ae494e9fb..c46f6d3deee 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3io.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3io.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3io.dtx 2595 2011-08-16 00:58:34Z bruno $ +\GetIdInfo$Id: l3io.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental input-output operations} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty index 749a5791777..434ba050077 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty @@ -46,11 +46,134 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3keys.dtx 2568 2011-08-14 05:03:32Z bruno $ +\GetIdInfo$Id: l3keys.dtx 2677 2011-08-28 06:54:22Z joseph $ {L3 Experimental key-value interfaces} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \package_check_loaded_expl: +\int_new:N \g_keyval_level_int +\tl_new:N \l_keyval_key_tl +\tl_new:N \l_keyval_value_tl +\tl_new:N \l_keyval_sanitise_tl +\tl_new:N \l_keyval_parse_tl +\group_begin: + \char_set_catcode_active:n { `\= } + \char_set_catcode_active:n { `\, } + \char_set_lccode:nn { `\8 } { `\= } + \char_set_lccode:nn { `\9 } { `\, } +\tl_to_lowercase:n + { + \group_end: + \cs_new_protected:Npn \keyval_parse:n #1 + { + \group_begin: + \tl_clear:N \l_keyval_sanitise_tl + \tl_set:Nn \l_keyval_sanitise_tl {#1} + \tl_replace_all:Nnn \l_keyval_sanitise_tl { = } { 8 } + \tl_replace_all:Nnn \l_keyval_sanitise_tl { , } { 9 } + \tl_clear:N \l_keyval_parse_tl + \exp_after:wN \keyval_parse_elt:w \exp_after:wN + \q_no_value \l_keyval_sanitise_tl 9 \q_nil 9 + \exp_after:wN \group_end: + \l_keyval_parse_tl + } + } +\cs_new_protected:Npn \keyval_parse_elt:w #1 , + { + \tl_if_blank:oTF { \use_none:n #1 } + { \keyval_parse_elt:w \q_no_value } + { + \quark_if_nil:oF { \use_ii:nn #1 } + { + \keyval_split_key_value:w #1 = = \q_stop + \keyval_parse_elt:w \q_no_value + } + } + } +\cs_new_protected:Npn \keyval_split_key_value:w #1 = #2 \q_stop + { + \keyval_split_key:w #1 \q_stop + \str_if_eq:nnTF {#2} { = } + { + \tl_put_right:Nx \l_keyval_parse_tl + { + \exp_not:c + { keyval_key_no_value_elt_ \int_use:N \g_keyval_level_int :n } + { \exp_not:o \l_keyval_key_tl } + } + } + { + \keyval_split_key_value_aux:wTF #2 \q_no_value \q_stop + { \keyval_split_value:w \q_nil #2 } + { \msg_kernel_error:nn { keyval } { misplaced-equals-sign } } + } + } +\cs_new:Npn \keyval_split_key_value_aux:wTF #1 = #2#3 \q_stop + { \tl_if_head_eq_meaning:nNTF {#3} \q_no_value } +\group_begin: + \char_set_catcode_math_toggle:n { `\Q } + \cs_new_protected:Npn \keyval_split_key:w #1 \q_stop + { + \exp_args:NNf \tl_set:Nn \l_keyval_key_tl + { + \exp_after:wN \keyval_remove_spaces:w \exp_after:wN + \exp_not:N \use_none:n #1 Q ~ Q + } + \tl_set:Nx \l_keyval_key_tl + { \exp_after:wN \keyval_split_key_aux:w \l_keyval_key_tl \q_stop } + } + \cs_gset:Npn \keyval_split_key_aux:w #1 \q_stop { \exp_not:n {#1} } + \cs_gset:Npn \keyval_remove_spaces:w #1 ~ Q + { \keyval_remove_spaces_aux:w #1 Q } + \cs_gset:Npn \keyval_remove_spaces_aux:w #1 Q #2 {#1} +\group_end: +\cs_new_protected:Npn \keyval_split_value:w #1 = = + { + \tl_put_right:Nx \l_keyval_parse_tl + { + \exp_not:c + { keyval_key_value_elt_ \int_use:N \g_keyval_level_int :nn } + { \exp_not:o \l_keyval_key_tl } + } + \tl_set:Nx \l_keyval_value_tl + { \exp_not:o { \use_none:nnn #1 \q_nil \q_nil } } + \tl_if_empty:NTF \l_keyval_value_tl + { \tl_put_right:Nn \l_keyval_parse_tl { { } } } + { + \quark_if_nil:NTF \l_keyval_value_tl + { + \tl_put_right:Nx \l_keyval_parse_tl + { { \exp_not:o { \use_ii:nnn #1 \q_nil } } } + } + { \keyval_split_value_aux:w #1 \q_stop } + } + } +\group_begin: + \char_set_catcode_math_toggle:n { `\Q } + \cs_new_protected:Npn \keyval_split_value_aux:w \q_nil #1 \q_stop + { + \exp_args:NNf \tl_set:Nn \l_keyval_value_tl + { \keyval_remove_spaces:w \exp_not:N #1 Q ~ Q } + \tl_put_right:Nx \l_keyval_parse_tl + { { \exp_not:o \l_keyval_value_tl } } + } +\group_end: +\cs_new_protected:Npn \keyval_parse:NNn #1#2#3 + { + \int_gincr:N \g_keyval_level_int + \cs_gset_eq:cN + { keyval_key_no_value_elt_ \int_use:N \g_keyval_level_int :n } #1 + \cs_gset_eq:cN + { keyval_key_value_elt_ \int_use:N \g_keyval_level_int :nn } #2 + \keyval_parse:n {#3} + \int_gdecr:N \g_keyval_level_int + } +\msg_kernel_new:nnnn { keyval } { misplaced-equals-sign } + { Misplaced~equals~sign~in~key-value~input~\msg_line_number: } + { + LaTeX~is~attempting~to~parse~some~key-value~input~but~found~ + two~equals~signs~not~separated~by~a~comma. + } \tl_const:Nn \c_keys_code_root_tl { key~code~>~ } \tl_const:Nn \c_keys_vars_root_tl { key~var~>~ } \tl_const:Nn \c_keys_props_root_tl { key~prop~>~ } @@ -63,6 +186,7 @@ \bool_new:N \l_keys_no_value_bool \tl_new:N \l_keys_path_tl \tl_new:N \l_keys_property_tl +\tl_new:N \l_keys_unknown_clist \tl_new:N \l_keys_value_tl \cs_new_protected:Npn \keys_define:nn { \keys_define_aux:onn \l_keys_module_tl } @@ -141,6 +265,21 @@ } \keys_default_set:n { true } } +\cs_new_nopar:Npn \keys_bool_set_inverse:NN #1#2 + { + \cs_if_exist:NF #1 { \bool_new:N #1 } + \keys_choice_make: + \keys_cmd_set:nx { \l_keys_path_tl / true } + { \exp_not:c { bool_ #2 set_false:N } \exp_not:N #1 } + \keys_cmd_set:nx { \l_keys_path_tl / false } + { \exp_not:c { bool_ #2 set_true:N } \exp_not:N #1 } + \keys_cmd_set:nn { \l_keys_path_tl / unknown } + { + \msg_kernel_error:nnx { keys } { boolean-values-only } + { \l_keys_key_tl } + } + \keys_default_set:n { true } + } \cs_new_protected_nopar:Npn \keys_choice_make: { \keys_cmd_set:nn { \l_keys_path_tl } @@ -151,6 +290,22 @@ { \l_keys_path_tl } {##1} } } +\cs_new_protected:Npn \keys_choices_make:nn #1#2 + { + \keys_choice_make: + \int_zero:N \l_keys_choice_int + \clist_map_inline:nn {#1} + { + \keys_cmd_set:nx { \l_keys_path_tl / ##1 } + { + \tl_set:Nn \exp_not:N \l_keys_choice_tl {##1} + \int_set:Nn \exp_not:N \l_keys_choice_int + { \int_use:N \l_keys_choice_int } + \exp_not:n {#2} + } + \int_incr:N \l_keys_choice_int + } + } \cs_new_protected:Npn \keys_choices_generate:n #1 { \cs_if_exist:cTF @@ -169,8 +324,8 @@ { \keys_cmd_set:nx { \l_keys_path_tl / #1 } { - \exp_not:n { \tl_set:Nn \l_keys_choice_tl } {#1} - \exp_not:n { \int_set:Nn \l_keys_choice_int } + \tl_set:Nn \exp_not:N \l_keys_choice_tl {#1} + \int_set:Nn \exp_not:N \l_keys_choice_int { \int_use:N \l_keys_choice_int } \exp_not:v { \c_keys_vars_root_tl \l_keys_path_tl .choice~code } @@ -210,13 +365,41 @@ \cs_new_protected_nopar:Npn \keys_meta_make:n #1 { \exp_args:NNo \keys_cmd_set:nn \l_keys_path_tl - { \exp_after:wN \keys_set:nn \exp_after:wN { \l_keys_module_tl } {#1} } + { \exp_after:wN \keys_set:nn \exp_after:wN { \l_keys_module_tl } {#1} } } \cs_new_protected_nopar:Npn \keys_meta_make:x #1 { \keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:N \keys_set:nn { \l_keys_module_tl } {#1} } } +\cs_new_nopar:Npn \keys_multichoice_find:n #1 + { \clist_map_function:nN {#1} \keys_choice_find:n } +\cs_new_protected_nopar:Npn \keys_multichoice_make: + { + \keys_cmd_set:nn { \l_keys_path_tl } + { \keys_multichoice_find:n {##1} } + \keys_cmd_set:nn { \l_keys_path_tl / unknown } + { + \msg_kernel_error:nnxx { keys } { choice-unknown } + { \l_keys_path_tl } {##1} + } + } +\cs_new_protected:Npn \keys_multichoices_make:nn #1#2 + { + \keys_multichoice_make: + \int_zero:N \l_keys_choice_int + \clist_map_inline:nn {#1} + { + \keys_cmd_set:nx { \l_keys_path_tl / ##1 } + { + \tl_set:Nn \exp_not:N \l_keys_choice_tl {##1} + \int_set:Nn \exp_not:N \l_keys_choice_int + { \int_use:N \l_keys_choice_int } + \exp_not:n {#2} + } + \int_incr:N \l_keys_choice_int + } + } \cs_new_protected_nopar:Npn \keys_value_requirement:n #1 { \tl_set_eq:cc @@ -237,8 +420,14 @@ { \keys_bool_set:NN #1 { } } \cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_gset:N } #1 { \keys_bool_set:NN #1 g } +\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_set_inverse:N } #1 + { \keys_bool_set_inverse:NN #1 { } } +\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_gset_inverse:N } #1 + { \keys_bool_set_inverse:NN #1 g } \cs_new_protected_nopar:cpn { \c_keys_props_root_tl .choice: } { \keys_choice_make: } +\cs_new_protected:cpn { \c_keys_props_root_tl .choices:nn } #1 + { \keys_choices_make:nn #1 } \cs_new_protected:cpn { \c_keys_props_root_tl .code:n } #1 { \keys_cmd_set:nn { \l_keys_path_tl } {#1} } \cs_new_protected:cpn { \c_keys_props_root_tl .code:x } #1 @@ -281,6 +470,10 @@ { \keys_meta_make:n {#1} } \cs_new_protected:cpn { \c_keys_props_root_tl .meta:x } #1 { \keys_meta_make:x {#1} } +\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .multichoice: } + { \keys_multichoice_make: } +\cs_new_protected:cpn { \c_keys_props_root_tl .multichoices:nn } #1 + { \keys_multichoices_make:nn #1 } \cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_set:N } #1 { \keys_variable_set:NnN #1 { skip } n } \cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_set:c } #1 @@ -319,6 +512,20 @@ } \cs_generate_variant:Nn \keys_set:nn { nV , nv , no } \cs_generate_variant:Nn \keys_set_aux:nnn { o } +\cs_new_protected:Npn \keys_set_known:nnN + { \keys_set_known_aux:onnN { \l_keys_module_tl } } +\cs_new_protected:Npn \keys_set_known_aux:nnnN #1#2#3#4 + { + \tl_set:Nn \l_keys_module_tl {#2} + \clist_clear:N \l_keys_unknown_clist + \cs_set_eq:NN \keys_execute_unknown: \keys_execute_unknown_alt: + \keyval_parse:NNn \keys_set_elt:n \keys_set_elt:nn {#3} + \cs_set_eq:NN \keys_execute_unknown: \keys_execute_unknown_std: + \tl_set:Nn \l_keys_module_tl {#1} + \clist_set_eq:NN #4 \l_keys_unknown_clist + } +\cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } +\cs_generate_variant:Nn \keys_set_known_aux:nnnN { o } \cs_new_protected_nopar:Npn \keys_set_elt:n #1 { \bool_set_true:N \l_keys_no_value_bool @@ -363,8 +570,11 @@ { \quark_if_no_value:cF { \c_keys_vars_root_tl \l_keys_path_tl .default } { - \tl_set_eq:Nc \l_keys_value_tl - { \c_keys_vars_root_tl \l_keys_path_tl .default } + \cs_if_exist:cT { \c_keys_vars_root_tl \l_keys_path_tl .default } + { + \tl_set_eq:Nc \l_keys_value_tl + { \c_keys_vars_root_tl \l_keys_path_tl .default } + } } } } @@ -385,6 +595,16 @@ { \l_keys_path_tl } { \l_keys_module_tl } } } +\cs_new_eq:NN \keys_execute_unknown_std: \keys_execute_unknown: +\cs_new_nopar:Npn \keys_execute_unknown_alt: + { + \clist_put_right:Nx \l_keys_unknown_clist + { + \exp_not:o \l_keys_key_tl + \bool_if:NF \l_keys_no_value_bool + { = { \exp_not:o \l_keys_value_tl } } + } + } \cs_new_nopar:Npn \keys_execute:nn #1#2 { \cs_if_exist:cTF { \c_keys_code_root_tl #1 } @@ -402,8 +622,14 @@ \prg_new_conditional:Npnn \keys_if_exist:nn #1#2 { p , T , F , TF } { \cs_if_exist:cTF { \c_keys_code_root_tl #1 / #2 } - { \prg_return_true:} - { \prg_return_false:} + { \prg_return_true: } + { \prg_return_false: } + } +\prg_new_conditional:Npnn \keys_if_choice_exist:nnn #1#2#3 { p , T , F , TF } + { + \cs_if_exist:cTF { \c_keys_code_root_tl #1 / #2 / #3 } + { \prg_return_true: } + { \prg_return_false: } } \cs_new_nopar:Npn \keys_show:nn #1#2 { \cs_show:c { \c_keys_code_root_tl #1 / \tl_to_str:n {#2} } } @@ -470,6 +696,9 @@ The~key~'#1'~must~have~a~value.\\ No~value~was~present:~the~key~will~be~ignored. } +\cs_new_eq:NN \KV_process_space_removal_sanitize:NNn \keyval_parse:NNn +\cs_new_eq:NN \KV_process_space_removal_no_sanitize:NNn \keyval_parse:NNn +\cs_new_eq:NN \KV_process_no_space_removal_no_sanitize:NNn \keyval_parse:NNn %% %% %% End of file `l3keys.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keyval.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keyval.sty deleted file mode 100644 index a2b5411e916..00000000000 --- a/Master/texmf-dist/tex/latex/l3kernel/l3keyval.sty +++ /dev/null @@ -1,177 +0,0 @@ -%% -%% This is file `l3keyval.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% l3keyval.dtx (with options: `package') -%% -%% EXPERIMENTAL CODE -%% -%% Do not distribute this file without also distributing the -%% source files specified above. -%% -%% Do not distribute a modified version of this file. -%% -%% File: l3keyval.dtx Copyright (C) 2006-2011 The LaTeX3 Project -%% -%% It may be distributed and/or modified under the conditions of the -%% LaTeX Project Public License (LPPL), either version 1.3c of this -%% license or (at your option) any later version. The latest version -%% of this license is in the file -%% -%% http://www.latex-project.org/lppl.txt -%% -%% This file is part of the "expl3 bundle" (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% The released version of this bundle is available from CTAN. -%% -%% ----------------------------------------------------------------------- -%% -%% The development version of the bundle can be found at -%% -%% http://www.latex-project.org/svnroot/experimental/trunk/ -%% -%% for those people who are interested. -%% -%%%%%%%%%%% -%% NOTE: %% -%%%%%%%%%%% -%% -%% Snapshots taken from the repository represent work in progress and may -%% not work or may contain conflicting material! We therefore ask -%% people _not_ to put them into distributions, archives, etc. without -%% prior consultation with the LaTeX3 Project. -%% -%% ----------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: l3keyval.dtx 2601 2011-08-16 23:20:27Z bruno $ - {L3 Experimental key-value parsing} - %\section{Parsing key--value lists} - %\begin{function}{\keyval_parse:NNn} -\ProvidesExplPackage - {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\package_check_loaded_expl: -\int_new:N \g_keyval_level_int -\tl_new:N \l_keyval_key_tl -\tl_new:N \l_keyval_value_tl -\tl_new:N \l_keyval_sanitise_tl -\tl_new:N \l_keyval_parse_tl -\group_begin: - \char_set_catcode_active:n { `\= } - \char_set_catcode_active:n { `\, } - \char_set_lccode:nn { `\8 } { `\= } - \char_set_lccode:nn { `\9 } { `\, } -\tl_to_lowercase:n - { - \group_end: - \cs_new_protected:Npn \keyval_parse:n #1 - { - \group_begin: - \tl_clear:N \l_keyval_sanitise_tl - \tl_set:Nn \l_keyval_sanitise_tl {#1} - \tl_replace_all:Nnn \l_keyval_sanitise_tl { = } { 8 } - \tl_replace_all:Nnn \l_keyval_sanitise_tl { , } { 9 } - \tl_clear:N \l_keyval_parse_tl - \exp_after:wN \keyval_parse_elt:w \exp_after:wN - \q_no_value \l_keyval_sanitise_tl 9 \q_nil 9 - \exp_after:wN \group_end: - \l_keyval_parse_tl - } - } -\cs_new_protected:Npn \keyval_parse_elt:w #1 , - { - \tl_if_blank:oTF { \use_none:n #1 } - { \keyval_parse_elt:w \q_no_value } - { - \quark_if_nil:oF { \use_ii:nn #1 } - { - \keyval_split_key_value:w #1 = = \q_stop - \keyval_parse_elt:w \q_no_value - } - } - } -\cs_new_protected:Npn \keyval_split_key_value:w #1 = #2 \q_stop - { - \keyval_split_key:w #1 \q_stop - \str_if_eq:nnTF {#2} { = } - { - \tl_put_right:Nx \l_keyval_parse_tl - { - \exp_not:c { keyval_key_no_value_elt_ \int_use:N \g_keyval_level_int :n } - { \exp_not:o \l_keyval_key_tl } - } - } - { - \keyval_split_key_value_aux:wTF #2 \q_no_value \q_stop - { \keyval_split_value:w \q_nil #2 } - { \msg_kernel_error:nn { keyval } { misplaced-equals-sign } } - } - } -\cs_new:Npn \keyval_split_key_value_aux:wTF #1 = #2#3 \q_stop - { \tl_if_head_eq_meaning:nNTF {#3} \q_no_value } -\group_begin: - \char_set_catcode_math_toggle:n { `\Q } - \cs_new_protected:Npn \keyval_split_key:w #1 \q_stop - { - \exp_args:NNf \tl_set:Nn \l_keyval_key_tl - { - \exp_after:wN \keyval_remove_spaces:w \exp_after:wN - \exp_not:N \use_none:n #1 Q ~ Q - } - \tl_set:Nx \l_keyval_key_tl - { \exp_after:wN \keyval_split_key_aux:w \l_keyval_key_tl \q_stop } - } - \cs_gset:Npn \keyval_split_key_aux:w #1 \q_stop { \exp_not:n {#1} } - \cs_gset:Npn \keyval_remove_spaces:w #1 ~ Q { \keyval_remove_spaces_aux:w #1 Q } - \cs_gset:Npn \keyval_remove_spaces_aux:w #1 Q #2 {#1} -\group_end: -\cs_new_protected:Npn \keyval_split_value:w #1 = = - { - \tl_put_right:Nx \l_keyval_parse_tl - { - \exp_not:c { keyval_key_value_elt_ \int_use:N \g_keyval_level_int :nn } - { \exp_not:o \l_keyval_key_tl } - } - \tl_set:Nx \l_keyval_value_tl { \exp_not:o { \use_none:nnn #1 \q_nil \q_nil } } - \tl_if_empty:NTF \l_keyval_value_tl - { \tl_put_right:Nn \l_keyval_parse_tl { { } } } - { - \quark_if_nil:NTF \l_keyval_value_tl - { - \tl_put_right:Nx \l_keyval_parse_tl - { { \exp_not:o { \use_ii:nnn #1 \q_nil } } } - } - { \keyval_split_value_aux:w #1 \q_stop } - } - } -\group_begin: - \char_set_catcode_math_toggle:n { `\Q } - \cs_new_protected:Npn \keyval_split_value_aux:w \q_nil #1 \q_stop - { - \exp_args:NNf \tl_set:Nn \l_keyval_value_tl - { \keyval_remove_spaces:w \exp_not:N #1 Q ~ Q } - \tl_put_right:Nx \l_keyval_parse_tl { { \exp_not:o \l_keyval_value_tl } } - } -\group_end: -\cs_new_protected:Npn \keyval_parse:NNn #1#2#3 - { - \int_gincr:N \g_keyval_level_int - \cs_gset_eq:cN { keyval_key_no_value_elt_ \int_use:N \g_keyval_level_int :n } #1 - \cs_gset_eq:cN { keyval_key_value_elt_ \int_use:N \g_keyval_level_int :nn } #2 - \keyval_parse:n {#3} - \int_gdecr:N \g_keyval_level_int - } -\msg_kernel_new:nnnn { keyval } { misplaced-equals-sign } - { Misplaced~equals~sign~in~key-value~input~\msg_line_number: } - { - LaTeX~is~attempting~to~parse~some~key-value~input~but~found~ - two~equals~signs~not~separated~by~a~comma. - } -\cs_new_eq:NN \KV_process_space_removal_sanitize:NNn \keyval_parse:NNn -\cs_new_eq:NN \KV_process_space_removal_no_sanitize:NNn \keyval_parse:NNn -\cs_new_eq:NN \KV_process_no_space_removal_no_sanitize:NNn \keyval_parse:NNn -%% -%% -%% End of file `l3keyval.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty b/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty index 38e13e2b87b..c9db7919b6b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3luatex.dtx 2545 2011-08-11 13:47:19Z bruno $ +\GetIdInfo$Id: l3luatex.dtx 2617 2011-08-18 08:13:44Z joseph $ {L3 Experimental LuaTeX-specific functions} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty index a77391e1ec1..2aeb1f516e6 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3prg.dtx 2601 2011-08-16 23:20:27Z bruno $ +\GetIdInfo$Id: l3prg.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental control structures} %% \ProvidesExplPackage diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty index 5d2a1ff69d0..222170544df 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty @@ -46,8 +46,9 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3prop.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3prop.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental property lists} +%% \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \package_check_loaded_expl: @@ -208,6 +209,20 @@ \cs_generate_variant:Nn \prop_if_in:NnF { c , cV , co } \cs_generate_variant:Nn \prop_if_in:NnTF { NV , No } \cs_generate_variant:Nn \prop_if_in:NnTF { c , cV , co } +\prg_new_protected_conditional:Npnn \prop_get:NnN #1#2#3 { T , F , TF } + { + \prop_split:NnTF #1 {#2} + { \prop_get_aux_true:Nnnn #3 } + { \prg_return_false: } + } +\cs_new_protected:Npn \prop_get_aux_true:Nnnn #1#2#3#4 + { + \tl_set:Nn #1 {#3} + \prg_return_true: + } +\cs_generate_variant:Nn \prop_get:NnNT { c } +\cs_generate_variant:Nn \prop_get:NnNF { c } +\cs_generate_variant:Nn \prop_get:NnNTF { c } \cs_new_nopar:Npn \prop_map_function:NN #1#2 { \exp_last_unbraced:NNo \prop_map_function_aux:Nwn #2 @@ -265,24 +280,13 @@ } \cs_new:Npn \prop_show_aux:w #1 > ~ { } \cs_generate_variant:Nn \prop_show:N { c } -\prg_new_protected_conditional:Npnn \prop_get:NnN #1#2#3 { T , F , TF } - { - \prop_split:NnTF #1 {#2} - { \prop_get_aux_true:Nnnn #3 } - { \prg_return_false: } - } -\cs_new_protected:Npn \prop_get_aux_true:Nnnn #1#2#3#4 - { - \tl_set:Nn #1 {#3} - \prg_return_true: - } -\prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 {T,F,TF} +\prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 { T , F , TF } { \prop_split:NnTF #1 {#2} { \prop_pop_aux_true:NNNnnn \tl_set:Nn #1 #3 } { \prg_return_false: } } -\prg_new_protected_conditional:Npnn \prop_gpop:NnN #1#2#3 {T,F,TF} +\prg_new_protected_conditional:Npnn \prop_gpop:NnN #1#2#3 { T , F , TF } { \prop_split:NnTF #1 {#2} { \prop_pop_aux_true:NNNnnn \tl_gset:Nn #1 #3 } @@ -294,6 +298,12 @@ #1 #2 { #4 #6 } \prg_return_true: } +\cs_generate_variant:Nn \prop_pop:NnNT { c } +\cs_generate_variant:Nn \prop_pop:NnNF { c } +\cs_generate_variant:Nn \prop_pop:NnNTF { c } +\cs_generate_variant:Nn \prop_gpop:NnNT { c } +\cs_generate_variant:Nn \prop_gpop:NnNF { c } +\cs_generate_variant:Nn \prop_gpop:NnNTF { c } \cs_new:Npn \prop_map_tokens:Nn #1#2 { \exp_last_unbraced:Nno \prop_map_tokens_aux:nwn {#2} #1 @@ -307,10 +317,12 @@ \use:n {#1} {#2} {#3} \prop_map_tokens_aux:nwn {#1} } -\cs_new:Npn \prop_get:Nn #1 #2 +\cs_generate_variant:Nn \prop_map_tokens:Nn { c } +\cs_new:Npn \prop_get:Nn #1#2 { \prop_map_tokens:Nn #1 { \prop_get_aux:nnn {#2} } } -\cs_new:Npn \prop_get_aux:nnn #1 #2 #3 +\cs_new:Npn \prop_get_aux:nnn #1#2#3 { \str_if_eq:nnT {#1} {#2} { \prop_map_break:n {#3} } } +\cs_generate_variant:Nn \prop_get:Nn { c } \cs_new_eq:NN \prop_display:N \prop_show:N \cs_new_eq:NN \prop_display:c \prop_show:c \cs_new_protected:Npn \prop_gget:NnN #1#2#3 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty b/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty index 236b34b5a0a..d95b117b5f8 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3quark.dtx 2549 2011-08-11 21:06:39Z bruno $ +\GetIdInfo$Id: l3quark.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental quarks} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty index 0f3aee34e2c..9db270f6006 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3seq.dtx 2586 2011-08-15 03:59:12Z bruno $ +\GetIdInfo$Id: l3seq.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental sequences and stacks} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty index 787981891fd..2e85a330dae 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3skip.dtx 2526 2011-08-09 08:58:42Z joseph $ +\GetIdInfo$Id: l3skip.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental dimensions and skips} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty index 463d9f6f6b7..f304c84c084 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3tl.dtx 2566 2011-08-13 22:04:42Z bruno $ +\GetIdInfo$Id: l3tl.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental token lists} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty index 018240d7bfa..4ffd05760ff 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3token.dtx 2579 2011-08-14 16:22:30Z bruno $ +\GetIdInfo$Id: l3token.dtx 2665 2011-08-25 22:15:27Z joseph $ {L3 Experimental token manipulation} %% \begin{function}[EXP,pTF]{\token_if_protected_long_macro:N} \ProvidesExplPackage diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty b/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty index 484cdd401e8..5867a1f8e38 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3toks.dtx 2601 2011-08-16 23:20:27Z bruno $ +\GetIdInfo$Id: l3toks.dtx 2670 2011-08-27 09:58:02Z will $ {L3 Experimental token registers} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} |