summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/expl3/l3box.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3box.sty')
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3box.sty66
1 files changed, 38 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3box.sty b/Master/texmf-dist/tex/latex/expl3/l3box.sty
index 7f790646251..bada61a0001 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3box.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3box.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3box.dtx Copyright (C) 2005-2009 LaTeX3 project
+%% File: l3box.dtx Copyright (C) 2005-2010 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
@@ -48,16 +48,24 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3box.dtx 1375 2009-06-01 12:28:52Z joseph $
+\GetIdInfo$Id: l3box.dtx 1867 2010-03-23 13:03:12Z will $
{L3 Experimental Box module}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
\package_check_loaded_expl:
-\cs_new:Npn \box_new:N #1 {
+\cs_new_protected:Npn \box_new:N #1 {
\chk_if_free_cs:N #1
\newbox #1
}
+\cs_new_protected:Npn \box_new_local:N #1 {
+ \chk_if_free_cs:N #1
+ \int_compare:nNnTF
+ \tex_currentgrouplevel:D = 0
+ \newbox \locbox
+ #1
+}
\cs_generate_variant:Nn \box_new:N {c}
+\cs_generate_variant:Nn \box_new_local:N {c}
\cs_new_eq:NN \if_hbox:N \tex_ifhbox:D
\cs_new_eq:NN \if_vbox:N \tex_ifvbox:D
\cs_new_eq:NN \if_box_empty:N \tex_ifvoid:D
@@ -82,22 +90,22 @@
\cs_generate_variant:Nn \box_if_empty:NTF {c}
\cs_generate_variant:Nn \box_if_empty:NT {c}
\cs_generate_variant:Nn \box_if_empty:NF {c}
-\cs_new_nopar:Npn \box_set_eq:NN #1#2 {\tex_setbox:D #1 \tex_box:D #2}
+\cs_new_protected_nopar:Npn \box_set_eq:NN #1#2 {\tex_setbox:D #1 \tex_box:D #2}
\cs_generate_variant:Nn \box_set_eq:NN {cN,Nc,cc}
-\cs_new_nopar:Npn \box_gset_eq:NN {\pref_global:D\box_set_eq:NN}
+\cs_new_protected_nopar:Npn \box_gset_eq:NN {\pref_global:D\box_set_eq:NN}
\cs_generate_variant:Nn \box_gset_eq:NN {cN,Nc,cc}
\cs_new_eq:NN \l_last_box \tex_lastbox:D
-\cs_new_nopar:Npn \box_set_to_last:N #1{\tex_setbox:D#1\l_last_box}
+\cs_new_protected_nopar:Npn \box_set_to_last:N #1{\tex_setbox:D#1\l_last_box}
\cs_generate_variant:Nn \box_set_to_last:N {c}
-\cs_new_nopar:Npn \box_gset_to_last:N {\pref_global:D \box_set_to_last:N}
+\cs_new_protected_nopar:Npn \box_gset_to_last:N {\pref_global:D \box_set_to_last:N}
\cs_generate_variant:Nn \box_gset_to_last:N {c}
\cs_new:Npn \box_move_left:nn #1#2{\tex_moveleft:D\dim_eval:n{#1}{#2}}
\cs_new:Npn \box_move_right:nn #1#2{\tex_moveright:D\dim_eval:n{#1}{#2}}
\cs_new:Npn \box_move_up:nn #1#2{\tex_raise:D\dim_eval:n{#1}{#2}}
\cs_new:Npn \box_move_down:nn #1#2{\tex_lower:D\dim_eval:n{#1}{#2}}
-\cs_new_nopar:Npn \box_clear:N #1{\box_set_eq:NN #1 \c_empty_box }
+\cs_new_protected_nopar:Npn \box_clear:N #1{\box_set_eq:NN #1 \c_empty_box }
\cs_generate_variant:Nn \box_clear:N {c}
-\cs_new_nopar:Npn \box_gclear:N {\pref_global:D\box_clear:N}
+\cs_new_protected_nopar:Npn \box_gclear:N {\pref_global:D\box_clear:N}
\cs_generate_variant:Nn \box_gclear:N {c}
\cs_new_eq:NN \box_ht:N \tex_ht:D
\cs_new_eq:NN \box_dp:N \tex_dp:D
@@ -114,55 +122,57 @@
\cs_set_eq:NN \c_empty_box \voidb@x
\cs_new_eq:NN \l_tmpa_box \@tempboxa
\box_new:N \l_tmpb_box
-\cs_new_nopar:Npn \vbox:n {\tex_vbox:D \scan_stop:}
-\cs_new:Npn \vbox_set:Nn #1#2 {\tex_setbox:D #1 \tex_vbox:D {#2}}
+\cs_new_protected_nopar:Npn \vbox:n {\tex_vbox:D \scan_stop:}
+\cs_new_protected:Npn \vbox_set:Nn #1#2 {\tex_setbox:D #1 \tex_vbox:D {#2}}
\cs_generate_variant:Nn \vbox_set:Nn {cn}
-\cs_new_nopar:Npn \vbox_gset:Nn {\pref_global:D \vbox_set:Nn}
+\cs_new_protected_nopar:Npn \vbox_gset:Nn {\pref_global:D \vbox_set:Nn}
\cs_generate_variant:Nn \vbox_gset:Nn {cn}
-\cs_new:Npn \vbox_set_to_ht:Nnn #1#2#3 {
+\cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3 {
\tex_setbox:D #1 \tex_vbox:D to #2 {#3}
}
\cs_generate_variant:Nn \vbox_set_to_ht:Nnn {cnn}
-\cs_new_nopar:Npn \vbox_gset_to_ht:Nnn { \pref_global:D \vbox_set_to_ht:Nnn }
+\cs_new_protected_nopar:Npn \vbox_gset_to_ht:Nnn { \pref_global:D \vbox_set_to_ht:Nnn }
\cs_generate_variant:Nn \vbox_gset_to_ht:Nnn {cnn,ccn}
-\cs_new_nopar:Npn \vbox_set_inline_begin:N #1 {
+\cs_new_protected_nopar:Npn \vbox_set_inline_begin:N #1 {
\tex_setbox:D #1 \tex_vbox:D \c_group_begin_token }
\cs_new_eq:NN \vbox_set_inline_end: \c_group_end_token
-\cs_new_nopar:Npn \vbox_gset_inline_begin:N {
+\cs_new_protected_nopar:Npn \vbox_gset_inline_begin:N {
\pref_global:D \vbox_set_inline_begin:N }
\cs_new_eq:NN \vbox_gset_inline_end: \c_group_end_token
-\cs_new:Npn \vbox_to_ht:nn #1#2{\tex_vbox:D to \dim_eval:n{#1}{#2}}
-\cs_new:Npn \vbox_to_zero:n #1 {\tex_vbox:D to \c_zero_dim {#1}}
-\cs_new_nopar:Npn \vbox_set_split_to_ht:NNn #1#2#3{
+\cs_new_protected:Npn \vbox_to_ht:nn #1#2{\tex_vbox:D to \dim_eval:n{#1}{#2}}
+\cs_new_protected:Npn \vbox_to_zero:n #1 {\tex_vbox:D to \c_zero_dim {#1}}
+\cs_new_protected_nopar:Npn \vbox_set_split_to_ht:NNn #1#2#3{
\tex_setbox:D #1 \tex_vsplit:D #2 to #3
}
\cs_new_eq:NN \vbox_unpack:N \tex_unvcopy:D
\cs_generate_variant:Nn \vbox_unpack:N {c}
\cs_new_eq:NN \vbox_unpack_clear:N \tex_unvbox:D
\cs_generate_variant:Nn \vbox_unpack_clear:N {c}
-\cs_new_nopar:Npn \hbox:n {\tex_hbox:D \scan_stop:}
-\cs_new:Npn \hbox_set:Nn #1#2 {\tex_setbox:D #1 \tex_hbox:D {#2}}
+\cs_new_protected_nopar:Npn \hbox:n {\tex_hbox:D \scan_stop:}
+\cs_new_protected:Npn \hbox_set:Nn #1#2 {\tex_setbox:D #1 \tex_hbox:D {#2}}
\cs_generate_variant:Nn \hbox_set:Nn {cn}
-\cs_new_nopar:Npn \hbox_gset:Nn {\pref_global:D \hbox_set:Nn}
+\cs_new_protected_nopar:Npn \hbox_gset:Nn {\pref_global:D \hbox_set:Nn}
\cs_generate_variant:Nn \hbox_gset:Nn {cn}
-\cs_new:Npn \hbox_set_to_wd:Nnn #1#2#3 {
+\cs_new_protected:Npn \hbox_set_to_wd:Nnn #1#2#3 {
\tex_setbox:D #1 \tex_hbox:D to \dim_eval:n{#2} {#3}
}
\cs_generate_variant:Nn \hbox_set_to_wd:Nnn {cnn}
-\cs_new_nopar:Npn \hbox_gset_to_wd:Nnn {\pref_global:D \hbox_set_to_wd:Nnn }
+\cs_new_protected_nopar:Npn \hbox_gset_to_wd:Nnn {\pref_global:D \hbox_set_to_wd:Nnn }
\cs_generate_variant:Nn \hbox_gset_to_wd:Nnn {cnn}
-\cs_new_nopar:Npn \hbox_set_inline_begin:N #1 {
+\cs_new_protected_nopar:Npn \hbox_set_inline_begin:N #1 {
\tex_setbox:D #1 \tex_hbox:D \c_group_begin_token
}
\cs_generate_variant:Nn \hbox_set_inline_begin:N {c}
\cs_new_eq:NN \hbox_set_inline_end: \c_group_end_token
-\cs_new_nopar:Npn \hbox_gset_inline_begin:N {
+\cs_new_protected_nopar:Npn \hbox_gset_inline_begin:N {
\pref_global:D \hbox_set_inline_begin:N
}
\cs_generate_variant:Nn \hbox_gset_inline_begin:N {c}
\cs_new_eq:NN \hbox_gset_inline_end: \c_group_end_token
-\cs_new:Npn \hbox_to_wd:nn #1#2 {\tex_hbox:D to #1 {#2}}
-\cs_new:Npn \hbox_to_zero:n #1 {\tex_hbox:D to \c_zero_skip {#1}}
+\cs_new_protected:Npn \hbox_to_wd:nn #1#2 {\tex_hbox:D to #1 {#2}}
+\cs_new_protected:Npn \hbox_to_zero:n #1 {\tex_hbox:D to \c_zero_skip {#1}}
+\cs_new_protected:Npn \hbox_overlap_left:n #1 {\hbox_to_zero:n {\tex_hss:D #1}}
+\cs_new_protected:Npn \hbox_overlap_right:n #1 {\hbox_to_zero:n {#1 \tex_hss:D}}
\cs_new_eq:NN \hbox_unpack:N \tex_unhcopy:D
\cs_generate_variant:Nn \hbox_unpack:N {c}
\cs_new_eq:NN \hbox_unpack_clear:N \tex_unhbox:D