summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty26
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty28
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty28
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty52
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty64
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty110
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty509
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty34
8 files changed, 485 insertions, 366 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
index a719b42e7a4..21c29315228 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
@@ -47,7 +47,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{expl3}
-\GetIdInfo$Id: l3sort.dtx 3991 2012-07-16 19:00:35Z joseph $
+\GetIdInfo$Id: l3sort.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Experimental sorting functions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -60,32 +60,32 @@
\int_new:N \l__sort_A_int
\int_new:N \l__sort_B_int
\int_new:N \l__sort_C_int
-\cs_new:Npn \tl_sort:nN #1#2 { \__sort_quick_i:nNn {#1} #2 { } }
-\cs_new:Npn \__sort_quick_i:nNn #1#2
+\cs_new:Npn \tl_sort:nN #1#2 { \__sort_quick:nNn {#1} #2 { } }
+\cs_new:Npn \__sort_quick:nNn #1#2
{
- \exp_after:wN \__sort_quick_ii:wn
+ \exp_after:wN \__sort_quick:wn
\use_none:n #1 \__prg_break_point:
- \__sort_quick_iii:nnNnn { } { } #2
+ \__sort_quick:nnNnn { } { } #2
#1
{ \__prg_break_point: }
\__prg_break_point:
}
-\cs_new:Npn \__sort_quick_ii:wn #1 \__prg_break_point: #2 {#2}
-\cs_new:Npn \__sort_quick_iii:nnNnn #1#2#3#4#5
+\cs_new:Npn \__sort_quick:wn #1 \__prg_break_point: #2 {#2}
+\cs_new:Npn \__sort_quick:nnNnn #1#2#3#4#5
{
\__prg_break: #5
- \__sort_quick_iv:nnNnwn {#1} {#2}
+ \__sort_quick:nnNnwn {#1} {#2}
\__prg_break_point:
#3 {#4} {#5}
- { \__sort_quick_iii:nnNnn {#1} { #2 {#5} } }
- { \__sort_quick_iii:nnNnn { #1 {#5} } {#2} }
+ { \__sort_quick:nnNnn {#1} { #2 {#5} } }
+ { \__sort_quick:nnNnn { #1 {#5} } {#2} }
#3 {#4}
}
-\cs_new:Npn \__sort_quick_iv:nnNnwn
+\cs_new:Npn \__sort_quick:nnNnwn
#1#2 \__prg_break_point: #3#4 #5 \__prg_break_point: #6
{
- \__sort_quick_i:nNn {#2} #3
- { \__sort_quick_i:nNn {#1} #3 {#6} {#4} }
+ \__sort_quick:nNn {#2} #3
+ { \__sort_quick:nNn {#1} #3 {#6} {#4} }
}
\cs_new_protected:Npn \__sort_main:NNNnNn #1#2#3#4#5#6
{
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty
index 156d2c1393f..ccb695c0f0e 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3regex.dtx 4219 2012-09-09 13:28:51Z bruno $
+\GetIdInfo$Id: l3regex.dtx 4341 2012-11-27 08:39:42Z bruno $
{L3 Experimental regular expressions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -366,22 +366,22 @@
\if_charcode:w \c_space_token #1
\exp_after:wN \__regex_escape_x_test:N
\else:
- \exp_after:wN \__regex_escape_x_test_ii:N
+ \exp_after:wN \__regex_escape_x_test_two:N
\exp_after:wN #1
\fi:
}
}
-\cs_new:Npn \__regex_escape_x_test_ii:N #1
+\cs_new:Npn \__regex_escape_x_test_two:N #1
{
\if_charcode:w \c_lbrace_str #1
\exp_after:wN \__regex_escape_x_loop:N
\else:
\__str_hexadecimal_use:NTF #1
- { \exp_after:wN \__regex_escape_x_ii:N }
+ { \exp_after:wN \__regex_escape_x:N }
{ ; \exp_after:wN \__regex_escape_loop:N \exp_after:wN #1 }
\fi:
}
-\cs_new:Npn \__regex_escape_x_ii:N #1
+\cs_new:Npn \__regex_escape_x:N #1
{
\str_if_eq_x:nnTF {#1} { break } { ; }
{
@@ -701,10 +701,10 @@
\cs_new_protected:cpn { __regex_compile_quantifier_ \c_lbrace_str :w }
{
\__regex_get_digits:NTFw \l__regex_internal_a_int
- { \__regex_compile_quantifier_braced_i:w }
+ { \__regex_compile_quantifier_braced_auxi:w }
{ \__regex_compile_quantifier_abort:xNN { \c_lbrace_str } }
}
-\cs_new_protected:Npn \__regex_compile_quantifier_braced_i:w #1#2
+\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxi:w #1#2
{
\str_case_x:nnn { #1 #2 }
{
@@ -716,8 +716,8 @@
{ \__regex_compile_special:N , }
{
\__regex_get_digits:NTFw \l__regex_internal_b_int
- { \__regex_compile_quantifier_braced_iii:w }
- { \__regex_compile_quantifier_braced_ii:w }
+ { \__regex_compile_quantifier_braced_auxiii:w }
+ { \__regex_compile_quantifier_braced_auxii:w }
}
}
{
@@ -726,7 +726,7 @@
#1 #2
}
}
-\cs_new_protected:Npn \__regex_compile_quantifier_braced_ii:w #1#2
+\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxii:w #1#2
{
\str_if_eq_x:nnTF
{ #1 #2 } { \__regex_compile_special:N \c_rbrace_str }
@@ -740,7 +740,7 @@
#1 #2
}
}
-\cs_new_protected:Npn \__regex_compile_quantifier_braced_iii:w #1#2
+\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxiii:w #1#2
{
\str_if_eq_x:nnTF
{ #1 #2 } { \__regex_compile_special:N \c_rbrace_str }
@@ -957,14 +957,14 @@
\str_if_eq:nnTF { #3 #4 } { \__regex_compile_special:N ^ }
{
\__tl_build_one:n { #2 { \if_false: } \fi: }
- \__regex_compile_class_ii:NN
+ \__regex_compile_class:NN
}
{
\__tl_build_one:n { #1 { \if_false: } \fi: }
- \__regex_compile_class_ii:NN #3 #4
+ \__regex_compile_class:NN #3 #4
}
}
-\cs_new_protected:Npn \__regex_compile_class_ii:NN #1#2
+\cs_new_protected:Npn \__regex_compile_class:NN #1#2
{
\token_if_eq_charcode:NNTF #2 ]
{ \__regex_compile_raw:N #2 }
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
index eba57ade74e..5273399d7be 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 4219 2012-09-09 13:28:51Z bruno $
+\GetIdInfo$Id: l3regex.dtx 4341 2012-11-27 08:39:42Z bruno $
{L3 Experimental regular expressions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -364,22 +364,22 @@
\if_charcode:w \c_space_token #1
\exp_after:wN \__regex_escape_x_test:N
\else:
- \exp_after:wN \__regex_escape_x_test_ii:N
+ \exp_after:wN \__regex_escape_x_test_two:N
\exp_after:wN #1
\fi:
}
}
-\cs_new:Npn \__regex_escape_x_test_ii:N #1
+\cs_new:Npn \__regex_escape_x_test_two:N #1
{
\if_charcode:w \c_lbrace_str #1
\exp_after:wN \__regex_escape_x_loop:N
\else:
\__str_hexadecimal_use:NTF #1
- { \exp_after:wN \__regex_escape_x_ii:N }
+ { \exp_after:wN \__regex_escape_x:N }
{ ; \exp_after:wN \__regex_escape_loop:N \exp_after:wN #1 }
\fi:
}
-\cs_new:Npn \__regex_escape_x_ii:N #1
+\cs_new:Npn \__regex_escape_x:N #1
{
\str_if_eq_x:nnTF {#1} { break } { ; }
{
@@ -699,10 +699,10 @@
\cs_new_protected:cpn { __regex_compile_quantifier_ \c_lbrace_str :w }
{
\__regex_get_digits:NTFw \l__regex_internal_a_int
- { \__regex_compile_quantifier_braced_i:w }
+ { \__regex_compile_quantifier_braced_auxi:w }
{ \__regex_compile_quantifier_abort:xNN { \c_lbrace_str } }
}
-\cs_new_protected:Npn \__regex_compile_quantifier_braced_i:w #1#2
+\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxi:w #1#2
{
\str_case_x:nnn { #1 #2 }
{
@@ -714,8 +714,8 @@
{ \__regex_compile_special:N , }
{
\__regex_get_digits:NTFw \l__regex_internal_b_int
- { \__regex_compile_quantifier_braced_iii:w }
- { \__regex_compile_quantifier_braced_ii:w }
+ { \__regex_compile_quantifier_braced_auxiii:w }
+ { \__regex_compile_quantifier_braced_auxii:w }
}
}
{
@@ -724,7 +724,7 @@
#1 #2
}
}
-\cs_new_protected:Npn \__regex_compile_quantifier_braced_ii:w #1#2
+\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxii:w #1#2
{
\str_if_eq_x:nnTF
{ #1 #2 } { \__regex_compile_special:N \c_rbrace_str }
@@ -738,7 +738,7 @@
#1 #2
}
}
-\cs_new_protected:Npn \__regex_compile_quantifier_braced_iii:w #1#2
+\cs_new_protected:Npn \__regex_compile_quantifier_braced_auxiii:w #1#2
{
\str_if_eq_x:nnTF
{ #1 #2 } { \__regex_compile_special:N \c_rbrace_str }
@@ -955,14 +955,14 @@
\str_if_eq:nnTF { #3 #4 } { \__regex_compile_special:N ^ }
{
\__tl_build_one:n { #2 { \if_false: } \fi: }
- \__regex_compile_class_ii:NN
+ \__regex_compile_class:NN
}
{
\__tl_build_one:n { #1 { \if_false: } \fi: }
- \__regex_compile_class_ii:NN #3 #4
+ \__regex_compile_class:NN #3 #4
}
}
-\cs_new_protected:Npn \__regex_compile_class_ii:NN #1#2
+\cs_new_protected:Npn \__regex_compile_class:NN #1#2
{
\token_if_eq_charcode:NNTF #2 ]
{ \__regex_compile_raw:N #2 }
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
index 902d147cd3f..57e71f04988 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
@@ -63,51 +63,51 @@
\cs_generate_variant:Nn \__str_format_put:nw { o , f }
\cs_new:Npn \__str_format_parse:n #1
{
- \exp_last_unbraced:Nf \__str_format_parse_i:NN
+ \exp_last_unbraced:Nf \__str_format_parse_auxi:NN
\__str_to_other:n {#1} \s__stop \s__stop {#1}
}
-\cs_new:Npx \__str_format_parse_i:NN #1#2
+\cs_new:Npx \__str_format_parse_auxi:NN #1#2
{
\exp_not:N \__str_if_contains_char:nNTF { < > = ^ } #2
- { \exp_not:N \__str_format_parse_iii:nN { #1 #2 } }
+ { \exp_not:N \__str_format_parse_auxiii:nN { #1 #2 } }
{
- \exp_not:N \__str_format_parse_ii:nN
+ \exp_not:N \__str_format_parse_auxii:nN
{ \c_catcode_other_space_tl } #1 #2
}
}
-\cs_new:Npn \__str_format_parse_ii:nN #1#2
+\cs_new:Npn \__str_format_parse_auxii:nN #1#2
{
\__str_if_contains_char:nNTF { < > = ^ } #2
- { \__str_format_parse_iii:nN { #1 #2 } }
- { \__str_format_parse_iii:nN { #1 ? } #2 }
+ { \__str_format_parse_auxiii:nN { #1 #2 } }
+ { \__str_format_parse_auxiii:nN { #1 ? } #2 }
}
-\cs_new:Npx \__str_format_parse_iii:nN #1#2
+\cs_new:Npx \__str_format_parse_auxiii:nN #1#2
{
\exp_not:N \__str_if_contains_char:nNTF
{ + - \c_catcode_other_space_tl }
#2
- { \exp_not:N \__str_format_parse_iv:nwN { #1 #2 } ; }
- { \exp_not:N \__str_format_parse_iv:nwN { #1 ? } ; #2 }
+ { \exp_not:N \__str_format_parse_auxiv:nwN { #1 #2 } ; }
+ { \exp_not:N \__str_format_parse_auxiv:nwN { #1 ? } ; #2 }
}
-\cs_new:Npn \__str_format_parse_iv:nwN #1#2; #3
+\cs_new:Npn \__str_format_parse_auxiv:nwN #1#2; #3
{
\__str_format_if_digit:NTF #3
- { \__str_format_parse_iv:nwN {#1} #2 #3 ; }
- { \__str_format_parse_v:nN { #1 {#2} } #3 }
+ { \__str_format_parse_auxiv:nwN {#1} #2 #3 ; }
+ { \__str_format_parse_auxv:nN { #1 {#2} } #3 }
}
-\cs_new:Npn \__str_format_parse_v:nN #1#2
+\cs_new:Npn \__str_format_parse_auxv:nN #1#2
{
\token_if_eq_charcode:NNTF . #2
- { \__str_format_parse_vi:nwN {#1} 0 ; }
- { \__str_format_parse_vii:nN { #1 { } } #2 }
+ { \__str_format_parse_auxvi:nwN {#1} 0 ; }
+ { \__str_format_parse_auxvii:nN { #1 { } } #2 }
}
-\cs_new:Npn \__str_format_parse_vi:nwN #1#2; #3
+\cs_new:Npn \__str_format_parse_auxvi:nwN #1#2; #3
{
\__str_format_if_digit:NTF #3
- { \__str_format_parse_vi:nwN {#1} #2 #3 ; }
- { \__str_format_parse_vii:nN { #1 {#2} } #3 }
+ { \__str_format_parse_auxvi:nwN {#1} #2 #3 ; }
+ { \__str_format_parse_auxvii:nN { #1 {#2} } #3 }
}
-\cs_new:Npn \__str_format_parse_vii:nN #1#2
+\cs_new:Npn \__str_format_parse_auxvii:nN #1#2
{
\token_if_eq_meaning:NNTF \s__stop #2
{ \__str_format_parse_end:nwn { #1 ? } #2 }
@@ -367,12 +367,12 @@
{3} { nan }
}
{
- \exp_last_unbraced:Nf \__str_format_fp_e_ii:wn
+ \exp_last_unbraced:Nf \__str_format_fp_e_aux:wn
\__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2#3 ; { #4 + 1 }
{#4}
}
}
- \cs_new:Npn \__str_format_fp_e_ii:wn
+ \cs_new:Npn \__str_format_fp_e_aux:wn
\s__fp \__fp_chk:w #1#2 #3 #4#5#6#7 ; #8
{
\__str_format_put:fw { \int_eval:n { #3 - 1 } }
@@ -399,14 +399,14 @@
{3} { nan }
}
{
- \exp_last_unbraced:Nf \__str_format_fp_f_ii:wwwn
+ \exp_last_unbraced:Nf \__str_format_fp_f_aux:wwwn
\fp_to_decimal:n
{ abs ( round ( \s__fp \__fp_chk:w #1#2#3 ; , #4 ) ) }
. . ;
{#4}
}
}
-\cs_new:Npn \__str_format_fp_f_ii:wwwn #1 . #2 . #3 ; #4
+\cs_new:Npn \__str_format_fp_f_aux:wwwn #1 . #2 . #3 ; #4
{
\use:nf
{ #1 . #2 }
@@ -421,13 +421,13 @@
{3} { nan }
}
{
- \exp_last_unbraced:Nf \__str_format_fp_g_ii:wn
+ \exp_last_unbraced:Nf \__str_format_fp_g_aux:wn
\__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2 ;
{ \int_max:nn {1} {#3} }
{ \int_max:nn {1} {#3} }
}
}
-\cs_new:Npn \__str_format_fp_g_ii:wn #1; #2
+\cs_new:Npn \__str_format_fp_g_aux:wn #1; #2
{
\int_compare:nNnTF { \__fp_exponent:w #1; } < { -3 }
{ \fp_to_scientific:n }
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty
index 05cd375a84d..8fb7f22b337 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str.dtx 4119 2012-08-16 22:35:59Z bruno $
+\GetIdInfo$Id: l3str.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Experimental strings}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -231,17 +231,17 @@
\cs_new_nopar:Npn \str_tail:N { \exp_args:No \str_tail:n }
\cs_set:Npn \str_tail:n #1
{
- \exp_after:wN \__str_tail:w
+ \exp_after:wN \__str_tail_auxi:w
\reverse_if:N \if_charcode:w
\scan_stop: \tl_to_str:n {#1} X X \q_stop
}
-\cs_set:Npn \__str_tail:w #1 X #2 \q_stop { \fi: #1 }
+\cs_set:Npn \__str_tail_auxi:w #1 X #2 \q_stop { \fi: #1 }
\cs_new:Npn \str_tail_ignore_spaces:n #1
{
- \exp_after:wN \__str_tail_ii:w
+ \exp_after:wN \__str_tail_auxii:w
\tl_to_str:n {#1} X X \q_stop
}
-\cs_new:Npn \__str_tail_ii:w #1 #2 X #3 \q_stop { #2 }
+\cs_new:Npn \__str_tail_auxii:w #1 #2 X #3 \q_stop { #2 }
\cs_new:Npn \__str_skip_c_zero:w #1;
{
\if_int_compare:w \__int_eval:w #1 > \c_eight
@@ -256,11 +256,11 @@
{ \exp_after:wN \__str_skip_c_zero:w \int_use:N \__int_eval:w #1 - \c_eight ; }
\cs_new:Npn \__str_skip_end:w #1 ;
{
- \exp_after:wN \__str_skip_end_ii:NNNNNNNN
+ \exp_after:wN \__str_skip_end:NNNNNNNN
\if_case:w \if_int_compare:w #1 > \c_zero #1 \else: 0 \fi: \exp_stop_f:
\or: \or: \or: \or: \or: \or: \or: \or:
}
-\cs_new:Npn \__str_skip_end_ii:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \c_zero }
+\cs_new:Npn \__str_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \c_zero }
\cs_new:Npn \__str_collect_delimit_by_q_stop:w #1;
{
\exp_after:wN \__str_collect_loop:wn
@@ -270,13 +270,13 @@
\cs_new:Npn \__str_collect_loop:wn #1 ;
{
\if_int_compare:w #1 > \c_seven
- \exp_after:wN \__str_collect_loop_ii:wnNNNNNNN
+ \exp_after:wN \__str_collect_loop:wnNNNNNNN
\else:
\exp_after:wN \__str_collect_end:wn
\fi:
#1 ;
}
-\cs_new:Npn \__str_collect_loop_ii:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9
+\cs_new:Npn \__str_collect_loop:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9
{
\exp_after:wN \__str_collect_loop:wn
\int_use:N \__int_eval:w #1 - \c_seven ;
@@ -284,11 +284,11 @@
}
\cs_new:Npn \__str_collect_end:wn #1 ;
{
- \exp_after:wN \__str_collect_end_ii:nnnnnnnnw
+ \exp_after:wN \__str_collect_end:nnnnnnnnw
\if_case:w \if_int_compare:w #1 > \c_zero #1 \else: 0 \fi: \exp_stop_f:
\or: \or: \or: \or: \or: \or: \fi:
}
-\cs_new:Npn \__str_collect_end_ii:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop
+\cs_new:Npn \__str_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop
{ #1#2#3#4#5#6#7#8 }
\cs_new_nopar:Npn \str_item:Nn { \exp_args:No \str_item:nn }
\cs_new:Npn \str_item:nn #1#2
@@ -342,23 +342,23 @@
{ \exp_args:No \__str_substr_unsafe:nnn { \tl_to_str:n {#1} } }
\cs_new:Npn \__str_substr_unsafe:nnn #1#2#3
{
- \exp_after:wN \__str_substr_ii:www
+ \exp_after:wN \__str_substr:www
\__int_value:w \__str_count_unsafe:n {#1} \exp_after:wN ;
\int_use:N \__int_eval:w #2 + \c_zero \exp_after:wN ;
\int_use:N \__int_eval:w
- \exp_args:Nf \__str_substr_i:nN {#3} \c_max_int ;
+ \exp_args:Nf \__str_substr:nN {#3} \c_max_int ;
{ } #1
\q_stop
}
-\cs_new:Npn \__str_substr_i:nN #1 #2
+\cs_new:Npn \__str_substr:nN #1 #2
{ \tl_if_empty:nTF {#1} {#2} {#1} }
-\cs_new:Npn \__str_substr_ii:www #1; #2; #3;
+\cs_new:Npn \__str_substr:www #1; #2; #3;
{
- \exp_args:Nf \__str_substr_iii:nnw
+ \exp_args:Nf \__str_substr:nnw
{ \__str_substr_normalize_range:nn {#2} {#1} }
{ \__str_substr_normalize_range:nn {#3} {#1} }
}
-\cs_new:Npn \__str_substr_iii:nnw #1#2
+\cs_new:Npn \__str_substr:nnw #1#2
{
\exp_after:wN \__str_collect_delimit_by_q_stop:w
\int_use:N \__int_eval:w #2 + \c_one - #1 \exp_after:wN ;
@@ -539,14 +539,14 @@
\cs_new_protected:Npn \__str_if_flag_times:nT #1#2
{ \flag_if_raised:nT {#1} { #2~(x \flag_height:n {#1} ) } }
\cs_new_protected_nopar:Npn \str_set_convert:Nnnn
- { \__str_convert_i:nNNnnn { } \tl_set_eq:NN }
+ { \__str_convert:nNNnnn { } \tl_set_eq:NN }
\cs_new_protected_nopar:Npn \str_gset_convert:Nnnn
- { \__str_convert_i:nNNnnn { } \tl_gset_eq:NN }
+ { \__str_convert:nNNnnn { } \tl_gset_eq:NN }
\prg_new_protected_conditional:Npnn
\str_set_convert:Nnnn #1#2#3#4 { T , F , TF }
{
\bool_gset_false:N \g__str_error_bool
- \__str_convert_i:nNNnnn
+ \__str_convert:nNNnnn
{ \cs_set_eq:NN \__str_if_flag_error:nnx \__str_if_flag_no_error:nnx }
\tl_set_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g__str_error_bool \prg_return_false: \prg_return_true:
@@ -555,22 +555,22 @@
\str_gset_convert:Nnnn #1#2#3#4 { T , F , TF }
{
\bool_gset_false:N \g__str_error_bool
- \__str_convert_i:nNNnnn
+ \__str_convert:nNNnnn
{ \cs_set_eq:NN \__str_if_flag_error:nnx \__str_if_flag_no_error:nnx }
\tl_gset_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g__str_error_bool \prg_return_false: \prg_return_true:
}
-\cs_new_protected:Npn \__str_convert_i:nNNnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \__str_convert:nNNnnn #1#2#3#4#5#6
{
\group_begin:
#1
\__str_gset_other:Nn \g__str_result_tl {#4}
- \exp_after:wN \__str_convert_ii:wwwnn
+ \exp_after:wN \__str_convert:wwwnn
\tl_to_str:n {#5} /// \q_stop
{ decode } { unescape }
\prg_do_nothing:
\__str_convert_decode_:
- \exp_after:wN \__str_convert_ii:wwwnn
+ \exp_after:wN \__str_convert:wwwnn
\tl_to_str:n {#6} /// \q_stop
{ encode } { escape }
\use_ii_i:nn
@@ -578,15 +578,15 @@
\group_end:
#2 #3 \g__str_result_tl
}
-\cs_new_protected:Npn \__str_convert_ii:wwwnn
+\cs_new_protected:Npn \__str_convert:wwwnn
#1 / #2 // #3 \q_stop #4#5
{
- \__str_convert_iv:nnn {enc} {#4} {#1}
- \__str_convert_iv:nnn {esc} {#5} {#2}
- \exp_args:Ncc \__str_convert_iii:NNnNN
+ \__str_convert:nnn {enc} {#4} {#1}
+ \__str_convert:nnn {esc} {#5} {#2}
+ \exp_args:Ncc \__str_convert:NNnNN
{ __str_convert_#4_#1: } { __str_convert_#5_#2: } {#2}
}
-\cs_new_protected:Npn \__str_convert_iii:NNnNN #1#2#3#4#5
+\cs_new_protected:Npn \__str_convert:NNnNN #1#2#3#4#5
{
\if_meaning:w #1 #5
\tl_if_empty:nF {#3}
@@ -596,16 +596,16 @@
#4 #2 #1
\fi:
}
-\cs_new_protected:Npn \__str_convert_iv:nnn #1#2#3
+\cs_new_protected:Npn \__str_convert:nnn #1#2#3
{
\cs_if_exist:cF { __str_convert_#2_#3: }
{
- \exp_args:Nx \__str_convert_v:nnnn
+ \exp_args:Nx \__str_convert:nnnn
{ \__str_convert_lowercase_alphanum:n {#3} }
{#1} {#2} {#3}
}
}
-\cs_new_protected:Npn \__str_convert_v:nnnn #1#2#3#4
+\cs_new_protected:Npn \__str_convert:nnnn #1#2#3#4
{
\cs_if_exist:cF { __str_convert_#3_#1: }
{
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
index eb4a612e028..134eeed9815 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
@@ -87,8 +87,8 @@
\group_begin:
\group_align_safe_begin:
\__tl_analysis_setup:n {#1}
- \__tl_analysis_i:n {#1}
- \__tl_analysis_ii:n {#1}
+ \__tl_analysis_a:n {#1}
+ \__tl_analysis_b:n {#1}
\group_align_safe_end:
\group_end:
}
@@ -108,18 +108,18 @@
\__tl_analysis_disable_loop:N
}
\group_end:
-\cs_new_protected:Npn \__tl_analysis_i:n #1
+\cs_new_protected:Npn \__tl_analysis_a:n #1
{
\int_set:Nn \tex_escapechar:D { 92 }
\int_zero:N \l__tl_analysis_normal_int
\int_zero:N \l__tl_analysis_index_int
\int_zero:N \l__tl_analysis_nesting_int
- \if_false: { \fi: \__tl_analysis_i_loop:w #1 }
+ \if_false: { \fi: \__tl_analysis_a_loop:w #1 }
\int_decr:N \l__tl_analysis_index_int
}
-\cs_new_protected_nopar:Npn \__tl_analysis_i_loop:w
- { \tex_futurelet:D \l__tl_analysis_token \__tl_analysis_i_type:w }
-\cs_new_protected_nopar:Npn \__tl_analysis_i_type:w
+\cs_new_protected_nopar:Npn \__tl_analysis_a_loop:w
+ { \tex_futurelet:D \l__tl_analysis_token \__tl_analysis_a_type:w }
+\cs_new_protected_nopar:Npn \__tl_analysis_a_type:w
{
\l__tl_analysis_type_int =
\if_meaning:w \l__tl_analysis_token \c_space_token
@@ -136,61 +136,61 @@
\fi:
\fi:
\if_case:w \l__tl_analysis_type_int
- \exp_after:wN \__tl_analysis_i_space:w
- \or: \exp_after:wN \__tl_analysis_i_bgroup:w
- \or: \exp_after:wN \__tl_analysis_i_safe:N
- \else: \exp_after:wN \__tl_analysis_i_egroup:w
+ \exp_after:wN \__tl_analysis_a_space:w
+ \or: \exp_after:wN \__tl_analysis_a_bgroup:w
+ \or: \exp_after:wN \__tl_analysis_a_safe:N
+ \else: \exp_after:wN \__tl_analysis_a_egroup:w
\fi:
}
-\cs_new_protected_nopar:Npn \__tl_analysis_i_space:w
+\cs_new_protected_nopar:Npn \__tl_analysis_a_space:w
{
- \tex_afterassignment:D \__tl_analysis_i_space_test:w
+ \tex_afterassignment:D \__tl_analysis_a_space_test:w
\exp_after:wN \cs_set_eq:NN
\exp_after:wN \l__tl_analysis_char_token
\token_to_str:N
}
-\cs_new_protected_nopar:Npn \__tl_analysis_i_space_test:w
+\cs_new_protected_nopar:Npn \__tl_analysis_a_space_test:w
{
\if_meaning:w \l__tl_analysis_char_token \c_space_token
\tex_toks:D \l__tl_analysis_index_int { \exp_not:n { ~ } }
- \__tl_analysis_i_store:
+ \__tl_analysis_a_store:
\else:
\int_incr:N \l__tl_analysis_normal_int
\fi:
- \__tl_analysis_i_loop:w
+ \__tl_analysis_a_loop:w
}
\group_begin:
\char_set_catcode_group_begin:N \^^@
\char_set_catcode_group_end:N \^^E
- \cs_new_protected_nopar:Npn \__tl_analysis_i_bgroup:w
- { \__tl_analysis_i_group:nw { \exp_after:wN ^^@ \if_false: ^^E \fi: } }
+ \cs_new_protected_nopar:Npn \__tl_analysis_a_bgroup:w
+ { \__tl_analysis_a_group:nw { \exp_after:wN ^^@ \if_false: ^^E \fi: } }
\char_set_catcode_group_begin:N \^^B
\char_set_catcode_group_end:N \^^@
- \cs_new_protected_nopar:Npn \__tl_analysis_i_egroup:w
- { \__tl_analysis_i_group:nw { \if_false: ^^B \fi: ^^@ } }
+ \cs_new_protected_nopar:Npn \__tl_analysis_a_egroup:w
+ { \__tl_analysis_a_group:nw { \if_false: ^^B \fi: ^^@ } }
\group_end:
-\cs_new_protected:Npn \__tl_analysis_i_group:nw #1
+\cs_new_protected:Npn \__tl_analysis_a_group:nw #1
{
\tex_lccode:D \c_zero = \__tl_analysis_extract_charcode: \scan_stop:
\tl_to_lowercase:n { \tex_toks:D \l__tl_analysis_index_int {#1} }
\if_int_compare:w \tex_lccode:D \c_zero = \tex_escapechar:D
\int_set:Nn \tex_escapechar:D { 139 - \tex_escapechar:D }
\fi:
- \tex_afterassignment:D \__tl_analysis_i_group_test:w
+ \tex_afterassignment:D \__tl_analysis_a_group_test:w
\exp_after:wN \cs_set_eq:NN
\exp_after:wN \l__tl_analysis_char_token
\token_to_str:N
}
-\cs_new_protected_nopar:Npn \__tl_analysis_i_group_test:w
+\cs_new_protected_nopar:Npn \__tl_analysis_a_group_test:w
{
\if_charcode:w \l__tl_analysis_token \l__tl_analysis_char_token
- \__tl_analysis_i_store:
+ \__tl_analysis_a_store:
\else:
\int_incr:N \l__tl_analysis_normal_int
\fi:
- \__tl_analysis_i_loop:w
+ \__tl_analysis_a_loop:w
}
-\cs_new_protected_nopar:Npn \__tl_analysis_i_store:
+\cs_new_protected_nopar:Npn \__tl_analysis_a_store:
{
\tex_advance:D \l__tl_analysis_nesting_int \l__tl_analysis_type_int
\if_int_compare:w \tex_lccode:D \c_zero = \c_thirty_two
@@ -201,10 +201,10 @@
\int_incr:N \l__tl_analysis_index_int
\int_zero:N \l__tl_analysis_normal_int
\if_int_compare:w \l__tl_analysis_nesting_int = \c_minus_one
- \cs_set_eq:NN \__tl_analysis_i_loop:w \scan_stop:
+ \cs_set_eq:NN \__tl_analysis_a_loop:w \scan_stop:
\fi:
}
-\cs_new_protected:Npn \__tl_analysis_i_safe:N #1
+\cs_new_protected:Npn \__tl_analysis_a_safe:N #1
{
\if_charcode:w
\scan_stop:
@@ -212,11 +212,11 @@
\scan_stop:
\int_incr:N \l__tl_analysis_normal_int
\else:
- \__tl_analysis_cs_space_count:NN \__tl_analysis_i_cs:ww #1
+ \__tl_analysis_cs_space_count:NN \__tl_analysis_a_cs:ww #1
\fi:
- \__tl_analysis_i_loop:w
+ \__tl_analysis_a_loop:w
}
-\cs_new_protected:Npn \__tl_analysis_i_cs:ww #1; #2;
+\cs_new_protected:Npn \__tl_analysis_a_cs:ww #1; #2;
{
\if_int_compare:w #1 > \c_zero
\tex_skip:D \l__tl_analysis_index_int
@@ -227,36 +227,36 @@
\tex_advance:D \l__tl_analysis_normal_int #2 \exp_stop_f:
\fi:
}
-\cs_new_protected:Npn \__tl_analysis_ii:n #1
+\cs_new_protected:Npn \__tl_analysis_b:n #1
{
\tl_gset:Nx \g__tl_analysis_result_tl
{
- \__tl_analysis_ii_loop:w 0; #1
+ \__tl_analysis_b_loop:w 0; #1
\__prg_break_point:
}
}
-\cs_new:Npn \__tl_analysis_ii_loop:w #1;
+\cs_new:Npn \__tl_analysis_b_loop:w #1;
{
- \exp_after:wN \__tl_analysis_ii_normals:ww
+ \exp_after:wN \__tl_analysis_b_normals:ww
\__int_value:w \tex_skip:D #1 ; #1 ;
}
-\cs_new:Npn \__tl_analysis_ii_normals:ww #1;
+\cs_new:Npn \__tl_analysis_b_normals:ww #1;
{
\if_int_compare:w #1 = \c_zero
- \__tl_analysis_ii_special:w
+ \__tl_analysis_b_special:w
\fi:
- \__tl_analysis_ii_normal:wwN #1;
+ \__tl_analysis_b_normal:wwN #1;
}
-\cs_new:Npn \__tl_analysis_ii_normal:wwN #1; #2; #3
+\cs_new:Npn \__tl_analysis_b_normal:wwN #1; #2; #3
{
\exp_not:n { \exp_not:n { #3 } } \s__tl
\if_charcode:w
\scan_stop:
\exp_after:wN \use_none:n \token_to_str:N #3 \prg_do_nothing:
\scan_stop:
- \exp_after:wN \__tl_analysis_ii_char:Nww
+ \exp_after:wN \__tl_analysis_b_char:Nww
\else:
- \exp_after:wN \__tl_analysis_ii_cs:Nww
+ \exp_after:wN \__tl_analysis_b_cs:Nww
\fi:
#3 #1; #2;
}
@@ -267,7 +267,7 @@
\char_set_uccode:nn { `? } { `D }
\tl_to_uppercase:n
{
- \cs_new:Npn \__tl_analysis_ii_char:Nww #1
+ \cs_new:Npn \__tl_analysis_b_char:Nww #1
{
\if_meaning:w #1 \c_undefined:D ? \else:
\if_catcode:w #1 \c_catcode_other_token C \else:
@@ -280,19 +280,19 @@
6
\fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi:
\__int_value:w `#1 \s__tl
- \exp_after:wN \__tl_analysis_ii_normals:ww
+ \exp_after:wN \__tl_analysis_b_normals:ww
\int_use:N \__int_eval:w \c_minus_one +
}
}
\group_end:
-\cs_new:Npn \__tl_analysis_ii_cs:Nww #1
+\cs_new:Npn \__tl_analysis_b_cs:Nww #1
{
0 -1 \s__tl
- \__tl_analysis_cs_space_count:NN \__tl_analysis_ii_cs_test:ww #1
+ \__tl_analysis_cs_space_count:NN \__tl_analysis_b_cs_test:ww #1
}
-\cs_new:Npn \__tl_analysis_ii_cs_test:ww #1 ; #2 ; #3 ; #4 ;
+\cs_new:Npn \__tl_analysis_b_cs_test:ww #1 ; #2 ; #3 ; #4 ;
{
- \exp_after:wN \__tl_analysis_ii_normals:ww
+ \exp_after:wN \__tl_analysis_b_normals:ww
\int_use:N \__int_eval:w
\if_int_compare:w #1 = \c_zero
#3
@@ -305,8 +305,8 @@
}
\group_begin:
\char_set_catcode_other:N A
- \cs_new:Npn \__tl_analysis_ii_special:w
- \fi: \__tl_analysis_ii_normal:wwN 0 ; #1 ;
+ \cs_new:Npn \__tl_analysis_b_special:w
+ \fi: \__tl_analysis_b_normal:wwN 0 ; #1 ;
{
\fi:
\if_int_compare:w #1 = \l__tl_analysis_index_int
@@ -320,23 +320,23 @@
\else: 2
\fi:
\if_int_odd:w \etex_gluestretch:D \tex_skip:D #1 \exp_stop_f:
- \exp_after:wN \__tl_analysis_ii_special_char:wN \int_use:N
+ \exp_after:wN \__tl_analysis_b_special_char:wN \int_use:N
\else:
- \exp_after:wN \__tl_analysis_ii_special_space:w \int_use:N
+ \exp_after:wN \__tl_analysis_b_special_space:w \int_use:N
\fi:
\__int_eval:w \c_one + #1 \exp_after:wN ;
\token_to_str:N
}
\group_end:
-\cs_new:Npn \__tl_analysis_ii_special_char:wN #1 ; #2
+\cs_new:Npn \__tl_analysis_b_special_char:wN #1 ; #2
{
\__int_value:w `#2 \s__tl
- \__tl_analysis_ii_loop:w #1 ;
+ \__tl_analysis_b_loop:w #1 ;
}
-\cs_new:Npn \__tl_analysis_ii_special_space:w #1 ; ~
+\cs_new:Npn \__tl_analysis_b_special_space:w #1 ; ~
{
32 \s__tl
- \__tl_analysis_ii_loop:w #1 ;
+ \__tl_analysis_b_loop:w #1 ;
}
\cs_new_protected:Npn \__tl_analysis_map_inline:nn #1
{
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
index 30c72196f57..a16079a1428 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
@@ -48,16 +48,18 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{xparse}
-\GetIdInfo$Id: l3galley.dtx 4155 2012-08-29 10:29:58Z joseph $
+\GetIdInfo$Id: l3galley.dtx 4388 2012-12-20 22:15:35Z joseph $
{L3 Experimental galley code}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\clist_new:N \l__galley_parshape_left_indent_clist
-\clist_new:N \l__galley_parshape_right_indent_clist
+\cs_generate_variant:Nn \seq_map_function:NN { Nc }
+\int_new:N \l__galley_tmp_int
+\seq_new:N \l__galley_tmpa_seq
+\seq_new:N \l__galley_tmpb_seq
+\tl_new:N \l__galley_tmp_tl
\bool_new:N \l__galley_parshape_multipar_bool
-\bool_new:N \l__galley_parshape_resume_std_bool
-\bool_new:N \l__galley_parshape_fixed_lines_bool
-\int_new:N \l_galley_parshape_std_lines_int
+\seq_new:N \l__galley_parshape_left_indent_seq
+\seq_new:N \l__galley_parshape_right_indent_seq
\cs_new_eq:NN \l_galley_text_width_dim \linewidth
\cs_new_eq:NN \l_galley_total_left_margin_dim \@totalleftmargin
\dim_new:N \l_galley_total_right_margin_dim
@@ -66,20 +68,24 @@
\cs_new_eq:NN \l_galley_width_dim \tex_hsize:D
\bool_new:N \g__galley_begin_level_bool
\bool_new:N \l__galley_begin_level_bool
+\seq_new:N \g__galley_cutout_left_seq
+\seq_new:N \l__galley_cutout_left_seq
+\seq_new:N \g__galley_cutout_right_seq
+\seq_new:N \l__galley_cutout_right_seq
\bool_new:N \g_galley_omit_next_indent_bool
\bool_new:N \l__galley_omit_next_indent_bool
-\bool_new:N \g__galley_parshape_set_bool
-\bool_new:N \l__galley_parshape_set_bool
\bool_new:N \g_galley_no_break_next_bool
\bool_new:N \l__galley_no_break_next_bool
\tl_new:N \g_galley_par_begin_hook_tl
-\tl_new:N \l__galley_galley_par_begin_hook_tl
+\tl_new:N \l__galley_par_begin_hook_tl
\tl_new:N \g_galley_par_end_hook_tl
-\tl_new:N \l__galley_galley_par_end_hook_tl
-\tl_new:N \g_galley_par_after_hook_tl
-\tl_new:N \l__galley_par_after_hook_tl
+\tl_new:N \l__galley_par_end_hook_tl
+\tl_new:N \g_galley_par_reset_hook_tl
+\tl_new:N \l__galley_par_reset_hook_tl
\int_new:N \g_galley_previous_par_lines_int
\int_new:N \l__galley_previous_par_lines_int
+\int_new:N \g__galley_current_par_lines_int
+\int_new:N \l__galley_current_par_lines_int
\tl_new:N \g_galley_restore_running_tl
\tl_new:N \l__galley_restore_running_tl
\tl_new:N \g_galley_whatsit_next_tl
@@ -93,14 +99,16 @@
\cs_new_protected_nopar:Npn \__galley_initialise_variables:
{
\bool_gset_true:N \g__galley_begin_level_bool
+ \seq_gclear:N \g__galley_cutout_left_seq
+ \seq_gclear:N \g__galley_cutout_right_seq
\tl_gclear:N \g__galley_interpar_penalty_user_tl
\tl_gclear:N \g__galley_interpar_vspace_user_tl
\bool_gset_true:N \g_galley_omit_next_indent_bool
\bool_gset_false:N \g_galley_no_break_next_bool
\tl_gclear:N \g_galley_par_begin_hook_tl
\tl_gclear:N \g_galley_par_end_hook_tl
- \tl_gclear:N \g_galley_par_after_hook_tl
- \bool_gset_false:N \g__galley_parshape_set_bool
+ \tl_gclear:N \g_galley_par_reset_hook_tl
+ \int_gzero:N \g__galley_current_par_lines_int
\int_gzero:N \g_galley_previous_par_lines_int
\tl_gclear:N \g_galley_restore_running_tl
\tl_gclear:N \g_galley_whatsit_previous_tl
@@ -117,6 +125,10 @@
{
\bool_set_eq:NN \l__galley_begin_level_bool
\g__galley_begin_level_bool
+ \seq_set_eq:NN \l__galley_cutout_left_seq
+ \g__galley_cutout_left_seq
+ \seq_set_eq:NN \l__galley_cutout_right_seq
+ \g__galley_cutout_right_seq
\tl_set_eq:NN \l__galley_interpar_penalty_user_tl
\g__galley_interpar_penalty_user_tl
\tl_set_eq:NN \l__galley_interpar_vspace_user_tl
@@ -125,14 +137,14 @@
\g_galley_omit_next_indent_bool
\bool_set_eq:NN \l__galley_no_break_next_bool
\g_galley_no_break_next_bool
- \tl_set_eq:NN \l__galley_galley_par_begin_hook_tl
+ \tl_set_eq:NN \l__galley_par_begin_hook_tl
\g_galley_par_begin_hook_tl
- \tl_set_eq:NN \l__galley_galley_par_end_hook_tl
+ \tl_set_eq:NN \l__galley_par_end_hook_tl
\g_galley_par_end_hook_tl
- \tl_set_eq:NN \l__galley_par_after_hook_tl
- \g_galley_par_after_hook_tl
- \bool_set_eq:NN \l__galley_parshape_set_bool
- \g__galley_parshape_set_bool
+ \tl_set_eq:NN \l__galley_par_reset_hook_tl
+ \g_galley_par_reset_hook_tl
+ \int_set_eq:NN \l__galley_current_par_lines_int
+ \g__galley_current_par_lines_int
\int_set_eq:NN \l__galley_previous_par_lines_int
\g_galley_previous_par_lines_int
\tl_set_eq:NN \l__galley_restore_running_tl
@@ -146,6 +158,10 @@
{
\bool_gset_eq:NN \g__galley_begin_level_bool
\l__galley_begin_level_bool
+ \seq_gset_eq:NN \g__galley_cutout_left_seq
+ \l__galley_cutout_left_seq
+ \seq_gset_eq:NN \g__galley_cutout_right_seq
+ \l__galley_cutout_right_seq
\tl_gset_eq:NN \g__galley_interpar_penalty_user_tl
\l__galley_interpar_penalty_user_tl
\tl_gset_eq:NN \g__galley_interpar_vspace_user_tl
@@ -155,13 +171,13 @@
\bool_gset_eq:NN \g_galley_no_break_next_bool
\l__galley_no_break_next_bool
\tl_gset_eq:NN \g_galley_par_begin_hook_tl
- \l__galley_galley_par_begin_hook_tl
+ \l__galley_par_begin_hook_tl
\tl_gset_eq:NN \g_galley_par_end_hook_tl
- \l__galley_galley_par_end_hook_tl
- \tl_gset_eq:NN \g_galley_par_after_hook_tl
- \l__galley_par_after_hook_tl
- \bool_gset_eq:NN \g__galley_parshape_set_bool
- \l__galley_parshape_set_bool
+ \l__galley_par_end_hook_tl
+ \tl_gset_eq:NN \g_galley_par_reset_hook_tl
+ \l__galley_par_reset_hook_tl
+ \int_gset_eq:NN \g__galley_current_par_lines_int
+ \l__galley_current_par_lines_int
\int_gset_eq:NN \g_galley_previous_par_lines_int
\l__galley_previous_par_lines_int
\tl_gset_eq:NN \g_galley_restore_running_tl
@@ -186,52 +202,58 @@
\group_end:
}
\__scan_new:N \s__par_omit
-\cs_new_protected_nopar:Npn \__galley_std_par:
+\cs_new_protected_nopar:Npn \galley_par:
{
\s__par_omit
- \exp_after:wN \__galley_std_par_aux_i: \tex_romannumeral:D - `0
+ \exp_after:wN \__galley_par_auxi: \tex_romannumeral:D - `0
}
-\cs_new_protected:Npn \__galley_std_par_aux_i:
+\cs_new_protected:Npn \__galley_par_auxi:
{
\peek_meaning:NTF \s__par_omit
- { \__galley_std_par_aux:N }
- { \__galley_std_par_aux_ii: }
+ { \__galley_par_aux:N }
+ { \__galley_par_auxii: }
}
-\cs_new_protected:Npn \__galley_std_par_aux:N #1
+\cs_new_protected:Npn \__galley_par_aux:N #1
{
\str_if_eq_x:nnF {#1} { \s__par_omit }
{
- \__galley_std_par_aux_ii:
+ \__galley_par_auxii:
#1
}
}
-\cs_new_protected_nopar:Npn \__galley_std_par_aux_ii:
+\cs_new_protected_nopar:Npn \__galley_par_auxii:
{
\mode_if_vertical:TF
- { \tex_par:D }
+ {
+ \group_begin:
+ \tex_par:D
+ \group_end:
+ }
{
\g_galley_par_end_hook_tl
- \__galley_set_measure_and_parshape:
\group_begin:
\tex_par:D
\group_end:
- \int_gadd:Nn \g_galley_previous_par_lines_int \tex_prevgraf:D
+ \int_gset:Nn \g_galley_previous_par_lines_int
+ { \tex_prevgraf:D + \g__galley_current_par_lines_int }
+ \__galley_parshape_reset:
+ \int_gzero:N \g__galley_current_par_lines_int
}
- \g_galley_par_after_hook_tl
- \tl_gclear:N \g_galley_par_after_hook_tl
+ \g_galley_par_reset_hook_tl
+ \tl_gclear:N \g_galley_par_reset_hook_tl
\tex_penalty:D \c_ten_thousand
}
-\cs_new_protected:Npn \__galley_end_par:n #1
+\cs_new_protected:Npn \galley_par:n #1
{
\s__par_omit
\bool_if:nF \g__galley_begin_level_bool
{
#1
- \__galley_std_par:
+ \galley_par:
}
}
-\cs_set_protected_nopar:Npn \par { \__galley_std_par: }
-\tl_set:Nn \@par { \__galley_std_par: }
+\cs_set_protected_nopar:Npn \par { \galley_par: }
+\tl_set:Nn \@par { \galley_par: }
\cs_new_protected_nopar:Npn \galley_display_begin:
{
\group_begin:
@@ -285,7 +307,7 @@
}
\cs_new_protected_nopar:Npn \__galley_display_par:
{
- \cs_set_eq:NN \par \__galley_std_par:
+ \cs_set_eq:NN \par \galley_par:
\mode_if_vertical:TF
{
\par
@@ -294,11 +316,10 @@
\__galley_display_vspace:N \l_galley_display_end_par_vspace_tl
}
{
- \__galley_set_measure_and_parshape:
\group_begin:
\tex_par:D
\group_end:
- \int_gadd:Nn \g_galley_previous_par_lines_int \tex_prevgraf:D
+ \int_gadd:Nn \g__galley_current_par_lines_int \tex_prevgraf:D
\__galley_display_penalty:N \l_galley_display_end_penalty_tl
\__galley_display_vspace:N \l_galley_display_end_vspace_tl
}
@@ -325,7 +346,6 @@
\tex_everypar:D { }
\tex_noindent:D
\group_end:
- \int_gzero:N \g_galley_previous_par_lines_int
\__galley_insert_horizontal_items:
\__galley_restore_running_parameters:
}
@@ -391,8 +411,11 @@
\g_galley_restore_running_tl
\tl_gclear:N \g_galley_restore_running_tl
}
+\dim_new:N \l__galley_total_left_margin_dim
+\dim_new:N \l__galley_total_right_margin_dim
\cs_new_protected:Npn \galley_margins_set_absolute:nn #1#2
{
+ \__galley_save_margins:
\dim_set:Nn \l_galley_total_left_margin_dim {#1}
\dim_set:Nn \l_galley_total_right_margin_dim {#2}
\dim_set:Nn \l_galley_text_width_dim
@@ -401,9 +424,11 @@
- \l_galley_total_left_margin_dim
- \l_galley_total_right_margin_dim
}
+ \__galley_set_measure:
}
\cs_new_protected:Npn \galley_margins_set_relative:nn #1#2
{
+ \__galley_save_margins:
\dim_add:Nn \l_galley_total_left_margin_dim {#1}
\dim_add:Nn \l_galley_total_right_margin_dim {#2}
\dim_set:Nn \l_galley_text_width_dim
@@ -412,144 +437,241 @@
- \l_galley_total_left_margin_dim
- \l_galley_total_right_margin_dim
}
+ \__galley_set_measure:
}
-\cs_new_protected:Npn \galley_parshape_fixed_lines:nnn #1#2#3
+\cs_new_protected_nopar:Npn \__galley_save_margins:
{
- \bool_gset_true:N \g__galley_parshape_set_bool
- \bool_set_true:N \l__galley_parshape_fixed_lines_bool
- \int_set:Nn \l_galley_parshape_std_lines_int {#1}
- \clist_set:Nn \l__galley_parshape_left_indent_clist {#2}
- \clist_set:Nn \l__galley_parshape_right_indent_clist {#3}
- \bool_set_true:N \l__galley_parshape_resume_std_bool
+ \dim_set_eq:NN \l__galley_total_left_margin_dim
+ \l_galley_total_left_margin_dim
+ \dim_set_eq:NN \l__galley_total_right_margin_dim
+ \l_galley_total_right_margin_dim
}
-\cs_new_protected:Npn \galley_parshape_multi_par:nnnN #1#2#3#4
+\cs_new_protected_nopar:Npn \__galley_set_measure:
{
- \bool_gset_true:N \g__galley_parshape_set_bool
- \bool_set_true:N \l__galley_parshape_multipar_bool
- \bool_set_false:N \l__galley_parshape_fixed_lines_bool
- \int_set:Nn \l_galley_parshape_std_lines_int {#1}
- \clist_set:Nn \l__galley_parshape_left_indent_clist {#2}
- \clist_set:Nn \l__galley_parshape_right_indent_clist {#3}
- \bool_set_eq:NN \l__galley_parshape_resume_std_bool #4
+ \int_compare:nNnTF \tex_parshape:D = \c_zero
+ { \__galley_parshape_measure: }
+ {
+ \dim_sub:Nn \l__galley_total_left_margin_dim
+ \l_galley_total_left_margin_dim
+ \dim_sub:Nn \l__galley_total_right_margin_dim
+ \l_galley_total_right_margin_dim
+ \tex_parshape:D
+ \tex_parshape:D
+ \int_step_function:nnnN
+ \c_one \c_one \tex_parshape:D
+ \__galley_set_measure_aux:n
+ }
}
-\cs_new_protected:Npn \galley_parshape_single_par:nnnN #1#2#3#4
+\cs_new:Npn \__galley_set_measure_aux:n #1
{
- \bool_gset_true:N \g__galley_parshape_set_bool
- \bool_set_false:N \l__galley_parshape_multipar_bool
- \bool_set_false:N \l__galley_parshape_fixed_lines_bool
- \int_set:Nn \l_galley_parshape_std_lines_int {#1}
- \clist_set:Nn \l__galley_parshape_left_indent_clist {#2}
- \clist_set:Nn \l__galley_parshape_right_indent_clist {#3}
- \bool_set_eq:NN \l__galley_parshape_resume_std_bool #4
+ \__dim_eval:w
+ \etex_parshapeindent:D #1 - \l__galley_total_left_margin_dim
+ \__dim_eval_end:
+ \__dim_eval:w
+ \etex_parshapelength:D #1
+ + \l__galley_total_left_margin_dim + \l__galley_total_right_margin_dim
+ \__dim_eval_end:
}
-\cs_generate_variant:Nn \galley_parshape_fixed_lines:nnn { nVV }
-\cs_generate_variant:Nn \galley_parshape_multi_par:nnnN { nVV }
-\cs_generate_variant:Nn \galley_parshape_single_par:nnnN { nVV }
-\cs_new_protected_nopar:Npn \__galley_set_measure_and_parshape:
+\cs_new_protected_nopar:Npn \__galley_parshape_reset:
{
- \bool_if:NTF \g__galley_parshape_set_bool
+ \int_compare:nNnF \tex_parshape:D = \c_zero
{
- \bool_if:NTF \l__galley_parshape_fixed_lines_bool
+ \bool_if:nTF
+ {
+ \seq_if_empty_p:N \g__galley_cutout_left_seq
+ && \seq_if_empty_p:N \g__galley_cutout_right_seq
+ }
{
- \int_compare:nNnTF \g_galley_previous_par_lines_int > \c_zero
- { \__galley_generate_parshape_lines: }
- { \__galley_generate_parshape: }
+ \bool_if:NF \l__galley_parshape_multipar_bool
+ { \__galley_parshape_measure: }
}
{
- \bool_gset_eq:NN \g__galley_parshape_set_bool
- \l__galley_parshape_multipar_bool
- \__galley_generate_parshape:
+ \prg_replicate:nn \g__galley_previous_par_lines_int
+ {
+ \seq_gpop:NN \g__galley_cutout_left_seq \l__galley_tmp_tl
+ \seq_gpop:NN \g__galley_cutout_right_seq \l__galley_tmp_tl
+ }
+ \bool_if:NTF \l__galley_parshape_multipar_bool
+ { \__galley_parshape_set: }
+ { \__galley_parshape_measure: }
+ \__galley_cutout_set:Nn \g__galley_cutout_left_seq { left }
+ \__galley_cutout_set:Nn \g__galley_cutout_right_seq { right }
}
}
+ }
+\cs_new_protected_nopar:Npn \__galley_parshape_measure:
+ {
+ \tex_parshape:D
+ \c_one
+ \l_galley_total_left_margin_dim
+ \l_galley_text_width_dim
+ }
+\cs_new_protected_nopar:Npn \galley_parshape_set_multi:nnnN
+ {
+ \bool_set_true:N \l__galley_parshape_multipar_bool
+ \__galley_parshape_set:nnnN
+ }
+\cs_new_protected_nopar:Npn \galley_parshape_set_single:nnnN
+ {
+ \bool_set_false:N \l__galley_parshape_multipar_bool
+ \__galley_parshape_set:nnnN
+ }
+\cs_generate_variant:Nn \galley_parshape_set_multi:nnnN { nVV }
+\cs_generate_variant:Nn \galley_parshape_set_single:nnnN { nVV }
+\cs_new_protected:Npn \__galley_parshape_set:nnnN #1#2#3#4
+ {
+ \seq_set_from_clist:Nn \l__galley_parshape_left_indent_seq {#2}
+ \seq_set_from_clist:Nn \l__galley_parshape_right_indent_seq {#3}
+ \prg_replicate:nn {#1}
+ {
+ \seq_put_left:Nn \l__galley_parshape_left_indent_seq { 0 pt }
+ \seq_put_left:Nn \l__galley_parshape_right_indent_seq { 0 pt }
+ }
+ \bool_if:NT #4
{
- \tex_global:D \tex_parshape:D
- \c_one
- \dim_use:N \l_galley_total_left_margin_dim
- \c_space_tl
- \dim_use:N \l_galley_text_width_dim
+ \seq_put_right:Nn \l__galley_parshape_left_indent_seq { 0 pt }
+ \seq_put_right:Nn \l__galley_parshape_right_indent_seq { 0 pt }
}
+ \__galley_parshape_set:
}
-\cs_new_protected_nopar:Npn \__galley_generate_parshape:
+\cs_new_protected_nopar:Npn \__galley_parshape_set:
{
- \tex_global:D \tex_parshape:D
+ \tex_parshape:D
\__int_eval:w
- \l_galley_parshape_std_lines_int +
- \int_min:nn
- { \clist_count:N \l__galley_parshape_left_indent_clist }
- { \clist_count:N \l__galley_parshape_right_indent_clist }
- \bool_if:NT \l__galley_parshape_resume_std_bool { + 1 }
+ \int_min:nn
+ { \seq_count:N \l__galley_parshape_left_indent_seq }
+ { \seq_count:N \l__galley_parshape_right_indent_seq }
\__int_eval_end:
- \prg_replicate:nn \l_galley_parshape_std_lines_int
- {
- \dim_use:N \l_galley_total_left_margin_dim
- \c_space_tl
- \dim_use:N \l_galley_text_width_dim
- \c_space_tl
- }
- \__galley_set_parshape_map:oo
- \l__galley_parshape_left_indent_clist
- \l__galley_parshape_right_indent_clist
- \bool_if:NT \l__galley_parshape_resume_std_bool
- {
- \c_space_tl
- \dim_use:N \l_galley_total_left_margin_dim
- \c_space_tl
- \dim_use:N \l_galley_text_width_dim
- }
+ \seq_mapthread_function:NNN
+ \l__galley_parshape_left_indent_seq
+ \l__galley_parshape_right_indent_seq
+ \__galley_parshape_set:nn
+ }
+\cs_new:Npn \__galley_parshape_set:nn #1#2
+ {
+ \__dim_eval:w \l_galley_total_left_margin_dim + ( #1 ) \__dim_eval_end:
+ \__dim_eval:w
+ \l_galley_text_width_dim - ( ( #1 ) + ( #2 ) )
+ \__dim_eval_end:
+ }
+\cs_new_protected_nopar:Npn \galley_cutout_left:nn
+ { \__galley_cutout:nnn { left } }
+\cs_new_protected_nopar:Npn \galley_cutout_right:nn
+ { \__galley_cutout:nnn { right } }
+\cs_new_protected:Npn \__galley_cutout:nnn #1#2#3
+ {
+ \seq_set_from_clist:Nn \l__galley_tmpa_seq {#3}
+ \prg_replicate:nn {#2}
+ { \seq_put_left:Nn \l__galley_tmpa_seq { 0 pt } }
+ \__galley_cutout_set:Nn \l__galley_tmpa_seq {#1}
+ \seq_clear:N \l__galley_tmpb_seq
+ \int_compare:nNnTF
+ { \seq_count:N \l__galley_tmpa_seq } >
+ { \seq_count:c { g__galley_cutout_ #1 _ seq } }
+ {
+ \seq_map_inline:Nn \l__galley_tmpa_seq
+ {
+ \__galley_cutout_store:nn
+ { \seq_gpop:cNF { g__galley_cutout_ #1 _ seq } }
+ {##1}
+ }
+ }
+ {
+ \seq_map_inline:cn { g__galley_cutout_ #1 _ seq }
+ {
+ \__galley_cutout_store:nn
+ { \seq_pop:NNF \l__galley_tmpa_seq }
+ {##1}
+ }
+ }
+ \seq_gset_eq:cN { g__galley_cutout_ #1 _ seq } \l__galley_tmpb_seq
+ }
+\cs_new_protected:Npn \__galley_cutout_store:nn #1#2
+ {
+ #1 \l__galley_tmp_tl
+ { \tl_set:Nn \l__galley_tmp_tl { 0 pt } }
+ \seq_put_right:Nx \l__galley_tmpb_seq
+ { \dim_eval:n { \l__galley_tmp_tl + #2 } }
}
-\cs_new:Npn \__galley_set_parshape_map:nn #1#2
- { \__galley_set_parshape_map_aux:nw { } #1 , \q_mark #2 , \q_stop }
-\cs_generate_variant:Nn \__galley_set_parshape_map:nn { oo }
-\cs_new:Npn \__galley_set_parshape_map_aux:nw #1#2 , #3 \q_mark #4 , #5 \q_stop
+\cs_new_protected:Npn \__galley_cutout_set:Nn #1#2
{
- \bool_if:nTF { \tl_if_empty_p:n {#3} || \tl_if_empty_p:n {#5} }
+ \int_zero:N \l__galley_tmp_int
+ \tl_clear:N \l__galley_tmp_tl
+ \seq_map_function:Nc #1 { __galley_cutout_ #2 :n }
+ \int_compare:nNnTF \tex_parshape:D > \l__galley_tmp_int
{
- #1
- \dim_eval:n { \l_galley_total_left_margin_dim + ( #2 ) }
- \c_space_tl
- \dim_eval:n { \l_galley_text_width_dim - ( ( #2 ) + ( #4 ) ) }
+ \int_step_function:nnnN
+ { \l__galley_tmp_int + \c_one }
+ \c_one
+ \tex_parshape:D
+ \__galley_cutout_end:n
}
{
- \__galley_set_parshape_map_aux:nw
+ \int_incr:N \l__galley_tmp_int
+ \int_compare:nNnTF \tex_parshape:D = \c_zero
{
- #1
- \dim_eval:n { \l_galley_total_left_margin_dim + ( #2 ) }
- \c_space_tl
- \dim_eval:n { \l_galley_text_width_dim - ( ( #2 ) + ( #4 ) ) }
- \c_space_tl
+ \tl_put_right:Nn \l__galley_tmp_tl
+ { \l__galley_total_left_margin_dim \l__galley_text_width_dim }
+ }
+ {
+ \tl_put_right:Nx \l__galley_tmp_tl
+ {
+ \dim_eval:n { \etex_parshapeindent:D \tex_parshape:D }
+ \c_space_tl
+ \dim_eval:n { \etex_parshapelength:D \tex_parshape:D }
+ \c_space_tl
+ }
}
- #3 \q_mark #5 \q_stop
}
+ \tex_parshape:D
+ \l__galley_tmp_int
+ \l__galley_tmp_tl
}
-\cs_new_protected_nopar:Npn \__galley_generate_parshape_lines:
+\cs_new_protected:Npn \__galley_cutout_left:n #1
{
- \int_compare:nNnTF \tex_parshape:D > \g_galley_previous_par_lines_int
+ \int_incr:N \l__galley_tmp_int
+ \tl_put_right:Nx \l__galley_tmp_tl
{
- \tex_global:D \tex_parshape:D
- \__int_eval:w \tex_parshape:D - \g_galley_previous_par_lines_int
- \__int_eval_end:
- \int_step_function:nnnN
- { \g_galley_previous_par_lines_int + \c_one }
- \c_one \tex_parshape:D \__galley_generate_parshape_lines:n
+ \int_compare:nNnTF \l__galley_tmp_int > \tex_parshape:D
+ {
+ \dim_eval:n { \l__galley_total_left_margin_dim + ( #1 ) }
+ \c_space_tl
+ \dim_eval:n { \l__galley_text_width_dim - ( #1 ) }
+ \c_space_tl
+ }
+ {
+ \dim_eval:n { \etex_parshapeindent:D \l__galley_tmp_int + ( #1 ) }
+ \c_space_tl
+ \dim_eval:n { \etex_parshapelength:D \l__galley_tmp_int - ( #1 ) }
+ \c_space_tl
+ }
}
+ }
+\cs_new_protected:Npn \__galley_cutout_right:n #1
+ {
+ \int_incr:N \l__galley_tmp_int
+ \tl_put_right:Nx \l__galley_tmp_tl
{
- \bool_gset_false:N \g__galley_parshape_set_bool
- \tex_global:D \tex_parshape:D
- \c_one
- \dim_use:N \l_galley_total_left_margin_dim
- \c_space_tl
- \dim_use:N \l_galley_text_width_dim
+ \dim_eval:n { \etex_parshapeindent:D \l__galley_tmp_int }
+ \c_space_tl
+ \dim_eval:n { \etex_parshapelength:D \l__galley_tmp_int - ( #1 ) }
+ \c_space_tl
}
}
-\cs_new:Npn \__galley_generate_parshape_lines:n #1
+\cs_new_protected:Npn \__galley_cutout_end:n #1
{
- \etex_parshapeindent:D #1
- ~
- \etex_parshapelength:D #1
+ \int_incr:N \l__galley_tmp_int
+ \tl_put_right:Nx \l__galley_tmp_tl
+ {
+ \dim_eval:n { \etex_parshapeindent:D #1 }
+ \c_space_tl
+ \dim_eval:n { \etex_parshapelength:D #1 }
+ \c_space_tl
+ }
}
-\cs_new_protected:Npn \galley_set_user_penalty:n #1
+\cs_new_protected:Npn \galley_penalty_set_single:n #1
{ \tl_gset:Nx \g__galley_interpar_penalty_user_tl { \int_eval:n {#1} } }
-\cs_new_protected:Npn \galley_set_user_vspace:n #1
+\cs_new_protected:Npn \galley_vspace_set_single:n #1
{ \tl_gset:Nx \g__galley_interpar_vspace_user_tl { \skip_eval:n {#1} } }
\dim_set:Nn \parskip \c_zero_dim
\cs_undefine:N \parskip
@@ -560,7 +682,7 @@
\cs_new_eq:NN \l_galley_par_end_skip \tex_parfillskip:D
\cs_new_eq:NN \l_galley_par_indent_dim \tex_parindent:D
\cs_new_eq:NN \l_galley_last_line_fit_int \etex_lastlinefit:D
-\cs_new_protected:Npn \galley_set_interword_spacing:N #1
+\cs_new_protected:Npn \galley_interword_spacing_set:N #1
{
\bool_if:NTF #1
{ % TODO Hook for font changes required!
@@ -607,45 +729,45 @@
\cs_new_eq:NN \l_galley_pre_display_penalty_int \tex_predisplaypenalty:D
\clist_new:N \l_galley_club_penalties_clist
\clist_new:N \l_galley_line_penalties_clist
-\cs_new_protected:Npn \galley_set_display_widow_penalties:n #1
+\cs_new_protected:Npn \galley_display_widow_penalties_set:n #1
{
\etex_displaywidowpenalties:D
\__int_eval:w \clist_count:n {#1} + \c_one \__int_eval_end:
- \clist_map_function:nN {#1} \galley_set_aux:n
+ \clist_map_function:nN {#1} \__galley_set_aux:n
\c_zero
}
-\cs_generate_variant:Nn \galley_set_display_widow_penalties:n { V , v }
-\cs_new_protected:Npn \galley_set_widow_penalties:n #1
+\cs_generate_variant:Nn \galley_display_widow_penalties_set:n { V , v }
+\cs_new_protected:Npn \galley_widow_penalties_set:n #1
{
\etex_widowpenalties:D
\__int_eval:w \clist_count:n {#1} + \c_one \__int_eval_end:
- \clist_map_function:nN {#1} \galley_set_aux:n
+ \clist_map_function:nN {#1} \__galley_set_aux:n
\c_zero
}
-\cs_generate_variant:Nn \galley_set_widow_penalties:n { V , v }
-\cs_new:Npn \galley_set_aux:n #1 { #1 ~ }
-\cs_new_protected:Npn \galley_set_club_penalties:n #1
+\cs_generate_variant:Nn \galley_widow_penalties_set:n { V , v }
+\cs_new:Npn \__galley_set_aux:n #1 { \int_eval:n {#1} ~ }
+\cs_new_protected:Npn \galley_club_penalties_set:n #1
{
\clist_set:Nn \l_galley_club_penalties_clist {#1}
\__galley_calc_interline_penalties:
}
-\cs_generate_variant:Nn \galley_set_club_penalties:n { V , v }
-\cs_new_protected:Npn \galley_set_interline_penalties:n #1
+\cs_generate_variant:Nn \galley_club_penalties_set:n { V , v }
+\cs_new_protected:Npn \galley_interline_penalties_set:n #1
{
\clist_set:Nn \l_galley_line_penalties_clist {#1}
\__galley_calc_interline_penalties:
}
-\cs_generate_variant:Nn \galley_set_interline_penalties:n { V , v }
-\cs_new_protected:Npn \galley_set_display_club_penalties:n #1
+\cs_generate_variant:Nn \galley_interline_penalties_set:n { V , v }
+\cs_new_protected:Npn \galley_display_club_penalties_set:n #1
{
\etex_clubpenalties:D
\__int_eval:w \clist_count:n {#1} + \c_one \__int_eval_end:
- \clist_map_function:nN {#1} \galley_set_aux:n
+ \clist_map_function:nN {#1} \__galley_set_aux:n
\c_zero
\__galley_calc_interline_penalties:
}
-\cs_generate_variant:Nn \galley_set_display_club_penalties:n { V , v }
-\cs_new_protected:Npn \galley_set_interline_penalty:n #1
+\cs_generate_variant:Nn \galley_display_club_penalties_set:n { V , v }
+\cs_new_protected:Npn \galley_interline_penalty_set:n #1
{
\int_compare:nNnTF { \etex_interlinepenalties:D \c_zero } = \c_zero
{
@@ -653,7 +775,7 @@
\__galley_calc_interline_penalties:
}
{
- \cs_set:Npn \__galley_set_interline_penalty_ii:n ##1
+ \cs_set:Npn \__galley_set_interline_penalty_auxii:n ##1
{
\__int_eval:w
\etex_interlinepenalties:D ##1
@@ -670,34 +792,31 @@
\etex_interlinepenalties:D
\etex_interlinepenalties:D \c_zero
\int_step_function:nnnN \c_one \c_one {#1}
- \__galley_set_interline_penalty_i:n
+ \__galley_set_interline_penalty_auxi:n
\int_step_function:nnnN { #1 + \c_one } \c_one
{ \etex_interlinepenalties:D \c_zero - \c_one }
- \__galley_set_interline_penalty_ii:n
+ \__galley_set_interline_penalty_auxii:n
\__int_eval:w #2 \__int_eval_end:
}
-\cs_new:Npn \__galley_set_interline_penalty_i:n #1
+\cs_new:Npn \__galley_set_interline_penalty_auxi:n #1
{ \etex_interlinepenalties:D \__int_eval:w #1 \__int_eval_end: }
-\cs_new:Npn \__galley_set_interline_penalty_ii:n #1 { }
+\cs_new:Npn \__galley_set_interline_penalty_auxii:n #1 { }
\cs_new_protected_nopar:Npn \__galley_calc_interline_penalties:
{
\exp_args:Nff \__galley_calc_interline_penalties:nn
{
- \int_eval:n
+ \int_max:nn
+ {
+ \clist_count:N \l_galley_club_penalties_clist
+ + \c_one
+ }
{
\int_max:nn
{
- \clist_count:N \l_galley_club_penalties_clist
+ \clist_count:N \l_galley_line_penalties_clist
+ \c_one
}
- {
- \int_max:nn
- {
- \clist_count:N \l_galley_line_penalties_clist
- + \c_one
- }
- { \etex_clubpenalties:D \c_zero }
- }
+ { \etex_clubpenalties:D \c_zero }
}
}
{ \clist_count:N \l_galley_line_penalties_clist }
@@ -706,12 +825,12 @@
{
\etex_interlinepenalties:D #1 ~
\int_step_function:nnnN \c_one \c_one {#2}
- \__galley_calc_interline_penalties_i:n
+ \__galley_calc_interline_penalties_auxi:n
\int_step_function:nnnN { #2 + \c_one } \c_one { #1 - \c_one }
- \__galley_calc_interline_penalties_ii:n
+ \__galley_calc_interline_penalties_auxii:n
\etex_interlinepenalties:D \etex_interlinepenalties:D \c_zero
}
-\cs_new:Npn \__galley_calc_interline_penalties_i:n #1
+\cs_new:Npn \__galley_calc_interline_penalties_auxi:n #1
{
\__int_eval:w
\clist_item:Nn \l_galley_line_penalties_clist {#1}
@@ -719,7 +838,7 @@
- \etex_clubpenalties:D #1 ~
\__int_eval_end:
}
-\cs_new:Npn \__galley_calc_interline_penalties_ii:n #1
+\cs_new:Npn \__galley_calc_interline_penalties_auxii:n #1
{
\__int_eval:w
\etex_interlinepenalties:D \etex_interlinepenalties:D \c_zero
@@ -737,21 +856,21 @@
{
\int_step_function:nnnN \c_one \c_one
{ \etex_clubpenalties:D \c_zero - \c_one }
- \galley_save_display_club_penalties:_aux:n
+ \__galley_save_display_club_penalties:n
}
}
-\cs_new:Npn \galley_save_display_club_penalties:_aux:n #1
- { \int_use:N \etex_clubpenaltes:D \__int_eval:w #1 \__int_eval_end: , }
+\cs_new:Npn \__galley_save_display_club_penalties:n #1
+ { \int_use:N \etex_clubpenalties:D \__int_eval:w #1 \__int_eval_end: , }
\cs_new_protected:Npn \galley_save_display_widow_penalties:N #1
{
\clist_set:Nx #1
{
\int_step_function:nnnN \c_one \c_one
{ \etex_displaywidowpenalties:D \c_zero - \c_one }
- \galley_save_display_widow_penalties:_aux:n
+ \__galley_save_display_widow_penalties:n
}
}
-\cs_new:Npn \galley_save_display_widow_penalties:_aux:n #1
+\cs_new:Npn \__galley_save_display_widow_penalties:n #1
{ \int_use:N \etex_displaywidowpenalties:D \__int_eval:w #1 \__int_eval_end: , }
\cs_new_protected:Npn \galley_save_widow_penalties:N #1
{
@@ -759,10 +878,10 @@
{
\int_step_function:nnnN \c_one \c_one
{ \etex_widowpenalties:D \c_zero - \c_one }
- \galley_save_widow_penalties:_aux:n
+ \__galley_save_widow_penalties:n
}
}
-\cs_new:Npn \galley_save_widow_penalties:_aux:n #1
+\cs_new:Npn \__galley_save_widow_penalties:n #1
{ \int_use:N \etex_widowpenalties:D \__int_eval:w #1 \__int_eval_end: , }
\cs_new_protected_nopar:Npn \galley_interline_penalty:
{ \int_use:N \etex_interlinepenalties:D \etex_interlinepenalties:D \c_zero }
@@ -782,7 +901,7 @@
\tl_gput_right:Nn \g_galley_whatsit_next_tl
{ \iow_shipout:Nx \c_minus_one { } }
\tex_vbox:D { }
- \galley_set_user_penalty:n { -\@Mi }
+ \galley_penalty_set_single:n { -\@Mi }
}
\RenewDocumentCommand \nobreak { }
{ \bool_gset_true:N \g_galley_no_break_next_bool }
@@ -794,20 +913,20 @@
\RenewDocumentCommand \vspace { s m }
{
\IfBooleanTF #1
- { \galley_set_user_vspace:n {#2} }
- { \galley_set_user_vspace:n {#2} }
+ { \galley_vspace_set_single:n {#2} }
+ { \galley_vspace_set_single:n {#2} }
}
\RenewDocumentCommand \\ { s O { 0 pt } }
{ \galley_break_line:Nn #1 {#2} }
\RenewDocumentCommand \newline { }
{ \galley_break_line:Nn \c_true_bool { 0 pt } }
-\cs_set_eq:NN \__galleypar \__galley_std_par:
+\cs_set_eq:cN { @ @ par } \galley_par:
\cs_set_protected_nopar:Npn \@afterheading
{
\bool_gset_true:N \g_galley_no_break_next_bool
\if@afterindent
\else
- \bool_gset_true:N \galley_omit_next_indent_bool
+ \bool_gset_true:N \g_galley_omit_next_indent_bool
\fi
}
\cs_set_protected:Npn \@hangfrom #1
@@ -815,7 +934,7 @@
\bool_gset_true:N \g_galley_omit_next_indent_bool
\leavevmode
\setbox \@tempboxa = \hbox { {#1} }
- \galley_parshape_single_par:nnnN
+ \galley_parshape_set_single:nnnN
\c_one
{ \box_wd:N \@tempboxa }
\c_zero_dim
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty
index f8552f3f8e4..f736e2b74a6 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty
@@ -48,7 +48,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{expl3}
-\GetIdInfo$Id: xgalley.dtx 4253 2012-11-01 21:01:54Z joseph $
+\GetIdInfo$Id: xgalley.dtx 4373 2012-12-17 16:41:59Z joseph $
{L3 Experimental galley}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -111,14 +111,14 @@
\AssignTemplateKeys
\bool_if:NTF \l__galley_parshape_on_left_bool
{
- \galley_parshape_single_par:nVVN
+ \galley_parshape_set_single:nVVN
\l__galley_parshape_lines_int
\l__galley_parshape_indent_dim
\c_zero_dim
\c_false_bool
}
{
- \galley_parshape_single_par:nVVN
+ \galley_parshape_set_single:nVVN
\l__galley_parshape_lines_int
\c_zero_dim
\l__galley_parshape_indent_dim
@@ -144,14 +144,14 @@
}
\bool_if:NTF \l__galley_parshape_on_left_bool
{
- \galley_parshape_single_par:nVVN
+ \galley_parshape_set_single:nVVN
\c_zero
\l__galley_tmpa_clist
\l__galley_tmpb_clist
\c_true_bool
}
{
- \galley_parshape_single_par:nVVN
+ \galley_parshape_set_single:nVVN
\c_zero
\l__galley_tmpb_clist
\l__galley_tmpa_clist
@@ -242,7 +242,7 @@
{
\AssignTemplateKeys
\tl_clear:N \l__galley_justification_other_tl
- \galley_set_interword_spacing:N \l_galley_fixed_spacing_bool
+ \galley_interword_spacing_set:N \l_galley_fixed_spacing_bool
\bool_if:NTF \l_galley_par_stretch_last_bool
{ \int_set_eq:NN \l_galley_last_line_fit_int \c_one_thousand }
{ \int_zero:N \l_galley_last_line_fit_int }
@@ -266,7 +266,7 @@
\bool_if:NTF \l_galley_fixed_spacing_bool
{ \bool_set_true:N \exp_not:N \l_galley_fixed_spacing_bool }
{ \bool_set_false:N \exp_not:N \l_galley_fixed_spacing_bool }
- \galley_set_interword_spacing:N
+ \galley_interword_spacing_set:N
\exp_not:N \l_galley_fixed_spacing_bool
\dim_set:Nn \exp_not:N \l_galley_par_indent_dim
{ \dim_use:N \l_galley_par_indent_dim }
@@ -284,7 +284,7 @@
\tl_gput_right:Nn \g_galley_restore_running_tl
{ \l__galley_justification_other_tl }
\AssignTemplateKeys
- \galley_set_interword_spacing:N \l_galley_fixed_spacing_bool
+ \galley_interword_spacing_set:N \l_galley_fixed_spacing_bool
\bool_if:NTF \l_galley_par_stretch_last_bool
{ \int_set_eq:NN \l_galley_last_line_fit_int \c_one_thousand }
{ \int_zero:N \l_galley_last_line_fit_int }
@@ -401,11 +401,11 @@
}
{
\AssignTemplateKeys
- \galley_set_club_penalties:V \l__galley_club_penalty_int
- \galley_set_display_club_penalties:V \l__galley_display_club_penalty_int
- \galley_set_display_widow_penalties:V \l__galley_display_widow_penalty_int
- \galley_set_interline_penalty:n \l__galley_interline_penalty_int
- \galley_set_widow_penalties:V \l__galley_widow_penalty_int
+ \galley_club_penalties_set:V \l__galley_club_penalty_int
+ \galley_display_club_penalties_set:V \l__galley_display_club_penalty_int
+ \galley_display_widow_penalties_set:V \l__galley_display_widow_penalty_int
+ \galley_interline_penalty_set:n \l__galley_interline_penalty_int
+ \galley_widow_penalties_set:V \l__galley_widow_penalty_int
}
\DeclareInstance { paragraph-breaking } { std } { std } { }
\UseInstance { paragraph-breaking } { std }
@@ -451,7 +451,7 @@
\AssignTemplateKeys
\tl_if_empty:NF \l__galley_interline_penalty_tl
{
- \tl_gput_right:Nx \g_galley_par_after_hook_tl
+ \tl_gput_right:Nx \g_galley_par_reset_hook_tl
{
\int_set:Nn \exp_not:N \l__galley_interline_penalty_int
{ \galley_interline_penalty: }
@@ -461,7 +461,7 @@
}
\tl_if_empty:NF \l__galley_parbreak_fuzz_tl
{
- \tl_gput_right:Nx \g_galley_par_after_hook_tl
+ \tl_gput_right:Nx \g_galley_par_reset_hook_tl
{
\dim_set:Nn \exp_not:N \l_galley_parbreak_fuzz_dim
{ \dim_use:N \l_galley_parbreak_fuzz_dim }
@@ -472,7 +472,7 @@
{
\tl_if_empty:cF { l_galley_ ##1 _tl }
{
- \tl_gput_right:Nx \g_galley_par_after_hook_tl
+ \tl_gput_right:Nx \g_galley_par_reset_hook_tl
{
\int_set:Nn \exp_not:c { l_galley_ ##1 _int }
{ \int_use:c { l_galley_ ##1 _int } }
@@ -486,7 +486,7 @@
\tl_if_empty:cF { l_galley_ ##1 _tl }
{
\use:c { galley_save_ ##1 :N } \l__galley_tmpa_clist
- \tl_gput_right:Nx \g_galley_par_after_hook_tl
+ \tl_gput_right:Nx \g_galley_par_reset_hook_tl
{
\exp_not:c { galley_set_ ##1 :n }
{ \exp_not:o \l__galley_tmpa_clist }