summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-07 22:41:58 +0000
committerKarl Berry <karl@freefriends.org>2012-02-07 22:41:58 +0000
commit7dd80542eb368ed18c1298c24250b409350a2059 (patch)
treeb2e1a4782f380070ebda613cbdbd81bf6da4bd7e /Master/texmf-dist/tex/latex/l3experimental
parent31c0645d94c7626cab0b433b855f6c2a6893f133 (diff)
l3experimental 3331 (7feb12)
git-svn-id: svn://tug.org/texlive/trunk@25328 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty224
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty8
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty28
3 files changed, 248 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
new file mode 100644
index 00000000000..4de96fa88a3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
@@ -0,0 +1,224 @@
+%%
+%% This is file `l3sort.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% l3sort.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 l3sort.dtx (C) Copyright 2012 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: l3sort.dtx 3295 2012-02-02 09:30:14Z joseph $
+ {L3 Experimental sorting functions}
+\ProvidesExplPackage
+ {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
+\package_check_loaded_expl:
+\int_const:Nn \c_sort_max_length_int
+ { \luatex_if_engine:TF { 49152 } { 24576 } }
+\int_new:N \l_sort_length_int
+\int_new:N \l_sort_block_int
+\int_new:N \l_sort_begin_int
+\int_new:N \l_sort_end_int
+\int_new:N \l_sort_A_int
+\int_new:N \l_sort_B_int
+\int_new:N \l_sort_C_int
+\cs_new_protected:Npn \sort_aux:NNnNn #1#2#3#4#5
+ {
+ \group_begin:
+ \l_sort_length_int \c_zero
+ #2 #4
+ {
+ \if_num:w \l_sort_length_int = \c_sort_max_length_int
+ \sort_too_long_error:Nw #4
+ \fi:
+ \tex_toks:D \l_sort_length_int {##1}
+ \tex_advance:D \l_sort_length_int \c_one
+ }
+ \cs_set:Npn \sort_compare:nn ##1 ##2 { #5 }
+ \l_sort_block_int \c_one
+ \sort_level:
+ \use:x
+ {
+ \group_end:
+ #1 \exp_not:N #4 {#3}
+ }
+ }
+\cs_new_protected_nopar:Npn \seq_sort:Nn
+ {
+ \sort_aux:NNnNn \tl_set:Nn
+ \seq_map_inline:Nn
+ { \sort_toks:NNw \exp_not:N \seq_item:n 0 ; }
+ }
+\cs_new_protected_nopar:Npn \seq_gsort:Nn
+ {
+ \sort_aux:NNnNn \tl_gset:Nn
+ \seq_map_inline:Nn
+ { \sort_toks:NNw \exp_not:N \seq_item:n 0 ; }
+ }
+\cs_new_protected_nopar:Npn \tl_sort:Nn
+ {
+ \sort_aux:NNnNn \tl_set:Nn
+ \tl_map_inline:Nn
+ { \sort_toks:NNw \prg_do_nothing: \prg_do_nothing: 0 ; }
+ }
+\cs_new_protected_nopar:Npn \tl_gsort:Nn
+ {
+ \sort_aux:NNnNn \tl_gset:Nn
+ \tl_map_inline:Nn
+ { \sort_toks:NNw \prg_do_nothing: \prg_do_nothing: 0 ; }
+ }
+\cs_new_protected_nopar:Npn \clist_sort:Nn
+ { \clist_sort_aux:NNn \tl_set:Nn }
+\cs_new_protected_nopar:Npn \clist_gsort:Nn
+ { \clist_sort_aux:NNn \tl_gset:Nn }
+\cs_new_protected:Npn \clist_sort_aux:NNn #1#2#3
+ {
+ \clist_if_empty:NF #2
+ {
+ \sort_aux:NNnNn #1
+ \clist_map_inline:Nn
+ {
+ \exp_last_unbraced:Nf \use_none:n
+ { \sort_toks:NNw \exp_args:No \clist_wrap_item:n 0 ; }
+ }
+ #2 {#3}
+ }
+ }
+\cs_new:Npn \sort_toks:NNw #1#2#3 ;
+ {
+ \if_num:w #3 < \l_sort_length_int
+ #1 #2 { \tex_the:D \tex_toks:D #3 }
+ \exp_after:wN \sort_toks:NNw \exp_after:wN #1 \exp_after:wN #2
+ \int_use:N \int_eval:w #3 + \c_one \exp_after:wN ;
+ \fi:
+ }
+\cs_new_protected_nopar:Npn \sort_level:
+ {
+ \if_num:w \l_sort_block_int < \l_sort_length_int
+ \l_sort_end_int \c_zero
+ \sort_merge_blocks:
+ \tex_multiply:D \l_sort_block_int \c_two
+ \exp_after:wN \sort_level:
+ \fi:
+ }
+\cs_new_protected_nopar:Npn \sort_merge_blocks:
+ {
+ \l_sort_begin_int \l_sort_end_int
+ \tex_advance:D \l_sort_end_int \l_sort_block_int
+ \if_num:w \int_eval:w \l_sort_end_int < \l_sort_length_int
+ \l_sort_A_int \l_sort_end_int
+ \tex_advance:D \l_sort_end_int \l_sort_block_int
+ \if_num:w \l_sort_end_int > \l_sort_length_int
+ \l_sort_end_int \l_sort_length_int
+ \fi:
+ \l_sort_B_int \l_sort_A_int
+ \l_sort_C_int \l_sort_length_int
+ \sort_copy_block:
+ \tex_advance:D \l_sort_A_int \c_minus_one
+ \tex_advance:D \l_sort_B_int \c_minus_one
+ \tex_advance:D \l_sort_C_int \c_minus_one
+ \sort_merge_blocks_aux:
+ \exp_after:wN \sort_merge_blocks:
+ \fi:
+ }
+\cs_new_protected_nopar:Npn \sort_copy_block:
+ {
+ \tex_toks:D \l_sort_C_int \tex_toks:D \l_sort_B_int
+ \tex_advance:D \l_sort_C_int \c_one
+ \tex_advance:D \l_sort_B_int \c_one
+ \if_num:w \l_sort_B_int = \l_sort_end_int
+ \use_i:nn
+ \fi:
+ \sort_copy_block:
+ }
+\cs_new_protected_nopar:Npn \sort_merge_blocks_aux:
+ {
+ \exp_after:wN \sort_compare:nn \exp_after:wN
+ { \tex_the:D \tex_toks:D \exp_after:wN \l_sort_A_int \exp_after:wN }
+ \exp_after:wN { \tex_the:D \tex_toks:D \l_sort_C_int }
+ }
+\cs_new_protected_nopar:Npn \sort_ordered:
+ {
+ \tex_toks:D \l_sort_B_int \tex_toks:D \l_sort_C_int
+ \tex_advance:D \l_sort_B_int \c_minus_one
+ \tex_advance:D \l_sort_C_int \c_minus_one
+ \if_num:w \l_sort_C_int < \l_sort_length_int
+ \use_i:nn
+ \fi:
+ \sort_merge_blocks_aux:
+ }
+\cs_new_protected_nopar:Npn \sort_reversed:
+ {
+ \tex_toks:D \l_sort_B_int \tex_toks:D \l_sort_A_int
+ \tex_advance:D \l_sort_B_int \c_minus_one
+ \tex_advance:D \l_sort_A_int \c_minus_one
+ \if_num:w \l_sort_A_int < \l_sort_begin_int
+ \sort_merge_blocks_end: \use_i:nn
+ \fi:
+ \sort_merge_blocks_aux:
+ }
+\cs_new_protected_nopar:Npn \sort_merge_blocks_end:
+ {
+ \tex_toks:D \l_sort_B_int \tex_toks:D \l_sort_C_int
+ \tex_advance:D \l_sort_B_int \c_minus_one
+ \tex_advance:D \l_sort_C_int \c_minus_one
+ \if_num:w \l_sort_B_int < \l_sort_begin_int
+ \use_i:nn
+ \fi:
+ \sort_merge_blocks_end:
+ }
+\cs_new_protected:Npn \sort_too_long_error:Nw #1 \fi:
+ {
+ \fi:
+ \msg_kernel_error:nnx { sort } { too-large } { \token_to_str:N #1 }
+ \prg_map_break:
+ }
+\msg_kernel_new:nnnn { sort } { too-large }
+ { The~list~#1~is~too~long~to~be~sorted~by~TeX. }
+ {
+ TeX~has~\int_use:N \c_max_register_int \ registers~available:~
+ this~only~allows~to~sorts~with~up~to~\int_use:N \c_sort_max_length_int
+ \ items.~All~extra~items~will~be~ignored.
+ }
+%%
+%%
+%% End of file `l3sort.sty'.
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
index f88c8fa4e15..2b99a8eb661 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3regex.dtx 3259 2012-01-29 20:50:48Z bruno $
+\GetIdInfo$Id: l3regex.dtx 3326 2012-02-07 00:39:44Z bruno $
{L3 Experimental Regular Expressions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -601,6 +601,7 @@
\int_set_eq:NN \l_regex_catcodes_default_int \c_regex_catcodes_all_int
\int_set_eq:NN \l_regex_catcodes_int \l_regex_catcodes_default_int
\int_set_eq:NN \l_regex_capturing_group_int \c_zero
+ \seq_clear:N \l_regex_capturing_group_seq
\tl_clear:N \l_regex_tests_tl
\bool_set_true:N \l_regex_tests_bool
\int_zero:N \l_regex_max_state_int
@@ -1760,7 +1761,7 @@
\int_set_eq:NN \l_regex_step_int \c_minus_one
\prg_stepwise_inline:nnnn
\c_zero \c_one { \l_regex_max_state_int - \c_one }
- { \tex_dimen:D ##1 \l_regex_step_int sp \scan_stop: }
+ { \tex_dimen:D ##1 \l_regex_step_int sp }
\int_set:Nn \l_regex_start_index_int
{ \l_regex_min_index_int - \c_one }
\int_set_eq:NN \l_regex_current_index_int \l_regex_min_index_int
@@ -2377,9 +2378,6 @@
\group_end:
\fi:
}
-\cs_new_protected:Npn \regex_replace_once_aux:w #1;
- {
- }
\cs_new_protected:Npn \regex_replace_all_aux:NnnN #1#2#3#4
{
\group_begin:
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
index 590062f47ae..cb77ed14d8f 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
@@ -48,7 +48,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{xparse}
-\GetIdInfo$Id: l3galley.dtx 3253 2012-01-28 14:59:55Z joseph $
+\GetIdInfo$Id: l3galley.dtx 3325 2012-02-06 22:07:00Z joseph $
{L3 Experimental galley code}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -113,8 +113,6 @@
\cs_new_protected_nopar:Npn \galley_initialise_settings:
{
\dim_set_eq:NN \l_galley_text_width_dim \l_galley_width_dim
- \dim_zero:N \l_galley_left_margin_dim
- \dim_zero:N \l_galley_right_margin_dim
\dim_zero:N \l_galley_total_left_margin_dim
\dim_zero:N \l_galley_total_right_margin_dim
}
@@ -776,6 +774,22 @@
{ \int_use:N \etex_interlinepenalties:D \etex_interlinepenalties:D \c_zero }
\msg_kernel_new:nnn { galley } { no-line-to-end }
{ There's~no~line~here~to~end. }
+\RenewDocumentCommand \clearpage { }
+ {
+ \mode_if_vertical:T
+ {
+ \int_compare:nNnT \@dbltopnum = \c_minus_one
+ {
+ \dim_compare:nNnT \tex_pagetotal:D < \topskip
+ { \tex_hbox:D { } }
+ }
+ }
+ \newpage
+ \tl_gput_right:Nn \g_galley_whatsit_next_tl
+ { \iow_shipout:Nx \c_minus_one { } }
+ \tex_vbox:D { }
+ \galley_set_user_penalty:n { -\@Mi }
+ }
\RenewDocumentCommand \nobreak { }
{ \bool_gset_true:N \g_galley_no_break_next_bool }
\RenewDocumentCommand \noindent { }
@@ -783,11 +797,11 @@
\tex_noindent:D
\bool_gset_false:N \g_galley_omit_next_indent_bool
}
-\RenewDocumentCommand \vspace { m }
+\RenewDocumentCommand \vspace { s m }
{
- \@ifstar
- { \galley_set_user_vspace:n {#1} }
- { \galley_set_user_vspace:n {#1} }
+ \IfBooleanTF #1
+ { \galley_set_user_vspace:n {#2} }
+ { \galley_set_user_vspace:n {#2} }
}
\RenewDocumentCommand \\ { s O { 0 pt } }
{ \galley_break_line:Nn #1 {#2} }