summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex701
1 files changed, 480 insertions, 221 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
index 0c0e211dda4..6a392563581 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
@@ -82,8 +82,8 @@
%% -----------------------------------------------------------------------
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 programming layer}
-\def\ExplFileDate{2015/09/11}
-\def\ExplFileVersion{6002}
+\def\ExplFileDate{2015/09/27}
+\def\ExplFileVersion{6111}
\begingroup
\def\next{\endgroup}
\expandafter\ifx\csname PackageError\endcsname\relax
@@ -489,7 +489,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3names.dtx 5939 2015-09-07 21:15:55Z joseph $
+\GetIdInfo$Id: l3names.dtx 6108 2015-09-27 08:58:42Z joseph $
{L3 Namespace for primitives}
\let \tex_global:D \global
\let \tex_let:D \let
@@ -1000,8 +1000,9 @@
\__kernel_primitive:NN \rpcode \pdftex_rpcode:D
\__kernel_primitive:NN \synctex \pdftex_synctex:D
\__kernel_primitive:NN \tagcode \pdftex_tagcode:D
+ \__kernel_primitive:NN \suppressfontnotfounderror \xetex_suppressfontnotfounderror:D
\__kernel_primitive:NN \XeTeXcharclass \xetex_charclass:D
- \__kernel_primitive:NN \XeTeXcharglyph \xetex_charcglyph:D
+ \__kernel_primitive:NN \XeTeXcharglyph \xetex_charglyph:D
\__kernel_primitive:NN \XeTeXcountfeatures \xetex_countfeatures:D
\__kernel_primitive:NN \XeTeXcountglyphs \xetex_countglyphs:D
\__kernel_primitive:NN \XeTeXcountselectors \xetex_countselectors:D
@@ -1029,7 +1030,7 @@
\__kernel_primitive:NN \XeTeXlinebreakskip \xetex_linebreakskip:D
\__kernel_primitive:NN \XeTeXlinebreaklocale \xetex_linebreaklocale:D
\__kernel_primitive:NN \XeTeXlinebreakpenalty \xetex_linebreakpenalty:D
- \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcounfeatures:D
+ \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcountfeatures:D
\__kernel_primitive:NN \XeTeXOTcountlanguages \xetex_OTcountlanguages:D
\__kernel_primitive:NN \XeTeXOTcountscripts \xetex_OTcountscripts:D
\__kernel_primitive:NN \XeTeXOTfeaturetag \xetex_OTfeaturetag:D
@@ -1084,7 +1085,6 @@
\__kernel_primitive:NN \prehyphenchar \luatex_prehyphenchar:D
\__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D
\__kernel_primitive:NN \scantextokens \luatex_scantextokens:D
- \__kernel_primitive:NN \suppressfontnotfounderror \luatex_suppressfontnotfounderror:D
\__kernel_primitive:NN \suppressifcsnameerror \luatex_suppressifcsnameerror:D
\__kernel_primitive:NN \suppresslongerror \luatex_suppresslongerror:D
\__kernel_primitive:NN \suppressmathparerror \luatex_suppressmathparerror:D
@@ -1320,12 +1320,12 @@
\tex_let:D \luatex_prehyphenchar:D \luatexprehyphenchar
\tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
\tex_let:D \luatex_scantextokens:D \luatexscantextokens
- \tex_let:D \luatex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror
\tex_let:D \luatex_suppressifcsnameerror:D \luatexsuppressifcsnameerror
\tex_let:D \luatex_suppresslongerror:D \luatexsuppresslongerror
\tex_let:D \luatex_suppressmathparerror:D \luatexsuppressmathparerror
\tex_let:D \luatex_suppressoutererror:D \luatexsuppressoutererror
\tex_let:D \utex_char:D \luatexUchar
+ \tex_let:D \xetex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror
\tex_let:D \luatex_bodydir:D \luatexbodydir
\tex_let:D \luatex_boxdir:D \luatexboxdir
\tex_let:D \luatex_chardp:D \luatexchardp
@@ -1436,7 +1436,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3basics.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3basics.dtx 6033 2015-09-22 19:48:51Z bruno $
{L3 Basic definitions}
\tex_let:D \if_true: \tex_iftrue:D
\tex_let:D \if_false: \tex_iffalse:D
@@ -1461,7 +1461,6 @@
\tex_let:D \exp_not:n \etex_unexpanded:D
\tex_let:D \exp:w \tex_romannumeral:D
\tex_chardef:D \exp_end: = 0 ~
-
\tex_let:D \token_to_meaning:N \tex_meaning:D
\tex_let:D \cs_meaning:N \tex_meaning:D
\tex_let:D \tl_to_str:n \etex_detokenize:D
@@ -2680,7 +2679,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3tl.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3tl.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Token lists}
\cs_new_protected:Npn \tl_new:N #1
{
@@ -2729,7 +2728,6 @@
\prg_new_eq_conditional:NNn \tl_if_exist:N \cs_if_exist:N { TF , T , F , p }
\prg_new_eq_conditional:NNn \tl_if_exist:c \cs_if_exist:c { TF , T , F , p }
\tl_const:Nn \c_empty_tl { }
-\tl_const:Nx \c_job_name_tl { \tex_jobname:D }
\tl_const:Nn \c_space_tl { ~ }
\cs_new_protected:Npn \tl_set:Nn #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:n {#2} } }
@@ -2905,7 +2903,7 @@
{ \use_ii:nn }
{
\char_set_lccode:nn { 0 } { \tex_newlinechar:D }
- \tl_to_lowercase:n { \__tl_set_rescan:NnTF ^^@ } {#1}
+ \tex_lowercase:D { \__tl_set_rescan:NnTF ^^@ } {#1}
}
{ \__tl_set_rescan_multi:n }
{ \__tl_set_rescan_single:nn { ' } }
@@ -2922,7 +2920,7 @@
\int_compare:nNnTF { `#1 } < { `\~ }
{
\char_set_lccode:nn { 0 } { `#1 + 1 }
- \tl_to_lowercase:n { \__tl_set_rescan_single:nn { ^^@ } }
+ \tex_lowercase:D { \__tl_set_rescan_single:nn { ^^@ } }
}
{ \__tl_set_rescan_single_aux:nn { } }
}
@@ -3176,7 +3174,7 @@
\cs_generate_variant:Nn \tl_case:NnF { c }
\cs_generate_variant:Nn \tl_case:NnTF { c }
\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
- { \c_zero #1 #4 }
+ { \exp_end: #1 #4 }
\cs_new_eq:NN \__tl_case_end:nw \__prg_case_end:nw
\cs_new:Npn \tl_map_function:nN #1#2
{
@@ -3564,7 +3562,7 @@
\tl_new:N \g_tmpb_tl
\tl_new:N \l_tmpa_tl
\tl_new:N \l_tmpb_tl
-%% File: l3str.dtx Copyright (C) 2014-2015 The LaTeX3 Project
+%% File: l3str.dtx Copyright (C) 2011-2015 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
@@ -3596,23 +3594,56 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3str.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3str.dtx 6021 2015-09-20 15:10:27Z joseph $
{L3 Strings}
-\cs_new:Npn \str_head:n #1
- {
- \exp_after:wN \__str_head:w
- \tl_to_str:n {#1}
- { { } } ~ \q_stop
- }
-\cs_new:Npn \__str_head:w #1 ~ %
- { \tl_head:w #1 { ~ } }
-\cs_new:Npn \str_tail:n #1
- {
- \exp_after:wN \__str_tail:w
- \reverse_if:N \if_charcode:w
- \scan_stop: \tl_to_str:n {#1} X X \q_stop
- }
-\cs_new:Npn \__str_tail:w #1 X #2 \q_stop { \fi: #1 }
+\group_begin:
+ \cs_set_protected:Npn \__str_tmp:n #1
+ {
+ \tl_if_blank:nF {#1}
+ {
+ \cs_new_eq:cc { str_ #1 :N } { tl_ #1 :N }
+ \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :N } { c }
+ \__str_tmp:n
+ }
+ }
+ \__str_tmp:n
+ { new }
+ { use }
+ { clear }
+ { gclear }
+ { clear_new }
+ { gclear_new }
+ { }
+\group_end:
+\cs_new_eq:NN \str_set_eq:NN \tl_set_eq:NN
+\cs_new_eq:NN \str_gset_eq:NN \tl_gset_eq:NN
+\cs_generate_variant:Nn \str_set_eq:NN { c , Nc , cc }
+\cs_generate_variant:Nn \str_gset_eq:NN { c , Nc , cc }
+\group_begin:
+ \cs_set_protected:Npn \__str_tmp:n #1
+ {
+ \tl_if_blank:nF {#1}
+ {
+ \cs_new_protected:cpx { str_ #1 :Nn } ##1##2
+ { \exp_not:c { tl_ #1 :Nx } ##1 { \exp_not:N \tl_to_str:n {##2} } }
+ \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :Nn } { Nx , cn , cx }
+ \__str_tmp:n
+ }
+ }
+ \__str_tmp:n
+ { set }
+ { gset }
+ { const }
+ { put_left }
+ { gput_left }
+ { put_right }
+ { gput_right }
+ { }
+\group_end:
+\prg_new_eq_conditional:NNn \str_if_exist:N \tl_if_exist:N { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_exist:c \tl_if_exist:c { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_empty:N \tl_if_empty:N { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_empty:c \tl_if_empty:c { p , T , F , TF }
\cs_new:Npn \__str_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} }
\cs_if_exist:NT \luatex_luatexversion:D
{
@@ -3663,6 +3694,15 @@
\if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero
\prg_return_true: \else: \prg_return_false: \fi:
}
+\prg_new_conditional:Npnn \str_if_eq:NN #1#2 { p , TF , T , F }
+ {
+ \if_int_compare:w \__str_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 }
+ = \c_zero \prg_return_true: \else: \prg_return_false: \fi:
+ }
+\cs_generate_variant:Nn \str_if_eq:NNT { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq:NNF { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq:NNTF { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq_p:NN { c , Nc , cc }
\cs_new:Npn \str_case:nn #1#2
{
\exp:w
@@ -3724,6 +3764,251 @@
{ \__str_case_x:nw {#1} }
}
\cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw
+\cs_new:Npn \__str_to_other:n #1
+ {
+ \exp_after:wN \__str_to_other_loop:w
+ \tl_to_str:n {#1} ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_mark \q_stop
+ }
+\group_begin:
+\tex_lccode:D `\* = `\ %
+\tex_lccode:D `\A = `\A
+\tex_lowercase:D
+ {
+ \group_end:
+ \cs_new:Npn \__str_to_other_loop:w
+ #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 ~ #7 ~ #8 ~ #9 \q_stop
+ {
+ \if_meaning:w A #8
+ \__str_to_other_end:w
+ \fi:
+ \__str_to_other_loop:w
+ #9 #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * \q_stop
+ }
+ \cs_new:Npn \__str_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop
+ { \fi: #2 }
+ }
+\cs_new_nopar:Npn \str_item:Nn { \exp_args:No \str_item:nn }
+\cs_generate_variant:Nn \str_item:Nn { c }
+\cs_new:Npn \str_item:nn #1#2
+ {
+ \exp_args:Nf \tl_to_str:n
+ {
+ \exp_args:Nf \__str_item:nn
+ { \__str_to_other:n {#1} } {#2}
+ }
+ }
+\cs_new:Npn \str_item_ignore_spaces:nn #1
+ { \exp_args:No \__str_item:nn { \tl_to_str:n {#1} } }
+\cs_new:Npn \__str_item:nn #1#2
+ {
+ \exp_after:wN \__str_item:w
+ \int_use:N \__int_eval:w #2 \exp_after:wN ;
+ \__int_value:w \__str_count:n {#1} ;
+ #1 \q_stop
+ }
+\cs_new:Npn \__str_item:w #1; #2;
+ {
+ \int_compare:nNnTF {#1} < \c_zero
+ {
+ \int_compare:nNnTF {#1} < {-#2}
+ { \use_none_delimit_by_q_stop:w }
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \exp:w \exp_after:wN \__str_skip_exp_end:w
+ \int_use:N \__int_eval:w #1 + #2 ;
+ }
+ }
+ {
+ \int_compare:nNnTF {#1} > {#2}
+ { \use_none_delimit_by_q_stop:w }
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \exp:w \__str_skip_exp_end:w #1 ; { }
+ }
+ }
+ }
+\cs_new:Npn \__str_skip_exp_end:w #1;
+ {
+ \if_int_compare:w #1 > \c_eight
+ \exp_after:wN \__str_skip_loop:wNNNNNNNN
+ \else:
+ \exp_after:wN \__str_skip_end:w
+ \int_use:N \__int_eval:w
+ \fi:
+ #1 ;
+ }
+\cs_new:Npn \__str_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
+ { \exp_after:wN \__str_skip_exp_end:w \int_use:N \__int_eval:w #1 - \c_eight ; }
+\cs_new:Npn \__str_skip_end:w #1 ;
+ {
+ \exp_after:wN \__str_skip_end:NNNNNNNN
+ \if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or:
+ }
+\cs_new:Npn \__str_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: }
+\cs_new_nopar:Npn \str_range:Nnn { \exp_args:No \str_range:nnn }
+\cs_generate_variant:Nn \str_range:Nnn { c }
+\cs_new:Npn \str_range:nnn #1#2#3
+ {
+ \exp_args:Nf \tl_to_str:n
+ {
+ \exp_args:Nf \__str_range:nnn
+ { \__str_to_other:n {#1} } {#2} {#3}
+ }
+ }
+\cs_new:Npn \str_range_ignore_spaces:nnn #1
+ { \exp_args:No \__str_range:nnn { \tl_to_str:n {#1} } }
+\cs_new:Npn \__str_range:nnn #1#2#3
+ {
+ \exp_after:wN \__str_range:w
+ \__int_value:w \__str_count:n {#1} \exp_after:wN ;
+ \int_use:N \__int_eval:w #2 - \c_one \exp_after:wN ;
+ \int_use:N \__int_eval:w #3 ;
+ #1 \q_stop
+ }
+\cs_new:Npn \__str_range:w #1; #2; #3;
+ {
+ \exp_args:Nf \__str_range:nnw
+ { \__str_range_normalize:nn {#2} {#1} }
+ { \__str_range_normalize:nn {#3} {#1} }
+ }
+\cs_new:Npn \__str_range:nnw #1#2
+ {
+ \exp_after:wN \__str_collect_delimit_by_q_stop:w
+ \int_use:N \__int_eval:w #2 - #1 \exp_after:wN ;
+ \exp:w \__str_skip_exp_end:w #1 ;
+ }
+\cs_new:Npn \__str_range_normalize:nn #1#2
+ {
+ \int_eval:n
+ {
+ \if_int_compare:w #1 < \c_zero
+ \if_int_compare:w #1 < -#2 \exp_stop_f:
+ \c_zero
+ \else:
+ #1 + #2 + \c_one
+ \fi:
+ \else:
+ \if_int_compare:w #1 < #2 \exp_stop_f:
+ #1
+ \else:
+ #2
+ \fi:
+ \fi:
+ }
+ }
+\cs_new:Npn \__str_collect_delimit_by_q_stop:w #1;
+ { \__str_collect_loop:wn #1 ; { } }
+\cs_new:Npn \__str_collect_loop:wn #1 ;
+ {
+ \if_int_compare:w #1 > \c_seven
+ \exp_after:wN \__str_collect_loop:wnNNNNNNN
+ \else:
+ \exp_after:wN \__str_collect_end:wn
+ \fi:
+ #1 ;
+ }
+\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 ;
+ { #2 #3#4#5#6#7#8#9 }
+ }
+\cs_new:Npn \__str_collect_end:wn #1 ;
+ {
+ \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: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_count_spaces:N
+ { \exp_args:No \str_count_spaces:n }
+\cs_generate_variant:Nn \str_count_spaces:N { c }
+\cs_new:Npn \str_count_spaces:n #1
+ {
+ \int_eval:n
+ {
+ \exp_after:wN \__str_count_spaces_loop:w
+ \tl_to_str:n {#1} ~
+ X 7 ~ X 6 ~ X 5 ~ X 4 ~ X 3 ~ X 2 ~ X 1 ~ X 0 ~ X -1 ~
+ \q_stop
+ }
+ }
+\cs_new:Npn \__str_count_spaces_loop:w #1~#2~#3~#4~#5~#6~#7~#8~#9~
+ {
+ \if_meaning:w X #9
+ \use_i_delimit_by_q_stop:nw
+ \fi:
+ \c_nine + \__str_count_spaces_loop:w
+ }
+\cs_new_nopar:Npn \str_count:N { \exp_args:No \str_count:n }
+\cs_generate_variant:Nn \str_count:N { c }
+\cs_new:Npn \str_count:n #1
+ {
+ \__str_count_aux:n
+ {
+ \str_count_spaces:n {#1}
+ + \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1}
+ }
+ }
+\cs_new:Npn \__str_count:n #1
+ {
+ \__str_count_aux:n
+ { \__str_count_loop:NNNNNNNNN #1 }
+ }
+\cs_new:Npn \str_count_ignore_spaces:n #1
+ {
+ \__str_count_aux:n
+ { \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1} }
+ }
+\cs_new:Npn \__str_count_aux:n #1
+ {
+ \int_eval:n
+ {
+ #1
+ { X \c_eight } { X \c_seven } { X \c_six }
+ { X \c_five } { X \c_four } { X \c_three }
+ { X \c_two } { X \c_one } { X \c_zero }
+ \q_stop
+ }
+ }
+\cs_new:Npn \__str_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
+ {
+ \if_meaning:w X #9
+ \exp_after:wN \use_none_delimit_by_q_stop:w
+ \fi:
+ \c_nine + \__str_count_loop:NNNNNNNNN
+ }
+\cs_new_nopar:Npn \str_head:N { \exp_args:No \str_head:n }
+\cs_generate_variant:Nn \str_head:N { c }
+\cs_set:Npn \str_head:n #1
+ {
+ \exp_after:wN \__str_head:w
+ \tl_to_str:n {#1}
+ { { } } ~ \q_stop
+ }
+\cs_set:Npn \__str_head:w #1 ~ %
+ { \use_i_delimit_by_q_stop:nw #1 { ~ } }
+\cs_new:Npn \str_head_ignore_spaces:n #1
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \tl_to_str:n {#1} { } \q_stop
+ }
+\cs_new_nopar:Npn \str_tail:N { \exp_args:No \str_tail:n }
+\cs_generate_variant:Nn \str_tail:N { c }
+\cs_set:Npn \str_tail:n #1
+ {
+ \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_auxi:w #1 X #2 \q_stop { \fi: #1 }
+\cs_new:Npn \str_tail_ignore_spaces:n #1
+ {
+ \exp_after:wN \__str_tail_auxii:w
+ \tl_to_str:n {#1} \q_mark \q_mark \q_stop
+ }
+\cs_new:Npn \__str_tail_auxii:w #1 #2 \q_mark #3 \q_stop { #2 }
\cs_new:Npn \str_fold_case:n #1 { \__str_change_case:nn {#1} { fold } }
\cs_new:Npn \str_lower_case:n #1 { \__str_change_case:nn {#1} { lower } }
\cs_new:Npn \str_upper_case:n #1 { \__str_change_case:nn {#1} { upper } }
@@ -3768,6 +4053,25 @@
{ c__unicode_ #9 _ #6 _X_ #7 _tl }
{ #8 }
}
+\str_const:Nx \c_ampersand_str { \cs_to_str:N \& }
+\str_const:Nx \c_atsign_str { \cs_to_str:N \@ }
+\str_const:Nx \c_backslash_str { \cs_to_str:N \\ }
+\str_const:Nx \c_left_brace_str { \cs_to_str:N \{ }
+\str_const:Nx \c_right_brace_str { \cs_to_str:N \} }
+\str_const:Nx \c_circumflex_str { \cs_to_str:N \^ }
+\str_const:Nx \c_colon_str { \cs_to_str:N \: }
+\str_const:Nx \c_dollar_str { \cs_to_str:N \$ }
+\str_const:Nx \c_hash_str { \cs_to_str:N \# }
+\str_const:Nx \c_percent_str { \cs_to_str:N \% }
+\str_const:Nx \c_tilde_str { \cs_to_str:N \~ }
+\str_const:Nx \c_underscore_str { \cs_to_str:N \_ }
+\str_new:N \l_tmpa_str
+\str_new:N \l_tmpb_str
+\str_new:N \g_tmpa_str
+\str_new:N \g_tmpb_str
+\cs_new_eq:NN \str_show:n \tl_show:n
+\cs_new_eq:NN \str_show:N \tl_show:N
+\cs_generate_variant:Nn \str_show:N { c }
%% File: l3seq.dtx Copyright (C) 1990-2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -4361,7 +4665,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3int.dtx 5987 2015-09-11 05:44:48Z joseph $
+\GetIdInfo$Id: l3int.dtx 6089 2015-09-25 13:29:50Z mittelba $
{L3 Integers}
\cs_new_eq:NN \__int_value:w \tex_number:D
\cs_new_eq:NN \__int_eval:w \etex_numexpr:D
@@ -4465,8 +4769,7 @@
\cs_if_exist:NT \luatex_luatexversion:D { 1 }
\cs_if_exist:NT \uptex_disablecjktoken:D
{ \if_int_compare:w \ptex_jis:D "2121 = "3000 ~ 1 \fi: }
- \cs_if_exist:NT \xetex_XeTeXversion:D { 1 }
- ~
+ \cs_if_exist:NT \xetex_XeTeXversion:D { 1 } ~
\cs_if_exist:NTF \uptex_disablecjktoken:D
{ \cs_new_eq:NN \__int_constdef:Nw \uptex_kchardef:D }
{ \cs_new_eq:NN \__int_constdef:Nw \tex_chardef:D }
@@ -4525,7 +4828,7 @@
\cs_generate_variant:Nn \int_set:Nn { c }
\cs_generate_variant:Nn \int_gset:Nn { c }
\cs_new_eq:NN \int_use:N \tex_the:D
-\cs_new:Npn \int_use:c #1 { \int_use:N \cs:w #1 \cs_end: }
+\cs_new:Npn \int_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
\cs_new_protected_nopar:Npn \__prg_compare_error:
{
\if_int_compare:w \c_zero \c_zero \fi:
@@ -6228,7 +6531,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3token.dtx 5893 2015-08-26 16:16:52Z mittelba $
+\GetIdInfo$Id: l3token.dtx 6040 2015-09-23 12:41:32Z joseph $
{L3 Experimental token manipulation}
\group_begin:
\tex_catcode:D `@ = \c_eleven
@@ -6237,7 +6540,7 @@
{
\group_begin:
\char_set_lccode:nn { 0 } {#1}
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \__char_set_catcode:Nn ^^@ } {#2}
}
\tex_catcode:D \c_zero = \c_thirteen
@@ -6256,7 +6559,7 @@
{
\group_begin:
\char_set_lccode:nn { 0 } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\seq_if_in:NnF \l_char_active_seq { ^^@ }
@@ -6519,21 +6822,18 @@
\if_charcode:w \exp_not:N #1 \exp_not:N #2
\prg_return_true: \else: \prg_return_false: \fi:
}
-\group_begin:
-\char_set_catcode_other:N \M
-\char_set_catcode_other:N \A
-\char_set_lccode:nn { `\; } { `\: }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\F } { `\F }
-\tl_to_lowercase:n
+\use:x
{
- \group_end:
- \prg_new_conditional:Npnn \token_if_macro:N #1 { p , T , F , TF }
+ \prg_new_conditional:Npnn \exp_not:N \token_if_macro:N ##1
+ { p , T , F , TF }
{
- \exp_after:wN \__token_if_macro_p:w
- \token_to_meaning:N #1 MA; \q_stop
+ \exp_not:N \exp_after:wN \exp_not:N \__token_if_macro_p:w
+ \exp_not:N \token_to_meaning:N ##1 \tl_to_str:n { ma : }
+ \exp_not:N \q_stop
}
- \cs_new:Npn \__token_if_macro_p:w #1 MA #2 ; #3 \q_stop
+ \cs_new:Npn \exp_not:N \__token_if_macro_p:w
+ ##1 \tl_to_str:n { ma } ##2 \c_colon_str ##3 \exp_not:N \q_stop
+ }
{
\if_int_compare:w \__str_if_eq_x:nn { #2 } { cro } = \c_zero
\prg_return_true:
@@ -6541,7 +6841,6 @@
\prg_return_false:
\fi:
}
- }
\prg_new_conditional:Npnn \token_if_cs:N #1 { p , T , F , TF }
{
\if_catcode:w \exp_not:N #1 \scan_stop:
@@ -6567,7 +6866,7 @@
\char_set_lccode:nn { `Z } { `d }
\tl_map_inline:nn { A C E G H I K L M O P R S U X Y Z R " }
{ \char_set_catcode:nn { `#1 } \c_twelve }
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\group_end:
\prg_new_conditional:Npnn \token_if_chardef:N #1 { p , T , F , TF }
@@ -6721,30 +7020,32 @@
}
\cs_new:Npn \__token_if_long_macro:w #1 LOXG~MACRO #2 \q_stop { #1 ~ }
}
-\tex_chardef:D \c_token_A_int = `A ~ %
-\group_begin:
-\char_set_catcode_other:N \;
-\char_set_lccode:nn { `\; } { `\: }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\F } { `\F }
-\tl_to_lowercase:n {
- \group_end:
- \prg_new_conditional:Npnn \token_if_primitive:N #1 { p , T , F , TF }
- {
- \token_if_macro:NTF #1
- \prg_return_false:
- {
- \exp_after:wN \__token_if_primitive:NNw
- \token_to_meaning:N #1 ; ; ; \q_stop #1
- }
- }
- \cs_new:Npn \__token_if_primitive:NNw #1#2 #3 ; #4 \q_stop
- {
- \tl_if_empty:oTF { \__token_if_primitive_space:w #3 ~ }
- { \__token_if_primitive_loop:N #3 ; \q_stop }
- { \__token_if_primitive_nullfont:N }
- }
-}
+\tex_chardef:D \c__token_A_int = `A ~ %
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \token_if_primitive:N ##1
+ { p , T , F , TF }
+ {
+ \exp_not:N \token_if_macro:NTF ##1
+ \exp_not:N \prg_return_false:
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \__token_if_primitive:NNw
+ \exp_not:N \token_to_meaning:N ##1
+ \tl_to_str:n { : : : } \exp_not:N \q_stop ##1
+ }
+ }
+ \cs_new:Npn \exp_not:N \__token_if_primitive:NNw
+ ##1##2 ##3 \c_colon_str ##4 \exp_not:N \q_stop
+ {
+ \exp_not:N \tl_if_empty:oTF
+ { \exp_not:N \__token_if_primitive_space:w ##3 ~ }
+ {
+ \exp_not:N \__token_if_primitive_loop:N ##3
+ \c_colon_str \exp_not:N \q_stop
+ }
+ { \exp_not:N \__token_if_primitive_nullfont:N }
+ }
+ }
\cs_new:Npn \__token_if_primitive_space:w #1 ~ { }
\cs_new:Npn \__token_if_primitive_nullfont:N #1
{
@@ -6756,7 +7057,7 @@
}
\cs_new:Npn \__token_if_primitive_loop:N #1
{
- \if_int_compare:w `#1 < \c_token_A_int %
+ \if_int_compare:w `#1 < \c__token_A_int %
\exp_after:wN \__token_if_primitive:Nw
\exp_after:wN #1
\else:
@@ -7322,7 +7623,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3msg.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3msg.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Messages}
\tl_new:N \l__msg_internal_tl
\tl_const:Nn \c__msg_text_prefix_tl { msg~text~>~ }
@@ -7447,7 +7748,7 @@
\char_set_lccode:nn {`\}} {`\ }
\char_set_lccode:nn {`\&} {`\!}
\char_set_catcode_active:N \&
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\group_end:
\cs_new_protected:Npn \__msg_interrupt_text:n #1
@@ -7983,7 +8284,7 @@
\char_set_lccode:nn { `L } { `L }
\char_set_lccode:nn { `T } { `T }
\char_set_lccode:nn { `X } { `X }
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\cs_new:Npx \__msg_expandable_error:n #1
{
@@ -8141,7 +8442,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3file.dtx 5786 2015-08-05 16:18:39Z bruno $
+\GetIdInfo$Id: l3file.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 File and I/O operations}
\tl_new:N \g_file_current_name_tl
\cs_if_exist:NT \@currname
@@ -8523,7 +8824,7 @@
\group_begin:
\char_set_catcode_other:N \*
\char_set_lccode:nn {`\*} {`\ }
- \tl_to_lowercase:n { \tl_const:Nn \c_catcode_other_space_tl { * } }
+ \tex_lowercase:D { \tl_const:Nn \c_catcode_other_space_tl { * } }
\group_end:
\group_begin:
\int_set_eq:NN \tex_escapechar:D \c_minus_one
@@ -8611,7 +8912,7 @@
\cs_new_protected_nopar:Npn \__iow_wrap_word:
{
\int_set:Nn \l__iow_current_word_int
- { \__str_count_ignore_spaces:N \l__iow_current_word_tl }
+ { \exp_args:No \str_count_ignore_spaces:n \l__iow_current_word_tl }
\int_add:Nn \l__iow_current_line_int { \l__iow_current_word_int }
\int_compare:nNnTF \l__iow_current_line_int < \l__iow_target_count_int
{ \__iow_wrap_word_fits: }
@@ -8681,25 +8982,6 @@
{ \l__iow_current_line_tl }
\use_none_delimit_by_q_stop:w
}
-\cs_new_nopar:Npn \__str_count_ignore_spaces:N
- { \exp_args:No \__str_count_ignore_spaces:n }
-\cs_new:Npn \__str_count_ignore_spaces:n #1
- {
- \__int_value:w \__int_eval:w
- \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1}
- { X8 } { X7 } { X6 } { X5 } { X4 } { X3 } { X2 } { X1 } { X0 }
- \q_stop
- \__int_eval_end:
- }
-\cs_new:Npn \__str_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
- {
- \if_catcode:w X #9
- \exp_after:wN \use_none_delimit_by_q_stop:w
- \else:
- 9 +
- \exp_after:wN \__str_count_loop:NNNNNNNNN
- \fi:
- }
\__msg_kernel_new:nnnn { kernel } { file-not-found }
{ File~'#1'~not~found. }
{
@@ -8760,7 +9042,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3skip.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3skip.dtx 6089 2015-09-25 13:29:50Z mittelba $
{L3 Dimensions and skips}
\cs_new_eq:NN \if_dim:w \tex_ifdim:D
\cs_new_eq:NN \__dim_eval:w \etex_dimexpr:D
@@ -8976,7 +9258,7 @@
\cs_new:Npn \dim_eval:n #1
{ \dim_use:N \__dim_eval:w #1 \__dim_eval_end: }
\cs_new_eq:NN \dim_use:N \tex_the:D
-\cs_generate_variant:Nn \dim_use:N { c }
+\cs_new:Npn \dim_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
\cs_new:Npn \dim_to_decimal:n #1
{
\exp_after:wN
@@ -9085,7 +9367,7 @@
\cs_new:Npn \skip_eval:n #1
{ \skip_use:N \etex_glueexpr:D #1 \scan_stop: }
\cs_new_eq:NN \skip_use:N \tex_the:D
-\cs_generate_variant:Nn \skip_use:N { c }
+\cs_new:Npn \skip_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
\cs_new_eq:NN \skip_horizontal:N \tex_hskip:D
\cs_new:Npn \skip_horizontal:n #1
{ \skip_horizontal:N \etex_glueexpr:D #1 \scan_stop: }
@@ -9200,7 +9482,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3keys.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3keys.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Key-value interfaces}
\int_new:N \g__keyval_level_int
\tl_new:N \l__keyval_key_tl
@@ -9210,24 +9492,24 @@
\group_begin:
\char_set_catcode_active:n { `\= }
\char_set_catcode_active:n { `\, }
- \char_set_lccode:nn { `\8 } { `\= }
- \char_set_lccode:nn { `\9 } { `\, }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new_protected:Npn \__keyval_parse:n #1
- {
- \group_begin:
- \tl_set:Nn \l__keyval_sanitise_tl {#1}
- \tl_replace_all:Nnn \l__keyval_sanitise_tl { = } { 8 }
- \tl_replace_all:Nnn \l__keyval_sanitise_tl { , } { 9 }
- \tl_clear:N \l__keyval_parse_tl
- \exp_after:wN \__keyval_parse_elt:w \exp_after:wN
- \q_nil \l__keyval_sanitise_tl 9 \q_recursion_tail 9 \q_recursion_stop
- \exp_after:wN \group_end:
- \l__keyval_parse_tl
- }
- }
+ \cs_new_protected:Npx \__keyval_parse:n #1
+ {
+ \group_begin:
+ \tl_set:Nn \exp_not:N \l__keyval_sanitise_tl {#1}
+ \tl_replace_all:Nnn \exp_not:N \l__keyval_sanitise_tl
+ { \exp_not:N = } { \token_to_str:N = }
+ \tl_replace_all:Nnn \exp_not:N \l__keyval_sanitise_tl
+ { \exp_not:N , } { \token_to_str:N , }
+ \tl_clear:N \exp_not:N \l__keyval_parse_tl
+ \exp_not:N \exp_after:wN
+ \exp_not:N \__keyval_parse_elt:w \exp_not:N \exp_after:wN
+ \exp_not:N \q_nil \exp_not:N \l__keyval_sanitise_tl
+ \token_to_str:N , \exp_not:N \q_recursion_tail
+ \token_to_str:N , \exp_not:N \q_recursion_stop
+ \exp_not:N \exp_after:wN \group_end:
+ \exp_not:N \l__keyval_parse_tl
+ }
+\group_end:
\cs_new_protected:Npn \__keyval_parse_elt:w #1 ,
{
\tl_if_blank:oF { \use_none:n #1 }
@@ -10911,20 +11193,17 @@
\cs_new:Npn \__fp_parse_expand:w #1 { \exp_end_continue_f:w #1 }
\cs_new:Npn \__fp_parse_return_semicolon:w
#1 \fi: \__fp_parse_expand:w { \fi: ; #1 }
-\group_begin:
-\char_set_catcode_other:N \S
-\char_set_catcode_other:N \F
-\char_set_catcode_other:N \P
-\char_set_lccode:nn { `\- } { `\_ }
-\tl_to_lowercase:n
+\cs_new:Npx \__fp_type_from_scan:N #1
{
- \group_end:
- \cs_new:Npn \__fp_type_from_scan:N #1
- {
- \exp_after:wN \__fp_type_from_scan:w
- \token_to_str:N #1 \q_mark S--FP-? \q_mark \q_stop
- }
- \cs_new:Npn \__fp_type_from_scan:w #1 S--FP #2 \q_mark #3 \q_stop {#2}
+ \exp_not:N \exp_after:wN \exp_not:N \__fp_type_from_scan:w
+ \exp_not:N \token_to_str:N #1 \exp_not:N \q_mark
+ \tl_to_str:n { s__fp _? } \exp_not:N \q_mark \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \__fp_type_from_scan:w
+ ##1 \tl_to_str:n { s__fp } ##2 \exp_not:N \q_mark ##3 \exp_not:N \q_stop
+ {##2}
}
\cs_set_protected:Npn \__fp_tmp:w #1 #2 #3
{
@@ -11016,28 +11295,27 @@
\exp_after:wN \__fp_parse_exponent:N
\exp:w \__fp_parse_expand:w
}
-\group_begin:
-\char_set_catcode_other:N \P
-\char_set_catcode_other:N \T
-\char_set_catcode_other:N \M
-\char_set_catcode_other:N \U
-\tl_to_lowercase:n
+\cs_new:Npx \__fp_parse_one_register_aux:Nw #1
{
- \group_end:
- \cs_new:Npn \__fp_parse_one_register_aux:Nw #1
+ \exp_not:n
{
\exp_after:wN \use:nn
\exp_after:wN \__fp_parse_one_register_auxii:wwwNw
- \exp_after:wN { \tex_the:D #1 }
- ; \__fp_parse_one_register_dim:ww
- PT ; \__fp_parse_one_register_mu:www
- . PT ; \__fp_parse_one_register_int:www
- \q_stop
}
- \cs_new:Npn \__fp_parse_one_register_auxii:wwwNw
- #1 . #2 PT #3 ; #4#5 \q_stop { #4 #1.#2; }
- \cs_new:Npn \__fp_parse_one_register_mu:www #1 MU; #2;
- { \__fp_parse_one_register_dim:ww #1; }
+ \exp_not:N \exp_after:wN { \exp_not:N \tex_the:D #1 }
+ ; \exp_not:N \__fp_parse_one_register_dim:ww
+ \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_mu:www
+ . \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_int:www
+ \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \__fp_parse_one_register_auxii:wwwNw
+ ##1 . ##2 \tl_to_str:n { pt } ##3 ; ##4##5 \exp_not:N \q_stop
+ { ##4 ##1.##2; }
+ \cs_new:Npn \exp_not:N \__fp_parse_one_register_mu:www
+ ##1 \tl_to_str:n { mu } ; ##2 ;
+ { \exp_not:N \__fp_parse_one_register_dim:ww ##1 ; }
}
\cs_new:Npn \__fp_parse_one_register_int:www #1; #2.; #3;
{ \__fp_parse:n { #1 e #3 } }
@@ -16745,7 +17023,7 @@
%%
%% -----------------------------------------------------------------------
%%
-\GetIdInfo$Id: l3candidates.dtx 6002 2015-09-11 22:13:30Z joseph $
+\GetIdInfo$Id: l3candidates.dtx 6039 2015-09-23 12:41:26Z joseph $
{L3 Experimental additions to l3kernel}
\cs_new_protected_nopar:Npn \cs_log:N
{ \__msg_log_next: \cs_show:N }
@@ -17621,56 +17899,6 @@
\cs_new:Npn \__tl_act_count_space:n #1 { 1 + }
\cs_new:Npn \__tl_act_count_group:nn #1 #2
{ 2 + \tl_count_tokens:n {#2} + }
-\tl_const:Nn \c__tl_act_uppercase_tl
- {
- aA bB cC dD eE fF gG hH iI jJ kK lL mM
- nN oO pP qQ rR sS tT uU vV wW xX yY zZ
- }
-\tl_const:Nn \c__tl_act_lowercase_tl
- {
- Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm
- Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz
- }
-\cs_new:Npn \tl_expandable_uppercase:n #1
- {
- \etex_unexpanded:D \exp_after:wN
- {
- \exp:w
- \__tl_act_case_aux:nn { \c__tl_act_uppercase_tl } {#1}
- }
- }
-\cs_new:Npn \tl_expandable_lowercase:n #1
- {
- \etex_unexpanded:D \exp_after:wN
- {
- \exp:w
- \__tl_act_case_aux:nn { \c__tl_act_lowercase_tl } {#1}
- }
- }
-\cs_new:Npn \__tl_act_case_aux:nn
- {
- \__tl_act:NNNnn
- \__tl_act_case_normal:nN
- \__tl_act_case_group:nn
- \__tl_act_case_space:n
- }
-\cs_new:Npn \__tl_act_case_space:n #1 { \__tl_act_output:n {~} }
-\cs_new:Npn \__tl_act_case_normal:nN #1 #2
- {
- \exp_args:Nf \__tl_act_output:n
- {
- \exp_args:NNo \str_case:nnF #2 {#1}
- { \exp_stop_f: #2 }
- }
- }
-\cs_new:Npn \__tl_act_case_group:nn #1 #2
- {
- \exp_after:wN \__tl_act_output:n \exp_after:wN
- {
- \exp_after:wN
- { \exp:w \__tl_act_case_aux:nn {#1} {#2} }
- }
- }
\cs_new_protected_nopar:Npn \tl_set_from_file:Nnn
{ \__tl_set_from_file:NNnn \tl_set:Nn }
\cs_new_protected_nopar:Npn \tl_gset_from_file:Nnn
@@ -18766,12 +18994,7 @@
\__msg_kernel_new:nnn { kernel } { char-space }
{ Cannot~generate~space~chars. }
\group_begin:
- \char_set_catcode_other:N \O
- \char_set_catcode_other:N \U
- \char_set_catcode_other:N \T
- \char_set_catcode_other:N \E
- \char_set_catcode_other:N \R
- \tl_to_lowercase:n
+ \cs_set_protected:Npn \__peek_tmp:w #1 \q_stop
{
\cs_new_protected_nopar:Npn \__peek_execute_branches_N_type:
{
@@ -18783,16 +19006,17 @@
\exp_after:wN \__peek_N_type:w
\token_to_meaning:N \l_peek_token
\q_mark \__peek_N_type_aux:nnw
- OUTER \q_mark \use_none_delimit_by_q_stop:w
+ #1 \q_mark \use_none_delimit_by_q_stop:w
\q_stop
\exp_after:wN \__peek_true:w
\else:
\exp_after:wN \__peek_false:w
\fi:
}
- \cs_new_protected:Npn \__peek_N_type:w #1 OUTER #2 \q_mark #3
- { #3 {#1} {#2} }
+ \cs_new_protected:Npn \__peek_N_type:w ##1 #1 ##2 \q_mark ##3
+ { ##3 {##1} {##2} }
}
+ \exp_after:wN \__peek_tmp:w \tl_to_str:n { outer } \q_stop
\group_end:
\cs_new_protected:Npn \__peek_N_type_aux:nnw #1 #2 #3 \fi:
{
@@ -18807,12 +19031,6 @@
{ \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: }
\cs_new_protected_nopar:Npn \peek_N_type:F
{ \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: }
-\cs_new_protected:Npn \fp_set_from_dim:Nn #1#2
- { \fp_set:Nn #1 { \dim_to_fp:n {#2} } }
-\cs_new_protected:Npn \fp_gset_from_dim:Nn #1#2
- { \fp_gset:Nn #1 { \dim_to_fp:n {#2} } }
-\cs_generate_variant:Nn \fp_set_from_dim:Nn { c }
-\cs_generate_variant:Nn \fp_gset_from_dim:Nn { c }
%% File: l3sys.dtx Copyright (C) 2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -18845,8 +19063,16 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id$
+\GetIdInfo$Id: l3sys.dtx 6087 2015-09-25 10:29:53Z joseph $
{L3 Experimental system/runtime functions}
+\str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
+\int_const:Nn \c_sys_minute_int
+ { \int_mod:nn { \tex_time:D } { 60 } }
+\int_const:Nn \c_sys_hour_int
+ { \int_div_truncate:nn { \tex_time:D } { 60 } }
+\int_const:Nn \c_sys_day_int { \tex_day:D }
+\int_const:Nn \c_sys_month_int { \tex_month:D }
+\int_const:Nn \c_sys_year_int { \tex_year:D }
\clist_map_inline:nn { lua , pdf , p , up , xe }
{
\cs_new_eq:cN { sys_if_engine_ #1 tex:T } \use_none:n
@@ -18860,6 +19086,7 @@
\cs_gset_eq:NN \sys_if_engine_luatex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_luatex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_luatex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { luatex }
}
\cs_if_exist:NT \pdftex_pdftexversion:D
{
@@ -18867,6 +19094,7 @@
\cs_gset_eq:NN \sys_if_engine_pdftex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_pdftex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_pdftex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { pdftex }
}
\cs_if_exist:NT \ptex_kanjiskip:D
{
@@ -18880,12 +19108,14 @@
\cs_gset_eq:NN \sys_if_engine_uptex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_uptex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_uptex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { uptex }
}
{
\cs_gset_eq:NN \sys_if_engine_ptex:T \use:n
\cs_gset_eq:NN \sys_if_engine_ptex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_ptex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_ptex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { ptex }
}
}
\cs_if_exist:NT \xetex_XeTeXversion:D
@@ -18894,6 +19124,34 @@
\cs_gset_eq:NN \sys_if_engine_xetex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_xetex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_xetex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { xetex }
+ }
+\bool_if:nTF
+ {
+ \cs_if_exist_p:N \pdftex_pdfoutput:D
+ && \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero
+ }
+ {
+ \cs_new_eq:NN \sys_if_output_dvi:T \use_none:n
+ \cs_new_eq:NN \sys_if_output_dvi:F \use:n
+ \cs_new_eq:NN \sys_if_output_dvi:TF \use_ii:nn
+ \cs_new_eq:NN \sys_if_output_dvi_p: \c_false_bool
+ \cs_new_eq:NN \sys_if_output_pdf:T \use:n
+ \cs_new_eq:NN \sys_if_output_pdf:F \use_none:n
+ \cs_new_eq:NN \sys_if_output_pdf:TF \use_i:nn
+ \cs_new_eq:NN \sys_if_output_pdf_p: \c_true_bool
+ \str_const:Nn \c_sys_output_str { pdf }
+ }
+ {
+ \cs_new_eq:NN \sys_if_output_dvi:T \use:n
+ \cs_new_eq:NN \sys_if_output_dvi:F \use_none:n
+ \cs_new_eq:NN \sys_if_output_dvi:TF \use_i:nn
+ \cs_new_eq:NN \sys_if_output_dvi_p: \c_true_bool
+ \cs_new_eq:NN \sys_if_output_pdf:T \use_none:n
+ \cs_new_eq:NN \sys_if_output_pdf:F \use:n
+ \cs_new_eq:NN \sys_if_output_pdf:TF \use_ii:nn
+ \cs_new_eq:NN \sys_if_output_pdf_p: \c_false_bool
+ \str_const:Nn \c_sys_output_str { dvi }
}
\prg_new_eq_conditional:NNn \luatex_if_engine: \sys_if_engine_luatex:
{ T , F , TF , p }
@@ -18916,6 +19174,7 @@
\cs_new_eq:NN \pdftex_if_engine:TF \use_i:nn
\cs_new_eq:NN \pdftex_if_engine_p: \c_true_bool
}
+\cs_set_eq:NN \c_job_name_tl \c_sys_jobname_str
%% File: l3luatex.dtx Copyright (C) 2010-2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the