diff options
author | Karl Berry <karl@freefriends.org> | 2011-01-26 23:20:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-01-26 23:20:47 +0000 |
commit | b47db3c140fe93b5deb16f3a7ad16be2134e81e7 (patch) | |
tree | af12a714ae6c3d680fea8c145084073e6ed062e5 /Master/texmf-dist/tex/latex | |
parent | 66c848bc93dc9fa2b85a8ad329ea12e2e0d0524b (diff) |
xpackages 2138 (26jan11)
git-svn-id: svn://tug.org/texlive/trunk@21184 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xpackages/xhead/xtextblock.sty | 101 |
2 files changed, 105 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty index f2c04ee2d9c..a6c0132ec16 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty @@ -57,7 +57,7 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: xparse.dtx 2125 2011-01-09 15:24:39Z joseph $ +\GetIdInfo$Id: xparse.dtx 2136 2011-01-23 12:15:49Z joseph $ {Generic document command parser} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} @@ -452,7 +452,7 @@ } #5 \xparse_grab_arg_aux_ii:w ##1 #2 { \tl_if_in:nnTF {##1} {#1} { - \xparse_grab_D_nested:NNNnn #1 #2 {##1} {#4} #5 + \xparse_grab_D_nested:NNnnN #1 #2 {##1} {#4} #5 }{ \xparse_add_arg:n {##1} #4 \l_xparse_args_tl @@ -468,7 +468,7 @@ \tl_new:N \_l_xparse_nesting_a_tl \tl_new:N \_l_xparse_nesting_b_tl \quark_new:N \q_xparse -\cs_new_protected:Npn \xparse_grab_D_nested:NNNnn #1#2#3#4#5 { +\cs_new_protected:Npn \xparse_grab_D_nested:NNnnN #1#2#3#4#5 { \tl_clear:N \_l_xparse_nesting_a_tl \tl_clear:N \_l_xparse_nesting_b_tl #5 \xparse_grab_arg:w ##1 #1 ##2 \q_xparse ##3 #2 @@ -478,6 +478,7 @@ \tl_if_in:nnTF {##2} {#1} { \xparse_grab_arg:w ##2 \q_xparse } { + \tl_put_right:Nn \_l_xparse_nesting_a_tl {##2} \tl_if_in:NnTF \_l_xparse_nesting_b_tl {#1} { \tl_set_eq:NN \l_xparse_tmp_tl \_l_xparse_nesting_b_tl @@ -486,7 +487,6 @@ \l_xparse_tmp_tl \q_xparse } { - \tl_put_right:Nn \_l_xparse_nesting_a_tl {##2} \tl_put_right:NV \_l_xparse_nesting_a_tl \_l_xparse_nesting_b_tl \xparse_add_arg:V \_l_xparse_nesting_a_tl diff --git a/Master/texmf-dist/tex/latex/xpackages/xhead/xtextblock.sty b/Master/texmf-dist/tex/latex/xpackages/xhead/xtextblock.sty new file mode 100644 index 00000000000..3f1907a5b5d --- /dev/null +++ b/Master/texmf-dist/tex/latex/xpackages/xhead/xtextblock.sty @@ -0,0 +1,101 @@ +% tmp file during development + +\DeclareObjectType {textblock-1} {1} +\DeclareObjectType {textblock-2} {2} +\DeclareObjectType {textblock-3} {3} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\DeclareTemplateInterface {textblock-1} {std} {1} + { + font : tokenlist = , + parshape : instance {parshape} = plain , + justification : instance {justification} = default , + } + + +\tl_new:N \l_tblock_font_tl + +\cs_new:Npn \tblock_parshape: {} +\cs_new:Npn \tblock_justification: {} + + +\DeclareTemplateCode {textblock-1} {std} {1} + { + font = \l_tblock_font_tl , + parshape = \tblock_parshape: , + justification = \tblock_justification: , + } + { + \AssignTemplateKeys + \group_begin: + \l_tblock_font_tl + \tblock_parshape: + \tblock_justification: + #1 + \@@par + \group_end: +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\dim_new:N \l_tblock_h_dim +\tl_new:N \l_tblock_font_ii_tl + +\DeclareTemplateInterface {textblock-2} {hangfrom} {2} + { + font-1 : tokenlist = , + font-2 : tokenlist = , + h-sep : length = 1em , + parshape : instance {parshape} = plain , + justification : instance {justification} = default , + } + + +\DeclareTemplateCode {textblock-2} {hangfrom} {2} + { + + font-1 = \l_tblock_font_tl , + font-2 = \l_tblock_font_ii_tl , + h-sep = \l_tblock_h_dim , + parshape = \tblock_parshape: , + justification = \tblock_justification: , + } + { + \AssignTemplateKeys + \group_begin: + \l_tblock_font_tl + + \hbox_set:Nn \l_tmpa_box + { \tl_if_empty:oF {#1} {#1 \hskip \l_tblock_h_dim } } + + \UseInstance{measure}{fullwidth} + { \box_wd:N \l_tmpa_box } + + \l_tblock_font_ii_tl + \tblock_parshape: + \tblock_justification: + + \leavevmode + \box_set_to_last:N \l_tmpb_box + \hskip -\leftskip + \hbox_overlap_left:n{ \box_use:N \l_tmpa_box } + \hskip \leftskip + \box_use:N \l_tmpb_box + #2 + \@@par + \group_end: +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%555 + + +\DeclareTemplateInterface {textblock-3} {std} {3} + { + } + + + |