%%
%% This is file `expl3.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% expl3.dtx  (with options: `package,loader')
%% 
%% Copyright (C) 1990-2018 The LaTeX3 Project
%% 
%% It may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License (LPPL), either version 1.3c of
%% this license or (at your option) any later version.  The latest
%% version of this license is in the file:
%% 
%%    https://www.latex-project.org/lppl.txt
%% 
%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%% 
%% File: expl3.dtx Copyright (C) 1990-2018 The LaTeX3 Project
\def\ExplFileDate{2018-06-14}%
\let\ExplLoaderFileDate\ExplFileDate
\ProvidesPackage{expl3}
  [%
    \ExplFileDate\space
    L3 programming layer (loader)
  ]%
\newcommand\expl@create@bool@option[2]%
  {%
    \DeclareOption{#1}{\chardef #2=1 }%
    \DeclareOption{#1=true}{\chardef #2=1 }%
    \DeclareOption{#1=false}{\chardef #2=0 }%
    \newcommand*#2{}%
    \chardef #2=0 %
  }%
\expl@create@bool@option{check-declarations}\l@expl@check@declarations@bool
\expl@create@bool@option{log-functions}\l@expl@log@functions@bool
\expl@create@bool@option{enable-debug}\l@expl@enable@debug@bool
\let\expl@create@bool@option\@undefined
\chardef\l@expl@enable@debug@bool=0 %
\newcommand*\l@expl@options@clist{}%
\DeclareOption*
  {%
    \ifx\l@expl@options@clist\@empty
      \let\l@expl@options@clist\CurrentOption
    \else
     \expandafter\expandafter\expandafter\def
       \expandafter\expandafter\expandafter\l@expl@options@clist
       \expandafter\expandafter\expandafter
         {\expandafter\l@expl@options@clist\expandafter,\CurrentOption}
    \fi
  }%
\ProcessOptions\relax
\ifodd\l@expl@check@declarations@bool
  \chardef\l@expl@enable@debug@bool=1 %
\fi
\ifodd\l@expl@log@functions@bool
  \chardef\l@expl@enable@debug@bool=1 %
\fi
\protected\def\ProvidesExplPackage#1#2#3#4%
  {%
    \ProvidesPackage{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]%
    \ExplSyntaxOn
  }%
\protected\def\ProvidesExplClass#1#2#3#4%
  {%
    \ProvidesClass{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]%
    \ExplSyntaxOn
  }%
\protected\def\ProvidesExplFile#1#2#3#4%
  {%
    \ProvidesFile{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]%
    \ExplSyntaxOn
  }%
\input{expl3-code.tex}%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname tex\string _let:D\endcsname\relax
  \expandafter\endinput
\fi
\AtBeginDocument
  {
    \cs_if_exist:NF \color
      { \DeclareRobustCommand \color [2] [ ] { } }
  }
\__kernel_msg_new:nnnn { expl } { wrong-driver }
  { Driver~request~inconsistent~with~engine:~using~'#2'~driver. }
  {
    You~have~requested~driver~'#1',~but~this~is~not~suitable~for~use~with~the~
    active~engine.~LaTeX3~will~use~the~'#2'~driver~instead.
  }
\tl_new:N \l__expl_driver_tl
\keys_define:nn { expl }
  {
    driver .choice:,
    driver / auto .code:n =
      {
        \tl_set:Nx \l__expl_driver_tl
          {
            \sys_if_engine_xetex:TF
              { xdvipdfmx }
              {
                \sys_if_output_pdf:TF
                  { pdfmode }
                  {
                    \bool_lazy_or:nnTF
                      { \sys_if_engine_pdftex_p: }
                      { \sys_if_engine_luatex_p: }
                      { dvips }
                      { dvipdfmx }
                  }
              }
          }
      },
    driver / dvipdfmx .code:n =
      {
        \tl_set:Nn \l__expl_driver_tl { dvipdfmx }
        \sys_if_engine_xetex:TF
          {
            \__kernel_msg_error:nnnn { expl } { wrong-driver }
              { dvipdfmx } { xdvipdfmx }
            \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
          }
          {
            \sys_if_output_pdf:T
              {
                \__kernel_msg_error:nnnn { expl } { wrong-driver }
                  { dvipdfmx } { pdfmode }
                \tl_set:Nn \l__expl_driver_tl { pdfmode }
              }
          }
      },
    driver / dvips .code:n =
      {
        \tl_set:Nn \l__expl_driver_tl { dvips }
        \sys_if_engine_xetex:TF
          {
            \__kernel_msg_error:nnnn { expl } { wrong-driver }
              { dvips } { xdvipdfmx }
            \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
          }
          {
            \sys_if_output_pdf:T
              {
                \__kernel_msg_error:nnnn { expl } { wrong-driver }
                  { dvips } { pdfmode }
                \tl_set:Nn \l__expl_driver_tl { pdfmode }
              }
          }
      },
    driver / dvisvgm .code:n =
      {
        \tl_set:Nn \l__expl_driver_tl { dvisvgm }
        \sys_if_engine_xetex:TF
          {
            \__kernel_msg_error:nnnn { expl } { wrong-driver }
              { dvips } { xdvipdfmx }
            \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
          }
          {
            \sys_if_output_pdf:T
              {
                \__kernel_msg_error:nnnn { expl } { wrong-driver }
                  { dvips } { pdfmode }
                \tl_set:Nn \l__expl_driver_tl { pdfmode }
              }
          }
      },
    driver / latex2e .code:n =
      { \tl_set:Nn \l__expl_driver_tl { latex2e } },
    driver / pdfmode .code:n =
      {
        \tl_set:Nn \l__expl_driver_tl { pdfmode }
        \sys_if_engine_xetex:TF
          {
            \__kernel_msg_error:nnnn { expl } { wrong-driver }
              { pdfmode } { xdvipdfmx }
            \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
          }
          {
            \sys_if_output_pdf:F
              {
                \__kernel_msg_error:nnnn { expl } { wrong-driver }
                  { pdfmode } { dvips }
                \tl_set:Nn \l__expl_driver_tl { dvips }
              }
          }
      },
    driver / xdvipdfmx .code:n =
      {
        \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
        \sys_if_engine_xetex:F
          {
            \sys_if_output_pdf:TF
              {
                \__kernel_msg_error:nnnn { expl } { wrong-driver }
                  { xdvipdfmx } { pdfmode }
                \tl_set:Nn \l__expl_driver_tl { pdfmode }
              }
              {
                \__kernel_msg_error:nnnn { expl } { wrong-driver }
                  { xdvipdfmx } { dvips }
                \tl_set:Nn \l__expl_driver_tl { dvips }
              }
          }
      },
    driver         .initial:n      = { auto } ,
    native-drivers .choice:,
    native-drivers .default:n      = { true },
    native-drivers / false .meta:n = { driver = latex2e },
    native-drivers / true  .meta:n = { driver = auto }
  }
\keys_define:nn { expl }
  {
    check-declarations .bool_set:N = \l@expl@check@declarations@bool,
    log-functions      .bool_set:N = \l@expl@log@functions@bool
  }
\keys_set:nV { expl } \l@expl@options@clist
\str_if_eq:VnTF \l__expl_driver_tl { latex2e }
  {
    \tl_gput_left:Nn \@begindocumenthook { \RequirePackage { graphics } }
    \__kernel_msg_new:nnnn { box } { clipping-not-available }
      { Box~clipping~not~available. }
      {
        The~\box_clip:N~function~is~only~available~when~loading~expl3~
        with~the~"native-drivers"~option.
      }
    \cs_set_protected:Npn \box_clip:N #1
      {
        \hbox_set:Nn #1 { \box_use:N #1 }
        \__kernel_msg_error:nn { box } { clipping-not-available }
      }
    \cs_set_protected:Npn \box_rotate:Nn #1#2
      { \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } }
    \cs_set_protected:Npn \box_resize_to_wd_and_ht_plus_dp:Nnn #1#2#3
      {
        \hbox_set:Nn #1
          {
            \resizebox *
              { \dim_eval:n {#2} }
              { \dim_eval:n {#3} }
              { \box_use:N #1 }
          }
      }
    \cs_set_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2
      {
        \hbox_set:Nn #1
          {
            \resizebox * { ! } { \dim_eval:n {#2} }
              { \box_use:N #1 }
          }
      }
    \cs_set_protected:Npn \box_resize_to_wd:Nn #1#2
      {
        \hbox_set:Nn #1
          {
            \resizebox * { \dim_eval:n {#2} } { ! }
              { \box_use:N #1 }
          }
      }
    \cs_set_protected:Npn \__box_scale_aux:N #1
      {
        \exp_last_unbraced:Nx \scalebox
          { { \fp_use:N \l__box_scale_x_fp } [ \fp_use:N \l__box_scale_y_fp ] }
          { \box_use:N #1 }
      }
    \cs_set_protected:Npn \color_ensure_current: { \set@color }
  }
  {
    \group_begin:
    \cs_set_protected:Npn \ProvidesExplFile
      {
        \char_set_catcode_space:n { `\  }
        \ProvidesExplFileAux
      }
    \cs_set_protected:Npn \ProvidesExplFileAux #1#2#3#4
      {
        \group_end:
        \ProvidesFile {#1} [ #2~v#3~#4 ]
      }
    \tl_const:Nn \c__expl_def_ext_tl { def }
    \@onefilewithoptions { l3 \l__expl_driver_tl } [ ] [ ] \c__expl_def_ext_tl
  }
\tl_put_left:Nn \@pushfilename
  {
    \exp_args:Nx \__kernel_file_input_push:n
      {
        \tl_to_str:N \@currname
        \tl_to_str:N \@currext
      }
    \tl_put_left:Nx \l__expl_status_stack_tl
      {
        \bool_if:NTF \l__kernel_expl_bool
          { 1 }
          { 0 }
      }
    \ExplSyntaxOff
  }
\tl_put_right:Nn \@pushfilename { \@pushfilenameaux }
\cs_set_protected:Npn \@pushfilenameaux #1#2#3
  {
    \str_gset:Nn \g_file_curr_name_str {#3}
    #1 #2 {#3}
  }
\tl_put_right:Nn \@popfilename
  {
    \__kernel_file_input_pop:
    \tl_if_empty:NTF \l__expl_status_stack_tl
      { \ExplSyntaxOff }
      { \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \q_stop }
  }
\cs_new_protected:Npn \__expl_status_pop:w #1#2 \q_stop
  {
    \tl_set:Nn \l__expl_status_stack_tl {#2}
    \int_if_odd:nTF {#1}
      { \ExplSyntaxOn }
      { \ExplSyntaxOff }
  }
\tl_new:N \l__expl_status_stack_tl
\tl_set:Nn \l__expl_status_stack_tl { 0 }
%% 
%%
%% End of file `expl3.sty'.
