summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3int.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3int.sty798
1 files changed, 0 insertions, 798 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
deleted file mode 100644
index c9b84c7e081..00000000000
--- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
+++ /dev/null
@@ -1,798 +0,0 @@
-%%
-%% This is file `l3int.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% l3int.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: l3int.dtx Copyright (C) 1990-2013 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 "l3kernel 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{l3bootstrap}
-\GetIdInfo$Id: l3int.dtx 4583 2013-08-02 19:14:35Z joseph $
- {L3 Integers}
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-\cs_new_eq:NN \__int_value:w \tex_number:D
-\cs_new_eq:NN \__int_eval:w \etex_numexpr:D
-\cs_new_eq:NN \__int_eval_end: \tex_relax:D
-\cs_new_eq:NN \if_int_odd:w \tex_ifodd:D
-\cs_new_eq:NN \if_case:w \tex_ifcase:D
-\cs_new:Npn \int_eval:n #1 { \__int_value:w \__int_eval:w #1 \__int_eval_end: }
-\cs_new:Npn \int_abs:n #1
- {
- \__int_value:w \exp_after:wN \__int_abs:N
- \int_use:N \__int_eval:w #1 \__int_eval_end:
- \exp_stop_f:
- }
-\cs_new:Npn \__int_abs:N #1
- { \if_meaning:w - #1 \else: \exp_after:wN #1 \fi: }
-\cs_set:Npn \int_max:nn #1#2
- {
- \__int_value:w \exp_after:wN \__int_maxmin:wwN
- \int_use:N \__int_eval:w #1 \exp_after:wN ;
- \int_use:N \__int_eval:w #2 ;
- >
- \exp_stop_f:
- }
-\cs_set:Npn \int_min:nn #1#2
- {
- \__int_value:w \exp_after:wN \__int_maxmin:wwN
- \int_use:N \__int_eval:w #1 \exp_after:wN ;
- \int_use:N \__int_eval:w #2 ;
- <
- \exp_stop_f:
- }
-\cs_new:Npn \__int_maxmin:wwN #1 ; #2 ; #3
- {
- \if_int_compare:w #1 #3 #2 ~
- #1
- \else:
- #2
- \fi:
- }
-\cs_new:Npn \int_div_truncate:nn #1#2
- {
- \int_use:N \__int_eval:w
- \exp_after:wN \__int_div_truncate:NwNw
- \int_use:N \__int_eval:w #1 \exp_after:wN ;
- \int_use:N \__int_eval:w #2 ;
- \__int_eval_end:
- }
-\cs_new:Npn \__int_div_truncate:NwNw #1#2; #3#4;
- {
- \if_meaning:w 0 #1
- \c_zero
- \else:
- (
- #1#2
- \if_meaning:w - #1 + \else: - \fi:
- ( \if_meaning:w - #3 - \fi: #3#4 - \c_one ) / \c_two
- )
- \fi:
- / #3#4
- }
-\cs_new:Npn \int_div_round:nn #1#2
- { \__int_value:w \__int_eval:w ( #1 ) / ( #2 ) \__int_eval_end: }
-\cs_new:Npn \int_mod:nn #1#2
- {
- \__int_value:w \__int_eval:w \exp_after:wN \__int_mod:ww
- \__int_value:w \__int_eval:w #1 \exp_after:wN ;
- \__int_value:w \__int_eval:w #2 ;
- \__int_eval_end:
- }
-\cs_new:Npn \__int_mod:ww #1; #2;
- { #1 - ( \__int_div_truncate:NwNw #1 ; #2 ; ) * #2 }
-\cs_new_protected:Npn \int_new:N #1
- {
- \__chk_if_free_cs:N #1
- \newcount #1
- }
-\cs_generate_variant:Nn \int_new:N { c }
-\cs_new_protected:Npn \int_const:Nn #1#2
- {
- \int_compare:nNnTF {#2} > \c_minus_one
- {
- \int_compare:nNnTF {#2} > \c__max_constdef_int
- {
- \int_new:N #1
- \int_gset:Nn #1 {#2}
- }
- {
- \__chk_if_free_cs:N #1
- \tex_global:D \__int_constdef:Nw #1 =
- \__int_eval:w #2 \__int_eval_end:
- }
- }
- {
- \int_new:N #1
- \int_gset:Nn #1 {#2}
- }
- }
-\cs_generate_variant:Nn \int_const:Nn { c }
-\pdftex_if_engine:TF
- {
- \cs_new_eq:NN \__int_constdef:Nw \tex_mathchardef:D
- \tex_mathchardef:D \c__max_constdef_int 32 767 ~
- }
- {
- \cs_new_eq:NN \__int_constdef:Nw \tex_chardef:D
- \tex_chardef:D \c__max_constdef_int 1 114 111 ~
- }
-\cs_new_protected:Npn \int_zero:N #1 { #1 = \c_zero }
-\cs_new_protected:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero }
-\cs_generate_variant:Nn \int_zero:N { c }
-\cs_generate_variant:Nn \int_gzero:N { c }
-\cs_new_protected:Npn \int_zero_new:N #1
- { \int_if_exist:NTF #1 { \int_zero:N #1 } { \int_new:N #1 } }
-\cs_new_protected:Npn \int_gzero_new:N #1
- { \int_if_exist:NTF #1 { \int_gzero:N #1 } { \int_new:N #1 } }
-\cs_generate_variant:Nn \int_zero_new:N { c }
-\cs_generate_variant:Nn \int_gzero_new:N { c }
-\cs_new_protected:Npn \int_set_eq:NN #1#2 { #1 = #2 }
-\cs_generate_variant:Nn \int_set_eq:NN { c }
-\cs_generate_variant:Nn \int_set_eq:NN { Nc , cc }
-\cs_new_protected:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
-\cs_generate_variant:Nn \int_gset_eq:NN { c }
-\cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc }
-\prg_new_eq_conditional:NNn \int_if_exist:N \cs_if_exist:N { TF , T , F , p }
-\prg_new_eq_conditional:NNn \int_if_exist:c \cs_if_exist:c { TF , T , F , p }
-\cs_new_protected:Npn \int_add:Nn #1#2
- { \tex_advance:D #1 by \__int_eval:w #2 \__int_eval_end: }
-\cs_new_protected:Npn \int_sub:Nn #1#2
- { \tex_advance:D #1 by - \__int_eval:w #2 \__int_eval_end: }
-\cs_new_protected_nopar:Npn \int_gadd:Nn
- { \tex_global:D \int_add:Nn }
-\cs_new_protected_nopar:Npn \int_gsub:Nn
- { \tex_global:D \int_sub:Nn }
-\cs_generate_variant:Nn \int_add:Nn { c }
-\cs_generate_variant:Nn \int_gadd:Nn { c }
-\cs_generate_variant:Nn \int_sub:Nn { c }
-\cs_generate_variant:Nn \int_gsub:Nn { c }
-\cs_new_protected:Npn \int_incr:N #1
- { \tex_advance:D #1 \c_one }
-\cs_new_protected:Npn \int_decr:N #1
- { \tex_advance:D #1 \c_minus_one }
-\cs_new_protected_nopar:Npn \int_gincr:N
- { \tex_global:D \int_incr:N }
-\cs_new_protected_nopar:Npn \int_gdecr:N
- { \tex_global:D \int_decr:N }
-\cs_generate_variant:Nn \int_incr:N { c }
-\cs_generate_variant:Nn \int_decr:N { c }
-\cs_generate_variant:Nn \int_gincr:N { c }
-\cs_generate_variant:Nn \int_gdecr:N { c }
-\cs_new_protected:Npn \int_set:Nn #1#2
- { #1 ~ \__int_eval:w #2\__int_eval_end: }
-\cs_new_protected_nopar:Npn \int_gset:Nn { \tex_global:D \int_set:Nn }
-\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_protected_nopar:Npn \__prg_compare_error:
- {
- \if_int_compare:w \c_zero \c_zero \fi:
- =
- \__prg_compare_error:
- }
-\cs_new:Npn \__prg_compare_error:Nw
- #1#2 \q_stop
- {
- { }
- \c_zero \fi:
- \__msg_kernel_expandable_error:nnn
- { kernel } { unknown-comparison } {#1}
- \prg_return_false:
- }
-\prg_new_conditional:Npnn \int_compare:n #1 { p , T , F , TF }
- {
- \exp_after:wN \__int_compare:w
- \int_use:N \__int_eval:w #1 \__prg_compare_error:
- }
-\cs_new:Npn \__int_compare:w #1 \__prg_compare_error:
- {
- \exp_after:wN \if_false: \__int_value:w
- \__int_compare:Nw #1 e { = nd_ } \q_stop
- }
-\cs_new:Npn \__int_compare:Nw #1#2 \q_stop
- {
- \exp_after:wN \__int_compare:NNw
- \__int_to_roman:w - 0 #2 \q_mark
- #1#2 \q_stop
- }
-\cs_new:Npn \__int_compare:NNw #1#2#3 \q_mark
- {
- \etex_unexpanded:D
- \use:c { __int_compare_ #1 \if_meaning:w = #2 = \fi: :NNw }
- \__prg_compare_error:Nw #1
- }
-\cs_new:cpn { __int_compare_end_=:NNw } #1#2#3 e #4 \q_stop
- {
- {#3} \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- }
-\cs_new:Npn \__int_compare:nnN #1#2#3
- {
- {#2} \exp_stop_f:
- \prg_return_false: \exp_after:wN \use_none_delimit_by_q_stop:w
- \fi:
- #1 #2 #3 \exp_after:wN \__int_compare:Nw \__int_value:w \__int_eval:w
- }
-\cs_new:cpn { __int_compare_=:NNw } #1#2#3 =
- { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} = }
-\cs_new:cpn { __int_compare_<:NNw } #1#2#3 <
- { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} < }
-\cs_new:cpn { __int_compare_>:NNw } #1#2#3 >
- { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} > }
-\cs_new:cpn { __int_compare_==:NNw } #1#2#3 ==
- { \__int_compare:nnN { \reverse_if:N \if_int_compare:w } {#3} = }
-\cs_new:cpn { __int_compare_!=:NNw } #1#2#3 !=
- { \__int_compare:nnN { \if_int_compare:w } {#3} = }
-\cs_new:cpn { __int_compare_<=:NNw } #1#2#3 <=
- { \__int_compare:nnN { \if_int_compare:w } {#3} > }
-\cs_new:cpn { __int_compare_>=:NNw } #1#2#3 >=
- { \__int_compare:nnN { \if_int_compare:w } {#3} < }
-\prg_new_conditional:Npnn \int_compare:nNn #1#2#3 { p , T , F , TF }
- {
- \if_int_compare:w \__int_eval:w #1 #2 \__int_eval:w #3 \__int_eval_end:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-\cs_new:Npn \int_case:nnTF #1
- {
- \tex_romannumeral:D
- \exp_args:Nf \__int_case:nnTF { \int_eval:n {#1} }
- }
-\cs_new:Npn \int_case:nnT #1#2#3
- {
- \tex_romannumeral:D
- \exp_args:Nf \__int_case:nnTF { \int_eval:n {#1} } {#2} {#3} { }
- }
-\cs_new:Npn \int_case:nnF #1#2
- {
- \tex_romannumeral:D
- \exp_args:Nf \__int_case:nnTF { \int_eval:n {#1} } {#2} { }
- }
-\cs_new:Npn \int_case:nn #1#2
- {
- \tex_romannumeral:D
- \exp_args:Nf \__int_case:nnTF { \int_eval:n {#1} } {#2} { } { }
- }
-\cs_new:Npn \__int_case:nnTF #1#2#3#4
- { \__int_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop }
-\cs_new:Npn \__int_case:nw #1#2#3
- {
- \int_compare:nNnTF {#1} = {#2}
- { \__int_case_end:nw {#3} }
- { \__int_case:nw {#1} }
- }
-\cs_new_eq:NN \__int_case_end:nw \__prg_case_end:nw
-\prg_new_conditional:Npnn \int_if_odd:n #1 { p , T , F , TF}
- {
- \if_int_odd:w \__int_eval:w #1 \__int_eval_end:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-\prg_new_conditional:Npnn \int_if_even:n #1 { p , T , F , TF}
- {
- \if_int_odd:w \__int_eval:w #1 \__int_eval_end:
- \prg_return_false:
- \else:
- \prg_return_true:
- \fi:
- }
-\cs_new:Npn \int_while_do:nn #1#2
- {
- \int_compare:nT {#1}
- {
- #2
- \int_while_do:nn {#1} {#2}
- }
- }
-\cs_new:Npn \int_until_do:nn #1#2
- {
- \int_compare:nF {#1}
- {
- #2
- \int_until_do:nn {#1} {#2}
- }
- }
-\cs_new:Npn \int_do_while:nn #1#2
- {
- #2
- \int_compare:nT {#1}
- { \int_do_while:nn {#1} {#2} }
- }
-\cs_new:Npn \int_do_until:nn #1#2
- {
- #2
- \int_compare:nF {#1}
- { \int_do_until:nn {#1} {#2} }
- }
-\cs_new:Npn \int_while_do:nNnn #1#2#3#4
- {
- \int_compare:nNnT {#1} #2 {#3}
- {
- #4
- \int_while_do:nNnn {#1} #2 {#3} {#4}
- }
- }
-\cs_new:Npn \int_until_do:nNnn #1#2#3#4
- {
- \int_compare:nNnF {#1} #2 {#3}
- {
- #4
- \int_until_do:nNnn {#1} #2 {#3} {#4}
- }
- }
-\cs_new:Npn \int_do_while:nNnn #1#2#3#4
- {
- #4
- \int_compare:nNnT {#1} #2 {#3}
- { \int_do_while:nNnn {#1} #2 {#3} {#4} }
- }
-\cs_new:Npn \int_do_until:nNnn #1#2#3#4
- {
- #4
- \int_compare:nNnF {#1} #2 {#3}
- { \int_do_until:nNnn {#1} #2 {#3} {#4} }
- }
-\cs_new:Npn \int_step_function:nnnN #1#2#3#4
- {
- \int_compare:nNnTF {#2} > \c_zero
- { \exp_args:NNf \__int_step:NnnnN > }
- {
- \int_compare:nNnTF {#2} = \c_zero
- {
- \__msg_kernel_expandable_error:nnn { kernel } { zero-step } {#4}
- \use_none:nnnn
- }
- { \exp_args:NNf \__int_step:NnnnN < }
- }
- { \int_eval:n {#1} } {#2} {#3} #4
- }
-\cs_new:Npn \__int_step:NnnnN #1#2#3#4#5
- {
- \int_compare:nNnF {#2} #1 {#4}
- {
- #5 {#2}
- \exp_args:NNf \__int_step:NnnnN
- #1 { \int_eval:n { #2 + #3 } } {#3} {#4} #5
- }
- }
-\cs_new_protected_nopar:Npn \int_step_inline:nnnn
- {
- \int_gincr:N \g__prg_map_int
- \exp_args:NNc \__int_step:NNnnnn
- \cs_gset_nopar:Npn
- { __prg_map_ \int_use:N \g__prg_map_int :w }
- }
-\cs_new_protected:Npn \int_step_variable:nnnNn #1#2#3#4#5
- {
- \int_gincr:N \g__prg_map_int
- \exp_args:NNc \__int_step:NNnnnn
- \cs_gset_nopar:Npx
- { __prg_map_ \int_use:N \g__prg_map_int :w }
- {#1}{#2}{#3}
- {
- \tl_set:Nn \exp_not:N #4 {##1}
- \exp_not:n {#5}
- }
- }
-\cs_new_protected:Npn \__int_step:NNnnnn #1#2#3#4#5#6
- {
- #1 #2 ##1 {#6}
- \int_step_function:nnnN {#3} {#4} {#5} #2
- \__prg_break_point:Nn \scan_stop: { \int_gdecr:N \g__prg_map_int }
- }
-\cs_new:Npn \int_to_arabic:n #1 { \int_eval:n {#1} }
-\cs_new:Npn \int_to_symbols:nnn #1#2#3
- {
- \int_compare:nNnTF {#1} > {#2}
- {
- \exp_args:NNo \exp_args:No \__int_to_symbols:nnnn
- {
- \int_case:nn
- { 1 + \int_mod:nn { #1 - 1 } {#2} }
- {#3}
- }
- {#1} {#2} {#3}
- }
- { \int_case:nn {#1} {#3} }
- }
-\cs_new:Npn \__int_to_symbols:nnnn #1#2#3#4
- {
- \exp_args:Nf \int_to_symbols:nnn
- { \int_div_truncate:nn { #2 - 1 } {#3} } {#3} {#4}
- #1
- }
-\cs_new:Npn \int_to_alph:n #1
- {
- \int_to_symbols:nnn {#1} { 26 }
- {
- { 1 } { a }
- { 2 } { b }
- { 3 } { c }
- { 4 } { d }
- { 5 } { e }
- { 6 } { f }
- { 7 } { g }
- { 8 } { h }
- { 9 } { i }
- { 10 } { j }
- { 11 } { k }
- { 12 } { l }
- { 13 } { m }
- { 14 } { n }
- { 15 } { o }
- { 16 } { p }
- { 17 } { q }
- { 18 } { r }
- { 19 } { s }
- { 20 } { t }
- { 21 } { u }
- { 22 } { v }
- { 23 } { w }
- { 24 } { x }
- { 25 } { y }
- { 26 } { z }
- }
- }
-\cs_new:Npn \int_to_Alph:n #1
- {
- \int_to_symbols:nnn {#1} { 26 }
- {
- { 1 } { A }
- { 2 } { B }
- { 3 } { C }
- { 4 } { D }
- { 5 } { E }
- { 6 } { F }
- { 7 } { G }
- { 8 } { H }
- { 9 } { I }
- { 10 } { J }
- { 11 } { K }
- { 12 } { L }
- { 13 } { M }
- { 14 } { N }
- { 15 } { O }
- { 16 } { P }
- { 17 } { Q }
- { 18 } { R }
- { 19 } { S }
- { 20 } { T }
- { 21 } { U }
- { 22 } { V }
- { 23 } { W }
- { 24 } { X }
- { 25 } { Y }
- { 26 } { Z }
- }
- }
-\cs_new:Npn \int_to_base:nn #1
- { \exp_args:Nf \__int_to_base:nn { \int_eval:n {#1} } }
-\cs_new:Npn \__int_to_base:nn #1#2
- {
- \int_compare:nNnTF {#1} < \c_zero
- { \exp_args:No \__int_to_base:nnN { \use_none:n #1 } {#2} - }
- { \__int_to_base:nnN {#1} {#2} \c_empty_tl }
- }
-\cs_new:Npn \__int_to_base:nnN #1#2#3
- {
- \int_compare:nNnTF {#1} < {#2}
- { \exp_last_unbraced:Nf #3 { \__int_to_letter:n {#1} } }
- {
- \exp_args:Nf \__int_to_base:nnnN
- { \__int_to_letter:n { \int_mod:nn {#1} {#2} } }
- {#1}
- {#2}
- #3
- }
- }
-\cs_new:Npn \__int_to_base:nnnN #1#2#3#4
- {
- \exp_args:Nf \__int_to_base:nnN
- { \int_div_truncate:nn {#2} {#3} }
- {#3}
- #4
- #1
- }
-\cs_new:Npn \__int_to_letter:n #1
- {
- \exp_after:wN \exp_after:wN
- \if_case:w \__int_eval:w #1 - \c_ten \__int_eval_end:
- A
- \or: B
- \or: C
- \or: D
- \or: E
- \or: F
- \or: G
- \or: H
- \or: I
- \or: J
- \or: K
- \or: L
- \or: M
- \or: N
- \or: O
- \or: P
- \or: Q
- \or: R
- \or: S
- \or: T
- \or: U
- \or: V
- \or: W
- \or: X
- \or: Y
- \or: Z
- \else: \__int_value:w \__int_eval:w #1 \exp_after:wN \__int_eval_end:
- \fi:
- }
-\cs_new:Npn \int_to_binary:n #1
- { \int_to_base:nn {#1} { 2 } }
-\cs_new:Npn \int_to_hexadecimal:n #1
- { \int_to_base:nn {#1} { 16 } }
-\cs_new:Npn \int_to_octal:n #1
- { \int_to_base:nn {#1} { 8 } }
-\cs_new:Npn \int_to_roman:n #1
- {
- \exp_after:wN \__int_to_roman:N
- \__int_to_roman:w \int_eval:n {#1} Q
- }
-\cs_new:Npn \__int_to_roman:N #1
- {
- \use:c { __int_to_roman_ #1 :w }
- \__int_to_roman:N
- }
-\cs_new:Npn \int_to_Roman:n #1
- {
- \exp_after:wN \__int_to_Roman_aux:N
- \__int_to_roman:w \int_eval:n {#1} Q
- }
-\cs_new:Npn \__int_to_Roman_aux:N #1
- {
- \use:c { __int_to_Roman_ #1 :w }
- \__int_to_Roman_aux:N
- }
-\cs_new_nopar:Npn \__int_to_roman_i:w { i }
-\cs_new_nopar:Npn \__int_to_roman_v:w { v }
-\cs_new_nopar:Npn \__int_to_roman_x:w { x }
-\cs_new_nopar:Npn \__int_to_roman_l:w { l }
-\cs_new_nopar:Npn \__int_to_roman_c:w { c }
-\cs_new_nopar:Npn \__int_to_roman_d:w { d }
-\cs_new_nopar:Npn \__int_to_roman_m:w { m }
-\cs_new_nopar:Npn \__int_to_roman_Q:w #1 { }
-\cs_new_nopar:Npn \__int_to_Roman_i:w { I }
-\cs_new_nopar:Npn \__int_to_Roman_v:w { V }
-\cs_new_nopar:Npn \__int_to_Roman_x:w { X }
-\cs_new_nopar:Npn \__int_to_Roman_l:w { L }
-\cs_new_nopar:Npn \__int_to_Roman_c:w { C }
-\cs_new_nopar:Npn \__int_to_Roman_d:w { D }
-\cs_new_nopar:Npn \__int_to_Roman_m:w { M }
-\cs_new:Npn \__int_to_Roman_Q:w #1 { }
-\cs_new:Npn \__int_get_sign:n #1
- {
- \__int_get_sign_and_digits:nNNN {#1}
- \c_true_bool \c_true_bool \c_false_bool
- }
-\cs_new:Npn \__int_get_digits:n #1
- {
- \__int_get_sign_and_digits:nNNN {#1}
- \c_true_bool \c_false_bool \c_true_bool
- }
-\cs_new:Npn \__int_get_sign_and_digits:nNNN #1#2#3#4
- {
- \exp_args:Nf \tl_if_head_eq_charcode:nNTF {#1} -
- {
- \bool_if:NTF #2
- {
- \__int_get_sign_and_digits:oNNN
- { \use_none:n #1 } \c_false_bool #3#4
- }
- {
- \__int_get_sign_and_digits:oNNN
- { \use_none:n #1 } \c_true_bool #3#4
- }
- }
- {
- \exp_args:Nf \tl_if_head_eq_charcode:nNTF {#1} +
- { \__int_get_sign_and_digits:oNNN { \use_none:n #1 } #2#3#4 }
- {
- \bool_if:NT #3 { \bool_if:NF #2 - }
- \bool_if:NT #4 {#1}
- }
- }
- }
-\cs_generate_variant:Nn \__int_get_sign_and_digits:nNNN { o }
-\cs_new:Npn \int_from_alph:n #1
- {
- \int_eval:n
- {
- \__int_get_sign:n {#1}
- \exp_args:Nf \__int_from_alph:n { \__int_get_digits:n {#1} }
- }
- }
-\cs_new:Npn \__int_from_alph:n #1
- { \__int_from_alph:nN { 0 } #1 \q_nil }
-\cs_new:Npn \__int_from_alph:nN #1#2
- {
- \quark_if_nil:NTF #2
- {#1}
- {
- \exp_args:Nf \__int_from_alph:nN
- { \int_eval:n { #1 * 26 + \__int_from_alph:N #2 } }
- }
- }
-\cs_new:Npn \__int_from_alph:N #1
- { \int_eval:n { `#1 - \int_compare:nNnTF { `#1 } < { 91 } { 64 } { 96 } } }
-\cs_new:Npn \int_from_base:nn #1#2
- {
- \int_eval:n
- {
- \__int_get_sign:n {#1}
- \exp_args:Nf \__int_from_base:nn
- { \__int_get_digits:n {#1} } {#2}
- }
- }
-\cs_new:Npn \__int_from_base:nn #1#2
- { \__int_from_base:nnN { 0 } { #2 } #1 \q_nil }
-\cs_new:Npn \__int_from_base:nnN #1#2#3
- {
- \quark_if_nil:NTF #3
- {#1}
- {
- \exp_args:Nf \__int_from_base:nnN
- { \int_eval:n { #1 * #2 + \__int_from_base:N #3 } }
- {#2}
- }
- }
-\cs_new:Npn \__int_from_base:N #1
- {
- \int_compare:nNnTF { `#1 } < { 58 }
- {#1}
- {
- \int_eval:n
- { `#1 - \int_compare:nNnTF { `#1 } < { 91 } { 55 } { 87 } }
- }
- }
-\cs_new:Npn \int_from_binary:n #1
- { \int_from_base:nn {#1} \c_two }
-\cs_new:Npn \int_from_hexadecimal:n #1
- { \int_from_base:nn {#1} \c_sixteen }
-\cs_new:Npn \int_from_octal:n #1
- { \int_from_base:nn {#1} \c_eight }
-\int_const:cn { c__int_from_roman_i_int } { 1 }
-\int_const:cn { c__int_from_roman_v_int } { 5 }
-\int_const:cn { c__int_from_roman_x_int } { 10 }
-\int_const:cn { c__int_from_roman_l_int } { 50 }
-\int_const:cn { c__int_from_roman_c_int } { 100 }
-\int_const:cn { c__int_from_roman_d_int } { 500 }
-\int_const:cn { c__int_from_roman_m_int } { 1000 }
-\int_const:cn { c__int_from_roman_I_int } { 1 }
-\int_const:cn { c__int_from_roman_V_int } { 5 }
-\int_const:cn { c__int_from_roman_X_int } { 10 }
-\int_const:cn { c__int_from_roman_L_int } { 50 }
-\int_const:cn { c__int_from_roman_C_int } { 100 }
-\int_const:cn { c__int_from_roman_D_int } { 500 }
-\int_const:cn { c__int_from_roman_M_int } { 1000 }
-\cs_new:Npn \int_from_roman:n #1
- {
- \tl_if_blank:nF {#1}
- {
- \exp_after:wN \__int_from_roman_end:w
- \__int_value:w \__int_eval:w
- \__int_from_roman:NN #1 Q \q_stop
- }
- }
-\cs_new:Npn \__int_from_roman:NN #1#2
- {
- \str_if_eq:nnTF {#1} { Q }
- {#1#2}
- {
- \str_if_eq:nnTF {#2} { Q }
- {
- \int_if_exist:cF { c__int_from_roman_ #1 _int }
- { \__int_from_roman_clean_up:w }
- +
- \use:c { c__int_from_roman_ #1 _int }
- #2
- }
- {
- \int_if_exist:cF { c__int_from_roman_ #1 _int }
- { \__int_from_roman_clean_up:w }
- \int_if_exist:cF { c__int_from_roman_ #2 _int }
- { \__int_from_roman_clean_up:w }
- \int_compare:nNnTF
- { \use:c { c__int_from_roman_ #1 _int } }
- <
- { \use:c { c__int_from_roman_ #2 _int } }
- {
- + \use:c { c__int_from_roman_ #2 _int }
- - \use:c { c__int_from_roman_ #1 _int }
- \__int_from_roman:NN
- }
- {
- + \use:c { c__int_from_roman_ #1 _int }
- \__int_from_roman:NN #2
- }
- }
- }
- }
-\cs_new:Npn \__int_from_roman_end:w #1 Q #2 \q_stop
- { \tl_if_empty:nTF {#2} {#1} {#2} }
-\cs_new:Npn \__int_from_roman_clean_up:w #1 Q { + 0 Q -1 }
-\cs_new_eq:NN \int_show:N \__kernel_register_show:N
-\cs_new_eq:NN \int_show:c \__kernel_register_show:c
-\cs_new_protected:Npn \int_show:n #1
- { \etex_showtokens:D \exp_after:wN { \int_use:N \__int_eval:w #1 } }
-\int_const:Nn \c_one { 1 }
-\int_const:Nn \c_two { 2 }
-\int_const:Nn \c_three { 3 }
-\int_const:Nn \c_four { 4 }
-\int_const:Nn \c_five { 5 }
-\int_const:Nn \c_eight { 8 }
-\int_const:Nn \c_nine { 9 }
-\int_const:Nn \c_ten { 10 }
-\int_const:Nn \c_eleven { 11 }
-\int_const:Nn \c_thirteen { 13 }
-\int_const:Nn \c_fourteen { 14 }
-\int_const:Nn \c_fifteen { 15 }
-\int_const:Nn \c_thirty_two { 32 }
-\int_const:Nn \c_two_hundred_fifty_five { 255 }
-\int_const:Nn \c_two_hundred_fifty_six { 256 }
-\int_const:Nn \c_one_hundred { 100 }
-\int_const:Nn \c_one_thousand { 1000 }
-\int_const:Nn \c_ten_thousand { 10000 }
-\int_const:Nn \c_max_int { 2 147 483 647 }
-\int_new:N \l_tmpa_int
-\int_new:N \l_tmpb_int
-\int_new:N \g_tmpa_int
-\int_new:N \g_tmpb_int
-\cs_new_eq:NN \int_case:nnn \int_case:nnF
-%%
-%%
-%% End of file `l3int.sty'.