diff options
author | Karl Berry <karl@freefriends.org> | 2011-09-07 23:32:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-09-07 23:32:55 +0000 |
commit | 996a539c5bd7795ddb5e2db3b2e2c16ea93d1048 (patch) | |
tree | 01e99da20019143bb2fe8e25f1a292f144b956c4 /Master/texmf-dist/tex/latex/l3experimental/xcoffins | |
parent | d048b0fd24845bf48f447a005cdc5acbc6811675 (diff) |
l3experimental 2729 (5sep11)
git-svn-id: svn://tug.org/texlive/trunk@23863 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/xcoffins')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3experimental/xcoffins/l3coffins-scaling.sty | 143 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty | 9 |
2 files changed, 8 insertions, 144 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/l3coffins-scaling.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/l3coffins-scaling.sty deleted file mode 100644 index 27ada47014e..00000000000 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/l3coffins-scaling.sty +++ /dev/null @@ -1,143 +0,0 @@ -%% -%% This is file `l3coffins-scaling.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% l3coffins-scaling.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 "l3experimental 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{expl3} -\GetIdInfo$Id: l3coffins-scaling.dtx 2678 2011-08-28 07:02:32Z joseph $ - {L3 Experimental coffin scaling code} -\ProvidesExplPackage - {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\fp_new:N \l_coffin_scale_x_fp -\fp_new:N \l_coffin_scale_y_fp -\dim_new:N \l_coffin_scaled_total_height_dim -\dim_new:N \l_coffin_scaled_width_dim -\cs_new_protected_nopar:Npn \coffin_resize:Nnn #1#2#3 - { - \coffin_set_user_dimensions:N #1 - \fp_set_from_dim:Nn \l_coffin_scale_x_fp {#2} - \fp_set_from_dim:Nn \l_coffin_tmp_fp { \Width } - \fp_div:Nn \l_coffin_scale_x_fp { \l_coffin_tmp_fp } - \fp_set_from_dim:Nn \l_coffin_scale_y_fp {#3} - \fp_set_from_dim:Nn \l_coffin_tmp_fp { \TotalHeight } - \fp_div:Nn \l_coffin_scale_y_fp { \l_coffin_tmp_fp } - \hbox_set:Nn #1 { \resizebox * {#2} {#3} { \box_use:N #1 } } - \coffin_resize_common:Nnn #1 {#2} {#3} - } -\cs_generate_variant:Nn \coffin_resize:Nnn { c } -\cs_new_protected_nopar:Npn \coffin_resize_common:Nnn #1#2#3 - { - \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } - { \coffin_scale_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop } - { \coffin_scale_pole:Nnnnnn #1 {##1} ##2 } - \fp_compare:NNNT \l_coffin_scale_x_fp < \c_zero_fp - { - \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } - { \coffin_x_shift_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop } - { \coffin_x_shift_pole:Nnnnnn #1 {##1} ##2 } - } - \coffin_end_user_dimensions: - } -\cs_new_protected_nopar:Npn \coffin_scale:Nnn #1#2#3 - { - \coffin_set_user_dimensions:N #1 - \fp_set:Nn \l_coffin_scale_x_fp {#2} - \fp_set:Nn \l_coffin_scale_y_fp {#3} - \fp_compare:NNNTF \l_coffin_scale_y_fp > \c_zero_fp - { \l_coffin_scaled_total_height_dim #3 \TotalHeight } - { \l_coffin_scaled_total_height_dim -#3 \TotalHeight } - \fp_compare:NNNTF \l_coffin_scale_x_fp > \c_zero_fp - { \l_coffin_scaled_width_dim -#2 \Width } - { \l_coffin_scaled_width_dim #2 \Width } - \hbox_set:Nn #1 { \scalebox {#2} [#3] { \box_use:N #1 } } - \coffin_resize_common:Nnn #1 - { \l_coffin_scaled_width_dim } { \l_coffin_scaled_total_height_dim } - } -\cs_generate_variant:Nn \coffin_scale:Nnn { c } -\cs_new_protected_nopar:Npn \coffin_scale_vector:nnNN #1#2#3#4 - { - \fp_set_from_dim:Nn \l_coffin_tmp_fp {#1} - \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_scale_x_fp } - \dim_set:Nn #3 { \fp_to_dim:N \l_coffin_tmp_fp } - \fp_set_from_dim:Nn \l_coffin_tmp_fp {#2} - \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_scale_y_fp } - \dim_set:Nn #4 { \fp_to_dim:N \l_coffin_tmp_fp } - } -\cs_new_protected_nopar:Npn \coffin_scale_corner:Nnnn #1#2#3#4 - { - \coffin_scale_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_scale_pole:Nnnnnn #1#2#3#4#5#6 - { - \coffin_scale_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim - \coffin_set_pole:Nnx #1 {#2} - { - { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } - {#5} {#6} - } - } -\cs_new_protected_nopar:Npn \coffin_x_shift_corner:Nnnn #1#2#3#4 - { - \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} - { - { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} - } - } -\cs_new_protected_nopar:Npn \coffin_x_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 + \box_wd:N #1 } {#4} - {#5} {#6} - } - } -%% -%% -%% End of file `l3coffins-scaling.sty'. diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index 2f8cf2ed99c..cbadf49e9fb 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- %% -\RequirePackage{xparse,l3coffins-scaling} +\RequirePackage{xparse} \GetIdInfo$Id: xcoffins.dtx 2349 2011-05-11 18:44:37Z joseph $ {L3 Experimental design-level coffins} \ProvidesExplPackage @@ -80,6 +80,13 @@ } \NewDocumentCommand \NewCoffin { m } { \coffin_new:N #1 } +\NewDocumentCommand \BoxToCoffin { m } + { + \prop_clear_new:c { l_coffin_corners_ \int_value:w #1 _prop } + \prop_clear_new:c { l_coffin_poles_ \int_value:w #1 _prop } + \coffin_update_corners:N #1 + \coffin_update_poles:N #1 + } \NewDocumentCommand \SetHorizontalCoffin { m +m } { \hcoffin_set:Nn #1 {#2} } \NewDocumentCommand \SetVerticalCoffin { m m +m } |