%% %% This is file `l3tl-build.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% l3tl-build.dtx (with options: `package') %% %% EXPERIMENTAL CODE %% %% Do not distribute this file without also distributing the %% source files specified above. %% %% Do not distribute a modified version of this file. %% %% File: l3tl-build.dtx Copyright (C) 2011-2012 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this %% license or (at your option) any later version. The latest version %% of this license is in the file %% %% http://www.latex-project.org/lppl.txt %% %% This file is part of the "l3experimental bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% %% The released version of this bundle is available from CTAN. %% %% ----------------------------------------------------------------------- %% %% The development version of the bundle can be found at %% %% http://www.latex-project.org/svnroot/experimental/trunk/ %% %% for those people who are interested. %% %%%%%%%%%%% %% NOTE: %% %%%%%%%%%%% %% %% Snapshots taken from the repository represent work in progress and may %% not work or may contain conflicting material! We therefore ask %% people _not_ to put them into distributions, archives, etc. without %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- \RequirePackage{expl3} \GetIdInfo$Id: l3tl-build.dtx 3039 2011-12-08 09:22:35Z bruno $ {L3 Experimental Build of Token lists} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \int_new:N \l_tl_build_start_index_int \int_new:N \l_tl_build_index_int \tl_new:N \l_tl_build_result_tl \cs_new_protected_nopar:Npn \tl_build_unpack: { \tl_put_right:Nx \l_tl_build_result_tl { \exp_after:wN \tl_build_unpack_loop:w \int_use:N \l_tl_build_start_index_int ; \prg_break_point:n { } } } \cs_new:Npn \tl_build_unpack_loop:w #1 ; { \if_num:w #1 = \l_tl_build_index_int \exp_after:wN \prg_map_break: \fi: \tex_the:D \tex_toks:D #1 \exp_stop_f: \exp_after:wN \tl_build_unpack_loop:w \int_use:N \int_eval:w #1 + \c_one ; } \cs_new_protected_nopar:Npn \tl_set_build:Nw { \tl_set_build_aux:NNw \tl_set:Nn } \cs_new_protected_nopar:Npn \tl_set_build_x:Nw { \tl_set_build_aux:NNw \tl_set:Nx } \cs_new_protected_nopar:Npn \tl_gset_build:Nw { \tl_set_build_aux:NNw \tl_gset:Nn } \cs_new_protected_nopar:Npn \tl_gset_build_x:Nw { \tl_set_build_aux:NNw \tl_gset:Nx } \cs_new_protected:Npn \tl_set_build_aux:NNw #1#2 { \group_begin: \cs_set_nopar:Npn \tl_build_end_assignment:n { \group_end: #1 #2 } \int_zero:N \l_tl_build_start_index_int \int_zero:N \l_tl_build_index_int \tl_clear:N \l_tl_build_result_tl } \cs_new_protected_nopar:Npn \tl_build_end: { \tl_build_unpack: \exp_args:No \tl_build_end_assignment:n \l_tl_build_result_tl } \cs_new_eq:NN \tl_build_end_assignment:n \use_none:n \cs_new_protected:Npn \tl_build_one:n #1 { \tex_toks:D \l_tl_build_index_int {#1} \tex_advance:D \l_tl_build_index_int \c_one \if_num:w \l_tl_build_index_int > \c_max_register_int \tl_build_unpack: \l_tl_build_index_int \l_tl_build_start_index_int \fi: } \cs_new_protected:Npn \tl_build_one:o #1 { \tex_toks:D \l_tl_build_index_int \exp_after:wN {#1} \tex_advance:D \l_tl_build_index_int \c_one \if_num:w \l_tl_build_index_int > \c_max_register_int \tl_build_unpack: \l_tl_build_index_int \l_tl_build_start_index_int \fi: } \cs_new_protected:Npn \tl_build_one:x #1 { \use:x { \tl_build_one:n {#1} } } %% %% %% End of file `l3tl-build.sty'.