summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/unravel/unravel.sty4817
1 files changed, 4817 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/unravel/unravel.sty b/Master/texmf-dist/tex/latex/unravel/unravel.sty
new file mode 100644
index 00000000000..1665ce3acf4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/unravel/unravel.sty
@@ -0,0 +1,4817 @@
+%%
+%% This is file `unravel.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% unravel.dtx (with options: `package')
+%%
+%% Do not distribute a modified version of this file.
+%%
+%% Communicate any suggestions for changing this package
+%% to Bruno Le Floch (blflatex@gmail.com).
+%%
+%% File: unravel.dtx Copyright (C) 2013 Bruno Le Floch
+%%
+%% 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
+%%
+%% -----------------------------------------------------------------------
+\RequirePackage{expl3}[2013/07/01]
+\RequirePackage{l3str}[2013/04/24]
+\RequirePackage{gtl}[2013/07/28]
+\ProvidesExplPackage
+ {unravel} {2013/07/28} {0.0a} {Watching TeX digest tokens}
+\ior_new:N \g__unravel_prompt_ior
+\tl_new:N \g__unravel_prompt_before_tl
+\int_new:N \l__unravel_prompt_tmpa_int
+\int_new:N \g__unravel_nonstop_int
+\int_new:N \g__unravel_noise_int
+\int_gset_eq:NN \g__unravel_noise_int \c_one
+\bool_new:N \l__unravel_debug_bool
+\int_new:N \g__unravel_step_int
+\str_new:N \g__unravel_action_text_str
+\int_new:N \g__unravel_max_action_int
+\int_new:N \g__unravel_max_output_int
+\int_new:N \g__unravel_max_prev_int
+\int_new:N \g__unravel_max_input_int
+\int_gset:Nn \g__unravel_max_action_int { 50 }
+\int_gset:Nn \g__unravel_max_output_int { 300 }
+\int_gset:Nn \g__unravel_max_prev_int { 300 }
+\int_gset:Nn \g__unravel_max_input_int { 300 }
+\bool_new:N \g__unravel_speedup_macros_bool
+\bool_gset_true:N \g__unravel_speedup_macros_bool
+\int_new:N \l__unravel_print_int
+\int_new:N \g__unravel_input_int
+\int_new:N \g__unravel_input_tmpa_int
+\tl_new:N \l__unravel_input_tmpa_tl
+\seq_new:N \g__unravel_prev_input_seq
+\tl_new:N \l__unravel_prev_input_tl
+\gtl_new:N \l__unravel_prev_input_gtl
+\gtl_new:N \g__unravel_output_gtl
+\gtl_new:N \l__unravel_head_gtl
+\tl_new:N \l__unravel_head_tl
+\token_new:Nn \l__unravel_head_token { ? }
+\int_new:N \l__unravel_head_cmd_int
+\int_new:N \l__unravel_head_char_int
+\tl_new:N \l__unravel_head_meaning_tl
+\tl_new:N \l__unravel_tmpa_tl
+\gtl_new:N \l__unravel_tmpb_gtl
+\tl_new:N \g__unravel_tmpc_tl
+\seq_new:N \l__unravel_tmpa_seq
+\tl_new:N \l__unravel_defined_tl
+\tl_new:N \l__unravel_defining_tl
+\cs_new_eq:NN \__unravel_inaccessible:w ?
+\gtl_new:N \g__unravel_after_assignment_gtl
+\bool_new:N \g__unravel_set_box_allowed_bool
+\bool_new:N \g__unravel_name_in_progress_bool
+\group_begin:
+ \char_set_lccode:nn { `* } { `# }
+ \tex_lowercase:D
+ { \tl_const:Nn \c__unravel_parameters_tl { ^*1*2*3*4*5*6*7*8*9 } }
+\group_end:
+\int_new:N \g__unravel_val_level_int
+\tl_const:Nn \c__unravel_plus_tl { + }
+\tl_const:Nn \c__unravel_minus_tl { - }
+\tl_const:Nn \c__unravel_times_tl { * }
+\tl_const:Nn \c__unravel_over_tl { / }
+\tl_const:Nn \c__unravel_lq_tl { ` }
+\tl_const:Nn \c__unravel_rq_tl { ' }
+\tl_const:Nn \c__unravel_dq_tl { " }
+\tl_const:Nn \c__unravel_lp_tl { ( }
+\tl_const:Nn \c__unravel_rp_tl { ) }
+\tl_const:Nn \c__unravel_eq_tl { = }
+\tl_const:Nn \c__unravel_comma_tl { , }
+\tl_const:Nn \c__unravel_point_tl { . }
+\tl_new:N \g__unravel_if_limit_tl
+\int_new:N \g__unravel_if_limit_int
+\int_new:N \g__unravel_if_depth_int
+\int_new:N \l__unravel_if_nesting_int
+\seq_new:N \l__unravel_leaders_box_seq
+\int_new:N \g__unravel_ends_int
+\int_gset:Nn \g__unravel_ends_int { 3 }
+\gtl_const:Nx \c__unravel_frozen_relax_gtl { \if_int_compare:w 0 = 0 \fi: }
+\cs_if_exist:NF \exp_last_unbraced:NNn
+ { \cs_new_eq:NN \exp_last_unbraced:NNn \use:nnn }
+\cs_generate_variant:Nn \exp_last_unbraced:NNn { NNv }
+\cs_generate_variant:Nn \str_head:n { f }
+\cs_generate_variant:Nn \tl_to_str:n { o }
+\cs_generate_variant:Nn \tl_if_head_eq_meaning:nNT { V }
+\cs_generate_variant:Nn \tl_if_head_is_space:nTF { o }
+\cs_generate_variant:Nn \tl_if_head_is_space:nT { V }
+\cs_generate_variant:Nn \tl_if_head_is_N_type:nTF { o }
+\cs_generate_variant:Nn \tl_if_in:nnF { nV }
+\cs_generate_variant:Nn \tl_if_in:nnTF { nV }
+\cs_generate_variant:Nn \tl_if_eq:nnT { V }
+\cs_generate_variant:Nn \tl_if_in:NnTF { No , NV }
+\cs_generate_variant:Nn \tl_if_single_token:nT { V }
+\cs_generate_variant:Nn \tl_gset_rescan:Nnn { Nnx }
+\cs_generate_variant:Nn \gtl_gput_left:Nn { Nx , NV , No }
+\cs_generate_variant:Nn \gtl_gput_right:Nn { Nx , NV }
+\cs_generate_variant:Nn \gtl_put_right:Nn { NV }
+\cs_generate_variant:Nn \ior_get_str:NN { Nc }
+\cs_generate_variant:Nn \gtl_if_empty:NTF { c }
+\cs_generate_variant:Nn \gtl_to_str:N { c }
+\cs_generate_variant:Nn \gtl_gpop_left:NN { c }
+\cs_generate_variant:Nn \gtl_get_left:NN { c }
+\cs_generate_variant:Nn \gtl_gset:Nn { c }
+\cs_generate_variant:Nn \gtl_gconcat:NNN { ccc , cNc }
+\cs_generate_variant:Nn \gtl_gclear:N { c }
+\cs_new_protected:Npn \__unravel_tl_gset_input:Nnn #1#2#3
+ {
+ \group_begin:
+ \etex_everyeof:D \exp_after:wN { \token_to_str:N @ @ #1 }
+ #2
+ \tl_gclear:N #1
+ \str_if_eq_x:nnF
+ { \token_to_meaning:N \tex_input:D }
+ { \token_to_str:N \input }
+ { \msg_unravel:nnx { unravel } { internal } { input-prim } }
+ \exp_after:wN \__unravel_tl_gset_input_aux:wN
+ \exp_after:wN \prg_do_nothing:
+ \tex_input:D \tl_to_str:n {#3} \scan_stop:
+ \group_end:
+ \tl_gput_right:NV #1 \etex_everyeof:D
+ }
+\cs_generate_variant:Nn \__unravel_tl_gset_input:Nnn { Nno }
+\use:x
+ {
+ \cs_new_protected:Npn \exp_not:N \__unravel_tl_gset_input_aux:wN
+ ##1 \token_to_str:N @ @ ##2
+ } { \tl_gset:No #2 {#1} }
+\cs_new_eq:NN \__unravel_cs_case:NnF \tl_case:NnF
+\cs_new_nopar:Npn \__unravel_strip_escape:w
+ {
+ \tex_romannumeral:D
+ \if_charcode:w \token_to_str:N \ \__unravel_strip_escape_aux:w \fi:
+ \__unravel_strip_escape_aux:N
+ }
+\cs_new:Npn \__unravel_strip_escape_aux:N #1 { \c_zero }
+\cs_new:Npn \__unravel_strip_escape_aux:w #1#2
+ { - \__int_value:w #1 \c_zero }
+\cs_new:Npn \__unravel_meaning_to_char:n #1
+ { \__unravel_meaning_to_char_auxi:w #1 \q_mark ~ {} ~ \q_mark \q_stop }
+\cs_new:Npn \__unravel_meaning_to_char_auxi:w #1 ~ #2 ~ #3 \q_mark #4 \q_stop
+ { \__unravel_meaning_to_char_auxii:w #3 ~ #3 ~ \q_stop }
+\cs_new:Npn \__unravel_meaning_to_char_auxii:w #1 ~ #2 ~ #3 \q_stop
+ { \tl_if_empty:nTF {#2} { ~ } {#2} }
+\cs_generate_variant:Nn \__unravel_meaning_to_char:n { o }
+\cs_new:Npn \__unravel_token_to_char:N #1
+ { \__unravel_meaning_to_char:o { \token_to_meaning:N #1 } }
+\cs_new:Npn \__unravel_to_str:n #1
+ {
+ \tl_if_head_eq_meaning:nNTF {#1} \scan_stop:
+ { \__unravel_to_str_auxi:w #1 ? \q_stop }
+ { \tl_to_str:n }
+ {#1}
+ }
+\cs_set:Npn \__unravel_tmp:w #1
+ {
+ \cs_new:Npn \__unravel_to_str_auxi:w ##1##2 \q_stop
+ {
+ \exp_after:wN \__unravel_to_str_auxii:w \token_to_str:N ##1 \q_mark
+ #1 tl \q_mark \q_stop
+ }
+ \cs_new:Npn \__unravel_to_str_auxii:w ##1 #1 ##2 \q_mark ##3 \q_stop
+ { \cs_if_exist_use:cF { ##2 _to_str:n } { \tl_to_str:n } }
+ }
+\exp_args:No \__unravel_tmp:w { \tl_to_str:n { s__ } }
+\cs_new_protected:Npn \__unravel_prev_input_silent:n #1
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_prev_input_tl
+ \tl_put_right:Nn \l__unravel_prev_input_tl {#1}
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_prev_input_tl
+ }
+\cs_generate_variant:Nn \__unravel_prev_input_silent:n { V , x }
+\cs_new_protected:Npn \__unravel_prev_input:n #1
+ {
+ \__unravel_prev_input_silent:n {#1}
+ \__unravel_print_action:x { \tl_to_str:n {#1} }
+ }
+\cs_generate_variant:Nn \__unravel_prev_input:n { V , x }
+\cs_new_protected:Npn \__unravel_prev_input_gtl:N #1
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_prev_input_gtl
+ \gtl_concat:NNN \l__unravel_prev_input_gtl \l__unravel_prev_input_gtl #1
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_prev_input_gtl
+ }
+\prg_new_conditional:Npnn \__unravel_token_if_expandable:N #1
+ { p , T , F , TF }
+ {
+ \exp_after:wN \if_meaning:w \exp_not:N #1 #1
+ \prg_return_false:
+ \else:
+ \prg_return_true:
+ \fi:
+ }
+\prg_new_conditional:Npnn \__unravel_token_if_protected:N #1
+ { p , T , F , TF }
+ {
+ \__unravel_token_if_expandable:NTF #1
+ {
+ \token_if_protected_macro:NTF #1
+ { \prg_return_true: }
+ {
+ \token_if_protected_long_macro:NTF #1
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ { \prg_return_true: }
+ }
+\cs_new_eq:NN \__unravel_exit_point: \prg_do_nothing:
+\cs_new:Npn \__unravel_exit:w #1 \__unravel_exit_point: { }
+\cs_new_eq:NN \__unravel_break_point: \prg_do_nothing:
+\cs_new:Npn \__unravel_break:w #1 \__unravel_break_point: { }
+\group_begin:
+ \char_set_catcode_active:n { `Z }
+ \prg_new_protected_conditional:Npnn \__unravel_token_if_definable:N #1
+ { TF }
+ {
+ \group_begin:
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:No \tl_if_single:nTF { \token_to_str:N #1 }
+ {
+ \exp_args:Nx \char_set_lccode:nn
+ { ` \str_head:n {#1} } { `Z }
+ \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { Z }
+ { \group_end: \prg_return_true: }
+ { \group_end: \prg_return_false: }
+ }
+ { \group_end: \prg_return_true: }
+ }
+\group_end:
+\prg_new_protected_conditional:Npnn \__unravel_gtl_if_head_is_definable:N #1
+ { TF , F }
+ {
+ \gtl_if_single_token:NTF #1
+ {
+ \gtl_if_head_is_N_type:NTF #1
+ {
+ \exp_last_unbraced:Nx \__unravel_token_if_definable:NTF
+ { \gtl_head:N #1 }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+\cs_new_protected:Npn \__unravel_tex_const:nn #1#2
+ { \int_const:cn { c__unravel_tex_#1_int } {#2} }
+\cs_new:Npn \__unravel_tex_use:n #1 { \int_use:c { c__unravel_tex_#1_int } }
+\cs_new_protected:Npn \__unravel_tex_primitive:nnn #1#2#3
+ {
+ \tl_const:cx { c__unravel_tex_#1_tl }
+ { { \__unravel_tex_use:n {#2} } {#3} }
+ }
+\cs_new_protected:Npn \__unravel_new_tex_cmd:nn #1#2
+ {
+ \cs_new_protected_nopar:cpn
+ { __unravel_cmd_ \__unravel_tex_use:n {#1} : } {#2}
+ }
+\cs_new_protected:Npn \__unravel_new_eq_tex_cmd:nn #1#2
+ {
+ \cs_new_eq:cc
+ { __unravel_cmd_ \__unravel_tex_use:n {#1} : }
+ { __unravel_cmd_ \__unravel_tex_use:n {#2} : }
+ }
+\cs_new_protected:Npn \__unravel_new_tex_expandable:nn #1#2
+ {
+ \cs_new_protected_nopar:cpn
+ { __unravel_expandable_ \__unravel_tex_use:n {#1} : } {#2}
+ }
+\__unravel_tex_const:nn { relax } { 0 }
+\__unravel_tex_const:nn { begin-group_char } { 1 }
+\__unravel_tex_const:nn { end-group_char } { 2 }
+\__unravel_tex_const:nn { math_char } { 3 }
+\__unravel_tex_const:nn { tab_mark } { 4 }
+\__unravel_tex_const:nn { alignment_char } { 4 }
+\__unravel_tex_const:nn { car_ret } { 5 }
+\__unravel_tex_const:nn { macro_char } { 6 }
+\__unravel_tex_const:nn { superscript_char } { 7 }
+\__unravel_tex_const:nn { subscript_char } { 8 }
+\__unravel_tex_const:nn { endv } { 9 }
+\__unravel_tex_const:nn { blank_char } { 10 }
+\__unravel_tex_const:nn { the_char } { 11 }
+\__unravel_tex_const:nn { other_char } { 12 }
+\__unravel_tex_const:nn { par_end } { 13 }
+\__unravel_tex_const:nn { stop } { 14 }
+\__unravel_tex_const:nn { delim_num } { 15 }
+\__unravel_tex_const:nn { max_char_code } { 15 }
+\__unravel_tex_const:nn { char_num } { 16 }
+\__unravel_tex_const:nn { math_char_num } { 17 }
+\__unravel_tex_const:nn { mark } { 18 }
+\__unravel_tex_const:nn { xray } { 19 }
+\__unravel_tex_const:nn { make_box } { 20 }
+\__unravel_tex_const:nn { hmove } { 21 }
+\__unravel_tex_const:nn { vmove } { 22 }
+\__unravel_tex_const:nn { un_hbox } { 23 }
+\__unravel_tex_const:nn { un_vbox } { 24 }
+\__unravel_tex_const:nn { remove_item } { 25 }
+\__unravel_tex_const:nn { hskip } { 26 }
+\__unravel_tex_const:nn { vskip } { 27 }
+\__unravel_tex_const:nn { mskip } { 28 }
+\__unravel_tex_const:nn { kern } { 29 }
+\__unravel_tex_const:nn { mkern } { 30 }
+\__unravel_tex_const:nn { leader_ship } { 31 }
+\__unravel_tex_const:nn { halign } { 32 }
+\__unravel_tex_const:nn { valign } { 33 }
+\__unravel_tex_const:nn { no_align } { 34 }
+\__unravel_tex_const:nn { vrule } { 35 }
+\__unravel_tex_const:nn { hrule } { 36 }
+\__unravel_tex_const:nn { insert } { 37 }
+\__unravel_tex_const:nn { vadjust } { 38 }
+\__unravel_tex_const:nn { ignore_spaces } { 39 }
+\__unravel_tex_const:nn { after_assignment } { 40 }
+\__unravel_tex_const:nn { after_group } { 41 }
+\__unravel_tex_const:nn { break_penalty } { 42 }
+\__unravel_tex_const:nn { start_par } { 43 }
+\__unravel_tex_const:nn { ital_corr } { 44 }
+\__unravel_tex_const:nn { accent } { 45 }
+\__unravel_tex_const:nn { math_accent } { 46 }
+\__unravel_tex_const:nn { discretionary } { 47 }
+\__unravel_tex_const:nn { eq_no } { 48 }
+\__unravel_tex_const:nn { left_right } { 49 }
+\__unravel_tex_const:nn { math_comp } { 50 }
+\__unravel_tex_const:nn { limit_switch } { 51 }
+\__unravel_tex_const:nn { above } { 52 }
+\__unravel_tex_const:nn { math_style } { 53 }
+\__unravel_tex_const:nn { math_choice } { 54 }
+\__unravel_tex_const:nn { non_script } { 55 }
+\__unravel_tex_const:nn { vcenter } { 56 }
+\__unravel_tex_const:nn { case_shift } { 57 }
+\__unravel_tex_const:nn { message } { 58 }
+\__unravel_tex_const:nn { extension } { 59 }
+\__unravel_tex_const:nn { in_stream } { 60 }
+\__unravel_tex_const:nn { begin_group } { 61 }
+\__unravel_tex_const:nn { end_group } { 62 }
+\__unravel_tex_const:nn { omit } { 63 }
+\__unravel_tex_const:nn { ex_space } { 64 }
+\__unravel_tex_const:nn { no_boundary } { 65 }
+\__unravel_tex_const:nn { radical } { 66 }
+\__unravel_tex_const:nn { end_cs_name } { 67 }
+\__unravel_tex_const:nn { min_internal } { 68 }
+\__unravel_tex_const:nn { char_given } { 68 }
+\__unravel_tex_const:nn { math_given } { 69 }
+\__unravel_tex_const:nn { last_item } { 70 }
+\__unravel_tex_const:nn { max_non_prefixed_command } { 70 }
+\__unravel_tex_const:nn { toks_register } { 71 }
+\__unravel_tex_const:nn { assign_toks } { 72 }
+\__unravel_tex_const:nn { assign_int } { 73 }
+\__unravel_tex_const:nn { assign_dimen } { 74 }
+\__unravel_tex_const:nn { assign_glue } { 75 }
+\__unravel_tex_const:nn { assign_mu_glue } { 76 }
+\__unravel_tex_const:nn { assign_font_dimen } { 77 }
+\__unravel_tex_const:nn { assign_font_int } { 78 }
+\__unravel_tex_const:nn { set_aux } { 79 }
+\__unravel_tex_const:nn { set_prev_graf } { 80 }
+\__unravel_tex_const:nn { set_page_dimen } { 81 }
+\__unravel_tex_const:nn { set_page_int } { 82 }
+\__unravel_tex_const:nn { set_box_dimen } { 83 }
+\__unravel_tex_const:nn { set_shape } { 84 }
+\__unravel_tex_const:nn { def_code } { 85 }
+\__unravel_tex_const:nn { def_family } { 86 }
+\__unravel_tex_const:nn { set_font } { 87 }
+\__unravel_tex_const:nn { def_font } { 88 }
+\__unravel_tex_const:nn { register } { 89 }
+\__unravel_tex_const:nn { max_internal } { 89 }
+\__unravel_tex_const:nn { advance } { 90 }
+\__unravel_tex_const:nn { multiply } { 91 }
+\__unravel_tex_const:nn { divide } { 92 }
+\__unravel_tex_const:nn { prefix } { 93 }
+\__unravel_tex_const:nn { let } { 94 }
+\__unravel_tex_const:nn { shorthand_def } { 95 }
+\__unravel_tex_const:nn { read_to_cs } { 96 }
+\__unravel_tex_const:nn { def } { 97 }
+\__unravel_tex_const:nn { set_box } { 98 }
+\__unravel_tex_const:nn { hyph_data } { 99 }
+\__unravel_tex_const:nn { set_interaction } { 100 }
+\__unravel_tex_const:nn { letterspace_font } { 101 }
+\__unravel_tex_const:nn { pdf_copy_font } { 102 }
+\__unravel_tex_const:nn { max_command } { 102 }
+\__unravel_tex_const:nn { undefined_cs } { 103 }
+\__unravel_tex_const:nn { expand_after } { 104 }
+\__unravel_tex_const:nn { no_expand } { 105 }
+\__unravel_tex_const:nn { input } { 106 }
+\__unravel_tex_const:nn { if_test } { 107 }
+\__unravel_tex_const:nn { fi_or_else } { 108 }
+\__unravel_tex_const:nn { cs_name } { 109 }
+\__unravel_tex_const:nn { convert } { 110 }
+\__unravel_tex_const:nn { the } { 111 }
+\__unravel_tex_const:nn { top_bot_mark } { 112 }
+\__unravel_tex_const:nn { call } { 113 }
+\__unravel_tex_const:nn { end_template } { 117 }
+\__unravel_tex_primitive:nnn { relax } { relax } { 256 }
+\__unravel_tex_primitive:nnn { span } { tab_mark } { 256 }
+\__unravel_tex_primitive:nnn { cr } { car_ret } { 257 }
+\__unravel_tex_primitive:nnn { crcr } { car_ret } { 258 }
+\__unravel_tex_primitive:nnn { par } { par_end } { 256 }
+\__unravel_tex_primitive:nnn { end } { stop } { 0 }
+\__unravel_tex_primitive:nnn { dump } { stop } { 1 }
+\__unravel_tex_primitive:nnn { delimiter } { delim_num } { 0 }
+\__unravel_tex_primitive:nnn { char } { char_num } { 0 }
+\__unravel_tex_primitive:nnn { mathchar } { math_char_num } { 0 }
+\__unravel_tex_primitive:nnn { mark } { mark } { 0 }
+\__unravel_tex_primitive:nnn { marks } { mark } { 5 }
+\__unravel_tex_primitive:nnn { show } { xray } { 0 }
+\__unravel_tex_primitive:nnn { showbox } { xray } { 1 }
+\__unravel_tex_primitive:nnn { showthe } { xray } { 2 }
+\__unravel_tex_primitive:nnn { showlists } { xray } { 3 }
+\__unravel_tex_primitive:nnn { showgroups } { xray } { 4 }
+\__unravel_tex_primitive:nnn { showtokens } { xray } { 5 }
+\__unravel_tex_primitive:nnn { showifs } { xray } { 6 }
+\__unravel_tex_primitive:nnn { box } { make_box } { 0 }
+\__unravel_tex_primitive:nnn { copy } { make_box } { 1 }
+\__unravel_tex_primitive:nnn { lastbox } { make_box } { 2 }
+\__unravel_tex_primitive:nnn { vsplit } { make_box } { 3 }
+\__unravel_tex_primitive:nnn { vtop } { make_box } { 4 }
+\__unravel_tex_primitive:nnn { vbox } { make_box } { 5 }
+\__unravel_tex_primitive:nnn { hbox } { make_box } { 106 }
+\__unravel_tex_primitive:nnn { moveright } { hmove } { 0 }
+\__unravel_tex_primitive:nnn { moveleft } { hmove } { 1 }
+\__unravel_tex_primitive:nnn { lower } { vmove } { 0 }
+\__unravel_tex_primitive:nnn { raise } { vmove } { 1 }
+\__unravel_tex_primitive:nnn { unhbox } { un_hbox } { 0 }
+\__unravel_tex_primitive:nnn { unhcopy } { un_hbox } { 1 }
+\__unravel_tex_primitive:nnn { unvbox } { un_vbox } { 0 }
+\__unravel_tex_primitive:nnn { unvcopy } { un_vbox } { 1 }
+\__unravel_tex_primitive:nnn { pagediscards } { un_vbox } { 2 }
+\__unravel_tex_primitive:nnn { splitdiscards } { un_vbox } { 3 }
+\__unravel_tex_primitive:nnn { unpenalty } { remove_item } { 12 }
+\__unravel_tex_primitive:nnn { unkern } { remove_item } { 11 }
+\__unravel_tex_primitive:nnn { unskip } { remove_item } { 10 }
+\__unravel_tex_primitive:nnn { hfil } { hskip } { 0 }
+\__unravel_tex_primitive:nnn { hfill } { hskip } { 1 }
+\__unravel_tex_primitive:nnn { hss } { hskip } { 2 }
+\__unravel_tex_primitive:nnn { hfilneg } { hskip } { 3 }
+\__unravel_tex_primitive:nnn { hskip } { hskip } { 4 }
+\__unravel_tex_primitive:nnn { vfil } { vskip } { 0 }
+\__unravel_tex_primitive:nnn { vfill } { vskip } { 1 }
+\__unravel_tex_primitive:nnn { vss } { vskip } { 2 }
+\__unravel_tex_primitive:nnn { vfilneg } { vskip } { 3 }
+\__unravel_tex_primitive:nnn { vskip } { vskip } { 4 }
+\__unravel_tex_primitive:nnn { mskip } { mskip } { 5 }
+\__unravel_tex_primitive:nnn { kern } { kern } { 1 }
+\__unravel_tex_primitive:nnn { mkern } { mkern } { 99 }
+\__unravel_tex_primitive:nnn { shipout } { leader_ship } { 99 }
+\__unravel_tex_primitive:nnn { leaders } { leader_ship } { 100 }
+\__unravel_tex_primitive:nnn { cleaders } { leader_ship } { 101 }
+\__unravel_tex_primitive:nnn { xleaders } { leader_ship } { 102 }
+\__unravel_tex_primitive:nnn { halign } { halign } { 0 }
+\__unravel_tex_primitive:nnn { valign } { valign } { 0 }
+\__unravel_tex_primitive:nnn { beginL } { valign } { 4 }
+\__unravel_tex_primitive:nnn { endL } { valign } { 5 }
+\__unravel_tex_primitive:nnn { beginR } { valign } { 8 }
+\__unravel_tex_primitive:nnn { endR } { valign } { 9 }
+\__unravel_tex_primitive:nnn { noalign } { no_align } { 0 }
+\__unravel_tex_primitive:nnn { vrule } { vrule } { 0 }
+\__unravel_tex_primitive:nnn { hrule } { hrule } { 0 }
+\__unravel_tex_primitive:nnn { insert } { insert } { 0 }
+\__unravel_tex_primitive:nnn { vadjust } { vadjust } { 0 }
+\__unravel_tex_primitive:nnn { ignorespaces } { ignore_spaces } { 0 }
+\__unravel_tex_primitive:nnn { afterassignment } { after_assignment } { 0 }
+\__unravel_tex_primitive:nnn { aftergroup } { after_group } { 0 }
+\__unravel_tex_primitive:nnn { penalty } { break_penalty } { 0 }
+\__unravel_tex_primitive:nnn { indent } { start_par } { 1 }
+\__unravel_tex_primitive:nnn { noindent } { start_par } { 0 }
+\__unravel_tex_primitive:nnn { quitvmode } { start_par } { 2 }
+\__unravel_tex_primitive:nnn { / } { ital_corr } { 0 }
+\__unravel_tex_primitive:nnn { accent } { accent } { 0 }
+\__unravel_tex_primitive:nnn { mathaccent } { math_accent } { 0 }
+\__unravel_tex_primitive:nnn { - } { discretionary } { 1 }
+\__unravel_tex_primitive:nnn { discretionary } { discretionary } { 0 }
+\__unravel_tex_primitive:nnn { eqno } { eq_no } { 0 }
+\__unravel_tex_primitive:nnn { leqno } { eq_no } { 1 }
+\__unravel_tex_primitive:nnn { left } { left_right } { 30 }
+\__unravel_tex_primitive:nnn { right } { left_right } { 31 }
+\__unravel_tex_primitive:nnn { middle } { left_right } { 17 }
+\__unravel_tex_primitive:nnn { mathord } { math_comp } { 16 }
+\__unravel_tex_primitive:nnn { mathop } { math_comp } { 17 }
+\__unravel_tex_primitive:nnn { mathbin } { math_comp } { 18 }
+\__unravel_tex_primitive:nnn { mathrel } { math_comp } { 19 }
+\__unravel_tex_primitive:nnn { mathopen } { math_comp } { 20 }
+\__unravel_tex_primitive:nnn { mathclose } { math_comp } { 21 }
+\__unravel_tex_primitive:nnn { mathpunct } { math_comp } { 22 }
+\__unravel_tex_primitive:nnn { mathinner } { math_comp } { 23 }
+\__unravel_tex_primitive:nnn { underline } { math_comp } { 26 }
+\__unravel_tex_primitive:nnn { overline } { math_comp } { 27 }
+\__unravel_tex_primitive:nnn { displaylimits } { limit_switch } { 0 }
+\__unravel_tex_primitive:nnn { limits } { limit_switch } { 1 }
+\__unravel_tex_primitive:nnn { nolimits } { limit_switch } { 2 }
+\__unravel_tex_primitive:nnn { above } { above } { 0 }
+\__unravel_tex_primitive:nnn { over } { above } { 1 }
+\__unravel_tex_primitive:nnn { atop } { above } { 2 }
+\__unravel_tex_primitive:nnn { abovewithdelims } { above } { 3 }
+\__unravel_tex_primitive:nnn { overwithdelims } { above } { 4 }
+\__unravel_tex_primitive:nnn { atopwithdelims } { above } { 5 }
+\__unravel_tex_primitive:nnn { displaystyle } { math_style } { 0 }
+\__unravel_tex_primitive:nnn { textstyle } { math_style } { 2 }
+\__unravel_tex_primitive:nnn { scriptstyle } { math_style } { 4 }
+\__unravel_tex_primitive:nnn { scriptscriptstyle } { math_style } { 6 }
+\__unravel_tex_primitive:nnn { mathchoice } { math_choice } { 0 }
+\__unravel_tex_primitive:nnn { nonscript } { non_script } { 0 }
+\__unravel_tex_primitive:nnn { vcenter } { vcenter } { 0 }
+\__unravel_tex_primitive:nnn { lowercase } { case_shift } { 256 }
+\__unravel_tex_primitive:nnn { uppercase } { case_shift } { 512 }
+\__unravel_tex_primitive:nnn { message } { message } { 0 }
+\__unravel_tex_primitive:nnn { errmessage } { message } { 1 }
+\__unravel_tex_primitive:nnn { openout } { extension } { 0 }
+\__unravel_tex_primitive:nnn { write } { extension } { 1 }
+\__unravel_tex_primitive:nnn { closeout } { extension } { 2 }
+\__unravel_tex_primitive:nnn { special } { extension } { 3 }
+\__unravel_tex_primitive:nnn { immediate } { extension } { 4 }
+\__unravel_tex_primitive:nnn { setlanguage } { extension } { 5 }
+\__unravel_tex_primitive:nnn { pdfliteral } { extension } { 6 }
+\__unravel_tex_primitive:nnn { pdfobj } { extension } { 7 }
+\__unravel_tex_primitive:nnn { pdfrefobj } { extension } { 8 }
+\__unravel_tex_primitive:nnn { pdfxform } { extension } { 9 }
+\__unravel_tex_primitive:nnn { pdfrefxform } { extension } { 10 }
+\__unravel_tex_primitive:nnn { pdfximage } { extension } { 11 }
+\__unravel_tex_primitive:nnn { pdfrefximage } { extension } { 12 }
+\__unravel_tex_primitive:nnn { pdfannot } { extension } { 13 }
+\__unravel_tex_primitive:nnn { pdfstartlink } { extension } { 14 }
+\__unravel_tex_primitive:nnn { pdfendlink } { extension } { 15 }
+\__unravel_tex_primitive:nnn { pdfoutline } { extension } { 16 }
+\__unravel_tex_primitive:nnn { pdfdest } { extension } { 17 }
+\__unravel_tex_primitive:nnn { pdfthread } { extension } { 18 }
+\__unravel_tex_primitive:nnn { pdfstartthread } { extension } { 19 }
+\__unravel_tex_primitive:nnn { pdfendthread } { extension } { 20 }
+\__unravel_tex_primitive:nnn { pdfsavepos } { extension } { 21 }
+\__unravel_tex_primitive:nnn { pdfinfo } { extension } { 22 }
+\__unravel_tex_primitive:nnn { pdfcatalog } { extension } { 23 }
+\__unravel_tex_primitive:nnn { pdfnames } { extension } { 24 }
+\__unravel_tex_primitive:nnn { pdffontattr } { extension } { 25 }
+\__unravel_tex_primitive:nnn { pdfincludechars } { extension } { 26 }
+\__unravel_tex_primitive:nnn { pdfmapfile } { extension } { 27 }
+\__unravel_tex_primitive:nnn { pdfmapline } { extension } { 28 }
+\__unravel_tex_primitive:nnn { pdftrailer } { extension } { 29 }
+\__unravel_tex_primitive:nnn { pdfresettimer } { extension } { 30 }
+\__unravel_tex_primitive:nnn { pdffontexpand } { extension } { 31 }
+\__unravel_tex_primitive:nnn { pdfsetrandomseed } { extension } { 32 }
+\__unravel_tex_primitive:nnn { pdfsnaprefpoint } { extension } { 33 }
+\__unravel_tex_primitive:nnn { pdfsnapy } { extension } { 34 }
+\__unravel_tex_primitive:nnn { pdfsnapycomp } { extension } { 35 }
+\__unravel_tex_primitive:nnn { pdfglyphtounicode } { extension } { 36 }
+\__unravel_tex_primitive:nnn { pdfcolorstack } { extension } { 37 }
+\__unravel_tex_primitive:nnn { pdfsetmatrix } { extension } { 38 }
+\__unravel_tex_primitive:nnn { pdfsave } { extension } { 39 }
+\__unravel_tex_primitive:nnn { pdfrestore } { extension } { 40 }
+\__unravel_tex_primitive:nnn { pdfnobuiltintounicode } { extension } { 41 }
+\__unravel_tex_primitive:nnn { openin } { in_stream } { 1 }
+\__unravel_tex_primitive:nnn { closein } { in_stream } { 0 }
+\__unravel_tex_primitive:nnn { begingroup } { begin_group } { 0 }
+\__unravel_tex_primitive:nnn { endgroup } { end_group } { 0 }
+\__unravel_tex_primitive:nnn { omit } { omit } { 0 }
+\__unravel_tex_primitive:nnn { ~ } { ex_space } { 0 }
+\__unravel_tex_primitive:nnn { noboundary } { no_boundary } { 0 }
+\__unravel_tex_primitive:nnn { radical } { radical } { 0 }
+\__unravel_tex_primitive:nnn { endcsname } { end_cs_name } { 0 }
+\__unravel_tex_primitive:nnn { lastpenalty } { last_item } { 0 }
+\__unravel_tex_primitive:nnn { lastkern } { last_item } { 1 }
+\__unravel_tex_primitive:nnn { lastskip } { last_item } { 2 }
+\__unravel_tex_primitive:nnn { lastnodetype } { last_item } { 3 }
+\__unravel_tex_primitive:nnn { inputlineno } { last_item } { 4 }
+\__unravel_tex_primitive:nnn { badness } { last_item } { 5 }
+\__unravel_tex_primitive:nnn { pdftexversion } { last_item } { 6 }
+\__unravel_tex_primitive:nnn { pdflastobj } { last_item } { 7 }
+\__unravel_tex_primitive:nnn { pdflastxform } { last_item } { 8 }
+\__unravel_tex_primitive:nnn { pdflastximage } { last_item } { 9 }
+\__unravel_tex_primitive:nnn { pdflastximagepages } { last_item } { 10 }
+\__unravel_tex_primitive:nnn { pdflastannot } { last_item } { 11 }
+\__unravel_tex_primitive:nnn { pdflastxpos } { last_item } { 12 }
+\__unravel_tex_primitive:nnn { pdflastypos } { last_item } { 13 }
+\__unravel_tex_primitive:nnn { pdfretval } { last_item } { 14 }
+\__unravel_tex_primitive:nnn { pdflastximagecolordepth } { last_item } { 15 }
+\__unravel_tex_primitive:nnn { pdfelapsedtime } { last_item } { 16 }
+\__unravel_tex_primitive:nnn { pdfshellescape } { last_item } { 17 }
+\__unravel_tex_primitive:nnn { pdfrandomseed } { last_item } { 18 }
+\__unravel_tex_primitive:nnn { pdflastlink } { last_item } { 19 }
+\__unravel_tex_primitive:nnn { eTeXversion } { last_item } { 20 }
+\__unravel_tex_primitive:nnn { currentgrouplevel } { last_item } { 21 }
+\__unravel_tex_primitive:nnn { currentgrouptype } { last_item } { 22 }
+\__unravel_tex_primitive:nnn { currentiflevel } { last_item } { 23 }
+\__unravel_tex_primitive:nnn { currentiftype } { last_item } { 24 }
+\__unravel_tex_primitive:nnn { currentifbranch } { last_item } { 25 }
+\__unravel_tex_primitive:nnn { gluestretchorder } { last_item } { 26 }
+\__unravel_tex_primitive:nnn { glueshrinkorder } { last_item } { 27 }
+\__unravel_tex_primitive:nnn { fontcharwd } { last_item } { 28 }
+\__unravel_tex_primitive:nnn { fontcharht } { last_item } { 29 }
+\__unravel_tex_primitive:nnn { fontchardp } { last_item } { 30 }
+\__unravel_tex_primitive:nnn { fontcharic } { last_item } { 31 }
+\__unravel_tex_primitive:nnn { parshapelength } { last_item } { 32 }
+\__unravel_tex_primitive:nnn { parshapeindent } { last_item } { 33 }
+\__unravel_tex_primitive:nnn { parshapedimen } { last_item } { 34 }
+\__unravel_tex_primitive:nnn { gluestretch } { last_item } { 35 }
+\__unravel_tex_primitive:nnn { glueshrink } { last_item } { 36 }
+\__unravel_tex_primitive:nnn { mutoglue } { last_item } { 37 }
+\__unravel_tex_primitive:nnn { gluetomu } { last_item } { 38 }
+\__unravel_tex_primitive:nnn { numexpr } { last_item } { 39 }
+\__unravel_tex_primitive:nnn { dimexpr } { last_item } { 40 }
+\__unravel_tex_primitive:nnn { glueexpr } { last_item } { 41 }
+\__unravel_tex_primitive:nnn { muexpr } { last_item } { 42 }
+\__unravel_tex_primitive:nnn { toks } { toks_register } { 0 }
+\__unravel_tex_primitive:nnn { output } { assign_toks } { 1 }
+\__unravel_tex_primitive:nnn { everypar } { assign_toks } { 2 }
+\__unravel_tex_primitive:nnn { everymath } { assign_toks } { 3 }
+\__unravel_tex_primitive:nnn { everydisplay } { assign_toks } { 4 }
+\__unravel_tex_primitive:nnn { everyhbox } { assign_toks } { 5 }
+\__unravel_tex_primitive:nnn { everyvbox } { assign_toks } { 6 }
+\__unravel_tex_primitive:nnn { everyjob } { assign_toks } { 7 }
+\__unravel_tex_primitive:nnn { everycr } { assign_toks } { 8 }
+\__unravel_tex_primitive:nnn { errhelp } { assign_toks } { 9 }
+\__unravel_tex_primitive:nnn { pdfpagesattr } { assign_toks } { 10 }
+\__unravel_tex_primitive:nnn { pdfpageattr } { assign_toks } { 11 }
+\__unravel_tex_primitive:nnn { pdfpageresources } { assign_toks } { 12 }
+\__unravel_tex_primitive:nnn { pdfpkmode } { assign_toks } { 13 }
+\__unravel_tex_primitive:nnn { everyeof } { assign_toks } { 14 }
+\__unravel_tex_primitive:nnn { pretolerance } { assign_int } { 0 }
+\__unravel_tex_primitive:nnn { tolerance } { assign_int } { 1 }
+\__unravel_tex_primitive:nnn { linepenalty } { assign_int } { 2 }
+\__unravel_tex_primitive:nnn { hyphenpenalty } { assign_int } { 3 }
+\__unravel_tex_primitive:nnn { exhyphenpenalty } { assign_int } { 4 }
+\__unravel_tex_primitive:nnn { clubpenalty } { assign_int } { 5 }
+\__unravel_tex_primitive:nnn { widowpenalty } { assign_int } { 6 }
+\__unravel_tex_primitive:nnn { displaywidowpenalty } { assign_int } { 7 }
+\__unravel_tex_primitive:nnn { brokenpenalty } { assign_int } { 8 }
+\__unravel_tex_primitive:nnn { binoppenalty } { assign_int } { 9 }
+\__unravel_tex_primitive:nnn { relpenalty } { assign_int } { 10 }
+\__unravel_tex_primitive:nnn { predisplaypenalty } { assign_int } { 11 }
+\__unravel_tex_primitive:nnn { postdisplaypenalty } { assign_int } { 12 }
+\__unravel_tex_primitive:nnn { interlinepenalty } { assign_int } { 13 }
+\__unravel_tex_primitive:nnn { doublehyphendemerits } { assign_int } { 14 }
+\__unravel_tex_primitive:nnn { finalhyphendemerits } { assign_int } { 15 }
+\__unravel_tex_primitive:nnn { adjdemerits } { assign_int } { 16 }
+\__unravel_tex_primitive:nnn { mag } { assign_int } { 17 }
+\__unravel_tex_primitive:nnn { delimiterfactor } { assign_int } { 18 }
+\__unravel_tex_primitive:nnn { looseness } { assign_int } { 19 }
+\__unravel_tex_primitive:nnn { time } { assign_int } { 20 }
+\__unravel_tex_primitive:nnn { day } { assign_int } { 21 }
+\__unravel_tex_primitive:nnn { month } { assign_int } { 22 }
+\__unravel_tex_primitive:nnn { year } { assign_int } { 23 }
+\__unravel_tex_primitive:nnn { showboxbreadth } { assign_int } { 24 }
+\__unravel_tex_primitive:nnn { showboxdepth } { assign_int } { 25 }
+\__unravel_tex_primitive:nnn { hbadness } { assign_int } { 26 }
+\__unravel_tex_primitive:nnn { vbadness } { assign_int } { 27 }
+\__unravel_tex_primitive:nnn { pausing } { assign_int } { 28 }
+\__unravel_tex_primitive:nnn { tracingonline } { assign_int } { 29 }
+\__unravel_tex_primitive:nnn { tracingmacros } { assign_int } { 30 }
+\__unravel_tex_primitive:nnn { tracingstats } { assign_int } { 31 }
+\__unravel_tex_primitive:nnn { tracingparagraphs } { assign_int } { 32 }
+\__unravel_tex_primitive:nnn { tracingpages } { assign_int } { 33 }
+\__unravel_tex_primitive:nnn { tracingoutput } { assign_int } { 34 }
+\__unravel_tex_primitive:nnn { tracinglostchars } { assign_int } { 35 }
+\__unravel_tex_primitive:nnn { tracingcommands } { assign_int } { 36 }
+\__unravel_tex_primitive:nnn { tracingrestores } { assign_int } { 37 }
+\__unravel_tex_primitive:nnn { uchyph } { assign_int } { 38 }
+\__unravel_tex_primitive:nnn { outputpenalty } { assign_int } { 39 }
+\__unravel_tex_primitive:nnn { maxdeadcycles } { assign_int } { 40 }
+\__unravel_tex_primitive:nnn { hangafter } { assign_int } { 41 }
+\__unravel_tex_primitive:nnn { floatingpenalty } { assign_int } { 42 }
+\__unravel_tex_primitive:nnn { globaldefs } { assign_int } { 43 }
+\__unravel_tex_primitive:nnn { fam } { assign_int } { 44 }
+\__unravel_tex_primitive:nnn { escapechar } { assign_int } { 45 }
+\__unravel_tex_primitive:nnn { defaulthyphenchar } { assign_int } { 46 }
+\__unravel_tex_primitive:nnn { defaultskewchar } { assign_int } { 47 }
+\__unravel_tex_primitive:nnn { endlinechar } { assign_int } { 48 }
+\__unravel_tex_primitive:nnn { newlinechar } { assign_int } { 49 }
+\__unravel_tex_primitive:nnn { language } { assign_int } { 50 }
+\__unravel_tex_primitive:nnn { lefthyphenmin } { assign_int } { 51 }
+\__unravel_tex_primitive:nnn { righthyphenmin } { assign_int } { 52 }
+\__unravel_tex_primitive:nnn { holdinginserts } { assign_int } { 53 }
+\__unravel_tex_primitive:nnn { errorcontegtlines } { assign_int } { 54 }
+\__unravel_tex_primitive:nnn { pdfoutput } { assign_int } { 55 }
+\__unravel_tex_primitive:nnn { pdfcompresslevel } { assign_int } { 56 }
+\__unravel_tex_primitive:nnn { pdfdecimaldigits } { assign_int } { 57 }
+\__unravel_tex_primitive:nnn { pdfmovechars } { assign_int } { 58 }
+\__unravel_tex_primitive:nnn { pdfimageresolution } { assign_int } { 59 }
+\__unravel_tex_primitive:nnn { pdfpkresolution } { assign_int } { 60 }
+\__unravel_tex_primitive:nnn { pdfuniqueresname } { assign_int } { 61 }
+\__unravel_tex_primitive:nnn
+ { pdfoptionalwaysusepdfpagebox } { assign_int } { 62 }
+\__unravel_tex_primitive:nnn
+ { pdfoptionpdfinclusionerrorlevel } { assign_int } { 63 }
+\__unravel_tex_primitive:nnn
+ { pdfoptionpdfminorversion } { assign_int } { 64 }
+\__unravel_tex_primitive:nnn { pdfminorversion } { assign_int } { 64 }
+\__unravel_tex_primitive:nnn { pdfforcepagebox } { assign_int } { 65 }
+\__unravel_tex_primitive:nnn { pdfpagebox } { assign_int } { 66 }
+\__unravel_tex_primitive:nnn
+ { pdfinclusionerrorlevel } { assign_int } { 67 }
+\__unravel_tex_primitive:nnn { pdfgamma } { assign_int } { 68 }
+\__unravel_tex_primitive:nnn { pdfimagegamma } { assign_int } { 69 }
+\__unravel_tex_primitive:nnn { pdfimagehicolor } { assign_int } { 70 }
+\__unravel_tex_primitive:nnn { pdfimageapplygamma } { assign_int } { 71 }
+\__unravel_tex_primitive:nnn { pdfadjustspacing } { assign_int } { 72 }
+\__unravel_tex_primitive:nnn { pdfprotrudechars } { assign_int } { 73 }
+\__unravel_tex_primitive:nnn { pdftracingfonts } { assign_int } { 74 }
+\__unravel_tex_primitive:nnn { pdfobjcompresslevel } { assign_int } { 75 }
+\__unravel_tex_primitive:nnn
+ { pdfadjustinterwordglue } { assign_int } { 76 }
+\__unravel_tex_primitive:nnn { pdfprependkern } { assign_int } { 77 }
+\__unravel_tex_primitive:nnn { pdfappendkern } { assign_int } { 78 }
+\__unravel_tex_primitive:nnn { pdfgentounicode } { assign_int } { 79 }
+\__unravel_tex_primitive:nnn { pdfdraftmode } { assign_int } { 80 }
+\__unravel_tex_primitive:nnn { pdfinclusioncopyfonts } { assign_int } { 81 }
+\__unravel_tex_primitive:nnn { tracingassigns } { assign_int } { 82 }
+\__unravel_tex_primitive:nnn { tracinggroups } { assign_int } { 83 }
+\__unravel_tex_primitive:nnn { tracingifs } { assign_int } { 84 }
+\__unravel_tex_primitive:nnn { tracingscantokens } { assign_int } { 85 }
+\__unravel_tex_primitive:nnn { tracingnesting } { assign_int } { 86 }
+\__unravel_tex_primitive:nnn { predisplaydirection } { assign_int } { 87 }
+\__unravel_tex_primitive:nnn { lastlinefit } { assign_int } { 88 }
+\__unravel_tex_primitive:nnn { savingvdiscards } { assign_int } { 89 }
+\__unravel_tex_primitive:nnn { savinghyphcodes } { assign_int } { 90 }
+\__unravel_tex_primitive:nnn { TeXXeTstate } { assign_int } { 91 }
+\__unravel_tex_primitive:nnn { parindent } { assign_dimen } { 0 }
+\__unravel_tex_primitive:nnn { mathsurround } { assign_dimen } { 1 }
+\__unravel_tex_primitive:nnn { lineskiplimit } { assign_dimen } { 2 }
+\__unravel_tex_primitive:nnn { hsize } { assign_dimen } { 3 }
+\__unravel_tex_primitive:nnn { vsize } { assign_dimen } { 4 }
+\__unravel_tex_primitive:nnn { maxdepth } { assign_dimen } { 5 }
+\__unravel_tex_primitive:nnn { splitmaxdepth } { assign_dimen } { 6 }
+\__unravel_tex_primitive:nnn { boxmaxdepth } { assign_dimen } { 7 }
+\__unravel_tex_primitive:nnn { hfuzz } { assign_dimen } { 8 }
+\__unravel_tex_primitive:nnn { vfuzz } { assign_dimen } { 9 }
+\__unravel_tex_primitive:nnn { delimitershortfall } { assign_dimen } { 10 }
+\__unravel_tex_primitive:nnn { nulldelimiterspace } { assign_dimen } { 11 }
+\__unravel_tex_primitive:nnn { scriptspace } { assign_dimen } { 12 }
+\__unravel_tex_primitive:nnn { predisplaysize } { assign_dimen } { 13 }
+\__unravel_tex_primitive:nnn { displaywidth } { assign_dimen } { 14 }
+\__unravel_tex_primitive:nnn { displayindent } { assign_dimen } { 15 }
+\__unravel_tex_primitive:nnn { overfullrule } { assign_dimen } { 16 }
+\__unravel_tex_primitive:nnn { hangindent } { assign_dimen } { 17 }
+\__unravel_tex_primitive:nnn { hoffset } { assign_dimen } { 18 }
+\__unravel_tex_primitive:nnn { voffset } { assign_dimen } { 19 }
+\__unravel_tex_primitive:nnn { emergencystretch } { assign_dimen } { 20 }
+\__unravel_tex_primitive:nnn { pdfhorigin } { assign_dimen } { 21 }
+\__unravel_tex_primitive:nnn { pdfvorigin } { assign_dimen } { 22 }
+\__unravel_tex_primitive:nnn { pdfpagewidth } { assign_dimen } { 23 }
+\__unravel_tex_primitive:nnn { pdfpageheight } { assign_dimen } { 24 }
+\__unravel_tex_primitive:nnn { pdflinkmargin } { assign_dimen } { 25 }
+\__unravel_tex_primitive:nnn { pdfdestmargin } { assign_dimen } { 26 }
+\__unravel_tex_primitive:nnn { pdfthreadmargin } { assign_dimen } { 27 }
+\__unravel_tex_primitive:nnn { pdffirstlineheight } { assign_dimen } { 28 }
+\__unravel_tex_primitive:nnn { pdflastlinedepth } { assign_dimen } { 29 }
+\__unravel_tex_primitive:nnn { pdfeachlineheight } { assign_dimen } { 30 }
+\__unravel_tex_primitive:nnn { pdfeachlinedepth } { assign_dimen } { 31 }
+\__unravel_tex_primitive:nnn { pdfignoreddimen } { assign_dimen } { 32 }
+\__unravel_tex_primitive:nnn { pdfpxdimen } { assign_dimen } { 33 }
+\__unravel_tex_primitive:nnn { lineskip } { assign_glue } { 0 }
+\__unravel_tex_primitive:nnn { baselineskip } { assign_glue } { 1 }
+\__unravel_tex_primitive:nnn { parskip } { assign_glue } { 2 }
+\__unravel_tex_primitive:nnn { abovedisplayskip } { assign_glue } { 3 }
+\__unravel_tex_primitive:nnn { belowdisplayskip } { assign_glue } { 4 }
+\__unravel_tex_primitive:nnn { abovedisplayshortskip } { assign_glue } { 5 }
+\__unravel_tex_primitive:nnn { belowdisplayshortskip } { assign_glue } { 6 }
+\__unravel_tex_primitive:nnn { leftskip } { assign_glue } { 7 }
+\__unravel_tex_primitive:nnn { rightskip } { assign_glue } { 8 }
+\__unravel_tex_primitive:nnn { topskip } { assign_glue } { 9 }
+\__unravel_tex_primitive:nnn { splittopskip } { assign_glue } { 10 }
+\__unravel_tex_primitive:nnn { tabskip } { assign_glue } { 11 }
+\__unravel_tex_primitive:nnn { spaceskip } { assign_glue } { 12 }
+\__unravel_tex_primitive:nnn { xspaceskip } { assign_glue } { 13 }
+\__unravel_tex_primitive:nnn { parfillskip } { assign_glue } { 14 }
+\__unravel_tex_primitive:nnn { thinmuskip } { assign_mu_glue } { 15 }
+\__unravel_tex_primitive:nnn { medmuskip } { assign_mu_glue } { 16 }
+\__unravel_tex_primitive:nnn { thickmuskip } { assign_mu_glue } { 17 }
+\__unravel_tex_primitive:nnn { fontdimen } { assign_font_dimen } { 0 }
+\__unravel_tex_primitive:nnn { hyphenchar } { assign_font_int } { 0 }
+\__unravel_tex_primitive:nnn { skewchar } { assign_font_int } { 1 }
+\__unravel_tex_primitive:nnn { lpcode } { assign_font_int } { 2 }
+\__unravel_tex_primitive:nnn { rpcode } { assign_font_int } { 3 }
+\__unravel_tex_primitive:nnn { efcode } { assign_font_int } { 4 }
+\__unravel_tex_primitive:nnn { tagcode } { assign_font_int } { 5 }
+\__unravel_tex_primitive:nnn { pdfnoligatures } { assign_font_int } { 6 }
+\__unravel_tex_primitive:nnn { knbscode } { assign_font_int } { 7 }
+\__unravel_tex_primitive:nnn { stbscode } { assign_font_int } { 8 }
+\__unravel_tex_primitive:nnn { shbscode } { assign_font_int } { 9 }
+\__unravel_tex_primitive:nnn { knbccode } { assign_font_int } { 10 }
+\__unravel_tex_primitive:nnn { knaccode } { assign_font_int } { 11 }
+\__unravel_tex_primitive:nnn { spacefactor } { set_aux } { 102 }
+\__unravel_tex_primitive:nnn { prevdepth } { set_aux } { 1 }
+\__unravel_tex_primitive:nnn { prevgraf } { set_prev_graf } { 0 }
+\__unravel_tex_primitive:nnn { pagegoal } { set_page_dimen } { 0 }
+\__unravel_tex_primitive:nnn { pagetotal } { set_page_dimen } { 1 }
+\__unravel_tex_primitive:nnn { pagestretch } { set_page_dimen } { 2 }
+\__unravel_tex_primitive:nnn { pagefilstretch } { set_page_dimen } { 3 }
+\__unravel_tex_primitive:nnn { pagefillstretch } { set_page_dimen } { 4 }
+\__unravel_tex_primitive:nnn { pagefilllstretch } { set_page_dimen } { 5 }
+\__unravel_tex_primitive:nnn { pageshrink } { set_page_dimen } { 6 }
+\__unravel_tex_primitive:nnn { pagedepth } { set_page_dimen } { 7 }
+\__unravel_tex_primitive:nnn { deadcycles } { set_page_int } { 0 }
+\__unravel_tex_primitive:nnn { insertpenalties } { set_page_int } { 1 }
+\__unravel_tex_primitive:nnn { interactionmode } { set_page_int } { 2 }
+\__unravel_tex_primitive:nnn { wd } { set_box_dimen } { 1 }
+\__unravel_tex_primitive:nnn { dp } { set_box_dimen } { 2 }
+\__unravel_tex_primitive:nnn { ht } { set_box_dimen } { 3 }
+\__unravel_tex_primitive:nnn { parshape } { set_shape } { 0 }
+\__unravel_tex_primitive:nnn { interlinepenalties } { set_shape } { 1 }
+\__unravel_tex_primitive:nnn { clubpenalties } { set_shape } { 2 }
+\__unravel_tex_primitive:nnn { widowpenalties } { set_shape } { 3 }
+\__unravel_tex_primitive:nnn { displaywidowpenalties } { set_shape } { 4 }
+\__unravel_tex_primitive:nnn { catcode } { def_code } { 0 }
+\__unravel_tex_primitive:nnn { lccode } { def_code } { 256 }
+\__unravel_tex_primitive:nnn { uccode } { def_code } { 512 }
+\__unravel_tex_primitive:nnn { sfcode } { def_code } { 768 }
+\__unravel_tex_primitive:nnn { mathcode } { def_code } { 1024 }
+\__unravel_tex_primitive:nnn { delcode } { def_code } { 1591 }
+\__unravel_tex_primitive:nnn { textfont } { def_family } { -48 }
+\__unravel_tex_primitive:nnn { scriptfont } { def_family } { -32 }
+\__unravel_tex_primitive:nnn { scriptscriptfont } { def_family } { -16 }
+\__unravel_tex_primitive:nnn { nullfont } { set_font } { 0 }
+\__unravel_tex_primitive:nnn { font } { def_font } { 0 }
+\__unravel_tex_primitive:nnn { count } { register } { 1 000 000 }
+\__unravel_tex_primitive:nnn { dimen } { register } { 2 000 000 }
+\__unravel_tex_primitive:nnn { skip } { register } { 3 000 000 }
+\__unravel_tex_primitive:nnn { muskip } { register } { 4 000 000 }
+\__unravel_tex_primitive:nnn { advance } { advance } { 0 }
+\__unravel_tex_primitive:nnn { multiply } { multiply } { 0 }
+\__unravel_tex_primitive:nnn { divide } { divide } { 0 }
+\__unravel_tex_primitive:nnn { long } { prefix } { 1 }
+\__unravel_tex_primitive:nnn { outer } { prefix } { 2 }
+\__unravel_tex_primitive:nnn { global } { prefix } { 4 }
+\__unravel_tex_primitive:nnn { protected } { prefix } { 8 }
+\__unravel_tex_primitive:nnn { let } { let } { 0 }
+\__unravel_tex_primitive:nnn { futurelet } { let } { 1 }
+\__unravel_tex_primitive:nnn { chardef } { shorthand_def } { 0 }
+\__unravel_tex_primitive:nnn { mathchardef } { shorthand_def } { 1 }
+\__unravel_tex_primitive:nnn { countdef } { shorthand_def } { 2 }
+\__unravel_tex_primitive:nnn { dimendef } { shorthand_def } { 3 }
+\__unravel_tex_primitive:nnn { skipdef } { shorthand_def } { 4 }
+\__unravel_tex_primitive:nnn { muskipdef } { shorthand_def } { 5 }
+\__unravel_tex_primitive:nnn { toksdef } { shorthand_def } { 6 }
+\__unravel_tex_primitive:nnn { read } { read_to_cs } { 0 }
+\__unravel_tex_primitive:nnn { readline } { read_to_cs } { 1 }
+\__unravel_tex_primitive:nnn { def } { def } { 0 }
+\__unravel_tex_primitive:nnn { gdef } { def } { 1 }
+\__unravel_tex_primitive:nnn { edef } { def } { 2 }
+\__unravel_tex_primitive:nnn { xdef } { def } { 3 }
+\__unravel_tex_primitive:nnn { setbox } { set_box } { 0 }
+\__unravel_tex_primitive:nnn { hyphenation } { hyph_data } { 0 }
+\__unravel_tex_primitive:nnn { patterns } { hyph_data } { 1 }
+\__unravel_tex_primitive:nnn { batchmode } { set_interaction } { 0 }
+\__unravel_tex_primitive:nnn { nonstopmode } { set_interaction } { 1 }
+\__unravel_tex_primitive:nnn { scrollmode } { set_interaction } { 2 }
+\__unravel_tex_primitive:nnn { errorstopmode } { set_interaction } { 3 }
+\__unravel_tex_primitive:nnn { letterspacefont } { letterspace_font } { 0 }
+\__unravel_tex_primitive:nnn { pdfcopyfont } { pdf_copy_font } { 0 }
+\__unravel_tex_primitive:nnn { undefined } { undefined_cs } { 0 }
+\__unravel_tex_primitive:nnn { ndefined } { undefined_cs } { 0 }
+\__unravel_tex_primitive:nnn { expandafter } { expand_after } { 0 }
+\__unravel_tex_primitive:nnn { unless } { expand_after } { 1 }
+\__unravel_tex_primitive:nnn { pdfprimitive } { no_expand } { 1 }
+\__unravel_tex_primitive:nnn { noexpand } { no_expand } { 0 }
+\__unravel_tex_primitive:nnn { input } { input } { 0 }
+\__unravel_tex_primitive:nnn { endinput } { input } { 1 }
+\__unravel_tex_primitive:nnn { scantokens } { input } { 2 }
+\__unravel_tex_primitive:nnn { if } { if_test } { 0 }
+\__unravel_tex_primitive:nnn { ifcat } { if_test } { 1 }
+\__unravel_tex_primitive:nnn { ifnum } { if_test } { 2 }
+\__unravel_tex_primitive:nnn { ifdim } { if_test } { 3 }
+\__unravel_tex_primitive:nnn { ifodd } { if_test } { 4 }
+\__unravel_tex_primitive:nnn { ifvmode } { if_test } { 5 }
+\__unravel_tex_primitive:nnn { ifhmode } { if_test } { 6 }
+\__unravel_tex_primitive:nnn { ifmmode } { if_test } { 7 }
+\__unravel_tex_primitive:nnn { ifinner } { if_test } { 8 }
+\__unravel_tex_primitive:nnn { ifvoid } { if_test } { 9 }
+\__unravel_tex_primitive:nnn { ifhbox } { if_test } { 10 }
+\__unravel_tex_primitive:nnn { ifvbox } { if_test } { 11 }
+\__unravel_tex_primitive:nnn { ifx } { if_test } { 12 }
+\__unravel_tex_primitive:nnn { ifeof } { if_test } { 13 }
+\__unravel_tex_primitive:nnn { iftrue } { if_test } { 14 }
+\__unravel_tex_primitive:nnn { iffalse } { if_test } { 15 }
+\__unravel_tex_primitive:nnn { ifcase } { if_test } { 16 }
+\__unravel_tex_primitive:nnn { ifdefined } { if_test } { 17 }
+\__unravel_tex_primitive:nnn { ifcsname } { if_test } { 18 }
+\__unravel_tex_primitive:nnn { iffontchar } { if_test } { 19 }
+\__unravel_tex_primitive:nnn { ifincsname } { if_test } { 20 }
+\__unravel_tex_primitive:nnn { ifpdfprimitive } { if_test } { 21 }
+\__unravel_tex_primitive:nnn { ifpdfabsnum } { if_test } { 22 }
+\__unravel_tex_primitive:nnn { ifpdfabsdim } { if_test } { 23 }
+\__unravel_tex_primitive:nnn { fi } { fi_or_else } { 2 }
+\__unravel_tex_primitive:nnn { else } { fi_or_else } { 3 }
+\__unravel_tex_primitive:nnn { or } { fi_or_else } { 4 }
+\__unravel_tex_primitive:nnn { csname } { cs_name } { 0 }
+\__unravel_tex_primitive:nnn { number } { convert } { 0 }
+\__unravel_tex_primitive:nnn { romannumeral } { convert } { 1 }
+\__unravel_tex_primitive:nnn { string } { convert } { 2 }
+\__unravel_tex_primitive:nnn { meaning } { convert } { 3 }
+\__unravel_tex_primitive:nnn { fontname } { convert } { 4 }
+\__unravel_tex_primitive:nnn { eTeXrevision } { convert } { 5 }
+\__unravel_tex_primitive:nnn { pdftexrevision } { convert } { 6 }
+\__unravel_tex_primitive:nnn { pdftexbanner } { convert } { 7 }
+\__unravel_tex_primitive:nnn { pdffontname } { convert } { 8 }
+\__unravel_tex_primitive:nnn { pdffontobjnum } { convert } { 9 }
+\__unravel_tex_primitive:nnn { pdffontsize } { convert } { 10 }
+\__unravel_tex_primitive:nnn { pdfpageref } { convert } { 11 }
+\__unravel_tex_primitive:nnn { pdfxformname } { convert } { 12 }
+\__unravel_tex_primitive:nnn { pdfescapestring } { convert } { 13 }
+\__unravel_tex_primitive:nnn { pdfescapename } { convert } { 14 }
+\__unravel_tex_primitive:nnn { leftmarginkern } { convert } { 15 }
+\__unravel_tex_primitive:nnn { rightmarginkern } { convert } { 16 }
+\__unravel_tex_primitive:nnn { pdfstrcmp } { convert } { 17 }
+\__unravel_tex_primitive:nnn { pdfcolorstackinit } { convert } { 18 }
+\__unravel_tex_primitive:nnn { pdfescapehex } { convert } { 19 }
+\__unravel_tex_primitive:nnn { pdfunescapehex } { convert } { 20 }
+\__unravel_tex_primitive:nnn { pdfcreationdate } { convert } { 21 }
+\__unravel_tex_primitive:nnn { pdffilemoddate } { convert } { 22 }
+\__unravel_tex_primitive:nnn { pdffilesize } { convert } { 23 }
+\__unravel_tex_primitive:nnn { pdfmdfivesum } { convert } { 24 }
+\__unravel_tex_primitive:nnn { pdffiledump } { convert } { 25 }
+\__unravel_tex_primitive:nnn { pdfmatch } { convert } { 26 }
+\__unravel_tex_primitive:nnn { pdflastmatch } { convert } { 27 }
+\__unravel_tex_primitive:nnn { pdfuniformdeviate } { convert } { 28 }
+\__unravel_tex_primitive:nnn { pdfnormaldeviate } { convert } { 29 }
+\__unravel_tex_primitive:nnn { pdfinsertht } { convert } { 30 }
+\__unravel_tex_primitive:nnn { pdfximagebbox } { convert } { 31 }
+\__unravel_tex_primitive:nnn { jobname } { convert } { 32 }
+\__unravel_tex_primitive:nnn { the } { the } { 0 }
+\__unravel_tex_primitive:nnn { unexpanded } { the } { 1 }
+\__unravel_tex_primitive:nnn { detokenize } { the } { 5 }
+\__unravel_tex_primitive:nnn { topmark } { top_bot_mark } { 0 }
+\__unravel_tex_primitive:nnn { firstmark } { top_bot_mark } { 1 }
+\__unravel_tex_primitive:nnn { botmark } { top_bot_mark } { 2 }
+\__unravel_tex_primitive:nnn { splitfirstmark } { top_bot_mark } { 3 }
+\__unravel_tex_primitive:nnn { splitbotmark } { top_bot_mark } { 4 }
+\__unravel_tex_primitive:nnn { topmarks } { top_bot_mark } { 5 }
+\__unravel_tex_primitive:nnn { firstmarks } { top_bot_mark } { 6 }
+\__unravel_tex_primitive:nnn { botmarks } { top_bot_mark } { 7 }
+\__unravel_tex_primitive:nnn { splitfirstmarks } { top_bot_mark } { 8 }
+\__unravel_tex_primitive:nnn { splitbotmarks } { top_bot_mark } { 9 }
+\cs_new_protected_nopar:Npn \__unravel_get_next:
+ {
+ \__unravel_input_if_empty:TF
+ { \__unravel_exit:w }
+ {
+ \__unravel_input_gpop:N \l__unravel_head_gtl
+ \gtl_head_do:NN \l__unravel_head_gtl \__unravel_get_next_aux:w
+ \gtl_if_tl:NTF \l__unravel_head_gtl
+ {
+ \tl_set:Nx \l__unravel_head_tl
+ { \gtl_head:N \l__unravel_head_gtl }
+ }
+ { \tl_clear:N \l__unravel_head_tl }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_get_next_aux:w
+ { \cs_set_eq:NN \l__unravel_head_token }
+\cs_new_protected_nopar:Npn \__unravel_get_token:
+ {
+ \__unravel_get_next:
+ \__unravel_set_cmd:
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_cmd:
+ {
+ \__unravel_set_cmd_aux_meaning:
+ \__unravel_set_cmd_aux_primitive:oTF { \l__unravel_head_meaning_tl }
+ { }
+ {
+ \__unravel_token_if_expandable:NTF \l__unravel_head_token
+ {
+ \token_if_macro:NTF \l__unravel_head_token
+ { \__unravel_set_cmd_aux_macro: }
+ { \__unravel_set_cmd_aux_unknown: }
+ }
+ {
+ \token_if_cs:NTF \l__unravel_head_token
+ { \__unravel_set_cmd_aux_cs: }
+ { \__unravel_set_cmd_aux_char: }
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_cmd_aux_meaning:
+ {
+ \tl_set:Nx \l__unravel_head_meaning_tl
+ {
+ \exp_after:wN \__unravel_strip_escape:w
+ \token_to_meaning:N \l__unravel_head_token
+ \tl_to_str:n { : }
+ }
+ \tl_set:Nx \l__unravel_head_meaning_tl
+ {
+ \exp_after:wN \__unravel_set_cmd_aux_meaning:w
+ \l__unravel_head_meaning_tl \q_stop
+ }
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \__unravel_set_cmd_aux_meaning:w
+ ##1 \token_to_str:N : ##2 \exp_not:N \q_stop {##1}
+ }
+\cs_new_protected:Npn \__unravel_set_cmd_aux_primitive:nTF #1#2
+ {
+ \cs_if_exist:cTF { c__unravel_tex_#1_tl }
+ {
+ \exp_last_unbraced:Nv \__unravel_set_cmd_aux_primitive:nn
+ { c__unravel_tex_#1_tl }
+ #2
+ }
+ }
+\cs_generate_variant:Nn \__unravel_set_cmd_aux_primitive:nTF { o }
+\cs_new_protected:Npn \__unravel_set_cmd_aux_primitive:nn #1#2
+ {
+ \int_set:Nn \l__unravel_head_cmd_int {#1}
+ \int_set:Nn \l__unravel_head_char_int {#2}
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_cmd_aux_macro:
+ {
+ \int_set:Nn \l__unravel_head_cmd_int { \__unravel_tex_use:n { call } }
+ \int_zero:N \l__unravel_head_char_int
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_cmd_aux_unknown:
+ {
+ \exp_last_unbraced:NV \__unravel_set_cmd_aux_primitive:nn
+ \c__unravel_tex_relax_tl
+ \msg_error:nnx { unravel } { unknown-primitive }
+ { \l__unravel_head_meaning_tl }
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_cmd_aux_cs:
+ {
+ \tl_if_in:NoTF \l__unravel_head_meaning_tl
+ { \tl_to_str:n { elect~font } }
+ {
+ \exp_last_unbraced:NV \__unravel_set_cmd_aux_primitive:nn
+ \c__unravel_tex_nullfont_tl
+ }
+ { \__unravel_set_cmd_aux_numeric: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_cmd_aux_numeric:
+ {
+ \tl_set:Nx \l__unravel_tmpa_tl
+ {
+ \exp_after:wN \__unravel_set_cmd_aux_numeric:N
+ \l__unravel_head_meaning_tl + 0
+ }
+ \exp_after:wN \__unravel_set_cmd_aux_numeric:w
+ \l__unravel_tmpa_tl \q_stop
+ }
+\cs_new:Npn \__unravel_set_cmd_aux_numeric:N #1
+ {
+ \if_int_compare:w `#1 < `A \exp_stop_f:
+ \exp_not:N \q_mark
+ \exp_after:wN \use_i:nn
+ \fi:
+ #1 \__unravel_set_cmd_aux_numeric:N
+ }
+\cs_new_protected:Npn \__unravel_set_cmd_aux_numeric:w #1 \q_mark #2 \q_stop
+ {
+ \str_case:nnF {#1}
+ {
+ { char } { \__unravel_set_cmd_aux_given:n { char_given } }
+ { mathchar } { \__unravel_set_cmd_aux_given:n { math_given } }
+ }
+ {
+ \__unravel_set_cmd_aux_primitive:nTF {#1}
+ { }
+ { \__unravel_set_cmd_aux_unknown: }
+ \int_add:Nn \l__unravel_head_char_int { 100 000 }
+ }
+ \int_add:Nn \l__unravel_head_char_int {#2}
+ }
+\cs_new_protected:Npn \__unravel_set_cmd_aux_given:n #1
+ {
+ \int_set:Nn \l__unravel_head_cmd_int { \__unravel_tex_use:n {#1} }
+ \int_zero:N \l__unravel_head_char_int
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_cmd_aux_char:
+ {
+ \tl_set:Nx \l__unravel_head_meaning_tl
+ { \token_to_meaning:N \l__unravel_head_token }
+ \token_if_eq_catcode:NNT \l__unravel_head_token \c_catcode_other_token
+ { \tl_set:Nn \l__unravel_head_meaning_tl { other~ } }
+ \exp_after:wN \__unravel_set_cmd_aux_char:w
+ \l__unravel_head_meaning_tl \q_stop
+ \exp_args:NNx \int_set:Nn \l__unravel_head_char_int
+ { ` \__unravel_token_to_char:N \l__unravel_head_token }
+ }
+\cs_new_protected:Npn \__unravel_set_cmd_aux_char:w #1 ~ #2 \q_stop
+ {
+ \int_set:Nn \l__unravel_head_cmd_int
+ { \__unravel_tex_use:n { #1_char } }
+ }
+\cs_new_nopar:Npn \__unravel_input_to_str:
+ {
+ \int_step_function:nnnN \g__unravel_input_int { -1 } { 1 }
+ \__unravel_input_to_str_aux:n
+ }
+\cs_new:Npn \__unravel_input_to_str_aux:n #1
+ { \gtl_to_str:c { g__unravel_input_#1_gtl } }
+\cs_new_protected:Npn \__unravel_input_if_empty:TF
+ {
+ \int_compare:nNnTF \g__unravel_input_int = \c_zero
+ { \use_i:nn }
+ {
+ \gtl_if_empty:cTF
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl }
+ {
+ \int_gdecr:N \g__unravel_input_int
+ \__unravel_input_if_empty:TF
+ }
+ {
+ \__unravel_input_split:
+ \use_ii:nn
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_input_split:
+ {
+ \int_compare:nNnT \g__unravel_input_int = \c_one
+ {
+ \exp_args:Nc \__unravel_input_split_aux:N
+ { g__unravel_input_1_gtl }
+ }
+ }
+\cs_new_protected:Npn \__unravel_input_split_aux:N #1
+ {
+ \gtl_if_tl:NT #1
+ {
+ \gtl_if_head_is_N_type:NT #1
+ {
+ \tl_set:Nx \l__unravel_input_tmpa_tl { \gtl_left_tl:N #1 }
+ \exp_last_unbraced:Nx \__unravel_input_split_auxii:N
+ { \tl_head:N \l__unravel_input_tmpa_tl }
+ }
+ }
+ }
+\cs_new_protected:Npn \__unravel_input_split_auxii:N #1
+ {
+ \token_if_parameter:NF #1
+ {
+ \tl_replace_all:Nnn \l__unravel_input_tmpa_tl {#1}
+ { \__unravel_input_split_end: \__unravel_input_split_auxiii:w #1 }
+ \group_begin:
+ \cs_set:Npn \__unravel_input_split_auxiii:w
+ ##1 \__unravel_input_split_end: { + 1 }
+ \int_gset:Nn \g__unravel_input_int
+ { 0 \l__unravel_input_tmpa_tl \__unravel_input_split_end: }
+ \group_end:
+ \int_gset_eq:NN \g__unravel_input_tmpa_int \g__unravel_input_int
+ \l__unravel_input_tmpa_tl \__unravel_input_split_end:
+ }
+ }
+\cs_new_nopar:Npn \__unravel_input_split_end: { }
+\cs_new_protected:Npn \__unravel_input_split_auxiii:w
+ #1 \__unravel_input_split_end:
+ {
+ \gtl_gset:cn
+ { g__unravel_input_ \int_use:N \g__unravel_input_tmpa_int _gtl } {#1}
+ \int_gdecr:N \g__unravel_input_tmpa_int
+ }
+\cs_new_protected_nopar:Npn \__unravel_input_gset:n
+ {
+ \int_gset_eq:NN \g__unravel_input_int \c_one
+ \gtl_gset:cn { g__unravel_input_1_gtl }
+ }
+\cs_new_protected:Npn \__unravel_input_get:N #1
+ {
+ \__unravel_input_if_empty:TF
+ { \gtl_set:Nn #1 { \q_no_value } }
+ {
+ \gtl_get_left:cN
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl } #1
+ }
+ }
+\cs_new_protected:Npn \__unravel_input_gpop:N #1
+ {
+ \__unravel_input_if_empty:TF
+ { \gtl_set:Nn #1 { \q_no_value } }
+ {
+ \gtl_gpop_left:cN
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl } #1
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_input_merge:
+ {
+ \int_gdecr:N \g__unravel_input_int
+ \gtl_gconcat:ccc
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl }
+ { g__unravel_input_ \int_eval:n { \g__unravel_input_int + 1 } _gtl }
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl }
+ \gtl_gclear:c
+ { g__unravel_input_ \int_eval:n { \g__unravel_input_int + 1 } _gtl }
+ }
+\prg_new_protected_conditional:Npnn \__unravel_input_gpop_item:N #1 { F }
+ {
+ \int_compare:nNnTF \g__unravel_input_int = \c_zero
+ { \prg_return_false: }
+ {
+ \exp_args:Nc \__unravel_input_gpop_item_aux:NN
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl } #1
+ }
+ }
+\cs_new_protected:Npn \__unravel_input_gpop_item_aux:NN #1#2
+ {
+ \gtl_gpop_left_item:NNTF #1#2
+ { \prg_return_true: }
+ {
+ \int_compare:nNnTF { \gtl_extra_end:N #1 } > \c_zero
+ { \prg_return_false: }
+ {
+ \int_compare:nNnTF \g__unravel_input_int = \c_one
+ { \prg_return_false: }
+ {
+ \__unravel_input_merge:
+ \exp_args:Nc \__unravel_input_gpop_item_aux:NN
+ {
+ g__unravel_input_
+ \int_use:N \g__unravel_input_int _gtl
+ }
+ #2
+ }
+ }
+ }
+ }
+\cs_new_protected:Npn \__unravel_input_gpop_tl:N #1
+ { \tl_clear:N #1 \__unravel_input_gpop_tl_aux:N #1 }
+\cs_new_protected:Npn \__unravel_input_gpop_tl_aux:N #1
+ {
+ \int_compare:nNnF \g__unravel_input_int = \c_zero
+ {
+ \exp_args:Nc \__unravel_input_gpop_tl_aux:NN
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl } #1
+ }
+ }
+\cs_new_protected:Npn \__unravel_input_gpop_tl_aux:NN #1#2
+ {
+ \gtl_if_tl:NTF #1
+ {
+ \tl_put_right:Nx #2 { \gtl_left_tl:N #1 }
+ \gtl_gclear:N #1
+ \int_gdecr:N \g__unravel_input_int
+ \__unravel_input_gpop_tl_aux:N #2
+ }
+ {
+ \int_compare:nNnTF \g__unravel_input_int > \c_one
+ { \int_compare:nNnTF { \gtl_extra_end:N #1 } > \c_zero }
+ { \use_i:nn }
+ {
+ \tl_put_right:Nx #2 { \gtl_left_tl:N #1 }
+ \gtl_gpop_left_tl:N #1
+ }
+ {
+ \__unravel_input_merge:
+ \__unravel_input_gpop_tl_aux:N #2
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_back_input:n
+ {
+ \int_gincr:N \g__unravel_input_int
+ \gtl_gset:cn { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl }
+ }
+\cs_generate_variant:Nn \__unravel_back_input:n { x , V , o }
+\cs_new_protected:Npn \__unravel_back_input_gtl:N #1
+ {
+ \gtl_if_tl:NTF #1
+ { \__unravel_back_input:x { \gtl_left_tl:N #1 } }
+ {
+ \gtl_gconcat:cNc
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl }
+ #1
+ { g__unravel_input_ \int_use:N \g__unravel_input_int _gtl }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_back_input:
+ { \__unravel_back_input_gtl:N \l__unravel_head_gtl }
+\cs_new_protected_nopar:Npn \__unravel_back_input_tl_o:
+ {
+ \tl_set:Nx \l__unravel_tmpa_tl
+ { \exp_args:NV \exp_not:o \l__unravel_head_tl }
+ \__unravel_back_input:V \l__unravel_tmpa_tl
+ \__unravel_print_done:x
+ { \tl_to_str:N \l__unravel_head_tl = \tl_to_str:N \l__unravel_tmpa_tl }
+ }
+\cs_new_protected_nopar:Npn \__unravel_insert_relax:
+ {
+ \__unravel_back_input:
+ \gtl_set_eq:NN \l__unravel_head_gtl \c__unravel_frozen_relax_gtl
+ \__unravel_back_input:
+ \__unravel_print_action:
+ }
+\cs_new_protected_nopar:Npn \__unravel_insert_group_begin_error:
+ {
+ \msg_error:nn { unravel } { missing-lbrace }
+ \__unravel_back_input:
+ \gtl_set_eq:NN \l__unravel_head_gtl \c_group_begin_gtl
+ \__unravel_back_input:
+ \__unravel_print_action:
+ }
+\cs_new_protected_nopar:Npn \__unravel_insert_dollar_error:
+ {
+ \__unravel_back_input:
+ \__unravel_back_input:n { $ } % $
+ \msg_error:nn { unravel } { missing-dollar }
+ \__unravel_print_action:
+ }
+\group_begin:
+ \char_set_lccode:nn { `. } { `: }
+ \tex_lowercase:D
+ {
+ \cs_new:Npn \__unravel_macro_split_do:NN #1
+ {
+ \exp_after:wN \__unravel_macro_split_do:wN
+ \token_to_meaning:N #1 \q_mark { } . -> \q_mark \use_none:nnnn
+ \q_stop
+ }
+ \cs_new:Npn \__unravel_macro_split_do:wN
+ #1 . #2 -> #3 \q_mark #4 #5 \q_stop #6
+ { #4 #6 {#1} {#2} {#3} }
+ }
+\group_end:
+\cs_new:Npn \__unravel_macro_prefix:N #1
+ { \__unravel_macro_split_do:NN #1 \use_i:nnn }
+\cs_new:Npn \__unravel_macro_parameter:N #1
+ { \__unravel_macro_split_do:NN #1 \use_ii:nnn }
+\cs_new:Npn \__unravel_macro_replacement:N #1
+ { \__unravel_macro_split_do:NN #1 \use_iii:nnn }
+\cs_new_protected_nopar:Npn \__unravel_macro_call:
+ {
+ \bool_if:NTF \g__unravel_speedup_macros_bool
+ {
+ \tl_set:Nx \l__unravel_tmpa_tl
+ {^ \exp_after:wN \__unravel_macro_parameter:N \l__unravel_head_tl }
+ \tl_if_in:NVTF \c__unravel_parameters_tl \l__unravel_tmpa_tl
+ { \__unravel_macro_call_quick: } { \__unravel_macro_call_safe: }
+ }
+ { \__unravel_macro_call_safe: }
+ \exp_args:NV \__unravel_back_input:o \l__unravel_head_tl
+ \__unravel_print_done:x { \g__unravel_action_text_str }
+ }
+\cs_new_protected_nopar:Npn \__unravel_macro_call_safe:
+ {
+ \__unravel_input_gpop_tl:N \l__unravel_tmpa_tl
+ \tl_put_right:NV \l__unravel_head_tl \l__unravel_tmpa_tl
+ }
+\cs_new_protected_nopar:Npn \__unravel_macro_call_quick:
+ {
+ \exp_after:wN \__unravel_macro_call_quick_loop:NN \l__unravel_tmpa_tl
+ { ? \use_none_delimit_by_q_stop:w } \q_stop
+ }
+\cs_new_protected_nopar:Npn \__unravel_macro_call_quick_loop:NN #1#2
+ {
+ \use_none:n #2
+ \__unravel_input_gpop_item:NF \l__unravel_tmpa_tl
+ { \msg_error:nn { unravel } { runaway-macro-parameter } }
+ \tl_put_right:Nx \l__unravel_head_tl
+ { { \exp_not:V \l__unravel_tmpa_tl } }
+ \__unravel_macro_call_quick_loop:NN
+ }
+\cs_new_protected_nopar:Npn \__unravel_expand:
+ {
+ \__unravel_set_action_text:
+ \bool_if:NT \l__unravel_debug_bool
+ {
+ \__unravel_set_cmd:
+ \iow_term:x { Exp:~\int_use:N \l__unravel_head_cmd_int }
+ }
+ \token_if_macro:NTF \l__unravel_head_token
+ { \__unravel_macro_call: }
+ { \__unravel_expand_nonmacro: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_expand_nonmacro:
+ {
+ \__unravel_set_cmd_aux_meaning:
+ \__unravel_set_cmd_aux_primitive:oTF { \l__unravel_head_meaning_tl }
+ {
+ \cs_if_exist_use:cF
+ { __unravel_expandable_ \int_use:N \l__unravel_head_cmd_int : }
+ { \msg_error:nnx { unravel } { internal } { expandable } }
+ }
+ {
+ \msg_error:nnx { unravel } { unknown-primitive }
+ { \l__unravel_head_meaning_tl }
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \__unravel_print_action:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_get_x_next:
+ {
+ \__unravel_get_next:
+ \__unravel_token_if_expandable:NT \l__unravel_head_token
+ {
+ \__unravel_expand:
+ \__unravel_get_x_next:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_get_x_or_protected:
+ {
+ \__unravel_get_next:
+ \__unravel_token_if_protected:NF \l__unravel_head_token
+ {
+ \__unravel_expand:
+ \__unravel_get_x_or_protected:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_get_x_non_blank:
+ {
+ \__unravel_get_x_next:
+ \token_if_eq_catcode:NNT \l__unravel_head_token \c_space_token
+ { \__unravel_get_x_non_blank: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_get_x_non_relax:
+ {
+ \__unravel_get_x_next:
+ \token_if_eq_meaning:NNT \l__unravel_head_token \scan_stop:
+ { \__unravel_get_x_non_relax: }
+ {
+ \token_if_eq_catcode:NNT \l__unravel_head_token \c_space_token
+ { \__unravel_get_x_non_relax: }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_skip_optional_space:
+ {
+ \__unravel_get_x_next:
+ \token_if_eq_catcode:NNF \l__unravel_head_token \c_space_token
+ { \__unravel_back_input: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_optional_equals:
+ {
+ \__unravel_get_x_non_blank:
+ \tl_if_eq:NNTF \l__unravel_head_tl \c__unravel_eq_tl
+ { \__unravel_prev_input:n { = } }
+ {
+ \__unravel_prev_input_silent:n { = }
+ \__unravel_back_input:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_left_brace:
+ {
+ \__unravel_get_x_non_relax:
+ \token_if_eq_catcode:NNF \l__unravel_head_token \c_group_begin_token
+ { \__unravel_insert_group_begin_error: }
+ }
+\cs_new_protected:Npn \__unravel_scan_keyword:n #1
+ { \__unravel_scan_keyword:nTF {#1} { } { } }
+\prg_new_protected_conditional:Npnn \__unravel_scan_keyword:n #1
+ { T , F , TF }
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \c_empty_gtl
+ \__unravel_scan_keyword_loop:NNN \c_true_bool
+ #1 \q_recursion_tail \q_recursion_tail \q_recursion_stop
+ }
+\cs_new_protected:Npn \__unravel_scan_keyword_loop:NNN #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2}
+ { \__unravel_scan_keyword_true: }
+ \quark_if_recursion_tail_stop_do:nn {#3}
+ { \msg_error:nnx { unravel } { internal } { odd-keyword-length } }
+ \__unravel_get_x_next:
+ \__unravel_scan_keyword_test:NNTF #2#3
+ {
+ \__unravel_prev_input_gtl:N \l__unravel_head_gtl
+ \__unravel_scan_keyword_loop:NNN \c_false_bool
+ }
+ {
+ \token_if_eq_catcode:NNF \l__unravel_head_token \c_space_token
+ { \__unravel_scan_keyword_false:w }
+ \bool_if:NF #1
+ { \__unravel_scan_keyword_false:w }
+ \__unravel_scan_keyword_loop:NNN #1#2#3
+ }
+ }
+\prg_new_protected_conditional:Npnn \__unravel_scan_keyword_test:NN #1#2
+ { TF }
+ {
+ \__unravel_gtl_if_head_is_definable:NTF \l__unravel_head_gtl
+ { \prg_return_false: }
+ {
+ \str_if_eq_x:nnTF
+ { \str_head:f { \gtl_to_str:N \l__unravel_head_gtl } } {#1}
+ { \prg_return_true: }
+ {
+ \str_if_eq_x:nnTF
+ { \str_head:f { \gtl_to_str:N \l__unravel_head_gtl } } {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_keyword_true:
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpb_gtl
+ \__unravel_prev_input:x { \gtl_to_str:N \l__unravel_tmpb_gtl }
+ \prg_return_true:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_keyword_false:w
+ #1 \q_recursion_stop
+ {
+ \__unravel_back_input:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpb_gtl
+ \__unravel_back_input_gtl:N \l__unravel_tmpb_gtl
+ \prg_return_false:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_font_ident:
+ {
+ \__unravel_get_x_non_blank:
+ \__unravel_set_cmd:
+ \int_case:nnF \l__unravel_head_cmd_int
+ {
+ { \__unravel_tex_use:n { def_font } }
+ { \__unravel_prev_input:V \l__unravel_head_tl }
+ { \__unravel_tex_use:n { letterspace_font } }
+ { \__unravel_prev_input:V \l__unravel_head_tl }
+ { \__unravel_tex_use:n { pdf_copy_font } }
+ { \__unravel_prev_input:V \l__unravel_head_tl }
+ { \__unravel_tex_use:n { set_font } }
+ { \__unravel_prev_input:V \l__unravel_head_tl }
+ { \__unravel_tex_use:n { def_family } }
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_int:
+ }
+ }
+ {
+ \msg_error:nn { unravel } { missing-font-id }
+ \__unravel_prev_input:n { \tex_nullfont:D }
+ \__unravel_back_error:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_font_int:
+ {
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 0 } { \__unravel_scan_font_ident: }
+ { 1 } { \__unravel_scan_font_ident: }
+ { 6 } { \__unravel_scan_font_ident: }
+ }
+ { \__unravel_scan_font_ident: \__unravel_scan_int: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_font_dimen:
+ {
+ \__unravel_scan_int:
+ \__unravel_scan_font_ident:
+ }
+\cs_new_protected:Npn \__unravel_scan_something_internal:n #1
+ {
+ \__unravel_set_cmd:
+ \__unravel_set_action_text:
+ \tl_set:Nf \l__unravel_tmpa_tl { \__unravel_thing_case: }
+ \exp_after:wN \__unravel_scan_something_aux:nwn
+ \l__unravel_tmpa_tl \q_stop {#1}
+ }
+\cs_new_protected:Npn \__unravel_scan_something_aux:nwn #1#2 \q_stop #3
+ {
+ \int_compare:nNnTF
+ { ( #1 + \c_two ) / \c_four } > { ( #3 + \c_two ) / \c_four }
+ { \__unravel_back_input: }
+ {
+ \tl_if_empty:nF {#2}
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ #2
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ }
+ }
+ \tl_set:Nx \l__unravel_tmpa_tl
+ { \__unravel_thing_use:nnN {#1} {#3} \l__unravel_head_tl }
+ \__unravel_prev_input_silent:V \l__unravel_tmpa_tl
+ \__unravel_set_action_text:
+ \__unravel_set_action_text:x
+ { \g__unravel_action_text_str = ~ \tl_to_str:N \l__unravel_tmpa_tl }
+ \int_compare:nNnF {#3} > { 3 } { \__unravel_print_action: }
+ \int_gset:Nn \g__unravel_val_level_int {#1}
+ }
+\cs_new_nopar:Npn \__unravel_thing_case:
+ {
+ \int_case:nnF \l__unravel_head_cmd_int
+ {
+ { 68 } { 0 } % char_given
+ { 69 } { 0 } % math_given
+ { 70 } { \__unravel_thing_last_item: } % last_item
+ { 71 } { 5 \__unravel_scan_toks_register: } % toks_register
+ { 72 } { 5 } % assign_toks
+ { 73 } { 0 } % assign_int
+ { 74 } { 1 } % assign_dimen
+ { 75 } { 2 } % assign_glue
+ { 76 } { 3 } % assign_mu_glue
+ { 77 } { 1 \__unravel_scan_font_dimen: } % assign_font_dimen
+ { 78 } { 0 \__unravel_scan_font_int: } % assign_font_int
+ { 79 } { 0 } % set_aux
+ { 80 } { 0 } % set_prev_graf
+ { 81 } { 1 } % set_page_dimen
+ { 82 } { 0 } % set_page_int
+ { 83 } { 1 \__unravel_scan_int: } % set_box_dimen
+ { 84 } { 0 \__unravel_scan_int: } % set_shape
+ { 85 } { 0 \__unravel_scan_int: } % def_code
+ { 86 } { 4 \__unravel_scan_font_ident: } % def_family
+ { 87 } { 4 \__unravel_scan_font_ident: } % set_font
+ { 88 } { 4 \__unravel_scan_font_ident: } % def_font
+ { 89 } { \__unravel_thing_register: } % register
+ }
+ { 8 }
+ }
+\cs_new_nopar:Npn \__unravel_thing_last_item:
+ {
+ \int_compare:nNnTF \l__unravel_head_char_int < { 26 }
+ {
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 1 } { 1 } % lastkern
+ { 2 } { 2 } % lastskip
+ }
+ { 0 } % other integer parameters
+ }
+ {
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 26 } { 0 \__unravel_scan_normal_glue: } % gluestretchorder
+ { 27 } { 0 \__unravel_scan_normal_glue: } % glueshrinkorder
+ { 28 } % fontcharwd
+ { 1 \__unravel_scan_font_ident: \__unravel_scan_int: }
+ { 29 } % fontcharht
+ { 1 \__unravel_scan_font_ident: \__unravel_scan_int: }
+ { 30 } % fontchardp
+ { 1 \__unravel_scan_font_ident: \__unravel_scan_int: }
+ { 31 } % fontcharic
+ { 1 \__unravel_scan_font_ident: \__unravel_scan_int: }
+ { 32 } { 1 \__unravel_scan_int: } % parshapelength
+ { 33 } { 1 \__unravel_scan_int: } % parshapeindent
+ { 34 } { 1 \__unravel_scan_int: } % parshapedimen
+ { 35 } { 1 \__unravel_scan_normal_glue: } % gluestretch
+ { 36 } { 1 \__unravel_scan_normal_glue: } % glueshrink
+ { 37 } { 2 \__unravel_scan_mu_glue: } % mutoglue
+ { 38 } { 3 \__unravel_scan_normal_glue: } % gluetomu
+ { 39 } % numepr
+ { 0 \__unravel_scan_expr:N \__unravel_scan_int: }
+ { 40 } % dimexpr
+ { 1 \__unravel_scan_expr:N \__unravel_scan_normal_dimen: }
+ { 41 } % glueexpr
+ { 2 \__unravel_scan_expr:N \__unravel_scan_normal_glue: }
+ { 42 } % muexpr
+ { 3 \__unravel_scan_expr:N \__unravel_scan_mu_glue: }
+ }
+ { }
+ }
+ }
+\cs_new_nopar:Npn \__unravel_thing_register:
+ {
+ \int_eval:n { \l__unravel_head_char_int / 1 000 000 - 1 }
+ \int_compare:nNnT { \tl_tail:V \l__unravel_head_char_int } = \c_zero
+ { \__unravel_scan_int: }
+ }
+\cs_new_protected:Npn \__unravel_scan_toks_register:
+ {
+ \int_compare:nNnT \l__unravel_head_char_int = \c_zero
+ { \__unravel_scan_int: }
+ }
+\cs_new:Npn \__unravel_thing_use:nnN #1#2
+ {
+ \int_case:nnF { \int_min:nn {#1} {#2} }
+ {
+ { 0 } \int_eval:n
+ { 1 } \dim_eval:n
+ { 2 } \skip_eval:n
+ { 3 } \muskip_eval:n
+ }
+ { \tex_the:D }
+ }
+\cs_new_protected:Npn \__unravel_scan_expr:N #1
+ { \__unravel_scan_expr_aux:NN #1 \c_false_bool }
+\cs_new_protected:Npn \__unravel_scan_expr_aux:NN #1#2
+ {
+ \__unravel_get_x_non_blank:
+ \__unravel_scan_factor:N #1
+ \__unravel_scan_expr_op:NN #1#2
+ }
+\cs_new_protected:Npn \__unravel_scan_expr_op:NN #1#2
+ {
+ \__unravel_get_x_non_blank:
+ \tl_case:NnF \l__unravel_head_tl
+ {
+ \c__unravel_plus_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_expr_aux:NN #1#2
+ }
+ \c__unravel_minus_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_expr_aux:NN #1#2
+ }
+ \c__unravel_times_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_get_x_non_blank:
+ \__unravel_scan_factor:N \__unravel_scan_int:
+ \__unravel_scan_expr_op:NN #1#2
+ }
+ \c__unravel_over_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_get_x_non_blank:
+ \__unravel_scan_factor:N \__unravel_scan_int:
+ \__unravel_scan_expr_op:NN #1#2
+ }
+ \c__unravel_rp_tl
+ {
+ \bool_if:NTF #2
+ { \__unravel_prev_input:V \l__unravel_head_tl }
+ { \__unravel_back_input: }
+ }
+ }
+ {
+ \bool_if:NTF #2
+ {
+ \msg_error:nn { unravel } { missing-rparen }
+ \__unravel_back_input:
+ \__unravel_prev_input:V \c__unravel_rp_tl
+ }
+ {
+ \token_if_eq_meaning:NNF \l__unravel_head_token \scan_stop:
+ { \__unravel_back_input: }
+ }
+ }
+ }
+\cs_new_protected:Npn \__unravel_scan_factor:N #1
+ {
+ \tl_if_eq:NNTF \l__unravel_head_tl \c__unravel_lp_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_expr_aux:NN #1 \c_true_bool
+ }
+ {
+ \__unravel_back_input:
+ #1
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_signs:
+ {
+ \__unravel_get_x_non_blank:
+ \tl_if_eq:NNTF \l__unravel_head_tl \c__unravel_plus_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_signs:
+ }
+ {
+ \tl_if_eq:NNT \l__unravel_head_tl \c__unravel_minus_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_signs:
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_int:
+ {
+ \__unravel_scan_signs:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int < { \__unravel_tex_use:n { min_internal } }
+ { \__unravel_scan_int_char: }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int
+ > { \__unravel_tex_use:n { max_internal } }
+ { \__unravel_scan_int_char: }
+ { \__unravel_scan_something_internal:n { 0 } }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_int_char:
+ {
+ \tl_case:NnF \l__unravel_head_tl
+ {
+ \c__unravel_lq_tl { \__unravel_scan_int_lq: }
+ \c__unravel_rq_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_get_x_next:
+ \__unravel_scan_int_explicit:n { ' }
+ }
+ \c__unravel_dq_tl
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_get_x_next:
+ \__unravel_scan_int_explicit:n { " }
+ }
+ }
+ { \__unravel_scan_int_explicit:n { } }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_int_lq:
+ {
+ \__unravel_get_next:
+ \__unravel_gtl_if_head_is_definable:NF \l__unravel_head_gtl
+ {
+ \tl_set:Nx \l__unravel_head_tl
+ { \__unravel_token_to_char:N \l__unravel_head_token }
+ }
+ \tl_set:Nx \l__unravel_tmpa_tl
+ { \int_eval:n { \exp_after:wN ` \l__unravel_head_tl } }
+ \__unravel_prev_input_silent:V \l__unravel_tmpa_tl
+ \__unravel_print_action:x
+ { ` \gtl_to_str:N \l__unravel_head_gtl = \l__unravel_tmpa_tl }
+ \__unravel_skip_optional_space:
+ }
+\cs_new_protected:Npn \__unravel_scan_int_explicit:n #1
+ {
+ \if_int_compare:w \c_one
+ < #1 1 \exp_after:wN \exp_not:N \l__unravel_head_tl \exp_stop_f:
+ \exp_after:wN \use_i:nn
+ \else:
+ \exp_after:wN \use_ii:nn
+ \fi:
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_get_x_next:
+ \__unravel_scan_int_explicit:n {#1}
+ }
+ {
+ \token_if_eq_catcode:NNF \l__unravel_head_token \c_space_token
+ { \__unravel_back_input: }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_normal_dimen:
+ { \__unravel_scan_dimen:NN \c_false_bool \c_false_bool }
+\cs_new_protected:Npn \__unravel_scan_dimen:NN #1#2
+ {
+ \__unravel_scan_signs:
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int < { \__unravel_tex_use:n { min_internal } }
+ { \__unravel_scan_dimen_char:NN #1#2 }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int
+ > { \__unravel_tex_use:n { max_internal } }
+ { \__unravel_scan_dimen_char:NN #1#2 }
+ {
+ \bool_if:NTF #1
+ {
+ \__unravel_scan_something_internal:n { 3 }
+ \int_case:nnF \g__unravel_val_level_int
+ {
+ { 0 } { \__unravel_scan_dim_unit:NN #1 #2 }
+ { 3 } { }
+ }
+ {
+ \msg_error:nn { unravel } { incompatible-units }
+ % ^^A todo: error recovery
+ }
+ }
+ {
+ \__unravel_scan_something_internal:n { 2 }
+ \int_case:nnF \g__unravel_val_level_int
+ {
+ { 0 } { \__unravel_scan_dim_unit:NN #1#2 }
+ { 3 } % ^^A todo: error recovery
+ { \msg_error:nn { unravel } { incompatible-units } }
+ }
+ { }
+ }
+ }
+ }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ }
+\cs_new_protected:Npn \__unravel_scan_dimen_char:NN #1#2
+ {
+ \tl_if_eq:NNT \l__unravel_head_tl \c__unravel_comma_tl
+ { \tl_set_eq:NN \l__unravel_head_tl \c__unravel_point_tl }
+ \tl_if_eq:NNTF \l__unravel_head_tl \c__unravel_point_tl
+ {
+ \__unravel_prev_input:n { . }
+ \__unravel_scan_decimal_loop:
+ }
+ {
+ \tl_if_in:nVTF { 0123456789 } \l__unravel_head_tl
+ {
+ \__unravel_back_input:
+ \__unravel_scan_int:
+ \tl_if_eq:NNT \l__unravel_head_tl \c__unravel_comma_tl
+ { \tl_set_eq:NN \l__unravel_head_tl \c__unravel_point_tl }
+ \tl_if_eq:NNT \l__unravel_head_tl \c__unravel_point_tl
+ {
+ \__unravel_input_gpop:N \l__unravel_tmpb_gtl
+ \__unravel_prev_input:n { . }
+ \__unravel_scan_decimal_loop:
+ }
+ }
+ {
+ \__unravel_back_input:
+ \__unravel_scan_int:
+ }
+ }
+ \__unravel_scan_dim_unit:NN #1#2
+ }
+\cs_new_protected:Npn \__unravel_scan_dim_unit:NN #1#2
+ {
+ \bool_if:NT #2
+ {
+ \__unravel_scan_keyword:nT { fF iI lL }
+ {
+ \__unravel_scan_inf_unit_loop:
+ \__unravel_break:w
+ }
+ }
+ \__unravel_get_x_non_blank:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int < { \__unravel_tex_use:n { min_internal } }
+ { \__unravel_back_input: }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int
+ > { \__unravel_tex_use:n { max_internal } }
+ { \__unravel_back_input: }
+ {
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \bool_if:NTF #1
+ { \__unravel_scan_something_internal:n { 3 } }
+ { \__unravel_scan_something_internal:n { 2 } }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \tl_set:Nx \l__unravel_tmpa_tl
+ {
+ \bool_if:NTF #1 \muskip_eval:n \skip_eval:n
+ {
+ \l__unravel_tmpa_tl
+ \bool_if:NTF #1 \etex_muexpr:D \etex_glueexpr:D
+ \l__unravel_head_tl
+ }
+ }
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \__unravel_break:w
+ }
+ }
+ \bool_if:NT #1
+ {
+ \__unravel_scan_keyword:nT { mM uU } { \__unravel_break:w }
+ \msg_error:nn { unravel } { missing-mudim }
+ \__unravel_break:w
+ }
+ \__unravel_scan_keyword:nT { eE mM } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { eE xX } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { pP xX } { \__unravel_break:w }
+ \__unravel_scan_keyword:n { tT rR uU eE }
+ \__unravel_scan_keyword:nT { pP tT } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { iI nN } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { pP cC } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { cC mM } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { mM mM } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { bB pP } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { dD dD } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { cC cC } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { nN dD } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { nN cC } { \__unravel_break:w }
+ \__unravel_scan_keyword:nT { sS pP } { \__unravel_break:w }
+ \__unravel_break_point:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_inf_unit_loop:
+ { \__unravel_scan_keyword:nT { lL } { \__unravel_scan_inf_unit_loop: } }
+\cs_new_protected_nopar:Npn \__unravel_scan_decimal_loop:
+ {
+ \__unravel_get_x_next:
+ \tl_if_empty:NTF \l__unravel_head_tl
+ { \use_ii:nn }
+ { \tl_if_in:nVTF { 0123456789 } \l__unravel_head_tl }
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_decimal_loop:
+ }
+ {
+ \token_if_eq_catcode:NNF \l__unravel_head_token \c_space_token
+ { \__unravel_back_input: }
+ \__unravel_prev_input_silent:n { ~ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_normal_glue:
+ { \__unravel_scan_glue:n { 2 } }
+\cs_new_protected_nopar:Npn \__unravel_scan_mu_glue:
+ { \__unravel_scan_glue:n { 3 } }
+\cs_new_protected:Npn \__unravel_scan_glue:n #1
+ {
+ \int_compare:nNnTF {#1} = { 2 }
+ { \__unravel_scan_glue_aux:nN {#1} \c_false_bool }
+ { \__unravel_scan_glue_aux:nN {#1} \c_true_bool }
+ }
+\cs_new_protected:Npn \__unravel_scan_glue_aux:nN #1#2
+ {
+ \__unravel_scan_signs:
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int < { \__unravel_tex_use:n { min_internal } }
+ { \__unravel_back_input: \__unravel_scan_dimen:NN #2 \c_false_bool }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int
+ > { \__unravel_tex_use:n { max_internal } }
+ {
+ \__unravel_back_input:
+ \__unravel_scan_dimen:NN #2 \c_false_bool
+ }
+ {
+ \__unravel_scan_something_internal:n {#1}
+ \int_case:nnF \g__unravel_val_level_int
+ {
+ { 0 } { \__unravel_scan_dimen:NN #2 \c_false_bool }
+ { 1 } { \bool_if:NT #2 { \msg_error: } } % ^^A todo: ??
+ }
+ {
+ \int_compare:nNnF \g__unravel_val_level_int = {#1}
+ { \msg_error:nn { unravel } { incompatible-units } }
+ \__unravel_break:w
+ }
+ }
+ }
+ \__unravel_scan_keyword:nT { pP lL uU sS }
+ { \__unravel_scan_dimen:NN #2 \c_true_bool }
+ \__unravel_scan_keyword:nT { mM iI nN uU sS }
+ { \__unravel_scan_dimen:NN #2 \c_true_bool }
+ \__unravel_break_point:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_file_name:
+ {
+ \bool_gset_true:N \g__unravel_name_in_progress_bool
+ \__unravel_get_x_non_blank:
+ \__unravel_scan_file_name_loop:
+ \bool_gset_false:N \g__unravel_name_in_progress_bool
+ \__unravel_prev_input_silent:n { ~ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_file_name_loop:
+ {
+ \__unravel_gtl_if_head_is_definable:NTF \l__unravel_head_gtl
+ { \__unravel_back_input: }
+ {
+ \tl_set:Nx \l__unravel_tmpa_tl
+ { \__unravel_token_to_char:N \l__unravel_head_token }
+ \tl_if_eq:NNF \l__unravel_tmpa_tl \c_space_tl
+ {
+ \__unravel_prev_input_silent:V \l__unravel_tmpa_tl
+ \__unravel_get_x_next:
+ \__unravel_scan_file_name_loop:
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_r_token:
+ {
+ \bool_do_while:nn
+ { \tl_if_eq_p:NN \l__unravel_head_tl \c_space_tl }
+ { \__unravel_get_next: }
+ \__unravel_gtl_if_head_is_definable:NF \l__unravel_head_gtl
+ {
+ \msg_error:nn { unravel } { missing-cs }
+ \__unravel_back_input:
+ \tl_set:Nn \l__unravel_head_tl { \__unravel_inaccessible:w }
+ }
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ \tl_set_eq:NN \l__unravel_defined_tl \l__unravel_head_tl
+ }
+\cs_new_protected:Npn \__unravel_scan_toks_to_str:
+ {
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_scan_toks:NN \c_false_bool \c_true_bool
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \__unravel_prev_input_silent:x
+ { { \exp_after:wN \tl_to_str:n \l__unravel_tmpa_tl } }
+ }
+\cs_new_protected:Npn \__unravel_scan_toks:NN #1#2
+ {
+ \bool_if:NT #1 { \__unravel_scan_param: }
+ \__unravel_scan_left_brace:
+ \bool_if:NTF #2
+ { \__unravel_scan_group_x:N #1 }
+ { \__unravel_scan_group_n:N #1 }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_param:
+ {
+ \tl_clear:N \l__unravel_tmpa_tl
+ \__unravel_scan_param_aux:
+ \tl_put_right:NV \l__unravel_defining_tl \l__unravel_tmpa_tl
+ \__unravel_prev_input_silent:V \l__unravel_tmpa_tl
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_param_aux:
+ {
+ \__unravel_get_next:
+ \tl_concat:NNN \l__unravel_tmpa_tl
+ \l__unravel_tmpa_tl \l__unravel_head_tl
+ \tl_if_empty:NTF \l__unravel_head_tl
+ { \__unravel_back_input: } { \__unravel_scan_param_aux: }
+ }
+\cs_new_protected:Npn \__unravel_scan_group_n:N #1
+ {
+ \__unravel_back_input:
+ \__unravel_input_gpop_item:NF \l__unravel_head_tl
+ {
+ \msg_error:nn { unravel } { runaway-text }
+ \__unravel_exit:w
+ }
+ \tl_set:Nx \l__unravel_head_tl { { \exp_not:V \l__unravel_head_tl } }
+ \bool_if:NT #1
+ { \tl_put_right:NV \l__unravel_defining_tl \l__unravel_head_tl }
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ }
+\cs_new_protected:Npn \__unravel_scan_group_x:N #1
+ {
+ \__unravel_input_gpop_tl:N \l__unravel_head_tl
+ \__unravel_back_input:V \l__unravel_head_tl
+ \bool_if:NTF #1
+ {
+ \__unravel_prev_input_silent:V \c_left_brace_str
+ \tl_put_right:Nn \l__unravel_defining_tl { { \if_false: } \fi: }
+ \__unravel_scan_group_xdef:n { 1 }
+ }
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \c_empty_gtl
+ \__unravel_prev_input_gtl:N \l__unravel_head_gtl
+ \__unravel_scan_group_x:n { 1 }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpb_gtl
+ \__unravel_prev_input_silent:x
+ { \gtl_left_tl:N \l__unravel_tmpb_gtl }
+ }
+ }
+\cs_new_protected:Npn \__unravel_scan_group_xdef:n #1
+ {
+ \__unravel_get_token_x:N \c_true_bool
+ \tl_if_empty:NTF \l__unravel_head_tl
+ {
+ \gtl_if_head_is_group_begin:NTF \l__unravel_head_gtl
+ {
+ \__unravel_prev_input_silent:V \c_left_brace_str
+ \tl_put_right:Nn \l__unravel_defining_tl { { \if_false: } \fi: }
+ \__unravel_scan_group_xdef:f { \int_eval:n { #1 + 1 } }
+ }
+ {
+ \__unravel_prev_input_silent:V \c_right_brace_str
+ \tl_put_right:Nn \l__unravel_defining_tl { \if_false: { \fi: } }
+ \int_compare:nNnF {#1} = \c_one
+ { \__unravel_scan_group_xdef:f { \int_eval:n { #1 - 1 } } }
+ }
+ }
+ {
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ \tl_put_right:Nx \l__unravel_defining_tl
+ { \exp_not:N \exp_not:N \exp_not:V \l__unravel_head_tl }
+ \__unravel_scan_group_xdef:n {#1}
+ }
+ }
+\cs_generate_variant:Nn \__unravel_scan_group_xdef:n { f }
+\cs_new_protected:Npn \__unravel_scan_group_x:n #1
+ {
+ \__unravel_get_token_x:N \c_false_bool
+ \__unravel_prev_input_gtl:N \l__unravel_head_gtl
+ \tl_if_empty:NTF \l__unravel_head_tl
+ {
+ \gtl_if_head_is_group_begin:NTF \l__unravel_head_gtl
+ { \__unravel_scan_group_x:f { \int_eval:n { #1 + 1 } } }
+ {
+ \int_compare:nNnF {#1} = \c_one
+ { \__unravel_scan_group_x:f { \int_eval:n { #1 - 1 } } }
+ }
+ }
+ { \__unravel_scan_group_x:n {#1} }
+ }
+\cs_generate_variant:Nn \__unravel_scan_group_x:n { f }
+\cs_new_protected:Npn \__unravel_get_token_x:N #1
+ {
+ \__unravel_get_next:
+ \__unravel_token_if_protected:NF \l__unravel_head_token
+ {
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { the } }
+ {
+ \__unravel_get_the:
+ \bool_if:NTF #1
+ {
+ \tl_put_right:NV \l__unravel_defining_tl \l__unravel_head_tl
+ \__unravel_prev_input:V \l__unravel_head_tl
+ }
+ {
+ \gtl_set:Nx \l__unravel_tmpb_gtl { \l__unravel_head_tl }
+ \__unravel_prev_input_gtl:N \l__unravel_tmpb_gtl
+ \__unravel_print_action:
+ }
+ }
+ { \__unravel_expand: }
+ \__unravel_get_token_x:N #1
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_alt_rule:
+ {
+ \__unravel_scan_keyword:nTF { wWiIdDtThH }
+ {
+ \__unravel_scan_normal_dimen:
+ \__unravel_scan_alt_rule:
+ }
+ {
+ \__unravel_scan_keyword:nTF { hHeEiIgGhHtT }
+ {
+ \__unravel_scan_normal_dimen:
+ \__unravel_scan_alt_rule:
+ }
+ {
+ \__unravel_scan_keyword:nT { dDeEpPtThH }
+ {
+ \__unravel_scan_normal_dimen:
+ \__unravel_scan_alt_rule:
+ }
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_spec:
+ {
+ \__unravel_scan_keyword:nTF { tT oO } { \__unravel_scan_normal_dimen: }
+ {
+ \__unravel_scan_keyword:nT { sS pP rR eE aA dD }
+ { \__unravel_scan_normal_dimen: }
+ }
+ \__unravel_scan_left_brace:
+ }
+\cs_new_protected:Npn \__unravel_do_box:N #1
+ {
+ \__unravel_get_x_non_relax:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { make_box } }
+ { \__unravel_do_begin_box:N #1 }
+ {
+ \bool_if:NTF #1
+ {
+ \__unravel_cs_case:NnF \l__unravel_head_token
+ {
+ \tex_hrule:D { \__unravel_do_leaders_rule: }
+ \tex_vrule:D { \__unravel_do_leaders_rule: }
+ }
+ { \__unravel_do_box_error: }
+ }
+ { \__unravel_do_box_error: }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_box_error:
+ {
+ \__unravel_back_input:
+ \msg_error:nn { unravel } { missing-box }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\cs_new_protected:Npn \__unravel_do_begin_box:N #1
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \int_case:nnTF \l__unravel_head_char_int
+ {
+ { 0 } { \__unravel_scan_int: } % box
+ { 1 } { \__unravel_scan_int: } % copy
+ { 2 } { } % lastbox
+ { 3 } % vsplit
+ {
+ \__unravel_scan_int:
+ \__unravel_scan_keyword:nF { tT oO }
+ {
+ \msg_error:nn { unravel } { missing-to }
+ \__unravel_prev_input:n { to }
+ }
+ \__unravel_scan_normal_dimen:
+ }
+ }
+ { \__unravel_do_simple_box:N #1 }
+ { \__unravel_do_box_explicit:N #1 }
+ }
+\cs_new_protected:Npn \__unravel_do_simple_box:N #1
+ {
+ \bool_if:NTF #1 { \__unravel_do_leaders_fetch_skip: }
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \gtl_put_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_leaders_fetch_skip:
+ {
+ \__unravel_get_x_non_relax:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF \l__unravel_head_cmd_int
+ = { \__unravel_tex_use:n { \mode_if_vertical:TF { vskip } { hskip } } }
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \tl_put_left:NV \l__unravel_head_tl \l__unravel_tmpa_tl
+ \__unravel_do_append_glue:
+ }
+ {
+ \__unravel_back_input:
+ \msg_error:nn { unravel } { improper-leaders }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+ }
+\cs_new_protected:Npn \__unravel_do_box_explicit:N #1
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_hbox:D
+ { \__unravel_box_hook:N \tex_everyhbox:D }
+ { \__unravel_box_hook:N \tex_everyvbox:D }
+ % ^^A todo: TeX calls |normal_paragraph| here.
+ \__unravel_scan_spec:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_set_action_text:x
+ { \tl_to_str:N \l__unravel_head_tl \iow_char:N \{ }
+ \seq_push:Nx \l__unravel_leaders_box_seq
+ { \bool_if:NTF #1 { \mode_if_vertical:TF { v } { h } } { Z } }
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \gtl_gconcat:NNN \g__unravel_output_gtl
+ \g__unravel_output_gtl \c_group_begin_gtl
+ \tl_use:N \l__unravel_head_tl
+ \c_group_begin_token \__unravel_box_hook_end:
+ }
+\cs_new_protected:Npn \__unravel_box_hook:N #1
+ {
+ \tl_set:NV \l__unravel_tmpa_tl #1
+ \str_if_eq_x:nnF
+ { \tl_head:N \l__unravel_tmpa_tl } { \exp_not:N \__unravel_box_hook:w }
+ {
+ \exp_args:Nx #1
+ {
+ \exp_not:n { \__unravel_box_hook:w \prg_do_nothing: }
+ \exp_not:V #1
+ }
+ }
+ \cs_gset_protected:Npn \__unravel_box_hook:w ##1 \__unravel_box_hook_end:
+ {
+ \exp_args:No #1 {##1}
+ \cs_gset_eq:NN \__unravel_box_hook:w \prg_do_nothing:
+ \__unravel_print_action:
+ \__unravel_back_input:o {##1}
+ \__unravel_set_action_text:x
+ { \token_to_meaning:N #1 \tl_to_str:o {##1} }
+ \tl_if_empty:oF {##1} { \__unravel_print_action: }
+ }
+ }
+\cs_new_eq:NN \__unravel_box_hook:w \prg_do_nothing:
+\cs_new_eq:NN \__unravel_box_hook_end: \prg_do_nothing:
+\cs_new_protected_nopar:Npn \__unravel_do_leaders_rule:
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_alt_rule:
+ \__unravel_do_leaders_fetch_skip:
+ }
+\prg_new_protected_conditional:Npnn \__unravel_charcode_if_safe:n #1 { TF }
+ {
+ \bool_if:nTF
+ {
+ \int_compare_p:n { #1 = `! }
+ || \int_compare_p:n { `' <= #1 <= `[ }
+ || \int_compare_p:n { #1 = `] }
+ || \int_compare_p:n { ` ` <= #1 <= `z }
+ }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\group_begin:
+ \char_set_catcode_other:n { 0 }
+ \cs_new_protected:Npn \__unravel_char:n #1
+ {
+ \tex_char:D #1 \scan_stop:
+ \__unravel_charcode_if_safe:nTF {#1}
+ {
+ \group_begin:
+ \char_set_lccode:nn { 0 } {#1}
+ \tex_lowercase:D
+ { \group_end: \tl_set:Nn \l__unravel_tmpa_tl { ^^@ } }
+ }
+ {
+ \tl_set:Nx \l__unravel_tmpa_tl
+ { \exp_not:N \char \int_eval:n {#1} ~ }
+ }
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_tmpa_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_tmpa_tl }
+ }
+\group_end:
+\cs_generate_variant:Nn \__unravel_char:n { V , x }
+\group_begin:
+ \char_set_catcode_other:n { 0 }
+ \cs_new_protected:Npn \__unravel_char_in_mmode:n #1
+ {
+ \int_compare:nNnTF { \tex_mathcode:D #1 } = { "8000 }
+ { % math active
+ \group_begin:
+ \char_set_lccode:nn { 0 } { \l__unravel_tmpa_tl }
+ \tex_lowercase:D
+ { \group_end: \gtl_set:Nn \l__unravel_head_gtl { ^^@ } }
+ \__unravel_back_input:
+ }
+ { \__unravel_char:n {#1} }
+ }
+\group_end:
+\cs_generate_variant:Nn \__unravel_char_in_mmode:n { V , x }
+\cs_new_protected:Npn \__unravel_mathchar:n #1
+ {
+ \tex_mathchar:D #1 \scan_stop:
+ \tl_set:Nx \l__unravel_tmpa_tl
+ { \exp_not:N \mathchar \int_eval:n {#1} ~ }
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_tmpa_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_tmpa_tl }
+ }
+\cs_generate_variant:Nn \__unravel_mathchar:n { x }
+\cs_new_protected:Npn \__unravel_new_graf:N #1
+ {
+ \tl_set:NV \l__unravel_tmpa_tl \tex_everypar:D
+ \tex_everypar:D { }
+ \bool_if:NTF #1 { \tex_indent:D } { \tex_noindent:D }
+ \exp_args:NV \tex_everypar:D \l__unravel_tmpa_tl
+ \__unravel_back_input:V \l__unravel_tmpa_tl
+ \__unravel_print_action:x
+ {
+ \g__unravel_action_text_str \c_space_tl : ~
+ \token_to_str:N \everypar = { \tl_to_str:N \l__unravel_tmpa_tl }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_end_graf:
+ { \mode_if_horizontal:T { \__unravel_normal_paragraph: } }
+\cs_new_protected_nopar:Npn \__unravel_normal_paragraph:
+ {
+ \tex_par:D
+ \gtl_gput_right:Nn \g__unravel_output_gtl { \par }
+ \__unravel_print_action:x { Paragraph~end. }
+ }
+\cs_new_protected_nopar:Npn \__unravel_build_page:
+ {
+ }
+\cs_new_protected_nopar:Npn \__unravel_handle_left_brace:
+ {
+ \int_case:nnF \etex_currentgrouptype:D
+ {
+ { 1 } { \__unravel_end_simple_group: } % simple
+ { 2 } { \__unravel_end_box_group: } % hbox
+ { 3 } { \__unravel_end_box_group: } % adjusted_hbox
+ { 4 } { \__unravel_end_graf: \__unravel_end_box_group: } % vbox
+ { 5 } { \__unravel_end_graf: \__unravel_end_box_group: } % vtop
+ { 6 } { \__unravel_end_align_group: } % align
+ { 7 } { \__unravel_end_no_align_group: } % no_align
+ { 8 } { \__unravel_end_output_group: } % output
+ { 9 } { \__unravel_end_math_group: } % math
+ { 10 } { \__unravel_end_disc_group: } % disc
+ { 11 } { \__unravel_end_graf: \__unravel_end_simple_group: } % insert
+ { 12 } { \__unravel_end_graf: \__unravel_end_simple_group: } % vcenter
+ { 13 } { \__unravel_end_math_choice_group: } % math_choice
+ }
+ { % bottom_level, semi_simple, math_shift, math_left
+ \__unravel_back_input:
+ \l__unravel_head_token
+ \__unravel_print_action:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_end_simple_group:
+ {
+ \l__unravel_head_token
+ \gtl_gconcat:NNN \g__unravel_output_gtl
+ \g__unravel_output_gtl \c_group_end_gtl
+ \__unravel_print_action:
+ }
+\cs_new_protected_nopar:Npn \__unravel_end_box_group:
+ {
+ \seq_pop:NN \l__unravel_leaders_box_seq \l__unravel_tmpa_tl
+ \str_if_eq_x:nnTF \l__unravel_tmpa_tl { Z }
+ { \__unravel_end_simple_group: }
+ {
+ \__unravel_get_x_non_relax:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF \l__unravel_head_cmd_int
+ = { \__unravel_tex_use:n { \l__unravel_tmpa_tl skip } }
+ {
+ \tl_put_left:Nn \l__unravel_head_tl { \c_group_end_token }
+ \__unravel_do_append_glue:
+ }
+ {
+ \__unravel_back_input:
+ \c_group_end_token \group_begin: \group_end:
+ \__unravel_print_action:
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_off_save:
+ {
+ \int_compare:nNnTF \etex_currentgrouptype:D = { 0 }
+ { % bottom-level
+ \msg_error:nnx { unravel } { extra-close }
+ { \token_to_meaning:N \l__unravel_head_token }
+ }
+ {
+ \__unravel_back_input:
+ \int_case:nnF \etex_currentgrouptype:D
+ {
+ { 14 } % semi_simple_group
+ { \gtl_set:Nn \l__unravel_head_gtl { \group_end: } }
+ { 15 } % math_shift_group
+ { \gtl_set:Nn \l__unravel_head_gtl { $ } } % $
+ { 16 } % math_left_group
+ { \gtl_set:Nn \l__unravel_head_gtl { \tex_right:D . } }
+ }
+ { \gtl_set_eq:NN \l__unravel_head_gtl \c_group_end_gtl }
+ \__unravel_back_input:
+ \msg_error:nnx { unravel } { off-save }
+ { \gtl_to_str:N \l__unravel_head_gtl }
+ }
+ }
+\cs_new_protected:Npn \__unravel_mode_math:n #1
+ { \mode_if_math:TF {#1} { \__unravel_insert_dollar_error: } }
+\cs_new_protected:Npn \__unravel_mode_non_math:n #1
+ { \mode_if_math:TF { \__unravel_insert_dollar_error: } {#1} }
+\cs_new_protected:Npn \__unravel_mode_vertical:n #1
+ {
+ \mode_if_math:TF
+ { \__unravel_insert_dollar_error: }
+ { \mode_if_horizontal:TF { \__unravel_head_for_vmode: } {#1} }
+ }
+\cs_new_protected:Npn \__unravel_mode_non_vertical:n #1
+ {
+ \mode_if_vertical:TF
+ { \__unravel_back_input: \__unravel_new_graf:N \c_true_bool }
+ {#1}
+ }
+\cs_new_protected_nopar:Npn \__unravel_head_for_vmode:
+ {
+ \mode_if_inner:TF
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_hrule:D
+ {
+ \msg_error:nn { unravel } { hrule-bad-mode }
+ \__unravel_print_action:
+ }
+ { \__unravel_off_save: }
+ }
+ {
+ \__unravel_back_input:
+ \gtl_set:Nn \l__unravel_head_gtl { \par }
+ \__unravel_back_input:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_step:
+ {
+ \__unravel_set_action_text:
+ \bool_if:NT \l__unravel_debug_bool
+ { \iow_term:x { Cmd:~\int_use:N \l__unravel_head_cmd_int } }
+ \cs_if_exist_use:cF
+ { __unravel_cmd_ \int_use:N \l__unravel_head_cmd_int : }
+ { \msg_error:nnx { unravel } { internal } { unknown-command } }
+ }
+\__unravel_new_tex_cmd:nn { relax } % 0
+ { \__unravel_print_action: }
+\__unravel_new_tex_cmd:nn { begin-group_char } % 1
+ {
+ \gtl_gconcat:NNN \g__unravel_output_gtl
+ \g__unravel_output_gtl \c_group_begin_gtl
+ \__unravel_print_action:
+ \l__unravel_head_token
+ }
+\__unravel_new_tex_cmd:nn { end-group_char } % 2
+ { \__unravel_handle_left_brace: }
+\__unravel_new_tex_cmd:nn { math_char } % 3
+ {
+ \__unravel_mode_non_vertical:n
+ {
+ \mode_if_math:TF
+ {
+ \int_compare:nNnTF
+ \etex_currentgrouplevel:D = { 15 } % math_shift_group
+ { \__unravel_after_math: }
+ { \__unravel_off_save: }
+ }
+ {
+ \__unravel_get_next:
+ \token_if_eq_catcode:NNTF
+ \l__unravel_head_token \c_math_toggle_token
+ {
+ \mode_if_inner:TF
+ { \__unravel_back_input: \__unravel_goto_inner_math: }
+ { \__unravel_goto_display_math: }
+ }
+ { \__unravel_back_input: \__unravel_goto_inner_math: }
+ }
+ }
+ }
+\__unravel_new_tex_cmd:nn { alignment_char } % 4
+ { \l__unravel_head_token \__unravel_print_action: }
+\__unravel_new_tex_cmd:nn { car_ret } % 5
+ { \l__unravel_head_token \__unravel_print_action: }
+\__unravel_new_tex_cmd:nn { macro_char } % 6
+ { \l__unravel_head_token \__unravel_print_action: }
+\__unravel_new_tex_cmd:nn { superscript_char } % 7
+ { \__unravel_mode_math:n { \__unravel_sub_sup: } }
+\__unravel_new_tex_cmd:nn { subscript_char } % 8
+ { \__unravel_mode_math:n { \__unravel_sub_sup: } }
+\cs_new_protected_nopar:Npn \__unravel_sub_sup:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_math:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { endv } % 9
+ { \msg_error:nn { unravel } { not-implemented } { alignments } }
+\__unravel_new_tex_cmd:nn { blank_char } % 10
+ {
+ \mode_if_horizontal:T
+ {
+ \gtl_gput_right:Nn \g__unravel_output_gtl { ~ }
+ \l__unravel_head_token
+ }
+ \__unravel_print_action:
+ }
+\__unravel_new_tex_cmd:nn { the_char } % 11
+ {
+ \__unravel_mode_non_vertical:n
+ {
+ \tl_set:Nx \l__unravel_tmpa_tl
+ { ` \__unravel_token_to_char:N \l__unravel_head_token }
+ \mode_if_math:TF
+ { \__unravel_char_in_mmode:V \l__unravel_tmpa_tl }
+ { \__unravel_char:V \l__unravel_tmpa_tl }
+ }
+ }
+\__unravel_new_eq_tex_cmd:nn { other_char } { the_char } % 12
+\__unravel_new_tex_cmd:nn { par_end } % 13
+ {
+ \__unravel_mode_non_math:n
+ {
+ \mode_if_vertical:TF
+ { \__unravel_normal_paragraph: }
+ {
+ % if align_state<0 then off_save;
+ \__unravel_end_graf:
+ \mode_if_vertical:T
+ { \mode_if_inner:F { \__unravel_build_page: } }
+ }
+ }
+ }
+\__unravel_new_tex_cmd:nn { stop } % 14
+ {
+ \__unravel_mode_vertical:n
+ {
+ \mode_if_inner:TF
+ { \__unravel_forbidden_case: }
+ {
+ % ^^A todo: unless its_all_over
+ \int_gdecr:N \g__unravel_ends_int
+ \int_compare:nNnTF \g__unravel_ends_int > \c_zero
+ {
+ \__unravel_back_input:
+ \__unravel_back_input:n
+ {
+ \tex_hbox:D to \tex_hsize:D { }
+ \tex_vfill:D
+ \tex_penalty:D - '10000000000 ~
+ }
+ \__unravel_build_page:
+ \__unravel_print_action:x { End~everything! }
+ }
+ {
+ \__unravel_print_outcome:
+ \l__unravel_head_token
+ }
+ }
+ }
+ }
+\__unravel_new_tex_cmd:nn { delim_num } % 15
+ {
+ \__unravel_mode_math:n
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+ }
+\__unravel_new_tex_cmd:nn { char_num } % 16
+ {
+ \__unravel_mode_non_vertical:n
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \mode_if_math:TF
+ { \__unravel_char_in_mmode:x { \tl_tail:N \l__unravel_head_tl } }
+ { \__unravel_char:x { \tl_tail:N \l__unravel_head_tl } }
+ }
+ }
+\__unravel_new_tex_cmd:nn { math_char_num } % 17
+ {
+ \__unravel_mode_math:n
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_mathchar:x { \tl_tail:N \l__unravel_head_tl }
+ }
+ }
+\__unravel_new_tex_cmd:nn { mark } % 18
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \int_compare:nNnF \l__unravel_head_char_int = \c_zero
+ { \__unravel_scan_int: }
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_scan_toks:NN \c_false_bool \c_true_bool
+ \seq_gpop_right:Nn \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:x
+ { \tl_to_str:N \l__unravel_head_tl \tl_to_str:N \l__unravel_tmpa_tl }
+ \tl_put_right:Nx \l__unravel_head_tl
+ { { \exp_not:N \exp_not:n \exp_not:V \l__unravel_tmpa_tl } }
+ \tl_use:N \l__unravel_head_tl
+ }
+\__unravel_new_tex_cmd:nn { xray } % 19
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 0 }
+ { % show
+ \__unravel_get_next:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \gtl_head_do:NN \l__unravel_head_gtl \l__unravel_tmpa_tl
+ }
+ { 2 }
+ { % showthe
+ \__unravel_get_x_next:
+ \__unravel_scan_something_internal:n { 5 }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \exp_args:Nx \etex_showtokens:D
+ { \tl_tail:N \l__unravel_head_tl }
+ }
+ }
+ { % no operand for showlists, showgroups, showifs
+ \int_compare:nNnT \l__unravel_head_char_int = \c_one % showbox
+ { \__unravel_scan_int: }
+ \int_compare:nNnT \l__unravel_head_char_int = \c_five % showtokens
+ { \__unravel_scan_toks:NN \c_false_bool \c_false_bool }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ }
+ }
+\__unravel_new_tex_cmd:nn { make_box } % 20
+ {
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_back_input:
+ \__unravel_do_box:N \c_false_bool
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_move:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_normal_dimen:
+ \__unravel_do_box:N \c_false_bool
+ }
+\__unravel_new_tex_cmd:nn { hmove } % 21
+ {
+ \mode_if_vertical:TF
+ { \__unravel_do_move: } { \__unravel_forbidden_case: }
+ }
+\__unravel_new_tex_cmd:nn { vmove } % 22
+ {
+ \mode_if_vertical:TF
+ { \__unravel_forbidden_case: } { \__unravel_do_move: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_unpackage:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { un_hbox } % 23
+ { \__unravel_mode_non_vertical:n { \__unravel_do_unpackage: } }
+\__unravel_new_tex_cmd:nn { un_vbox } % 24
+ {
+ \__unravel_mode_vertical:n
+ {
+ \int_compare:nNnTF \l__unravel_head_char_int > { 1 }
+ { \l__unravel_head_token \__unravel_print_action: }
+ { \__unravel_do_unpackage: }
+ }
+ }
+\__unravel_new_tex_cmd:nn { remove_item } % 25
+ { \l__unravel_head_token \__unravel_print_action: }
+\cs_new_protected_nopar:Npn \__unravel_do_append_glue:
+ {
+ \int_compare:nNnTF \l__unravel_head_char_int < { 4 }
+ { \tl_use:N \l__unravel_head_tl \__unravel_print_action: }
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \exp_args:Nf \__unravel_scan_glue:n
+ { \int_eval:n { \l__unravel_head_char_int - 2 } }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+ }
+\__unravel_new_tex_cmd:nn { hskip } % 26
+ { \__unravel_mode_non_vertical:n { \__unravel_do_append_glue: } }
+\__unravel_new_tex_cmd:nn { vskip } % 27
+ { \__unravel_mode_vertical:n { \__unravel_do_append_glue: } }
+\__unravel_new_tex_cmd:nn { mskip } % 28
+ { \__unravel_mode_math:n { \__unravel_do_append_glue: } }
+\cs_new_protected_nopar:Npn \__unravel_do_append_kern:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_kern:D
+ { \__unravel_scan_dimen:NN \c_true_bool \c_false_bool }
+ { \__unravel_scan_dimen:NN \c_false_bool \c_false_bool }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { kern } % 29
+ { \__unravel_do_append_kern: }
+\__unravel_new_tex_cmd:nn { mkern } % 30
+ { \__unravel_mode_math:n { \__unravel_do_append_kern: } }
+\__unravel_new_tex_cmd:nn { leader_ship } % 31
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_do_box:N \c_true_bool
+ }
+\__unravel_new_tex_cmd:nn { halign } % 32
+ { \msg_fatal:nnx { unravel } { not-implemented } { halign } }
+\__unravel_new_tex_cmd:nn { valign } % 33
+ { \msg_fatal:nnx { unravel } { not-implemented } { valign } }
+\__unravel_new_tex_cmd:nn { no_align } % 34
+ { \msg_fatal:nnx { unravel } { not-implemented } { noalign } }
+\__unravel_new_tex_cmd:nn { vrule } % 35
+ { \__unravel_mode_non_vertical:n { \__unravel_do_rule: } }
+\__unravel_new_tex_cmd:nn { hrule } % 36
+ { \__unravel_mode_vertical:n { \__unravel_do_rule: } }
+\cs_new_protected_nopar:Npn \__unravel_do_rule:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_alt_rule:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { insert } % 37
+ { \__unravel_begin_insert_or_adjust: }
+\__unravel_new_tex_cmd:nn { vadjust } % 38
+ {
+ \mode_if_vertical:TF
+ { \__unravel_forbidden_case: } { \__unravel_begin_insert_or_adjust: }
+ }
+\__unravel_new_tex_cmd:nn { ignore_spaces } % 39
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_ignorespaces:D
+ {
+ \__unravel_get_x_non_blank:
+ \__unravel_set_cmd:
+ \__unravel_do_step:
+ }
+ { \msg_error:nn { unravel } { not-implemented } { pdfprimitive } }
+ }
+\__unravel_new_tex_cmd:nn { after_assignment } % 40
+ {
+ \tl_set_eq:NN \l__unravel_tmpa_tl \l__unravel_head_tl
+ \__unravel_get_next:
+ \gtl_gset_eq:NN \g__unravel_after_assignment_gtl \l__unravel_head_gtl
+ \__unravel_print_action:x
+ {
+ Afterassignment:~\tl_to_str:N \l__unravel_tmpa_tl
+ \gtl_to_str:N \l__unravel_head_gtl
+ }
+ }
+\__unravel_new_tex_cmd:nn { after_group } % 41
+ { \msg_error:nnx { unravel } { not-implemented } { aftergroup } }
+\__unravel_new_tex_cmd:nn { break_penalty } % 42
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { start_par } % 43
+ {
+ \mode_if_vertical:TF
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_noindent:D
+ { \__unravel_new_graf:N \c_false_bool }
+ { \__unravel_new_graf:N \c_true_bool }
+ }
+ {
+ \int_compare:nNnT \l__unravel_head_char_int = { 1 } % indent
+ {
+ \tex_hbox:D width \tex_parindent:D { }
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ }
+ \__unravel_print_action:
+ }
+ }
+\__unravel_new_tex_cmd:nn { ital_corr } % 44
+ {
+ \mode_if_vertical:TF { \__unravel_forbidden_case: }
+ { \l__unravel_head_token \__unravel_print_action: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_accent:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \__unravel_do_assignments:
+ \bool_if:nTF
+ {
+ \token_if_eq_catcode_p:NN
+ \l__unravel_head_token \c_catcode_letter_token
+ ||
+ \token_if_eq_catcode_p:NN
+ \l__unravel_head_token \c_catcode_other_token
+ ||
+ \int_compare_p:nNn
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { char_given } }
+ }
+ { \__unravel_prev_input:V \l__unravel_head_tl }
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_char:D
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_int:
+ }
+ { \__unravel_break:w }
+ }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ \__unravel_break_point:
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_math_accent:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \__unravel_scan_math:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { accent } % 45
+ {
+ \__unravel_mode_non_vertical:n
+ {
+ \mode_if_math:TF
+ { \__unravel_do_math_accent: } { \__unravel_do_accent: }
+ }
+ }
+\__unravel_new_tex_cmd:nn { math_accent } % 46
+ { \__unravel_mode_math:n { \__unravel_do_math_accent: } }
+\__unravel_new_tex_cmd:nn { discretionary } % 47
+ { \msg_error:nnx { unravel } { not-implemented } { discretionary } }
+\__unravel_new_tex_cmd:nn { eq_no } % 48
+ { \msg_error:nnx { unravel } { not-implemented } { eqno } }
+\__unravel_new_tex_cmd:nn { left_right } % 49
+ { \msg_error:nnx { unravel } { not-implemented } { left/right } }
+\__unravel_new_tex_cmd:nn { math_comp } % 50
+ { \msg_error:nnx { unravel } { not-implemented } { math~comp } }
+\__unravel_new_tex_cmd:nn { limit_switch } % 51
+ { \msg_error:nnx { unravel } { not-implemented } { limits } }
+\__unravel_new_tex_cmd:nn { above } % 52
+ { \msg_error:nnx { unravel } { not-implemented } { above } }
+\__unravel_new_tex_cmd:nn { math_style } % 53
+ { \msg_error:nnx { unravel } { not-implemented } { math~style } }
+\__unravel_new_tex_cmd:nn { math_choice } % 54
+ { \msg_error:nnx { unravel } { not-implemented } { math~choice } }
+\__unravel_new_tex_cmd:nn { non_script } % 55
+ { \msg_error:nnx { unravel } { not-implemented } { non~script } }
+\__unravel_new_tex_cmd:nn { vcenter } % 56
+ { \msg_error:nnx { unravel } { not-implemented } { vcenter } }
+\__unravel_new_tex_cmd:nn { case_shift } % 57
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_scan_toks:NN \c_false_bool \c_false_bool
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \exp_after:wN \__unravel_case_shift:Nn \l__unravel_tmpa_tl
+ }
+\cs_new_protected:Npn \__unravel_case_shift:Nn #1#2
+ {
+ #1 { \__unravel_back_input:n {#2} }
+ \__unravel_print_action:x
+ { \token_to_meaning:N #1 ~ \tl_to_str:n { {#2} } }
+ }
+\__unravel_new_tex_cmd:nn { message } % 58
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_toks_to_str:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { extension } % 59
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_extension_operands:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { in_stream } % 60
+ {
+ \seq_put_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_openin:D
+ {
+ \__unravel_scan_int:
+ \__unravel_scan_optional_equals:
+ \__unravel_scan_file_name:
+ }
+ { \__unravel_scan_int: }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_cmd:nn { begin_group } % 61
+ {
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \__unravel_print_action:
+ \l__unravel_head_token
+ }
+\__unravel_new_tex_cmd:nn { end_group } % 62
+ {
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \__unravel_print_action:
+ \l__unravel_head_token
+ }
+\__unravel_new_tex_cmd:nn { omit } % 63
+ { \msg_error:nn { unravel } { not-implemented } { omit } }
+\__unravel_new_tex_cmd:nn { ex_space } % 64
+ {
+ \__unravel_mode_non_vertical:n
+ { \l__unravel_head_token \__unravel_print_action: }
+ }
+\__unravel_new_tex_cmd:nn { no_boundary } % 65
+ {
+ \__unravel_mode_non_vertical:n
+ { \l__unravel_head_token \__unravel_print_action: }
+ }
+\__unravel_new_tex_cmd:nn { radical } % 66
+ {
+ \__unravel_mode_math:n
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \__unravel_scan_math:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+ }
+\__unravel_new_tex_cmd:nn { end_cs_name } % 67
+ { \l__unravel_head_token \__unravel_print_action: }
+\__unravel_new_tex_cmd:nn { char_given } % 68
+ {
+ \__unravel_mode_non_vertical:n
+ {
+ \mode_if_math:TF
+ { \__unravel_char_in_mmode:V \l__unravel_head_char_int }
+ { \__unravel_char:V \l__unravel_head_char_int }
+ }
+ }
+\__unravel_new_tex_cmd:nn { math_given } % 69
+ {
+ \__unravel_mode_math:n
+ { \__unravel_mathchar:x { \int_use:N \l__unravel_head_char_int } }
+ }
+\__unravel_new_tex_cmd:nn { last_item } % 70
+ { \__unravel_forbidden_case: }
+\cs_new_protected_nopar:Npn \__unravel_scan_extension_operands:
+ {
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 0 } % openout
+ {
+ \__unravel_scan_int:
+ \__unravel_scan_optional_equals:
+ \__unravel_scan_file_name:
+ }
+ { 1 } % write
+ {
+ \__unravel_scan_int:
+ \__unravel_scan_toks:NN \c_false_bool \c_false_bool
+ }
+ { 2 } % closeout
+ { \__unravel_scan_int: }
+ { 3 } % special
+ { \__unravel_scan_toks_to_str: }
+ { 4 } % immediate
+ { \__unravel_scan_immediate_operands: }
+ { 5 } % setlanguage
+ {
+ \mode_if_horizontal:TF
+ { \__unravel_scan_int: }
+ { \msg_error:nn { unravel } { invalid-mode } }
+ }
+ { 6 } % pdfliteral
+ {
+ \__unravel_scan_keyword:nF { dD iI rR eE cC tT }
+ { \__unravel_scan_keyword:n { pP aA gG eE } }
+ \__unravel_scan_pdf_ext_toks:
+ }
+ { 7 } % pdfobj
+ {
+ \__unravel_scan_keyword:nTF
+ { rR eE sS eE rR vV eE oO bB jJ nN uU mM }
+ { \__unravel_skip_optional_space: }
+ {
+ \__unravel_scan_keyword:nF { uU sS eE oO bB jJ nN uU mM }
+ { \__unravel_scan_int: }
+ \__unravel_scan_keyword:nT { sS tT rR eE aA mM }
+ {
+ \__unravel_scan_keyword:nT { aA tT tT rR }
+ { \__unravel_scan_pdf_ext_toks: }
+ }
+ \__unravel_scan_keyword:n { fF iI lL eE }
+ \__unravel_scan_pdf_ext_toks:
+ }
+ }
+ { 8 } % pdfrefobj
+ { \__unravel_scan_int: }
+ { 9 } % pdfxform
+ {
+ \__unravel_scan_keyword:nT { aA tT tT rR }
+ { \__unravel_scan_pdf_ext_toks: }
+ \__unravel_scan_keyword:nTF { rR eE sS oO uU rR cC eE sS }
+ { \__unravel_scan_pdf_ext_toks: }
+ \__unravel_scan_int:
+ }
+ { 10 } % pdfrefxform
+ { \__unravel_scan_int: }
+ { 11 } % pdfximage
+ { \__unravel_scan_image: }
+ { 12 } % pdfrefximage
+ { \__unravel_scan_int: }
+ { 13 } % pdfannot
+ {
+ \__unravel_scan_keyword:nTF
+ { rR eE sS eE rR vV eE oO bB jJ nN uU mM }
+ { \__unravel_scan_optional_space: }
+ {
+ \__unravel_scan_keyword:nT { uU sS eE oO bB jJ nN uU mM }
+ { \__unravel_scan_int: }
+ \__unravel_scan_alt_rule:
+ \__unravel_scan_pdf_ext_toks:
+ }
+ }
+ { 14 } % pdfstartlink
+ {
+ \mode_if_vertical:TF
+ { \msg_error:nn { unravel } { invalid-mode } }
+ {
+ \__unravel_scan_rule_attr:
+ \__unravel_scan_action:
+ }
+ }
+ { 15 } % pdfendlink
+ {
+ \mode_if_vertical:T
+ { \msg_error:nn { unravel } { invalid-mode } }
+ }
+ { 16 } % pdfoutline
+ {
+ \__unravel_scan_keyword:nT { aA tT tT rR }
+ { \__unravel_scan_pdf_ext_toks: }
+ \__unravel_scan_action:
+ \__unravel_scan_keyword:nT { cC oO uU nN tT }
+ { \__unravel_scan_int: }
+ \__unravel_scan_pdf_ext_toks:
+ }
+ { 17 } % pdfdest
+ { \__unravel_scan_pdfdest_operands: }
+ { 18 } % pdfthread
+ { \__unravel_scan_rule_attr: \__unravel_scan_thread_id: }
+ { 19 } % pdfstartthread
+ { \__unravel_scan_rule_attr: \__unravel_scan_thread_id: }
+ { 20 } % pdfendthread
+ { }
+ { 21 } % pdfsavepos
+ { }
+ { 22 } % pdfinfo
+ { \__unravel_scan_pdf_ext_toks: }
+ { 23 } % pdfcatalog
+ {
+ \__unravel_scan_pdf_ext_toks:
+ \__unravel_scan_keyword:n { oO pP eE nN aA cC tT iI oO nN }
+ { \__unravel_scan_action: }
+ }
+ { 24 } % pdfnames
+ { \__unravel_scan_pdf_ext_toks: }
+ { 25 } % pdffontattr
+ {
+ \__unravel_scan_font_ident:
+ \__unravel_scan_pdf_ext_toks:
+ }
+ { 26 } % pdfincludechars
+ {
+ \__unravel_scan_font_ident:
+ \__unravel_scan_pdf_ext_toks:
+ }
+ { 27 } % pdfmapfile
+ { \__unravel_scan_pdf_ext_toks: }
+ { 28 } % pdfmapline
+ { \__unravel_scan_pdf_ext_toks: }
+ { 29 } % pdftrailer
+ { \__unravel_scan_pdf_ext_toks: }
+ { 30 } % pdfresettimer
+ { }
+ { 31 } % pdffontexpand
+ {
+ \__unravel_scan_font_ident:
+ \__unravel_scan_optional_equals:
+ \__unravel_scan_int:
+ \__unravel_scan_int:
+ \__unravel_scan_int:
+ \__unravel_scan_keyword:nT { aAuUtToOeExXpPaAnNdD }
+ { \__unravel_skip_optional_space: }
+ }
+ { 32 } % pdfsetrandomseed
+ { \__unravel_scan_int: }
+ { 33 } % pdfsnaprefpoint
+ { }
+ { 34 } % pdfsnapy
+ { \__unravel_scan_normal_glue: }
+ { 35 } % pdfsnapycomp
+ { \__unravel_scan_int: }
+ { 36 } % pdfglyphtounicode
+ {
+ \__unravel_scan_pdf_ext_toks:
+ \__unravel_scan_pdf_ext_toks:
+ }
+ { 37 } % pdfcolorstack
+ { \__unravel_scan_pdfcolorstack_operands: }
+ { 38 } % pdfsetmatrix
+ { \__unravel_scan_pdf_ext_toks: }
+ { 39 } % pdfsave
+ { }
+ { 40 } % pdfrestore
+ { }
+ { 41 } % pdfnobuiltintounicode
+ { \__unravel_scan_font_ident: }
+ }
+ { } % no other cases.
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_pdfcolorstack_operands:
+ {
+ \__unravel_scan_int:
+ \__unravel_scan_keyword:nF { sSeEtT }
+ {
+ \__unravel_scan_keyword:nF { pPuUsShH }
+ {
+ \__unravel_scan_keyword:nF { pPoOpP }
+ {
+ \__unravel_scan_keyword:nF { cCuUrRrReEnNtT }
+ {
+ \msg_error:nn { unravel }
+ { color-stack-action-missing }
+ }
+ }
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_rule_attr:
+ {
+ \__unravel_scan_alt_rule:
+ \__unravel_scan_keyword:nT { aA tT tT rR }
+ { \__unravel_scan_pdf_ext_toks: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_action:
+ {
+ \__unravel_scan_keyword:nTF { uUsSeErR }
+ { \__unravel_scan_pdf_ext_toks: }
+ {
+ \__unravel_scan_keyword:nF { gGoOtToO }
+ {
+ \__unravel_scan_keyword:nF { tThHrReEaAdD }
+ { \msg_error:nn { unravel } { action-type-missing } }
+ }
+ }
+ \__unravel_scan_keyword:nT { fFiIlLeE }
+ { \__unravel_scan_pdf_ext_toks: }
+ \__unravel_scan_keyword:nTF { pPaAgGeE }
+ {
+ \__unravel_scan_int:
+ \__unravel_scan_pdf_ext_toks:
+ }
+ {
+ \__unravel_scan_keyword:nTF { nNaAmMeE }
+ { \__unravel_scan_pdf_ext_toks: }
+ {
+ \__unravel_scan_keyword:nTF { nNuUmM }
+ { \__unravel_scan_int: }
+ { \msg_error:nn { unravel } { identifier-type-missing } }
+ }
+ }
+ \__unravel_scan_keyword:nTF { nNeEwWwWiInNdDoOwW }
+ { \__unravel_skip_optional_space: }
+ {
+ \__unravel_scan_keyword:nT { nNoOnNeEwWwWiInNdDoOwW }
+ { \__unravel_skip_optional_space: }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_image:
+ {
+ \__unravel_scan_rule_attr:
+ \__unravel_scan_keyword:nTF { nNaAmMeEdD }
+ { \__unravel_scan_pdf_ext_toks: }
+ {
+ \__unravel_scan_keyword:nT { pPaAgGeE }
+ { \__unravel_scan_int: }
+ }
+ \__unravel_scan_keyword:nT { cCoOlLoOrRsSpPaAcCeE }
+ { \__unravel_scan_int: }
+ \__unravel_scan_pdf_ext_toks:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_immediate_operands:
+ {
+ \__unravel_get_x_next:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { extension } }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_char_int < { 3 } % openout, write, closeout
+ { \__unravel_scan_immediate_operands_aux: }
+ {
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 7 } { \__unravel_scan_extension_operands_aux: } % pdfobj
+ { 9 } { \__unravel_scan_extension_operands_aux: } % pdfxform
+ { 11 } { \__unravel_scan_extension_operands_aux: } %pdfximage
+ }
+ { \__unravel_scan_immediate_operands_bad: }
+ }
+ }
+ { \__unravel_scan_immediate_operands_bad: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_immediate_operands_aux:
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_extension_operands:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_immediate_operands_bad:
+ {
+ \__unravel_back_input:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl ignored }
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ }
+
+\cs_new_protected_nopar:Npn \__unravel_scan_pdfdest_operands:
+ {
+ \__unravel_scan_keyword:nTF { nNuUmM }
+ { \__unravel_scan_int: }
+ {
+ \__unravel_scan_keyword:nTF { nNaAmMeE }
+ { \__unravel_scan_pdf_ext_toks: }
+ { \msg_error:nn { unravel } { identifier-type-missing } }
+ }
+ \__unravel_scan_keyword:nTF { xXyYzZ }
+ {
+ \__unravel_scan_keyword:nT { zZoOoOmM }
+ { \__unravel_scan_int: }
+ }
+ {
+ \__unravel_scan_keyword:nF { fFiItTbBhH }
+ {
+ \__unravel_scan_keyword:nF { fFiItTbBvV }
+ {
+ \__unravel_scan_keyword:nF { fFiItTbB }
+ {
+ \__unravel_scan_keyword:nF { fFiItThHhH }
+ {
+ \__unravel_scan_keyword:nF { fFiItTvV }
+ {
+ \__unravel_scan_keyword:nTF
+ { fFiItTrR }
+ {
+ \__unravel_skip_optional_space:
+ \__unravel_scan_alt_rule:
+ \use_none:n
+ }
+ {
+ \__unravel_scan_keyword:nF
+ { fFiItT }
+ {
+ \msg_error:nn { unravel }
+ {
+ destination-type-missing
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ \__unravel_skip_optional_space:
+ }
+\cs_set_protected_nopar:Npn \__unravel_tmp:w
+ {
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_prefixed_command:
+ }
+\int_step_inline:nnnn
+ { \__unravel_tex_use:n { max_non_prefixed_command } + 1 }
+ { 1 }
+ { \__unravel_tex_use:n { max_command } }
+ { \cs_new_eq:cN { __unravel_cmd_#1: } \__unravel_tmp:w }
+\cs_new_protected_nopar:Npn \__unravel_prefixed_command:
+ {
+ \int_while_do:nNnn
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { prefix } }
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_get_x_non_relax:
+ \__unravel_set_cmd:
+ \int_compare:nNnF \l__unravel_head_cmd_int
+ > { \__unravel_tex_use:n { max_non_prefixed_command } }
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \msg_error:nnxx { unravel } { erroneous-prefixes }
+ { \tl_to_str:N \l__unravel_tmpa_tl }
+ { \tl_to_str:N l__unravel_head_tl }
+ \__unravel_back_input:
+ \__unravel_omit_after_assignment:w
+ }
+ }
+ % ^^A todo: Discard non-\global prefixes if they are irrelevant
+ % ^^A todo: Adjust for the setting of \globaldefs
+ \cs_if_exist_use:cF
+ { __unravel_prefixed_ \int_use:N \l__unravel_head_cmd_int : }
+ {
+ \msg_error:nnx { unravel } { internal } { prefixed }
+ \__unravel_omit_after_assignment:w
+ }
+ \__unravel_after_assignment:
+ }
+\cs_new_protected_nopar:Npn \__unravel_after_assignment:
+ {
+ \__unravel_back_input_gtl:N \g__unravel_after_assignment_gtl
+ \gtl_gclear:N \g__unravel_after_assignment_gtl
+ }
+\cs_new_protected_nopar:Npn \__unravel_omit_after_assignment:w
+ #1 \__unravel_after_assignment: { }
+\cs_new_protected:Npn \__unravel_prefixed_new:nn #1#2
+ {
+ \cs_new_protected_nopar:cpn
+ { __unravel_prefixed_ \__unravel_tex_use:n {#1} : } {#2}
+ }
+\cs_new_protected:Npn \__unravel_assign_token:n #1
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ #1
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_assigned_token:
+ }
+\cs_new_protected_nopar:Npn \__unravel_assign_register:
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_assigned_register:
+ }
+\cs_new_protected:Npn \__unravel_assign_value:nn #1#2
+ {
+ \tl_if_empty:nF {#1}
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ #1
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ }
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \tl_set_eq:NN \l__unravel_defined_tl \l__unravel_head_tl
+ \__unravel_scan_optional_equals:
+ #2
+ \__unravel_assign_register:
+ }
+\__unravel_prefixed_new:nn { toks_register } % 71
+ {
+ \int_compare:nNnT \l__unravel_head_char_int = \c_zero
+ { % \toks
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ }
+ \__unravel_assign_toks:
+ }
+\__unravel_prefixed_new:nn { assign_toks } % 72
+ { \__unravel_assign_toks: }
+\cs_new_protected_nopar:Npn \__unravel_assign_toks:
+ {
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ \__unravel_print_action:
+ \tl_set_eq:NN \l__unravel_defined_tl \l__unravel_head_tl
+ \__unravel_scan_optional_equals:
+ \__unravel_get_x_non_relax:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { toks_register } }
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \int_compare:nNnT \l__unravel_head_char_int = \c_zero
+ { \__unravel_scan_int: }
+ }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { assign_toks } }
+ { \__unravel_prev_input:V \l__unravel_head_tl }
+ {
+ \__unravel_back_input:
+ \__unravel_scan_toks:NN \c_false_bool \c_false_bool
+ }
+ }
+ \__unravel_assign_register:
+ }
+\__unravel_prefixed_new:nn { assign_int } % 73
+ { \__unravel_assign_value:nn { } { \__unravel_scan_int: } }
+\__unravel_prefixed_new:nn { assign_dimen } % 74
+ { \__unravel_assign_value:nn { } { \__unravel_scan_normal_dimen: } }
+\__unravel_prefixed_new:nn { assign_glue } % 75
+ { \__unravel_assign_value:nn { } { \__unravel_scan_normal_glue: } }
+\__unravel_prefixed_new:nn { assign_mu_glue } % 76
+ { \__unravel_assign_value:nn { } { \__unravel_scan_mu_glue: } }
+\__unravel_prefixed_new:nn { assign_font_dimen } % 77
+ {
+ \__unravel_assign_value:nn
+ { \__unravel_scan_int: \__unravel_scan_font_ident: }
+ { \__unravel_scan_normal_dimen: }
+ }
+\__unravel_prefixed_new:nn { assign_font_int } % 78
+ {
+ \__unravel_assign_value:nn
+ { \__unravel_scan_font_int: } { \__unravel_scan_int: }
+ }
+\__unravel_prefixed_new:nn { set_aux } % 79
+ { % prevdepth = 1, spacefactor = 0
+ \int_compare:nNnTF \l__unravel_head_char_int = \c_one
+ { \__unravel_assign_value:nn { } { \__unravel_scan_normal_dimen: } }
+ { \__unravel_assign_value:nn { } { \__unravel_scan_int: } }
+ }
+\__unravel_prefixed_new:nn { set_prev_graf } % 80
+ { \__unravel_assign_value:nn { } { \__unravel_scan_int: } }
+\__unravel_prefixed_new:nn { set_page_dimen } % 81
+ { \__unravel_assign_value:nn { } { \__unravel_scan_normal_dimen: } }
+\__unravel_prefixed_new:nn { set_page_int } % 82
+ { \__unravel_assign_value:nn { } { \__unravel_scan_int: } }
+\__unravel_prefixed_new:nn { set_box_dimen } % 83
+ {
+ \__unravel_assign_value:nn
+ { \__unravel_scan_int: } { \__unravel_scan_normal_dimen: }
+ }
+\__unravel_prefixed_new:nn { set_shape } % 84
+ {
+ \__unravel_assign_value:nn { \__unravel_scan_int: }
+ {
+ \prg_replicate:nn
+ {
+ \tl_if_head_eq_meaning:VNT
+ \l__unravel_defined_tl \tex_parshape:D { \c_two * }
+ \tl_tail:N \l__unravel_defined_tl
+ }
+ { \__unravel_scan_int: }
+ }
+ }
+\__unravel_prefixed_new:nn { def_code } % 85
+ {
+ \__unravel_assign_value:nn
+ { \__unravel_scan_int: } { \__unravel_scan_int: }
+ }
+\__unravel_prefixed_new:nn { def_family } % 86
+ {
+ \__unravel_assign_value:nn
+ { \__unravel_scan_int: } { \__unravel_scan_font_ident: }
+ }
+\__unravel_prefixed_new:nn { set_font } % 87
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \tl_put_left:NV \l__unravel_head_tl \l__unravel_tmpa_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \gtl_gput_right:NV \g__unravel_output_gtl \l__unravel_head_tl
+ \__unravel_print_action:
+ }
+\__unravel_prefixed_new:nn { def_font } % 88
+ {
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ \__unravel_set_action_text:x { \tl_to_str:N \l__unravel_head_tl }
+ \__unravel_scan_r_token:
+ \__unravel_print_action:x
+ { \g__unravel_action_text_str \tl_to_str:N \l__unravel_defined_tl }
+ \__unravel_scan_optional_equals:
+ \__unravel_scan_file_name:
+ \bool_gset_true:N \g__unravel_name_in_progress_bool
+ \__unravel_scan_keyword:nTF { aAtT }
+ { \__unravel_scan_normal_dimen: }
+ {
+ \__unravel_scan_keyword:nT { sS cC aA lL eE dD }
+ { \__unravel_scan_int: }
+ }
+ \bool_gset_false:N \g__unravel_name_in_progress_bool
+ \__unravel_assign_token:n { }
+ }
+\__unravel_prefixed_new:nn { let } % 94
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_let:D
+ { % |let|
+ \__unravel_scan_r_token:
+ \seq_get_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_tmpa_tl }
+ \__unravel_get_next:
+ \bool_while_do:nn
+ { \token_if_eq_catcode_p:NN \l__unravel_head_token \c_space_token }
+ { \__unravel_get_next: }
+ \tl_if_eq:NNT \l__unravel_head_tl \c__unravel_eq_tl
+ { \__unravel_get_next: }
+ \token_if_eq_catcode:NNT \l__unravel_head_token \c_space_token
+ { \__unravel_get_next: }
+ }
+ { % |futurelet|
+ \__unravel_scan_r_token:
+ \seq_get_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_tmpa_tl }
+ \__unravel_get_next:
+ \gtl_set_eq:NN \l__unravel_tmpb_gtl \l__unravel_head_gtl
+ \__unravel_get_next:
+ \__unravel_back_input:
+ \gtl_set_eq:NN \l__unravel_head_gtl \l__unravel_tmpb_gtl
+ \__unravel_back_input:
+ }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \tl_put_right:Nn \l__unravel_tmpa_tl { = ~ \l__unravel_head_token }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \use:x
+ {
+ \exp_not:V \l__unravel_head_tl
+ \tex_let:D \tl_tail:N \l__unravel_tmpa_tl
+ }
+ \__unravel_print_assigned_token:
+ }
+\__unravel_prefixed_new:nn { shorthand_def } % 95
+ {
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ \tl_set:Nx \l__unravel_prev_action_tl
+ { \tl_to_str:N \l__unravel_head_tl }
+ \__unravel_scan_r_token:
+ \__unravel_print_action:x
+ { \l__unravel_prev_action_tl \tl_to_str:N \l__unravel_defined_tl }
+ \exp_after:wN \cs_set_eq:NN \l__unravel_defined_tl \scan_stop:
+ \__unravel_scan_optional_equals:
+ \__unravel_scan_int:
+ \__unravel_assign_token:n { }
+ }
+\__unravel_prefixed_new:nn { read_to_cs } % 96
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ \__unravel_scan_int:
+ \__unravel_scan_keyword:nF { tToO }
+ {
+ \msg_error:nn { unravel } { missing-to }
+ \__unravel_prev_input:n { to }
+ }
+ \__unravel_scan_r_token:
+ \__unravel_assign_token:n { }
+ }
+\__unravel_prefixed_new:nn { def } % 97
+ {
+ \seq_get_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \tl_set:NV \l__unravel_defining_tl \l__unravel_tmpa_tl
+ \tl_put_right:NV \l__unravel_defining_tl \l__unravel_head_tl
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \int_compare:nNnTF \l__unravel_head_char_int < \c_two
+ { % def/gdef
+ \__unravel_scan_r_token:
+ \tl_put_right:NV \l__unravel_defining_tl \l__unravel_defined_tl
+ \__unravel_scan_toks:NN \c_true_bool \c_false_bool
+ }
+ { % edef/xdef
+ \__unravel_scan_r_token:
+ \tl_put_right:NV \l__unravel_defining_tl \l__unravel_defined_tl
+ \__unravel_scan_toks:NN \c_true_bool \c_true_bool
+ }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_assign_token:n
+ { \tl_set_eq:NN \l__unravel_head_tl \l__unravel_defining_tl }
+ }
+\__unravel_prefixed_new:nn { set_box } % 98
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_int:
+ \__unravel_scan_optional_equals:
+ \bool_if:NTF \g__unravel_set_box_allowed_bool
+ { \__unravel_do_box:N \c_false_bool }
+ {
+ \msg_error:nn { unravel } { improper-setbox }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \__unravel_omit_after_assignment:w
+ }
+ }
+\__unravel_prefixed_new:nn { hyph_data } % 99
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_scan_toks:NN \c_false_bool \c_false_bool
+ \__unravel_assign_token:n { }
+ }
+\__unravel_prefixed_new:nn { set_interaction } % 100
+ {
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \tl_put_right:NV \l__unravel_head_tl \l__unravel_tmpa_tl
+ \tl_use:N \l__unravel_head_tl \scan_stop:
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_prefixed_new:nn { letterspace_font } % 101
+ {
+ % ^^A todo...
+ % new_letterspaced_font(a);
+ \msg_error:nnx { unravel } { not-implemented } { letterspace-font }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_omit_after_assignment:w
+ }
+\__unravel_prefixed_new:nn { pdf_copy_font } % 102
+ {
+ % ^^A todo...
+ % make_font_copy(a);
+ \msg_error:nnx { unravel } { not-implemented } { pdf-copy-font }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_omit_after_assignment:w
+ }
+\__unravel_prefixed_new:nn { register } % 89
+ { \__unravel_do_register:N \c_zero }
+\__unravel_prefixed_new:nn { advance } % 90
+ { \__unravel_do_operation:N \c_one }
+\__unravel_prefixed_new:nn { multiply } % 91
+ { \__unravel_do_operation:N \c_two }
+\__unravel_prefixed_new:nn { divide } % 92
+ { \__unravel_do_operation:N \c_three }
+\cs_new_protected:Npn \__unravel_do_operation:N #1
+ {
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_get_x_next:
+ \__unravel_set_cmd:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int > { \__unravel_tex_use:n { assign_mu_glue } }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { register } }
+ { \__unravel_do_register:N #1 }
+ { \__unravel_do_operation_fail:w }
+ }
+ {
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int < { \__unravel_tex_use:n { assign_int } }
+ { \__unravel_do_operation_fail:w }
+ {
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \exp_args:NNf \__unravel_do_register_set:Nn #1
+ {
+ \int_eval:n
+ {
+ \l__unravel_head_cmd_int
+ - \__unravel_tex_use:n { assign_toks }
+ }
+ }
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_operation_fail:w
+ {
+ \msg_error:nn { unravel } { after-advance }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \__unravel_omit_after_assignment:w
+ }
+\cs_new_protected:Npn \__unravel_do_register:N #1
+ {
+ \exp_args:NNV \__unravel_do_register_aux:Nn #1
+ \l__unravel_head_char_int
+ }
+\cs_new_protected:Npn \__unravel_do_register_aux:Nn #1#2
+ {
+ \int_compare:nNnTF { \tl_tail:n {#2} } = \c_zero
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_scan_int:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ }
+ {
+ \__unravel_prev_input_silent:V \l__unravel_head_tl
+ \__unravel_print_action:
+ }
+ \tl_set_eq:NN \l__unravel_defined_tl \l__unravel_head_tl
+ \exp_args:NNf \__unravel_do_register_set:Nn #1
+ { \int_eval:n { #2 / 1 000 000 } }
+ }
+\cs_new_protected:Npn \__unravel_do_register_set:Nn #1#2
+ {
+ \int_compare:nNnTF {#1} = \c_zero
+ { % truly register command
+ \__unravel_scan_optional_equals:
+ }
+ { % \advance, \multiply, \divide
+ \__unravel_scan_keyword:nF { bByY }
+ { \__unravel_prev_input_silent:n { by } }
+ }
+ \int_compare:nNnTF {#1} < \c_two
+ {
+ \int_case:nnF {#2}
+ {
+ { 1 } { \__unravel_scan_int: } % count
+ { 2 } { \__unravel_scan_normal_dimen: } % dim
+ { 3 } { \__unravel_scan_normal_glue: } % glue
+ { 4 } { \__unravel_scan_mu_glue: } % muglue
+ }
+ { \msg_error:nnx { unravel } { internal } { do-reg=#2 } }
+ }
+ { \__unravel_scan_int: }
+ \__unravel_assign_register:
+ }
+\cs_new_protected_nopar:Npn \__unravel_do_assignments:
+ {
+ \__unravel_get_x_non_relax:
+ \__unravel_set_cmd:
+ \int_compare:nNnT
+ \l__unravel_head_cmd_int
+ > { \__unravel_tex_use:n { max_non_prefixed_command } }
+ {
+ \bool_gset_false:N \g__unravel_set_box_allowed_bool
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_prefixed_command:
+ \bool_gset_true:N \g__unravel_set_box_allowed_bool
+ \__unravel_do_assignments:
+ }
+ }
+\__unravel_new_tex_expandable:nn { undefined_cs } % 103
+ { \tl_use:N \l__unravel_head_tl \__unravel_print_action: }
+\__unravel_new_tex_expandable:nn { expand_after } % 104
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_expandafter:D
+ { \__unravel_expandafter: } { \__unravel_unless: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_expandafter:
+ {
+ \gtl_set_eq:NN \l__unravel_tmpb_gtl \l__unravel_head_gtl
+ \__unravel_get_next:
+ \gtl_concat:NNN \l__unravel_head_gtl
+ \l__unravel_tmpb_gtl \l__unravel_head_gtl
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_gtl
+ \__unravel_print_action:x { \gtl_to_str:N \l__unravel_head_gtl }
+ \__unravel_get_next:
+ \__unravel_token_if_expandable:NTF \l__unravel_head_token
+ { \__unravel_expand: }
+ { \__unravel_back_input: }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_gtl
+ \__unravel_set_action_text:x
+ { back_input: ~ \gtl_to_str:N \l__unravel_head_gtl }
+ \gtl_pop_left:N \l__unravel_head_gtl
+ \__unravel_back_input:
+ \__unravel_print_action:
+ }
+\cs_new_protected_nopar:Npn \__unravel_unless:
+ {
+ \__unravel_get_token:
+ \int_compare:nNnTF
+ \l__unravel_head_cmd_int = { \__unravel_tex_use:n { if_test } }
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_ifcase:D
+ { \__unravel_unless_bad: }
+ {
+ \tl_put_left:Nn \l__unravel_head_tl { \reverse_if:N }
+ % \int_add:Nn \l__unravel_head_char_int { 32 }
+ \__unravel_expand_nonmacro:
+ }
+ }
+ { \__unravel_unless_bad: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_unless_bad:
+ {
+ \msg_error:nn { unravel } { bad-unless }
+ \__unravel_back_input:
+ }
+\__unravel_new_tex_expandable:nn { no_expand } % 105
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \tex_noexpand:D
+ { \__unravel_noexpand: }
+ { \__unravel_pdfprimitive: }
+ }
+\cs_new_protected_nopar:Npn \__unravel_noexpand:
+ {
+ \__unravel_get_token:
+ \__unravel_back_input:
+ \__unravel_token_if_expandable:NT \l__unravel_head_token
+ {
+ \cs_gset_protected_nopar:Npx \__unravel_get_next:
+ {
+ \cs_gset_protected_nopar:Npn \__unravel_get_next:
+ { \exp_not:o { \__unravel_get_next: } }
+ \exp_not:o { \__unravel_get_next: }
+ \exp_not:n { \cs_set_eq:NN \l__unravel_head_token \tex_relax:D }
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_pdfprimitive:
+ { \msg_error:nnx { unravel } { not-implemented } { pdfprimitive } }
+\__unravel_new_tex_expandable:nn { input } % 106
+ {
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 1 } { \__unravel_print_action: } % \endinput
+ { 2 } { \__unravel_scantokens: } % \scantokens
+ }
+ { % 0=\input
+ \bool_if:NTF \g__unravel_name_in_progress_bool
+ { \__unravel_insert_relax: } { \__unravel_input: }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_scantokens:
+ {
+ \seq_gput_right:Nn \g__unravel_prev_input_seq { }
+ \__unravel_scan_toks:NN \c_false_bool \c_false_bool
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \tl_set_rescan:Nno \l__unravel_head_tl { } \l__unravel_tmpa_tl
+ \__unravel_back_input:V \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_tmpa_tl }
+ }
+\cs_new_protected_nopar:Npn \__unravel_input:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_scan_file_name:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_set:Nx \l__unravel_tmpa_tl { \tl_tail:N \l__unravel_head_tl }
+ \__unravel_tl_gset_input:Nno \g__unravel_tmpc_tl { } \l__unravel_tmpa_tl
+ \__unravel_back_input:V \g__unravel_tmpc_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\__unravel_new_tex_expandable:nn { cs_name } % 109
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_csname_loop:
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_back_input_tl_o:
+ }
+\cs_new_protected_nopar:Npn \__unravel_csname_loop:
+ {
+ \__unravel_get_x_next:
+ \token_if_cs:NTF \l__unravel_head_token
+ {
+ \cs_if_eq:NNF \l__unravel_head_token \tex_endcsname:D
+ {
+ \msg_error:nn { unravel } { missing-endcsname }
+ \__unravel_back_input:
+ \tl_set:Nn \l__unravel_head_tl { \tex_endcsname:D }
+ }
+ }
+ {
+ \__unravel_prev_input_silent:x
+ { \__unravel_token_to_char:N \l__unravel_head_token }
+ \__unravel_csname_loop:
+ }
+ }
+\__unravel_new_tex_expandable:nn { convert } % 110
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \int_case:nn \l__unravel_head_char_int
+ {
+ 0 \__unravel_scan_int:
+ 1 \__unravel_scan_int:
+ 2 { \__unravel_get_next: \__unravel_prev_input:V \l__unravel_head_tl }
+ 3 { \__unravel_get_next: \__unravel_prev_input:V \l__unravel_head_tl }
+ 4 \__unravel_scan_font_ident:
+ 8 \__unravel_scan_font_ident:
+ 9 \__unravel_scan_font_ident:
+ { 10 } \__unravel_scan_font_ident:
+ { 11 } \__unravel_scan_int:
+ { 12 } \__unravel_scan_int:
+ { 13 } \__unravel_scan_pdf_ext_toks:
+ { 14 } \__unravel_scan_pdf_ext_toks:
+ { 15 } \__unravel_scan_int:
+ { 16 } \__unravel_scan_int:
+ { 17 } \__unravel_scan_pdfstrcmp:
+ { 18 } \__unravel_scan_pdfcolorstackinit:
+ { 19 } \__unravel_scan_pdf_ext_toks:
+ { 20 } \__unravel_scan_pdf_ext_toks:
+ { 22 } \__unravel_scan_pdf_ext_toks:
+ { 23 } \__unravel_scan_pdf_ext_toks:
+ { 24 }
+ {
+ \__unravel_scan_keyword:n { fF iI lL eE }
+ \__unravel_scan_pdf_ext_toks:
+ }
+ { 25 } \__unravel_scan_pdffiledump:
+ { 26 } \__unravel_scan_pdfmatch:
+ { 27 } \__unravel_scan_int:
+ { 28 } \__unravel_scan_int:
+ { 30 } \__unravel_scan_int:
+ { 31 } \__unravel_scan_pdfximagebbox:
+ }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_back_input_tl_o:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_pdfstrcmp:
+ {
+ \__unravel_scan_toks_to_str:
+ \__unravel_scan_toks_to_str:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_pdfximagebbox:
+ { \__unravel_scan_int: \__unravel_scan_int: }
+\cs_new_protected_nopar:Npn \__unravel_scan_pdfcolorstackinit:
+ {
+ \__unravel_scan_keyword:nTF { pP aA gG eE }
+ { \bool_set_true:N \l__unravel_tmpa_bool }
+ { \bool_set_false:N \l__unravel_tmpb_bool }
+ \__unravel_scan_keyword:nF { dD iI rR eE cC tT }
+ { \__unravel_scan_keyword:n { pP aA gG eE } }
+ \__unravel_scan_toks_to_str:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_pdffiledump:
+ {
+ \__unravel_scan_keyword:nT { oO fF fF sS eE tT } \__unravel_scan_int:
+ \__unravel_scan_keyword:nT { lL eE nN gG tT hH } \__unravel_scan_int:
+ \__unravel_scan_pdf_ext_toks:
+ }
+\cs_new_protected_nopar:Npn \__unravel_scan_pdfmatch:
+ {
+ \__unravel_scan_keyword:n { iI cC aA sS eE }
+ \__unravel_scan_keyword:nT { sS uU bB cC oO uU nN tT }
+ { \__unravel_scan_int: }
+ \__unravel_scan_pdf_ext_toks:
+ \__unravel_scan_pdf_ext_toks:
+ }
+\__unravel_new_tex_expandable:nn { the } % 111
+ {
+ \__unravel_get_the:
+ \tl_set:Nx \l__unravel_tmpa_tl { \exp_args:NV \exp_not:o \l__unravel_head_tl }
+ \__unravel_back_input:V \l__unravel_tmpa_tl
+ \__unravel_print_action:
+ }
+\cs_new_protected_nopar:Npn \__unravel_get_the:
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \int_if_odd:nTF \l__unravel_head_char_int
+ { % \unexpanded, \detokenize
+ \__unravel_scan_toks:NN \c_false_bool \c_false_bool
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_set_action_text:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+ { % \the
+ \__unravel_get_x_next:
+ \__unravel_scan_something_internal:n { 5 }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_set_action_text:x
+ {
+ \tl_head:N \l__unravel_head_tl
+ => \tl_tail:N \l__unravel_head_tl
+ }
+ \tl_set:Nx \l__unravel_head_tl
+ { \exp_not:N \exp_not:n { \tl_tail:N \l__unravel_head_tl } }
+ }
+ }
+\__unravel_new_tex_expandable:nn { top_bot_mark } % 112
+ { \__unravel_back_input_tl_o: }
+\__unravel_new_tex_expandable:nn { end_template } % 117
+ {
+ \msg_error:nn { unravel } { not-implemented } { end-template }
+ \__unravel_back_input_tl_o:
+ }
+\cs_new_protected_nopar:Npn \__unravel_pass_text:
+ {
+ \__unravel_input_if_empty:TF
+ { \__unravel_pass_text_empty: }
+ {
+ \__unravel_input_get:N \l__unravel_tmpb_gtl
+ \if_true:
+ \if_case:w \gtl_head_do:NN \l__unravel_tmpb_gtl \c_one
+ \exp_after:wN \__unravel_pass_text_done:w
+ \fi:
+ \__unravel_input_gpop:N \l__unravel_tmpb_gtl
+ \exp_after:wN \__unravel_pass_text:
+ \else:
+ \use:c { fi: }
+ \int_set_eq:NN \l__unravel_if_nesting_int \c_one
+ \__unravel_input_gpop:N \l__unravel_tmpb_gtl
+ \exp_after:wN \__unravel_pass_text_nested:
+ \fi:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_pass_text_done:w
+ {
+ \__unravel_get_next:
+ \token_if_eq_meaning:NNT \l__unravel_head_token \fi: { \if_true: }
+ \else:
+ }
+\cs_new_protected_nopar:Npn \__unravel_pass_text_nested:
+ {
+ \__unravel_input_if_empty:TF
+ { \__unravel_pass_text_empty: }
+ {
+ \__unravel_input_get:N \l__unravel_tmpb_gtl
+ \if_true:
+ \if_true:
+ \gtl_head_do:NN \l__unravel_tmpb_gtl \else:
+ \int_decr:N \l__unravel_if_nesting_int
+ \use_none:nnnnn
+ \fi:
+ \use_none:nnn
+ \fi:
+ \int_incr:N \l__unravel_if_nesting_int
+ \fi:
+ \__unravel_input_gpop:N \l__unravel_tmpa_gtl
+ \int_compare:nNnTF \l__unravel_if_nesting_int = \c_zero
+ { \__unravel_pass_text: }
+ { \__unravel_pass_text_nested: }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_pass_text_empty:
+ {
+ \msg_error:nn { unravel } { runaway-if }
+ \__unravel_exit:w
+ }
+\cs_new_protected:Npn \__unravel_cond_push:
+ {
+ \tl_gput_left:Nx \g__unravel_if_limit_tl
+ { { \int_use:N \g__unravel_if_limit_int } }
+ \int_gincr:N \g__unravel_if_depth_int
+ \int_gzero:N \g__unravel_if_limit_int
+ }
+\cs_new_protected_nopar:Npn \__unravel_cond_pop:
+ {
+ \int_gset:Nn \g__unravel_if_limit_int
+ { \tl_head:N \g__unravel_if_limit_tl }
+ \tl_gset:Nx \g__unravel_if_limit_tl
+ { \tl_tail:N \g__unravel_if_limit_tl }
+ \int_gdecr:N \g__unravel_if_depth_int
+ }
+\cs_new_protected:Npn \__unravel_change_if_limit:nn #1#2
+ {
+ \int_compare:nNnTF {#2} = \g__unravel_if_depth_int
+ { \int_gset:Nn \g__unravel_if_limit_int {#1} }
+ {
+ \tl_clear:N \l__unravel_tmpa_tl
+ \prg_replicate:nn { \g__unravel_if_depth_int - #2 - \c_one }
+ {
+ \tl_put_right:Nx \l__unravel_tmpa_tl
+ { { \tl_head:N \g__unravel_if_limit_tl } }
+ \tl_gset:Nx \g__unravel_if_limit_tl
+ { \tl_tail:N \g__unravel_if_limit_tl }
+ }
+ \tl_gset:Nx \g__unravel_if_limit_tl
+ { \l__unravel_tmpa_tl {#1} \tl_tail:N \g__unravel_if_limit_tl }
+ }
+ }
+\__unravel_new_tex_expandable:nn { if_test } % 107
+ {
+ \__unravel_cond_push:
+ \exp_args:NV \__unravel_cond_aux:n \g__unravel_if_depth_int
+ }
+\cs_new_protected:Npn \__unravel_cond_aux:n #1
+ {
+ \int_case:nnF \l__unravel_head_char_int
+ {
+ { 12 } { \__unravel_test_ifx:n {#1} }
+ { 16 } { \__unravel_test_case:n {#1} }
+ { 21 } { \__unravel_test_pdfprimitive:n {#1} } % ^^A todo and \unless
+ }
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \int_case:nn \l__unravel_head_char_int
+ {
+ { 0 } { \__unravel_test_two_chars: } % if
+ { 1 } { \__unravel_test_two_chars: } % ifcat
+ { 2 } % ifnum
+ { \__unravel_test_two_vals:N \__unravel_scan_int: }
+ { 3 } % ifdim
+ { \__unravel_test_two_vals:N \__unravel_scan_normal_dimen: }
+ { 4 } { \__unravel_scan_int: } % ifodd
+ % { 5 } { } % ifvmode
+ % { 6 } { } % ifhmode
+ % { 7 } { } % ifmmode
+ % { 8 } { } % ifinner
+ { 9 } { \__unravel_scan_int: } % ifvoid
+ { 10 } { \__unravel_scan_int: } % ifhbox
+ { 11 } { \__unravel_scan_int: } % ifvbox
+ { 13 } { \__unravel_scan_int: } % ifeof
+ % { 14 } { } % iftrue
+ % { 15 } { } % iffalse
+ { 17 } { \__unravel_test_ifdefined: } % ifdefined
+ { 18 } { \__unravel_test_ifcsname: } % ifcsname
+ { 19 } % iffontchar
+ { \__unravel_scan_font_ident: \__unravel_scan_int: }
+ % { 20 } { } % ifincsname % ^^A todo: something?
+ { 22 } % ifpdfabsnum
+ { \__unravel_test_two_vals:N \__unravel_scan_int: }
+ { 23 } % ifpdfabsdim
+ { \__unravel_test_two_vals:N \__unravel_scan_normal_dimen: }
+ }
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_set_action_text:x { \tl_to_str:N \l__unravel_head_tl }
+ \l__unravel_head_tl \scan_stop:
+ \exp_after:wN \__unravel_cond_true:n
+ \else:
+ \exp_after:wN \__unravel_cond_false:n
+ \fi:
+ {#1}
+ }
+ }
+\cs_new_protected:Npn \__unravel_cond_true:n #1
+ {
+ \__unravel_change_if_limit:nn { 3 } {#1} % wait for else/fi
+ \__unravel_print_action:x { \g__unravel_action_text_str = true }
+ }
+\cs_new_protected:Npn \__unravel_cond_false:n #1
+ {
+ \__unravel_cond_false_loop:n {#1}
+ \__unravel_cond_false_common:
+ \__unravel_print_action:x { \g__unravel_action_text_str = false }
+ }
+\cs_new_protected:Npn \__unravel_cond_false_loop:n #1
+ {
+ \__unravel_pass_text:
+ \int_compare:nNnTF \g__unravel_if_depth_int = {#1}
+ {
+ \token_if_eq_meaning:NNT \l__unravel_head_token \or:
+ {
+ \msg_error:nn { unravel } { extra-or }
+ \__unravel_cond_false_loop:n {#1}
+ }
+ }
+ {
+ \token_if_eq_meaning:NNT \l__unravel_head_token \fi:
+ { \__unravel_cond_pop: }
+ \__unravel_cond_false_loop:n {#1}
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_cond_false_common:
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \fi:
+ { \__unravel_cond_pop: }
+ { \int_gset:Nn \g__unravel_if_limit_int { 2 } } % wait for fi
+ }
+\cs_new_protected:Npn \__unravel_test_two_vals:N #1
+ {
+ #1
+ \__unravel_get_x_non_blank:
+ \tl_if_in:nVF { < = > } \l__unravel_head_tl
+ {
+ \msg_error:nn { unravel } { missing-equals }
+ \__unravel_back_input:
+ \tl_set:Nn \l__unravel_head_tl { = }
+ }
+ \__unravel_prev_input:V \l__unravel_head_tl
+ #1
+ }
+\cs_new_protected_nopar:Npn \__unravel_test_two_chars:
+ {
+ \__unravel_test_two_chars_aux:
+ \__unravel_prev_input:V \l__unravel_head_tl
+ \__unravel_test_two_chars_aux:
+ \__unravel_prev_input:V \l__unravel_head_tl
+ }
+\cs_new_protected_nopar:Npn \__unravel_test_two_chars_aux:
+ {
+ \__unravel_get_x_next:
+ \gtl_if_tl:NF \l__unravel_head_gtl
+ {
+ \tl_set:Nx \l__unravel_head_tl
+ {
+ \gtl_if_head_is_group_begin:NTF \l__unravel_head_gtl
+ { \c_group_begin_token } { \c_group_end_token }
+ }
+ }
+ \tl_put_left:Nn \l__unravel_head_tl { \exp_not:N } % ^^A todo: prettify.
+ }
+\cs_new_protected:Npn \__unravel_test_ifx:n #1
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \__unravel_get_next:
+ \gtl_set_eq:NN \l__unravel_tmpb_gtl \l__unravel_head_gtl
+ \__unravel_get_next:
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_tmpa_tl
+ \__unravel_set_action_text:x
+ {
+ Compare:~ \tl_to_str:N \l__unravel_tmpa_tl
+ \gtl_to_str:N \l__unravel_tmpb_gtl
+ \gtl_to_str:N \l__unravel_head_gtl
+ }
+ \gtl_head_do:NN \l__unravel_tmpb_gtl \__unravel_test_ifx_aux:w
+ \exp_after:wN \__unravel_cond_true:n
+ \else:
+ \exp_after:wN \__unravel_cond_false:n
+ \fi:
+ {#1}
+ }
+\cs_new_nopar:Npn \__unravel_test_ifx_aux:w
+ { \gtl_head_do:NN \l__unravel_head_gtl \l__unravel_tmpa_tl }
+\cs_new_protected:Npn \__unravel_test_case:n #1
+ {
+ \seq_gput_right:NV \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:
+ \bool_if:NT \l__unravel_debug_bool { \iow_term:n { {\ifcase level~#1} } }
+ \__unravel_scan_int:
+ \seq_get_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \tl_set:Nx \l__unravel_head_tl { \tl_tail:N \l__unravel_head_tl }
+ % ^^A does text_case_aux use prev_input_seq?
+ \exp_args:No \__unravel_test_case_aux:nn { \l__unravel_head_tl } {#1}
+ \seq_gpop_right:NN \g__unravel_prev_input_seq \l__unravel_head_tl
+ \__unravel_print_action:x { \tl_to_str:N \l__unravel_head_tl }
+ }
+\cs_new_protected:Npn \__unravel_test_case_aux:nn #1#2
+ {
+ \int_compare:nNnTF {#1} = \c_zero
+ { \__unravel_change_if_limit:nn { 4 } {#2} }
+ {
+ \__unravel_pass_text:
+ \int_compare:nNnTF \g__unravel_if_depth_int = {#2}
+ {
+ \token_if_eq_meaning:NNTF \l__unravel_head_token \or:
+ {
+ \exp_args:Nf \__unravel_test_case_aux:nn
+ { \int_eval:n { #1 - 1 } } {#2}
+ }
+ { \__unravel_cond_false_common: }
+ }
+ {
+ \token_if_eq_meaning:NNT \l__unravel_head_token \fi:
+ { \__unravel_cond_pop: }
+ \__unravel_test_case_aux:nn {#1} {#2}
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_test_ifdefined:
+ {
+ \__unravel_input_if_empty:TF
+ { \__unravel_pass_text_empty: }
+ {
+ \__unravel_input_gpop:N \l__unravel_tmpb_gtl
+ \__unravel_set_action_text:x
+ {
+ Conditional:~ \tl_to_str:N \l__unravel_head_tl
+ \gtl_to_str:N \l__unravel_tmpb_gtl
+ }
+ \__unravel_prev_input:x
+ {
+ \gtl_if_tl:NTF \l__unravel_tmpb_gtl
+ { \gtl_head:N \l__unravel_tmpb_gtl }
+ { \gtl_to_str:N \l__unravel_tmpb_gtl }
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_test_ifcsname:
+ {
+ \__unravel_csname_loop:
+ \__unravel_prev_input:V \l__unravel_head_tl
+ }
+\__unravel_new_tex_expandable:nn { fi_or_else } % 108
+ {
+ \int_compare:nNnTF \l__unravel_head_char_int > \g__unravel_if_limit_int
+ {
+ \int_compare:nNnTF \g__unravel_if_limit_int = \c_zero
+ {
+ \int_compare:nNnTF \g__unravel_if_depth_int = \c_zero
+ { \msg_error:nn { unravel } { extra-fi-or-else } }
+ { \__unravel_insert_relax: }
+ }
+ { \msg_error:nn { unravel } { extra-fi-or-else } }
+ }
+ {
+ \__unravel_set_action_text:
+ \int_compare:nNnF \l__unravel_head_char_int = \c_two
+ {
+ \__unravel_fi_or_else_loop:
+ \__unravel_set_action_text:x
+ {
+ \g__unravel_action_text_str \c_space_tl
+ => ~ skipped ~ to ~ \tl_to_str:N \l__unravel_head_tl
+ }
+ }
+ % ^^A todo: in this print_action the token itself is missing.
+ \__unravel_print_action:
+ \__unravel_cond_pop:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_fi_or_else_loop:
+ {
+ \int_compare:nNnF \l__unravel_head_char_int = \c_two
+ {
+ \__unravel_pass_text:
+ \__unravel_set_cmd:
+ \__unravel_fi_or_else_loop:
+ }
+ }
+\cs_new_eq:NN \__unravel_print:n \iow_term:n
+\cs_generate_variant:Nn \__unravel_print:n { x }
+\cs_new_protected:Npn \__unravel_print_message:nn #1 #2
+ { \iow_wrap:nnnN { #1 #2 } { #1 } { } \__unravel_print:n }
+\cs_new_protected:Npn \__unravel_set_action_text:x #1
+ {
+ \group_begin:
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \str_gset:Nx \g__unravel_action_text_str {#1}
+ \group_end:
+ }
+\cs_new_protected_nopar:Npn \__unravel_set_action_text:
+ {
+ \__unravel_set_action_text:x
+ {
+ \tl_to_str:N \l__unravel_head_tl
+ \tl_if_single_token:VT \l__unravel_head_tl
+ { = ~ \exp_after:wN \token_to_meaning:N \l__unravel_head_tl }
+ }
+ }
+\cs_new_protected:Npn \__unravel_print_state:
+ {
+ \group_begin:
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \int_compare:nNnT \g__unravel_noise_int > \c_zero
+ {
+ \exp_args:Nx \__unravel_print_state_output:n
+ { \gtl_to_str:N \g__unravel_output_gtl }
+ \seq_set_map:NNn \l__unravel_tmpa_seq \g__unravel_prev_input_seq
+ { \__unravel_to_str:n {##1} }
+ \seq_remove_all:Nn \l__unravel_tmpa_seq { }
+ \exp_args:Nx \__unravel_print_state_prev:n
+ { \seq_use:Nn \l__unravel_tmpa_seq { \\ } }
+ \exp_args:Nx \__unravel_print_state_input:n
+ { \__unravel_input_to_str: }
+ }
+ \group_end:
+ \__unravel_prompt:
+ }
+\cs_new_protected:Npn \__unravel_print_state_output:n #1
+ {
+ \tl_if_empty:nF {#1}
+ {
+ \int_set:Nn \l__unravel_print_int { \str_count:n {#1} }
+ \__unravel_print_message:nn { <| ~ }
+ {
+ \int_compare:nNnTF
+ \l__unravel_print_int > \g__unravel_max_output_int
+ {
+ (
+ \int_eval:n
+ {
+ \l__unravel_print_int
+ - \g__unravel_max_output_int + 14
+ } ~
+ chars
+ )~
+ ...
+ \str_substr:nnn {#1}
+ { \l__unravel_print_int - \g__unravel_max_output_int + 15 }
+ { \l__unravel_print_int }
+ }
+ {#1}
+ }
+ }
+ }
+\cs_new_protected:Npn \__unravel_print_state_prev:n #1
+ {
+ % \int_set:Nn \l__unravel_print_int { \str_count:n {#1} }
+ \__unravel_print_message:nn { || ~ } {#1}
+ % {
+ % \int_compare:nNnTF \l__unravel_print_int > \g__unravel_max_prev_int
+ % {
+ % (
+ % \int_eval:n
+ % { \l__unravel_print_int - \g__unravel_max_prev_int + 14 } ~
+ % chars
+ % )~
+ % ...
+ % \str_substr:nnn {#1}
+ % { \l__unravel_print_int - \g__unravel_max_prev_int + 15 }
+ % { \l__unravel_print_int }
+ % }
+ % {#1}
+ % }
+ }
+\cs_new_protected:Npn \__unravel_print_state_input:n #1
+ {
+ \int_set:Nn \l__unravel_print_int { \str_count:n {#1} }
+ \__unravel_print_message:nn { |> ~ }
+ {
+ \int_compare:nNnTF \l__unravel_print_int > \g__unravel_max_input_int
+ {
+ \str_substr:nnn {#1} { 1 } { \g__unravel_max_input_int - 14 }
+ ...~
+ (
+ \int_eval:n
+ { \l__unravel_print_int - \g__unravel_max_input_int + 14 } ~
+ chars
+ )
+ }
+ {#1}
+ }
+ }
+\cs_new_protected:Npn \__unravel_print_meaning:
+ {
+ \__unravel_input_if_empty:TF
+ { \__unravel_print_message:nn { } { Empty~input! } }
+ {
+ \__unravel_input_get:N \l__unravel_tmpb_gtl
+ \__unravel_print_message:nn { }
+ {
+ \gtl_head_do:NN \l__unravel_tmpb_gtl \token_to_str:N
+ = \gtl_head_do:NN \l__unravel_tmpb_gtl \token_to_meaning:N
+ }
+ }
+ }
+\cs_new_protected:Npn \__unravel_print_action:
+ {
+ \int_gincr:N \g__unravel_step_int
+ \__unravel_print_message:nn { }
+ {
+ % \\
+ [=====~ Step~ \int_use:N \g__unravel_step_int \ =====]~
+ \int_compare:nNnTF
+ { \str_count:N \g__unravel_action_text_str }
+ > { \g__unravel_max_action_int }
+ {
+ \str_substr:Nnn \g__unravel_action_text_str
+ { 1 } { \g__unravel_max_action_int - 3 } ...
+ }
+ { \g__unravel_action_text_str }
+ % \\
+ % \ \ < \int_use:N \g__unravel_input_int > % ^^A todo: remove
+ % \ < \seq_count:N \g__unravel_prev_input_seq > % ^^A todo: remove
+ }
+ \__unravel_print_state:
+ }
+\cs_new_protected:Npn \__unravel_print_action:x #1
+ {
+ \__unravel_set_action_text:x {#1}
+ \__unravel_print_action:
+ }
+\cs_new_protected:Npn \__unravel_print_gtl_action:N #1
+ {
+ \__unravel_print_action:x { \gtl_to_str:N #1 }
+ }
+\cs_new_eq:NN \__unravel_print_done:x \__unravel_print_action:x
+\cs_new_protected_nopar:Npn \__unravel_print_assigned_token:
+ {
+ \__unravel_after_assignment: % ^^A todo: simplify
+ \__unravel_print_action:x
+ {
+ Set~ \exp_after:wN \token_to_str:N \l__unravel_defined_tl
+ = \exp_after:wN \token_to_meaning:N \l__unravel_defined_tl
+ }
+ \__unravel_omit_after_assignment:w
+ }
+\cs_new_protected_nopar:Npn \__unravel_print_assigned_register:
+ {
+ \__unravel_after_assignment: % ^^A todo: simplify
+ \__unravel_print_action:x
+ {
+ Set~ \exp_after:wN \token_to_str:N \l__unravel_defined_tl
+ \tl_if_single:NT \l__unravel_defined_tl
+ { ( \exp_after:wN \token_to_meaning:N \l__unravel_defined_tl ) }
+ = \exp_after:wN \tex_the:D \l__unravel_defined_tl
+ }
+ \__unravel_omit_after_assignment:w
+ }
+\cs_new_protected_nopar:Npn \__unravel_print_welcome:
+ {
+ \__unravel_print_message:nn { }
+ {
+ \\
+ ========~ Welcome~ to~ the~ unravel~ package~ ========\\
+ \iow_indent:n
+ {
+ "<|"~ denotes~ the~ output~ to~ TeX's~ stomach. \\
+ "||"~ denotes~ tokens~ waiting~ to~ be~ used. \\
+ "|>"~ denotes~ tokens~ that~ we~ will~ act~ on. \\
+ Press~<enter>~to~continue;~'h'~<enter>~for~help. \\
+ }
+ }
+ \__unravel_print_state:
+ }
+\cs_new_protected_nopar:Npn \__unravel_print_outcome:
+ {
+ % \int_gset_eq:NN \g__unravel_max_input_int \c_max_int
+ % \int_gset_eq:NN \g__unravel_max_prev_int \c_max_int
+ % \int_gset_eq:NN \g__unravel_max_output_int \c_max_int
+ % \__unravel_print_state:
+ \__unravel_print_message:nn { } { [=====~The~end!~=====] \\ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_prompt:
+ {
+ \int_gdecr:N \g__unravel_nonstop_int
+ \int_compare:nNnF \g__unravel_nonstop_int > \c_zero
+ {
+ \group_begin:
+ \int_set_eq:NN \tex_escapechar:D \c_minus_one
+ \int_set_eq:NN \tex_endlinechar:D \c_minus_one
+ \tl_use:N \g__unravel_prompt_before_tl
+ \tl_gclear:N \g__unravel_prompt_before_tl
+ \__unravel_prompt_aux:
+ \group_end:
+ }
+ }
+\cs_new_protected_nopar:Npn \__unravel_prompt_aux:
+ {
+ \ior_get_str:Nc \g__unravel_prompt_ior { Your~input }
+ \exp_args:Nv \__unravel_prompt_treat:n { Your~input }
+ }
+\cs_new_protected:Npn \__unravel_prompt_treat:n #1
+ {
+ \tl_if_empty:nF {#1}
+ {
+ \exp_args:Nx \str_case:nnF { \tl_head:n {#1} }
+ {
+ { m } { \__unravel_print_meaning: \__unravel_prompt_aux: }
+ { q }
+ {
+ \int_gset_eq:NN \g__unravel_noise_int \c_minus_one
+ \int_gzero:N \g__unravel_nonstop_int
+ }
+ { x }
+ {
+ \group_end:
+ \exp_after:wN \__unravel_exit:w \__unravel_exit:w
+ }
+ { X } { \tex_batchmode:D \tex_end:D }
+ { s } { \__unravel_prompt_scan_int:nn {#1}
+ \__unravel_prompt_silent_steps:n }
+ { o } { \__unravel_prompt_scan_int:nn {#1}
+ { \int_gset:Nn \g__unravel_noise_int } }
+ { C }
+ {
+ \tl_gset_rescan:Nnx \g__unravel_tmpc_tl
+ { \ExplSyntaxOn } { \tl_tail:n {#1} }
+ \tl_gput_left:Nn \g__unravel_tmpc_tl
+ { \tl_gclear:N \g__unravel_tmpc_tl }
+ \group_insert_after:N \g__unravel_tmpc_tl
+ }
+ }
+ { \__unravel_prompt_help: }
+ }
+ }
+\cs_new_protected:Npn \__unravel_prompt_scan_int:nn #1
+ {
+ \tex_afterassignment:D \__unravel_prompt_scan_int_after:wn
+ \l__unravel_prompt_tmpa_int = 0 \use_none:n #1 \scan_stop:
+ }
+\cs_new_protected:Npn \__unravel_prompt_scan_int_after:wn #1 \scan_stop: #2
+ {
+ #2 \l__unravel_prompt_tmpa_int
+ \tl_if_blank:nF {#1} { \__unravel_prompt_treat:n {#1} }
+ }
+\cs_new_protected:Npn \__unravel_prompt_help:
+ {
+ \__unravel_print:n { "m":~meaning~of~first~token }
+ \__unravel_print:n { "q":~semi-quiet }
+ \__unravel_print:n { "x":~exit~this~instance~of~unravel }
+ \__unravel_print:n { "X":~try~harder~to~exit }
+ \__unravel_print:n { "s<num>":~do~<num>~steps~silently }
+ \__unravel_print:n
+ { "o<num>":~0~=>~only~log~not~online,~1~=>~both,~-1~=>~neither.}
+ \__unravel_print:n { "C<code>":~run~some~code~immediately }
+ \__unravel_prompt_aux:
+ }
+\cs_new_protected:Npn \__unravel_prompt_silent_steps:n #1
+ {
+ \int_gset_eq:NN \g__unravel_noise_int \c_minus_one
+ \tl_gset:Nn \g__unravel_prompt_before_tl
+ { \int_gset_eq:NN \g__unravel_noise_int \c_one }
+ \int_gset:Nn \g__unravel_nonstop_int {#1}
+ }
+\cs_new_protected:Npn \unravel #1 { \__unravel_unravel:n {#1} }
+\cs_new_protected_nopar:Npn \UnravelDebug
+ {
+ \bool_set_true:N \l__unravel_debug_bool
+ }
+\cs_new_protected:Npn \__unravel_unravel:n #1
+ {
+ \int_gzero:N \g__unravel_step_int
+ \__unravel_input_gset:n {#1}
+ \seq_gclear:N \g__unravel_prev_input_seq
+ \gtl_gclear:N \g__unravel_output_gtl
+ \tl_gclear:N \g__unravel_if_limit_tl
+ \int_gzero:N \g__unravel_if_limit_int
+ \int_gzero:N \g__unravel_if_depth_int
+ \gtl_gclear:N \g__unravel_after_assignment_gtl
+ \bool_gset_true:N \g__unravel_set_box_allowed_bool
+ \bool_gset_false:N \g__unravel_name_in_progress_bool
+ \cs_gset_eq:NN \g__unravel_prompt_ior \c_minus_one % ^^A todo:?
+ \__unravel_print_welcome:
+ \__unravel_main_loop:
+ \__unravel_exit_point:
+ \__unravel_print_outcome:
+ \bool_if:nTF
+ {
+ \tl_if_empty_p:N \g__unravel_if_limit_tl
+ && \int_compare_p:nNn \g__unravel_if_limit_int = \c_zero
+ && \int_compare_p:nNn \g__unravel_if_depth_int = \c_zero
+ && \seq_if_empty_p:N \g__unravel_prev_input_seq
+ }
+ { \__unravel_input_if_empty:TF { } { \__unravel_bad_finish: } }
+ { \__unravel_bad_finish: }
+ \__unravel_exit_point:
+ }
+\cs_new_protected_nopar:Npn \__unravel_bad_finish:
+ {
+ \msg_error:nnx { unravel } { internal }
+ { the-last-unravel-finished-badly }
+ }
+\cs_new_protected_nopar:Npn \__unravel_main_loop:
+ {
+ \__unravel_get_x_next:
+ \__unravel_set_cmd:
+ \__unravel_do_step:
+ \__unravel_main_loop:
+ }
+\msg_new:nnn { unravel } { unknown-primitive }
+ { Internal~error:~the~primitive~'#1'~is~not~known. }
+\msg_new:nnn { unravel } { extra-fi-or-else }
+ { Extra~fi,~or,~or~else. }
+\msg_new:nnn { unravel } { missing-lbrace }
+ { Missing~left~brace~inserted. }
+\msg_new:nnn { unravel } { missing-dollar }
+ { Missing~dollar~inserted. }
+\msg_new:nnn { unravel } { unknown-expandable }
+ { Internal~error:~the~expandable~command~'#1'~is~not~known. }
+\msg_new:nnn { unravel } { missing-font-id }
+ { Missing~font~identifier.~\iow_char:N\\nullfont~inserted. }
+\msg_new:nnn { unravel } { missing-rparen }
+ { Missing~right~parenthesis~inserted~for~expression. }
+\msg_new:nnn { unravel } { incompatible-units }
+ { Mu~glue/dimen~used~as~a~normal~glue/dimen~or~vice-versa. }
+\msg_new:nnn { unravel } { missing-mudim }
+ { Missing~mu~unit. }
+\msg_new:nnn { unravel } { missing-cs }
+ { Missing~control~sequence.~\iow_char:N\\inaccessible~inserted. }
+\msg_new:nnn { unravel } { missing-box }
+ { Missing~box~inserted. }
+\msg_new:nnn { unravel } { missing-to }
+ { Missing~keyword~'to'~inserted. }
+\msg_new:nnn { unravel } { improper-leaders }
+ { Leaders~not~followed~by~proper~glue. }
+\msg_new:nnn { unravel } { extra-close }
+ { Extra~right~brace~or~\iow_char:N\\endgroup. }
+\msg_new:nnn { unravel } { off-save }
+ { Something~is~wrong~with~groups. }
+\msg_new:nnn { unravel } { hrule-bad-mode }
+ { \iow_char\\hrule~used~in~wrong~mode. }
+\msg_new:nnn { unravel } { invalid-mode }
+ { Invalid~mode~for~this~command. }
+\msg_new:nnn { unravel } { color-stack-action-missing }
+ { Missing~color~stack~action. }
+\msg_new:nnn { unravel } { action-type-missing }
+ { Missing~action~type. }
+\msg_new:nnn { unravel } { identifier-type-missing }
+ { Missing~identifier~type. }
+\msg_new:nnn { unravel } { destination-type-missing }
+ { Missing~destination~type. }
+\msg_new:nnn { unravel } { erroneous-prefixes }
+ { Prefixes~appplied~to~non-assignment~command. }
+\msg_new:nnn { unravel } { improper-setbox }
+ { \iow_char:N\\setbox~while~fetching~base~of~an~accent. }
+\msg_new:nnn { unravel } { after-advance }
+ {
+ Missing~register~after~\iow_char:N\\advance,~
+ \iow_char:N\\multiply,~or~\iow_char:N\\divide.
+ }
+\msg_new:nnn { unravel } { bad-unless }
+ { \iow_char:N\\unless~not~followed~by~conditional. }
+\msg_new:nnn { unravel } { missing-endcsname }
+ { Missing~\iow_char:N\\endcsname~inserted. }
+\msg_new:nnn { unravel } { runaway-if }
+ { Runaway~\iow_char:N\\if... }
+\msg_new:nnn { unravel } { extra-or }
+ { Extra~\iow_char:N\\or. }
+\msg_new:nnn { unravel } { missing-equals }
+ { Missing~equals~for~\iow_char:N\\ifnum~or~\iow_char:N\\ifdim. }
+\msg_new:nnn { unravel } { internal }
+ { Internal~error:~'#1'.~\ Please report. }
+\msg_new:nnn { unravel } { not-implemented }
+ { The~following~feature~is~not~implemented:~'#1'. }
+%%
+%%
+%% End of file `unravel.sty'.