%%
%% This is file `scontents-code.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% scontents.dtx  (with options: `core')
%% 
%% Copyright (C) 2019-2025 by Pablo González L <pablgonz@educarchile.cl>
%% 
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
%% your option) any later version. The latest version of this license is in
%% 
%%  https://www.latex-project.org/lppl.txt
%% 
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%% 
%% This work is "maintained" (as per the LPPL maintenance status)
%% by Pablo González Luengo.
%% 
%% This work consists of the files scontents.dtx and
%%                                 scontents.ins,
%% and the derived files           scontents.sty,
%%                                 scontents.tex,
%%                                 t-scontents.mkiv and
%%                                 scontents-code.tex.
%% 
\def\ScontentsCoreFileDate{2025-05-15}%
\begingroup
  \catcode32=10
  \endlinechar=32
  \def\next{\endgroup}%
  \expandafter\ifx\csname PackageError\endcsname\relax
    \begingroup
      \def\next{\endgroup\endgroup}%
      \def\PackageError#1#2#3%
        {%
          \endgroup
          \errhelp{#3}%
          \errmessage{#1 Error: #2!}%
        }%
  \fi
  \expandafter\ifx\csname ScontentsFileDate\endcsname\relax
    \def\next
      {%
        \PackageError{scontents}{No scontents loader detected}
          {%
            You have attempted to use the scontents code directly rather than using
            the correct loader. Loading of scontents will abort.
          }%
        \endgroup
        \endinput
      }%
  \else
    \ifx\ScontentsFileDate\ScontentsCoreFileDate
    \else
      \def\next
        {%
          \PackageError{scontents}{Mismatched scontents files detected}
            {%
              You have attempted to load scontents with mismatched files:
              probably you have one or more files 'locally installed' which
              are in conflict. Loading of scontents will abort.
            }%
          \endgroup
          \endinput
        }%
    \fi
  \fi
\next
\keys_define:nn { scontents }
  {
    store-env .tl_set:N         = \l__scontents_name_seq_env_tl,
    store-env .initial:n        = contents,
    store-env .value_required:n = true,
    store-cmd .tl_set:N         = \l__scontents_name_seq_cmd_tl,
    store-cmd .initial:n        = contents,
    store-cmd .value_required:n = true,
    verb-font .tl_set:N         = \l__scontents_verb_font_tl,
    verb-font .value_required:n = true,
    print-env .bool_set:N       = \l__scontents_print_env_bool,
    print-env .initial:n        = false,
    print-env .default:n        = true,
    print-cmd .bool_set:N       = \l__scontents_print_cmd_bool,
    print-cmd .initial:n        = false,
    print-cmd .default:n        = true,
    force-eol .bool_set:N       = \l__scontents_forced_eol_bool,
    force-eol .initial:n        = false,
    force-eol .default:n        = true,
    overwrite .bool_set:N       = \l__scontents_overwrite_bool,
    overwrite .initial:n        = false,
    overwrite .default:n        = true,
    width-tab .int_set:N        = \l__scontents_tab_width_int,
    width-tab .initial:n        = 1,
    width-tab .value_required:n = true,
    print-all .meta:n           = { print-env = #1, print-cmd = #1 },
    print-all .default:n        = true,
    store-all .meta:n           = { store-env = #1, store-cmd = #1 },
    store-all .value_required:n = true
  }
\tl_new:N  \l__scontents_save_every_body_lines_tl
\tl_new:N  \l__scontents_processed_body_lines_tl
\tl_new:N  \l__scontents_environment_keys_tl
\int_new:N \l__scontents_nesting_env_int
\int_new:N \l__scontents_nesting_aux_int
\tl_new:N \l__scontents_cmd_name_tl
\tl_new:N \l__scontents_Scontents_arg_tl
\tl_new:N \l__scontents_foreachsc_arg_tl
\tl_new:N \l__scontents_typestored_arg_tl
\tl_new:N \l__scontents_meaningsc_arg_tl
\tl_new:N  \l__scontents_mergesc_arg_tl
\tl_new:N  \l__scontents_mergesc_keys_tl
\str_new:N \l__scontents_current_seq_name_str
\tl_new:N   \l__scontents_file_name_tl
\iow_new:N  \l__scontents_file_write_iow
\bool_new:N \l__scontents_writing_bool
\bool_new:N \l__scontents_storing_bool
\bool_set_true:N \l__scontents_storing_bool
\bool_new:N \l__scontents_writable_bool
\seq_new:N  \l__scontents_foreach_print_seq
\tl_new:N   \g__scontents_foreach_exec_tl
\tl_new:N   \l__scontents_foreach_before_tl
\bool_new:N \l__scontents_foreach_before_bool
\tl_new:N   \l__scontents_foreach_after_tl
\bool_new:N \l__scontents_foreach_after_bool
\int_new:N  \l__scontents_foreach_stop_int
\bool_new:N \l__scontents_foreach_stop_bool
\bool_new:N \l__scontents_foreach_wrapper_bool
\seq_new:N \l__scontents_seq_item_seq
\seq_new:c { g__scontents_name_sc!internal_seq }
\tl_new:N \g__scontents_last_stored_tl
\str_const:Ne \c__scontents_hidden_space_str
  { \c_percent_str \c_circumflex_str \c_circumflex_str A scheol \c_percent_str }
\int_new:N  \l__scontents_save_sf_int
\skip_new:N \l__scontents_save_skip
\quark_new:N \q__scontents_stop
\quark_new:N \q__scontents_mark
\scan_new:N  \s__scontents_stop
\scan_new:N  \s__scontents_mark
\cs_new_protected:Npn \__scontents_rescan_tokens:n #1 { \tex_scantokens:D {#1} }
\cs_generate_variant:Nn \__scontents_rescan_tokens:n { V, e }
\prg_generate_conditional_variant:Nnn \tl_if_empty:n { f } { p, TF }
\cs_new:Npn \__scontents_use_delimit_by_s_stop:nw #1 \s__scontents_stop {#1}
\cs_new:Npn \__scontents_use_i_delimit_by_s_stop:nw #1 #2 \s__scontents_stop {#1}
\cs_new:Npn \__scontents_use_none_delimit_by_s_stop:w #1 \s__scontents_stop { }
\cs_new:Npn \__scontents_use_none_delimit_by_q_stop:w #1 \q__scontents_stop { }
\prg_new_protected_conditional:Npnn \__scontents_tl_if_head_is_q_mark:n #1
  { T, F, TF }
  {
    \exp_after:wN \if_meaning:w
      \exp_after:wN
        \q__scontents_mark \__scontents_use_i_delimit_by_s_stop:nw #1 ? \s__scontents_stop
      \prg_return_true:
    \else:
      \prg_return_false:
    \fi:
  }
\prg_new_protected_conditional:Npnn \__scontents_file_if_writable:n #1 { T, F, TF }
  {
    \bool_if:NTF \l__scontents_writing_bool
      {
        \file_if_exist:nTF {#1}
          {
            \bool_if:NTF \l__scontents_overwrite_bool
              {
                \msg_warning:nne { scontents } { overwrite-file } {#1}
                \prg_return_true:
              }
              {
                \msg_warning:nne { scontents } { not-writing } {#1}
                \prg_return_false:
              }
          }
          {
            \msg_warning:nne { scontents } { writing-file } {#1}
            \prg_return_true:
          }
      }
      { \prg_return_false: }
  }
\cs_new_protected:Npn \__scontents_file_write_cmd:nn #1#2
  {
    \__scontents_file_if_writable:nT {#1}
      {
        \iow_open:Nn \l__scontents_file_write_iow {#1}
        \iow_now:Nn  \l__scontents_file_write_iow {#2}
        \iow_close:N \l__scontents_file_write_iow
      }
  }
\cs_generate_variant:Nn \__scontents_file_write_cmd:nn { VV }
\cs_new:Ne \__scontents_tab: { \c_space_tl }
\cs_new:Nn \__scontents_par: { ^^J ^^J }
\cs_new:Nn \__scontents_tabs_to_spaces:
  { \prg_replicate:nn { \l__scontents_tab_width_int } { ~ } }
\cs_new_protected:Npn \__scontents_do_noligs:N #1
  {
    \char_set_catcode_active:N #1
    \cs_set:cpe { __scontents_active_char_ \token_to_str:N #1 : }
      {
        \mode_leave_vertical:
        \tex_kern:D \c_zero_dim
        \tex_char:D `\exp_not:N #1
      }
    \char_set_active_eq:Nc #1 { __scontents_active_char_ \token_to_str:N #1 : }
  }
\cs_new_protected:Npn \__scontents_set_active_eq:NN #1
  {
    \char_set_catcode_active:N #1
    \char_set_active_eq:NN #1
  }
\group_begin:
  \char_set_catcode_active:N \*
  \cs_new_protected:Nn \__scontents_make_control_chars_active:
    {
      \__scontents_plain_disable_outer_par:
      \__scontents_set_active_eq:NN \^^I \__scontents_tab:
      \__scontents_set_active_eq:NN \^^L \__scontents_par:
      \__scontents_set_active_eq:NN \^^M \__scontents_ret:w
    }
\group_end:
\cs_new_protected:Nn \__scontents_bsphack:
  {
    \scan_stop:
    \mode_if_horizontal:T
      {
        \skip_set_eq:NN \l__scontents_save_skip \tex_lastskip:D
        \int_set_eq:NN \l__scontents_save_sf_int \tex_spacefactor:D
      }
  }
\cs_new_protected:Nn \__scontents_esphack:
  {
    \scan_stop:
    \mode_if_horizontal:T
      {
        \int_set_eq:NN \tex_spacefactor:D \l__scontents_save_sf_int
        \dim_compare:nNnT { \l__scontents_save_skip } > { \c_zero_skip }
          {
            \skip_if_eq:nnT { \tex_lastskip:D } { \c_zero_skip }
              {
                \nobreak
                \skip_horizontal:n { \c_zero_skip }
              }
            \tex_ignorespaces:D
          }
      }
  }
\keys_define:nn { scontents / scontents }
  {
    write-env .code:n           = {
                                    \bool_set_true:N \l__scontents_storing_bool
                                    \bool_set_true:N \l__scontents_writing_bool
                                    \tl_set:Nn \l__scontents_file_name_tl {#1}
                                  },
    write-out .code:n           = {
                                    \bool_set_false:N \l__scontents_storing_bool
                                    \bool_set_true:N  \l__scontents_writing_bool
                                    \tl_set:Nn \l__scontents_file_name_tl {#1}
                                  },
    write-env .value_required:n = true,
    write-out .value_required:n = true,
    print-env .meta:nn          = { scontents } { print-env = #1 },
    print-env .default:n        = true,
    store-env .meta:nn          = { scontents } { store-env = #1 },
    force-eol .meta:nn          = { scontents } { force-eol = #1 },
    force-eol .default:n        = true,
    overwrite .meta:nn          = { scontents } { overwrite = #1 },
    overwrite .default:n        = true,
    unknown   .code:n           = { \__scontents_unknown_keys_env:n {#1} },
  }
\cs_new_protected:Npn \__scontents_unknown_keys_env:n #1
  { \exp_args:NV \__scontents_unknown_keys_env:nn \l_keys_key_str {#1} }
\cs_new_protected:Npn \__scontents_unknown_keys_env:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      { \msg_error:nnn { scontents } { env-key-unknown } {#1} }
      { \msg_error:nnnn { scontents } { env-key-value-unknown } {#1} {#2} }
  }
\keys_define:nn { scontents / Scontents }
  {
    write-cmd .code:n           = {
                                    \bool_set_true:N \l__scontents_storing_bool
                                    \bool_set_true:N \l__scontents_writing_bool
                                    \tl_set:Nn \l__scontents_file_name_tl {#1}
                                  },
    write-out .code:n           = {
                                    \bool_set_false:N \l__scontents_storing_bool
                                    \bool_set_true:N  \l__scontents_writing_bool
                                    \tl_set:Nn \l__scontents_file_name_tl {#1}
                                  },
    write-cmd .value_required:n = true,
    write-out .value_required:n = true,
    print-cmd .meta:nn          = { scontents } { print-cmd = #1 },
    print-cmd .default:n        = true,
    store-cmd .meta:nn          = { scontents } { store-cmd = #1 },
    force-eol .meta:nn          = { scontents } { force-eol = #1 },
    force-eol .default:n        = true,
    overwrite .meta:nn          = { scontents } { overwrite = #1 },
    overwrite .default:n        = true,
    unknown   .code:n           = { \__scontents_unknown_keys_cmd:n {#1} },
  }
\keys_define:nn { scontents / foreachsc }
  {
    before  .code:n           = {
                                  \bool_set_true:N \l__scontents_foreach_before_bool
                                  \tl_set:Nn \l__scontents_foreach_before_tl {#1}
                                },
    before  .value_required:n = true,
    after   .code:n           = {
                                  \bool_set_true:N \l__scontents_foreach_after_bool
                                  \tl_set:Nn \l__scontents_foreach_after_tl {#1}
                                },
    after   .value_required:n = true,
    start   .int_set:N        = \l__scontents_foreach_start_int,
    start   .value_required:n = true,
    start   .initial:n        = 1,
    stop    .code:n           = {
                                  \bool_set_true:N \l__scontents_foreach_stop_bool
                                  \int_set:Nn \l__scontents_foreach_stop_int {#1}
                                },
    stop    .value_required:n = true,
    step    .int_set:N        = \l__scontents_foreach_step_int,
    step    .value_required:n = true,
    step    .initial:n        = 1,
    wrapper .code:n           = {
                                  \bool_set_true:N \l__scontents_foreach_wrapper_bool
                                  \cs_set_protected:Npn
                                  \__scontents_foreach_wrapper:n ##1 {#1}
                                },
    wrapper .value_required:n = true,
    sep     .tl_set:N         = \l__scontents_foreach_sep_tl,
    sep     .initial:n        = { },
    sep     .value_required:n = true,
    unknown .code:n           = { \__scontents_unknown_keys_cmd:n {#1} },
  }
\cs_new_protected:Npn \__scontents_unknown_keys_cmd:n #1
  { \exp_args:NV \__scontents_unknown_keys_cmd:nn \l_keys_key_str {#1} }
\cs_new_protected:Npn \__scontents_unknown_keys_cmd:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      { \msg_error:nnn { scontents } { cmd-key-unknown } {#1} }
      { \msg_error:nnnn { scontents } { cmd-key-value-unknown } {#1} {#2} }
  }
\keys_define:nn { scontents / typemeaning }
  {
    width-tab .meta:nn    = { scontents } { width-tab = #1 },
    write-out .code:n     = {
                              \bool_set_false:N \l__scontents_storing_bool
                              \bool_set_true:N  \l__scontents_writing_bool
                              \tl_set:Nn \l__scontents_file_name_tl {#1}
                            },
    write-out .value_required:n = true,
    overwrite .meta:nn    = { scontents } { overwrite = #1 },
    overwrite .default:n  = true,
    print-cmd .bool_set:N = \l__scontents_print_verb_style_bool,
    print-cmd .initial:n  = true,
    print-cmd .default:n  = true,
    unknown   .code:n     = { \__scontents_parse_type_meaning_key:n {#1} },
  }
\keys_define:nn { scontents / mergesc }
  {
    typestored .code:n =
      {
        \cs_set_eq:NN \__scontents_mergesc_cmd:nn \__scontents_typestored:nn
      },
    typestored .value_forbidden:n = true,
    meaningsc  .code:n =
      {
        \cs_set_eq:NN \__scontents_mergesc_cmd:nn \__scontents_meaningsc:nn
      },
    meaningsc  .value_forbidden:n = true,
  }
\cs_new_protected:Npn \__scontents_mergesc_cmd:nn #1 #2
  {
    \msg_error:nn { scontents } { mergesc-missing-key }
  }
\cs_new_protected:Npn \__scontents_parse_type_meaning_key:n #1
  { \exp_args:NV \__scontents_parse_type_meaning_key:nn \l_keys_key_str {#1} }
\cs_new_protected:Npn \__scontents_parse_type_meaning_key:nn #1#2
  {
    \tl_if_blank:nTF {#2}
      { \__scontents_parse_type_meaning_range:w #1 - \q__scontents_mark - \s__scontents_mark }
      { \msg_error:nnee { scontents } { cmd-key-value-unknown } {#1} {#2} }
  }
\cs_new_protected:Npn \__scontents_parse_type_meaning_range:w #1 - #2 - #3 \s__scontents_mark
  {
    \__scontents_range_parser:nnen {#1} {#2}
      { \seq_count:c { g__scontents_name_ \l__scontents_current_seq_name_str _seq } }
      { \msg_error:nnn { scontents } { cmd-key-unknown } {#1} }
  }
\cs_new_protected:Npn \__scontents_range_parser:nnnn #1 #2 #3 #4
  {
    \exp_args:Nee \__scontents_range_parser_aux:nnn
      { \str_if_eq:nnTF {#1} { end } {#3} { \exp_not:n {#1} } }
      { \str_if_eq:nnTF {#2} { end } {#3} { \exp_not:n {#2} } }
      { #4 }
  }
\cs_generate_variant:Nn \__scontents_range_parser:nnnn { nnen }
\cs_new_protected:Npn \__scontents_range_parser_aux:nnn #1 #2 #3
  {
    \__scontents_tl_if_head_is_q_mark:nTF {#2}
      {
        \tl_if_empty:fTF { \int_to_roman:n { -0 #1 } }
          { \seq_put_right:Ne \l__scontents_seq_item_seq { \int_eval:n {#1} } }
          { #3 {#1} }
      }
      {
        \bool_lazy_and:nnTF
          { \tl_if_empty_p:f { \int_to_roman:n { -0 #1 } } }
          { \tl_if_empty_p:f { \int_to_roman:n { -0 #2 } } }
          {
            \int_compare:nNnTF {#2} > {#1}
              { \int_step_inline:nnnn {#1} { 1 } {#2} }
              { \int_step_inline:nnnn {#1} { -1 } {#2} }
              { \seq_put_right:Nn \l__scontents_seq_item_seq {##1} }
          }
          { #3 { #1-#2 } }
      }
  }
\cs_new_protected:Npn \__scontents_append_contents:nn #1#2
  {
    \tl_if_blank:nT {#1}
      { \msg_error:nn { scontents } { empty-store-cmd } }
    \seq_if_exist:cF { g__scontents_name_#1_seq }
      { \seq_new:c { g__scontents_name_#1_seq } }
    \seq_gput_right:cn { g__scontents_name_#1_seq } {#2}
  }
\cs_generate_variant:Nn \__scontents_append_contents:nn { Ve }
\cs_new_protected:Npn \__scontents_store_to_seq:NN #1#2
  {
    \tl_log:N #1
    \__scontents_append_contents:Ve #2 { \exp_not:V #1 }
  }
\cs_new_protected:Npn \__scontents_finish_storing:NNN #1 #2 #3
  {
    \bool_if:NT \l__scontents_storing_bool
      {
        \bool_if:NF \l__scontents_forced_eol_bool
          { \tl_put_right:Ne #1 { \c__scontents_hidden_space_str } }
        \__scontents_store_to_seq:NN #1 #2
        \bool_if:NT #3 { \__scontents_lastfrom_seq:V #2 }
      }
  }
\cs_new:Npn \__scontents_getfrom_seq:Nn #1#2
  {
    \seq_if_exist:cTF { g__scontents_name_#2_seq }
      {
        \exp_args:Nf \__scontents_getfrom_seq:nNn
          { \seq_count:c { g__scontents_name_#2_seq } } #1 {#2}
      }
      { \msg_expandable_error:nnn { scontents } { undefined-storage } {#2} }
  }
\cs_new:Npn \__scontents_getfrom_seq:nNn #1 #2 #3
  {
    \seq_map_tokens:Nn #2 { \__scontents_getfrom_seq_aux:nnn {#1} {#3} }
  }
\cs_new:Npn \__scontents_getfrom_seq_aux:nnn #1 #2 #3
  {
    \exp_args:Nnf \use:n { \__scontents_getfrom_seq:nnn {#1} } { \int_eval:n {#3} } {#2}
  }
\cs_new:Npn \__scontents_getfrom_seq:nn #1#2
  {
    \seq_if_exist:cTF { g__scontents_name_#2_seq }
      {
        \exp_args:Nf \__scontents_getfrom_seq:nnn
          { \seq_count:c { g__scontents_name_#2_seq } }
          {#1} {#2}
      }
      { \msg_expandable_error:nnn { scontents } { undefined-storage } {#2} }
  }
\cs_new:Npn \__scontents_getfrom_seq:nnn #1#2#3
  {
    \bool_lazy_or:nnTF
      { \int_compare_p:nNn {#2} = { 0 } }
      { \int_compare_p:nNn { \int_abs:n {#2} } > {#1} }
      { \msg_expandable_error:nnnnn { scontents } { index-out-of-range } {#2} {#3} {#1} }
      { \seq_item:cn { g__scontents_name_#3_seq } {#2} }
  }
\cs_new_protected:Npn \__scontents_lastfrom_seq:n #1
  {
    \tl_gset:Ne \g__scontents_last_stored_tl
      {
        \seq_item:cn { g__scontents_name_#1_seq } { -1 }
      }
    \group_insert_after:N \__scontents_rescan_tokens:V
    \group_insert_after:N \g__scontents_last_stored_tl
    \group_insert_after:N \tl_gclear:N
    \group_insert_after:N \g__scontents_last_stored_tl
  }
\cs_generate_variant:Nn \__scontents_lastfrom_seq:n { V }
\NewDocumentCommand \__scontents_grab_opt_arg:w { r[] }
  {
    \__scontents_grab_opt_arg:n {#1}
  }
\cs_new_protected:Npn \__scontents_grab_opt_arg:n #1
  {
    \tl_if_novalue:nF {#1}
      {
        \tl_set:Nn \l__scontents_environment_keys_tl {#1}
        \__scontents_normalise_line_ends:N \l__scontents_environment_keys_tl
        \keys_set:nV { scontents / scontents } \l__scontents_environment_keys_tl
      }
    \__scontents_start_after_option:w
  }
\group_begin:
  \char_set_catcode_active:N \^^I
  \char_set_catcode_active:N \^^L
  \char_set_catcode_active:N \^^M
  \cs_new_protected:Npn \__scontents_normalise_line_ends:N #1
    { \tl_replace_all:Nnn #1 { ^^M } { ~ } }
  \cs_new_protected:Npn \__scontents_start_environment:w #1 ^^M
    {
      \tl_if_head_is_N_type:nTF {#1}
        {
          \str_if_eq:eeTF { \tl_head:n {#1} } { [ }
            { \__scontents_grab_opt_arg:w #1 ^^M }
            { \__scontents_check_line_process:en { } {#1} }
        }
        { \__scontents_check_line_process:en { } {#1} }
    }
  \cs_new_protected:Npn \__scontents_start_after_option:w #1 ^^M
    { \__scontents_check_line_process:en { [...] } {#1} }
  \cs_new_protected:Npn \__scontents_check_line_process:en #1 #2
    {
      \tl_if_blank:nF {#2}
        {
          \msg_error:nnee { scontents } { junk-after-begin }
            { after~\c_backslash_str begin { \l__scontents_env_name_tl } #1 } {#2}
        }
      \__scontents_make_control_chars_active:
      \__scontents_file_tl_write_start:V \l__scontents_file_name_tl
    }
  \cs_new_protected:Nn \__scontents_stop_environment:
    {
      \__scontents_file_write_stop:N \l__scontents_processed_body_lines_tl
      \bool_lazy_and:nnT
        { \l__scontents_storing_bool }
        { \tl_if_empty_p:N \l__scontents_processed_body_lines_tl }
        {
          \msg_warning:nne { scontents } { empty-environment } { \l__scontents_env_name_tl }
        }
    }
  \cs_new_protected:Npn \__scontents_file_tl_write_start:n #1
    {
      \group_begin:
        \__scontents_file_if_writable:nTF {#1}
          {
            \bool_set_true:N \l__scontents_writable_bool
            \iow_open:Nn \l__scontents_file_write_iow {#1}
          }
          { \bool_set_false:N \l__scontents_writable_bool }
        \tl_clear:N \l__scontents_save_every_body_lines_tl
        \seq_map_function:NN \l_char_special_seq \char_set_catcode_other:N
        \int_step_function:nnnN { 128 } { 1 } { 255 } \char_set_catcode_letter:n
        \cs_set_protected:Npe \__scontents_ret:w ##1 ^^M
          {
            \exp_not:N \__scontents_verb_processor_iterate:w
            ##1 \c__scontents_end_env_tl
                \c__scontents_end_env_tl
                \exp_not:N \q__scontents_stop
          }
        \__scontents_make_control_chars_active:
        \__scontents_ret:w
    }
  \cs_new:Nn \__scontents_setup_verb_processor:
    {
      \use:e
        {
          \cs_set:Npn \exp_not:N \__scontents_verb_processor_iterate:w
            ##1 \c__scontents_end_env_tl
            ##2 \c__scontents_end_env_tl
            ##3 \exp_not:N \q__scontents_stop
        }   { \__scontents_verb_processor_iterate:nnn {##1} {##2} {##3} }
    }
  \cs_new:Npn \__scontents_verb_processor_iterate:nnn #1 #2 #3
    {
      \tl_if_blank:nTF {#3}
        {
          \__scontents_analyse_nesting:n {#1}
          \__scontents_verb_processor_output:n {#1}
        }
        {
          \__scontents_if_nested:TF
            {
              \__scontents_nesting_decr:
              \__scontents_verb_processor_output:e
                { \exp_not:n {#1} \c__scontents_end_env_tl \exp_not:n {#2} }
            }
            {
              \tl_if_blank:nF {#1}
                { \__scontents_verb_processor_output:n {#1} }
              \cs_set_protected:Npe \__scontents_ret:w
                {
                  \__scontents_env_end_function:
                  \bool_lazy_or:nnF
                    { \tl_if_blank_p:n {#2} }
                    { \str_if_eq_p:ee {#2} { \c_percent_str } }
                    {
                      \str_if_eq:VnF \c__scontents_hidden_space_str {#2}
                        {
                          \msg_warning:nnnn { scontents } { rescanning-text }
                            {#2} { \tl_use:N \l__scontents_env_name_tl }
                        }
                      \__scontents_rescan_tokens:n {#2}
                    }
                }
              \char_set_active_eq:NN ^^M \__scontents_ret:w
            }
        }
      ^^M
    }
  \cs_new:Nn \__scontents_env_end_function:
    {
      \__scontents_format_case:nnn
        { \exp_not:N \end { \if_false: } \fi: }
        { \exp_after:wN \exp_not:N \cs:w end }
        { \exp_after:wN \exp_not:N \cs:w stop }
      \tl_use:N \l__scontents_env_name_tl
      \__scontents_format_case:nnn
        { \if_false: { \fi: } }
        { \cs_end: }
        { \cs_end: }
    }
  \cs_new_protected:Npn \__scontents_file_write_stop:N #1
    {
      \bool_if:NT \l__scontents_writable_bool
        { \iow_close:N \l__scontents_file_write_iow }
      \use:e
        {
          \group_end:
          \bool_if:NT \l__scontents_storing_bool
            {
              \tl_set:Nn \exp_not:N #1
                {
                  \exp_args:NV
                    \__scontents_remove_leading_nl:n \l__scontents_save_every_body_lines_tl
                }
            }
        }
    }
  \cs_new:Npn \__scontents_remove_leading_nl:n #1
    {
      \tl_if_head_is_N_type:nTF {#1}
        {
          \exp_args:Nf
            \__scontents_remove_leading_nl:nn
              { \tl_head:n {#1} } {#1}
        }
        { \exp_not:n {#1} }
    }
  \cs_new:Npn \__scontents_remove_leading_nl:nn #1 #2
    {
      \token_if_eq_meaning:NNTF ^^J #1
        { \exp_not:o { \__scontents_remove_leading_nl:w #2 } }
        { \exp_not:n {#2} }
    }
  \cs_new:Npn \__scontents_remove_leading_nl:w ^^J { }
  \cs_new_protected:Npn \__scontents_verb_processor_output:n #1
    {
      \bool_if:NT \l__scontents_writable_bool
        { \iow_now:Nn \l__scontents_file_write_iow {#1} }
      \bool_if:NT \l__scontents_storing_bool
        { \tl_put_right:Nn \l__scontents_save_every_body_lines_tl { ^^J #1 } }
    }
\group_end:
\cs_generate_variant:Nn \__scontents_verb_processor_output:n { e }
\cs_generate_variant:Nn \__scontents_file_tl_write_start:n { V }
\cs_new_protected:Npn \__scontents_analyse_nesting:n #1
  {
    \int_zero:N \l__scontents_nesting_aux_int
    \__scontents_analyse_nesting_format:n {#1}
    \int_compare:nNnT { \l__scontents_nesting_aux_int } > { 1 }
      { \msg_warning:nn { scontents } { multiple-begin } }
  }
\cs_new_protected:Nn \__scontents_nesting_incr:
  {
    \int_incr:N \l__scontents_nesting_env_int
    \int_incr:N \l__scontents_nesting_aux_int
  }
\cs_new_protected:Nn \__scontents_nesting_decr:
  {
    \int_decr:N \l__scontents_nesting_env_int
  }
\prg_new_protected_conditional:Npnn \__scontents_if_nested: { TF }
  {
    \int_compare:nNnTF { \l__scontents_nesting_env_int } > { \c_zero_int }
      { \prg_return_true: }
      { \prg_return_false: }
  }
\use:e
  {
    \cs_new_protected:Npn \exp_not:N \__scontents_analyse_nesting_latex:w #1
      \c_backslash_str begin \c_left_brace_str #2 \c_right_brace_str
  }   {
        \__scontents_tl_if_head_is_q_mark:nTF {#2}
          { \__scontents_use_none_delimit_by_q_stop:w }
          {
            \str_if_eq:VnT \l__scontents_env_name_tl {#2}
              { \__scontents_nesting_incr: }
            \__scontents_analyse_nesting_latex:w
          }
      }
\cs_new_protected:Npe \__scontents_analyse_nesting_latex:n #1
  {
    \__scontents_analyse_nesting_latex:w #1
      \c_backslash_str begin
        \c_left_brace_str \exp_not:N \q__scontents_mark \c_right_brace_str
    \exp_not:N \q__scontents_stop
  }
\cs_new_protected:Npn \__scontents_analyse_nesting_generic_process:nn #1 #2
  {
    \tl_if_head_is_N_type:nTF {#2}
      {
        \__scontents_tl_if_head_is_q_mark:nF {#2}
          {
            \__scontents_nesting_incr:
            \__scontents_analyse_nesting_generic:w #2 \q__scontents_stop
          }
      }
      { \__scontents_analyse_nesting_generic:w #2 \q__scontents_stop }
  }
\cs_new_protected:Npn \__scontents_analyse_nesting_generic:nn #1 #2
  {
    \__scontents_define_generic_nesting_function:n {#1}
    \use:e
      {
        \exp_not:N \__scontents_analyse_nesting_generic:w #2
          \c_backslash_str #1 \tl_use:N \l__scontents_env_name_tl
            \exp_not:N \q__scontents_mark \exp_not:N \q__scontents_stop
      }
  }
\cs_new_protected:Npn \__scontents_define_generic_nesting_function:n #1
  {
    \use:e
      {
        \cs_set_protected:Npn \exp_not:N \__scontents_analyse_nesting_generic:w ##1
          \c_backslash_str #1 \tl_use:N \l__scontents_env_name_tl
            ##2 \exp_not:N \q__scontents_stop
      }   { \__scontents_analyse_nesting_generic_process:nn {##1} {##2} }
  }
\cs_new_protected:Npn \__scontents_generic_begin:
  {
    \char_set_catcode_active:N \^^M
    \__scontents_start_environment:w
  }
\cs_new_protected:Npn \__scontents_generic_end:
  {
    \__scontents_stop_environment:
    \__scontents_finish_storing:NNN
      \l__scontents_processed_body_lines_tl
      \l__scontents_name_seq_env_tl
      \l__scontents_print_env_bool
  }
\cs_new_protected:Npn \__scontents_setting_env:nn #1 #2
  {
    \cs_new_protected:cpn { __scontents_#1_begin: }
      {
        \tl_set:Nn \l__scontents_env_name_tl {#1}
        \keys_set:nn { scontents } {#2}
        \__scontents_setup_verb_processor:
        \__scontents_generic_begin:
      }
    \cs_new_protected:cpn { __scontents_#1_end: }
      { \__scontents_generic_end: }
    \exp_args:Nooo \__scontents_define_env:nnn % http://nooooooooooooooo.com :) jeje
      { \tl_to_str:n {#1} }
      { \cs:w __scontents_#1_begin: \cs_end: }
      { \cs:w __scontents_#1_end: \cs_end: }
  }
\cs_if_exist:NF \dospecials
  {
    \cs_new:Npn \dospecials
      { \seq_map_function:NN \l_char_special_seq \do }
  }
\NewDocumentCommand \Scontents { !s !O{} }
  {
    \tl_set:Nn \l__scontents_cmd_name_tl { Scontents }
    \__scontents_Scontents_code:nn {#1} {#2}
  }
\cs_new_protected:Npn \__scontents_Scontents_code:nn #1 #2
  {
    \__scontents_bsphack:
    \group_begin:
      \tl_if_novalue:nF {#2}
        { \keys_set:nn { scontents / Scontents } {#2} }
      \char_set_catcode_active:n { 9 }
      \bool_if:NTF #1
        { \__scontents_Scontents_verb_arg:w }
        { \__scontents_Scontents_norm_arg:n }
  }
\NewDocumentCommand \__scontents_Scontents_verb_arg:w { +v }
  {
    \tl_set:Nn \l__scontents_Scontents_arg_tl {#1}
    \cs_if_exist:NT \obeyedline
      {
        \RenewDocumentCommand \obeyedline { } { \iow_char:N \^^M }
        \tl_replace_all:Nee \l__scontents_Scontents_arg_tl { \obeyedline } { \iow_char:N \^^M }
      }
    \tl_replace_all:Nee \l__scontents_Scontents_arg_tl { \iow_char:N \^^M } { \iow_char:N \^^J }
    \__scontents_Scontents_finish:
  }
\cs_new_protected:Npn \__scontents_Scontents_norm_arg:n #1
  {
    \tl_set:Nn \l__scontents_Scontents_arg_tl {#1}
    \__scontents_Scontents_finish:
  }
\cs_new_protected:Nn \__scontents_Scontents_finish:
  {
    \__scontents_file_write_cmd:VV \l__scontents_file_name_tl \l__scontents_Scontents_arg_tl
    \__scontents_finish_storing:NNN
      \l__scontents_Scontents_arg_tl \l__scontents_name_seq_cmd_tl \l__scontents_print_cmd_bool
    \use:e
      {
        \group_end:
        \bool_if:NF \l__scontents_print_cmd_bool { \__scontents_esphack: }
      }
  }
\NewDocumentCommand \getstored { O{-1} m }
  {
    \__scontents_getstored:nn {#1} {#2}
  }
\cs_new_protected:Npn \__scontents_getstored:nn #1 #2
  {
    \group_begin:
      \int_set:Nn \tex_newlinechar:D { `\^^J }
      \__scontents_rescan_tokens:e
        {
    \endgroup % This assumes \catcode`\\=0... Things might go off otherwise.
    \__scontents_getfrom_seq:nn {#1} {#2}
        }
  }
\NewDocumentCommand \foreachsc { o m }
  {
    \tl_set:Nn \l__scontents_cmd_name_tl { foreachsc }
    \__scontents_foreachsc:nn {#1} {#2}
  }
\cs_new_protected:Npn \__scontents_foreachsc:nn #1 #2
  {
    \group_begin:
      \tl_if_novalue:nF {#1} { \keys_set:nn { scontents / foreachsc } {#1} }
      \tl_set:Nn \l__scontents_foreachsc_arg_tl {#2}
      \seq_clear:N \l__scontents_foreach_print_seq
      \bool_if:NF \l__scontents_foreach_stop_bool
        {
          \int_set:Nn \l__scontents_foreach_stop_int
            { \seq_count:c { g__scontents_name_#2_seq } }
        }
      \int_step_function:nnnN
        { \l__scontents_foreach_start_int }
        { \l__scontents_foreach_step_int }
        { \l__scontents_foreach_stop_int }
        \__scontents_foreach_add_body:n
      \tl_gset:Ne \g__scontents_foreach_exec_tl
        {
          \exp_args:NNV \seq_use:Nn
            \l__scontents_foreach_print_seq \l__scontents_foreach_sep_tl
        }
    \group_end:
    \exp_after:wN \tl_gclear:N
    \exp_after:wN \g__scontents_foreach_exec_tl
    \g__scontents_foreach_exec_tl
  }
\cs_new_protected:Npn \__scontents_foreach_add_body:n #1
  {
    \seq_put_right:Ne \l__scontents_foreach_print_seq
      {
        \bool_if:NT \l__scontents_foreach_before_bool
          { \exp_not:V \l__scontents_foreach_before_tl }
        \bool_if:NTF \l__scontents_foreach_wrapper_bool
          { \__scontents_foreach_wrapper:n }
          { \use:n }
            { \getstored [#1] { \tl_use:N \l__scontents_foreachsc_arg_tl } }
        \bool_if:NT \l__scontents_foreach_after_bool
          { \exp_not:V \l__scontents_foreach_after_tl }
      }
  }
\NewDocumentCommand \typestored { o m }
  {
    \tl_set:Nn \l__scontents_cmd_name_tl { typestored }
    \__scontents_typestored:nn {#1} {#2}
  }
\cs_new_protected:Npn \__scontents_typestored:nn #1 #2
  {
    \__scontents_bsphack:
    \group_begin:
      \seq_clear:N \l__scontents_seq_item_seq
      \str_set:Ne \l__scontents_current_seq_name_str {#2}
      \tl_if_novalue:nF {#1} { \keys_set:nn { scontents / typemeaning } {#1} }
      \seq_if_empty:NT \l__scontents_seq_item_seq
        { \seq_set_from_clist:Nn \l__scontents_seq_item_seq { 1 } }
      \tl_set:Ne \l__scontents_typestored_arg_tl
        { \__scontents_getfrom_seq:Nn \l__scontents_seq_item_seq {#2} }
      \__scontents_remove_trailing_eol:N \l__scontents_typestored_arg_tl
      \tl_replace_all:Nen \l__scontents_typestored_arg_tl { \c__scontents_hidden_space_str } { ^^J }
      \tl_log:N \l__scontents_typestored_arg_tl
      \tl_if_empty:NF \l__scontents_typestored_arg_tl
        {
          \bool_if:NT \l__scontents_print_verb_style_bool
            {
              \__scontents_typestored:N \l__scontents_typestored_arg_tl
            }
        }
      \__scontents_file_write_cmd:VV \l__scontents_file_name_tl \l__scontents_typestored_arg_tl
      \use:e
        {
    \group_end:
    \bool_if:NF \l__scontents_print_verb_style_bool { \__scontents_esphack: }
        }
  }
\group_begin:
  \char_set_catcode_active:N \^^M
  \cs_new_protected:Npn \__scontents_typestored:N #1
    {
      \tl_if_blank:VT #1
        { \msg_error:nnn { scontents } { empty-variable } {#1} }
      \cs_set_eq:NN \__scontents_verb_print_EOL: ^^M
      \cs_set_eq:NN ^^M \scan_stop:
      \cs_set_eq:cN { do@noligs } \__scontents_do_noligs:N
      \int_set:Nn \tex_newlinechar:D { `\^^J }
      \__scontents_rescan_tokens:e
        {
          \__scontents_format_case:nnn
            { \exp_not:N \begin{verbatimsc} } % LaTeX
            { \verbatimsc } % Plain/Generic
            { \startverbatimsc } % ConTeXt
            ^^M
          \exp_not:V #1 ^^M
          \g__scontents_end_verbatimsc_tl
        }
      \cs_set_eq:NN ^^M \__scontents_verb_print_EOL:
    }
\group_end:
\cs_new_protected:Nn \__scontents_xverb:
  {
    \char_set_catcode_active:n { 9 }
    \char_set_active_eq:nN { 9 } \__scontents_tabs_to_spaces:
    \__scontents_xverb:w
  }
\NewDocumentCommand \meaningsc { o m }
  {
    \tl_set:Nn \l__scontents_cmd_name_tl { meaningsc }
    \__scontents_meaningsc:nn {#1} {#2}
  }
\cs_new_protected:Npn \__scontents_meaningsc:nn #1 #2
  {
    \__scontents_bsphack:
    \group_begin:
      \seq_clear:N \l__scontents_seq_item_seq
      \str_set:Ne \l__scontents_current_seq_name_str {#2}
      \tl_if_novalue:nF {#1} { \keys_set:nn { scontents / typemeaning } {#1} }
      \seq_if_empty:NT \l__scontents_seq_item_seq
        { \seq_set_from_clist:Nn \l__scontents_seq_item_seq { 1 } }
      \__scontents_meaningsc:n {#2}
      \use:e
        {
    \group_end:
    \bool_if:NF \l__scontents_print_verb_style_bool { \__scontents_esphack: }
        }
  }
\group_begin:
  \char_set_catcode_active:N \^^I
  \cs_new_protected:Npn \__scontents_meaningsc:n #1
    {
      \tl_set:Ne \l__scontents_meaningsc_arg_tl
        { \__scontents_getfrom_seq:Nn \l__scontents_seq_item_seq {#1} }
      \tl_replace_all:Nen \l__scontents_meaningsc_arg_tl { \iow_char:N \^^J } { ~ }
      \tl_replace_all:Nen \l__scontents_meaningsc_arg_tl { \c__scontents_hidden_space_str } { ~ }
      \tl_log:N \l__scontents_meaningsc_arg_tl
      \tl_use:N \l__scontents_verb_font_tl
      \tl_replace_all:Nne \l__scontents_meaningsc_arg_tl { ^^I } { \__scontents_tabs_to_spaces: }
      \tl_if_empty:NF \l__scontents_meaningsc_arg_tl
        {
          \bool_if:NT \l__scontents_print_verb_style_bool
            {
              \cs_replacement_spec:N \l__scontents_meaningsc_arg_tl
            }
        }
      \__scontents_file_write_cmd:VV \l__scontents_file_name_tl \l__scontents_meaningsc_arg_tl
    }
\group_end:
\NewDocumentCommand \mergesc { o m }
  {
    \tl_set:Nn \l__scontents_cmd_name_tl { mergesc }
    \__scontents_mergesc_code:nn {#1} {#2}
  }
\cs_new_protected:Npn \__scontents_mergesc_code:nn #1 #2
  {
    \group_begin:
      \tl_clear:N \l__scontents_mergesc_keys_tl
      \tl_if_novalue:nF {#1}
        {
          \keys_set_known:nnN { scontents / mergesc } {#1} \l__scontents_mergesc_keys_tl
        }
      \seq_gclear:c { g__scontents_name_sc!internal_seq }
      \__scontents_mergesc_parse_list:n {#2}
      \exp_args:Ne \__scontents_mergesc_cmd:nn
        { 1-end, \exp_not:V \l__scontents_mergesc_keys_tl } { sc!internal }
    \group_end:
  }
\cs_new_protected:Npn \__scontents_mergesc_parse_list:n #1
  {
    \clist_map_inline:nn {#1} { \__scontents_parse_mergesc:nw ##1 \s__scontents_stop }
    \seq_gpop_right:cN { g__scontents_name_sc!internal_seq } \l__scontents_mergesc_arg_tl
    \__scontents_remove_trailing_eol:N \l__scontents_mergesc_arg_tl
    \seq_gput_right:cV { g__scontents_name_sc!internal_seq } \l__scontents_mergesc_arg_tl
  }
\cs_new_protected:Npe \__scontents_remove_trailing_eol:N #1
  {
    \exp_not:N \exp_after:wN \exp_not:N \__scontents_remove_trailing_eol:w
      #1 \s__scontents_stop \c__scontents_hidden_space_str \s__scontents_stop \s__scontents_mark #1
  }
\use:e
  {
    \cs_new_protected:Npn \exp_not:N \__scontents_remove_trailing_eol:w #1
        \c__scontents_hidden_space_str \s__scontents_stop #2 \s__scontents_mark #3
  }   {
        \tl_set:Ne #3
          {
            \tl_if_empty:nTF {#2}
              { \exp_not:o { \__scontents_use_delimit_by_s_stop:nw #1 } }
              { \exp_not:n {#1} }
          }
      }
\cs_new_protected:Npn \__scontents_parse_mergesc:nw #1
  {
    \peek_remove_spaces:n
      {
        \peek_charcode:NTF [ % ]
          { \__scontents_parse_mergesc_aux:nw {#1} }
          { \__scontents_parse_mergesc_aux:nw {#1} [ 1-\seq_count:c { g__scontents_name_#1_seq } ] }
      }
  }
\cs_new_protected:Npn \__scontents_parse_mergesc_aux:nw #1 [#2]
  {
    \seq_clear:N \l__scontents_seq_item_seq
    \clist_map_inline:nn {#2}
      { \__scontents_parse_mergesc_range:nw {#1} ##1 - \q__scontents_mark - \s__scontents_mark }
    \seq_map_inline:Nn \l__scontents_seq_item_seq
      {
        \seq_gput_right:ce { g__scontents_name_sc!internal_seq }
          { \seq_item:cn { g__scontents_name_#1_seq } {##1} }
      }
    \__scontents_use_none_delimit_by_s_stop:w
  }
\cs_new_protected:Npn \__scontents_parse_mergesc_range:nw #1 #2 - #3 - #4 \s__scontents_mark
  {
    \cs_set_protected:Npn \__scontents_tmp:w ##1
      {
        \msg_error:nneee { scontents } { index-out-of-range }
          {##1} {#1} { \seq_count:c { g__scontents_name_#1_seq } }
      }
    \__scontents_range_parser:nnen {#2} {#3}
      { \seq_count:c { g__scontents_name_#1_seq } }
      { \__scontents_tmp:w }
  }
\NewDocumentCommand \setupsc { +m }
  {
    \keys_set:nn { scontents } {#1}
  }
\NewExpandableDocumentCommand \countsc { m }
  {
    \seq_count:c { g__scontents_name_#1_seq }
  }
\NewDocumentCommand \cleanseqsc { m }
  {
    \seq_gclear_new:c { g__scontents_name_#1_seq }
  }
\msg_new:nnn { scontents } { junk-after-begin }
  {
    Junk~characters~#1~\msg_line_context: :
    \\ \\
    #2
  }
\msg_new:nnnn { scontents } { env-already-defined }
  { Environment~'#1'~already~defined! }
  {
    You~have~used~\newenvsc
    with~an~environment~that~already~has~a~definition. \\ \\
    The~existing~definition~of~'#1'~will~not~be~altered.
  }
\msg_new:nnn { scontents } { empty-stored-content }
  { Empty~value~for~key~'getstored'~\msg_line_context:. }
\msg_new:nnn { scontents } { empty-variable }
  { Variable~'#1'~empty~\msg_line_context:. }
\msg_new:nnn { scontents } { overwrite-file }
  { Overwriting~file~'#1'. }
\msg_new:nnn { scontents } { writing-file }
  { Writing~file~'#1'. }
\msg_new:nnn { scontents } { not-writing }
  { File~`#1'~already~exists.~Not~writing. }
\msg_new:nnn { scontents } { rescanning-text }
  { Rescanning~text~'#1'~after~\c_backslash_str end{#2}~\msg_line_context:.}
\msg_new:nnn { scontents } { multiple-begin }
  { Multiple~\c_backslash_str begin{ \l__scontents_env_name_tl }~\msg_line_context:.}
\msg_new:nnn { scontents } { undefined-storage }
  { Storage~named~'#1'~is~not~defined. }
\msg_new:nnnn { scontents } { mergesc-missing-key }
  {
    Need~mandatory~key~'typestored'~or~'meaningsc'~for~\\
    command~\c_backslash_str mergesc~\msg_line_context:.
  }
  {
    The~command~\c_backslash_str mergesc~need~a~mandatory~key~typestored~or~meaningsc.\\
    Check~that~you~have~spelled~the~key~name~correctly.
  }
\msg_new:nnn { scontents } { index-out-of-range }
  {
    \int_compare:nNnTF {#1} = { 0 }
      { Index~of~sequence~cannot~be~zero. }
      {
        Index~'#1'~out~of~range~for~'#2'.~
        \int_compare:nNnTF {#1} > { 0 }
          { Max = } { Min = -} #3.
      }
  }
\msg_new:nnnn { scontents } { env-key-unknown }
  {
    The~key~'#1'~is~unknown~by~environment~
    '\l__scontents_env_name_tl'~and~is~being~ignored.
  }
  {
    The~environment~'\l__scontents_env_name_tl'~does~not~have~a~key~called~'#1'.\\
    Check~that~you~have~spelled~the~key~name~correctly.
  }
\msg_new:nnnn { scontents } { env-key-value-unknown }
  {
    The~key~'#1=#2'~is~unknown~by~environment~
    '\l__scontents_env_name_tl'~and~is~being~ignored.
  }
  {
    The~environment~'\l__scontents_env_name_tl'~does~not~have~a~key~called~'#1'.\\
    Check~that~you~have~spelled~the~key~name~correctly.
  }
\msg_new:nnnn { scontents } { cmd-key-unknown }
  {
    The~key~'#1'~is~unknown~by~command~\c_backslash_str \l__scontents_cmd_name_tl \c_space_tl
    and~is~being~ignored~ \msg_line_context:.
  }
  {
    The~command~\c_backslash_str \l__scontents_cmd_name_tl \c_space_tl
    does~not~have~a~key~called~'#1'.\\
    Check~that~you~have~spelled~the~key~name~correctly.
  }
\msg_new:nnnn { scontents } { cmd-key-value-unknown }
  {
    The~key~'#1=#2'~is~unknown~by~command~\c_backslash_str \l__scontents_cmd_name_tl \c_space_tl
    and~is~being~ignored~ \msg_line_context:.
  }
  {
    The~command~\c_backslash_str \l__scontents_cmd_name_tl \c_space_tl
    does~not~have~a~key~called~'#1'.\\
    Check~that~you~have~spelled~the~key~name~correctly.
  }
\msg_new:nnn { scontents } { empty-environment }
  { environment~'#1'~empty~\msg_line_context:. }
\msg_new:nnnn { scontents } { verbatim-newline }
  { Verbatim~argument~of~#1~ended~by~end~of~line. }
  {
    The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
    but~the~end~
    of~the~current~line~has~been~reached.~You~may~have~forgotten~the~
    closing~delimiter.
    \\ \\
    LaTeX~will~ignore~'#2'.
  }
\msg_new:nnnn { scontents } { verbatim-tokenized }
  { The~verbatim~#1~cannot~be~used~inside~an~argument. }
  {
    The~#1~takes~a~verbatim~argument.~
    It~may~not~appear~within~the~argument~of~another~function.~
    It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } .
    \\ \\
    LaTeX~will~ignore~'#2'.
  }
\file_input_stop:
%% 
%%
%% End of file `scontents-code.tex'.
