%%
%% This is file `expl3.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% expl3.dtx  (with options: `package,loader')
%% 
%% EXPERIMENTAL CODE
%% 
%% Do not distribute this file without also distributing the
%% source files specified above.
%% 
%% Do not distribute a modified version of this file.
%% 
%% File: expl3.dtx Copyright (C) 1990-2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
%% license or (at your option) any later version.  The latest version
%% of this license is in the file
%%
%%    http://www.latex-project.org/lppl.txt
%%
%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
%%
%% -----------------------------------------------------------------------
%%
%% The development version of the bundle can be found at
%%
%%    http://www.latex-project.org/svnroot/experimental/trunk/
%%
%% for those people who are interested.
%%
%%%%%%%%%%%
%% NOTE: %%
%%%%%%%%%%%
%%
%%   Snapshots taken from the repository represent work in progress and may
%%   not work or may contain conflicting material!  We therefore ask
%%   people _not_ to put them into distributions, archives, etc. without
%%   prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 programming layer}
\def\ExplFileDate{2015/03/01}
\def\ExplFileVersion{5547}
\let\ExplLoaderFileVersion\ExplFileVersion
\ProvidesPackage{\ExplFileName}
  [%
    \ExplFileDate\space v\ExplFileVersion\space
    \ExplFileDescription\space (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
\let\expl@create@bool@option\@undefined
\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
\protected\def\ProvidesExplPackage#1#2#3#4%
  {%
    \ProvidesPackage{#1}[#2 v#3 #4]%
    \ExplSyntaxOn
  }
\protected\def\ProvidesExplClass#1#2#3#4%
  {%
    \ProvidesClass{#1}[#2 v#3 #4]%
    \ExplSyntaxOn
  }
\protected\def\ProvidesExplFile#1#2#3#4%
  {%
    \ProvidesFile{#1}[#2 v#3 #4]%
    \ExplSyntaxOn
  }
\input{expl3-code.tex}
\protected\def\GetIdInfoLog{}
\AtBeginDocument
  {
    \cs_if_exist:NF \color
      { \DeclareRobustCommand \color [2] [ ] { } }
  }
\__msg_kernel_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
\bool_if:nTF
  {
       \cs_if_exist_p:N  \pdftex_pdfoutput:D
    && \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero
  }
  {
    \cs_new_eq:NN \__expl_if_pdf:T  \use:n
    \cs_new_eq:NN \__expl_if_pdf:F  \use_none:n
    \cs_new_eq:NN \__expl_if_pdf:TF \use_i:nn
  }
  {
    \cs_new_eq:NN \__expl_if_pdf:T  \use_none:n
    \cs_new_eq:NN \__expl_if_pdf:F  \use:n
    \cs_new_eq:NN \__expl_if_pdf:TF \use_ii:nn
  }
\keys_define:nn { expl }
  {
    driver .choice:,
    driver / auto .code:n =
      {
        \tl_set:Nx \l__expl_driver_tl
          {
            \xetex_if_engine:TF
              { xdvipdfmx }
              {
                \__expl_if_pdf:TF
                  { pdfmode }
                  { dvips }
              }
          }
      },
    driver / dvipdfmx .code:n =
      {
        \tl_set:Nn \l__expl_driver_tl { dvipdfmx }
        \xetex_if_engine:TF
          {
            \__msg_kernel_error:nnnn { expl } { wrong-driver }
              { dvipdfmx } { xdvipdfmx }
            \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
          }
          {
            \__expl_if_pdf:T
              {
                \__msg_kernel_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 }
        \xetex_if_engine:TF
          {
            \__msg_kernel_error:nnnn { expl } { wrong-driver }
              { dvips } { xdvipdfmx }
            \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
          }
          {
            \__expl_if_pdf:T
              {
                \__msg_kernel_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 }
        \xetex_if_engine:TF
          {
            \__msg_kernel_error:nnnn { expl } { wrong-driver }
              { pdfmode } { xdvipdfmx }
            \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
          }
          {
            \__expl_if_pdf:F
              {
                \__msg_kernel_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 }
        \xetex_if_engine:F
          {
            \__expl_if_pdf:TF
              {
                \__msg_kernel_error:nnnn { expl } { wrong-driver }
                  { xdvipdfmx } { pdfmode }
                \tl_set:Nn \l__expl_driver_tl { pdfmode }
              }
              {
                \__msg_kernel_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
\tl_const:Nn \c__expl_def_ext_tl { def }
\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 ]
  }
\@onefilewithoptions { l3unicode-data } [ ] [ ] \c__expl_def_ext_tl
\str_if_eq:VnTF \l__expl_driver_tl { latex2e }
  {
    \tl_gput_left:Nn \@begindocumenthook { \RequirePackage { graphics } }
    \__msg_kernel_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 }
        \__msg_kernel_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:Nnn #1#2#3
      {
        \hbox_set:Nn #1
          {
            \resizebox *
              { \__dim_eval:w #2 \__dim_eval_end: }
              { \__dim_eval:w #3 \__dim_eval_end: }
              { \box_use:N #1 }
          }
      }
    \cs_set_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2
      {
        \hbox_set:Nn #1
          {
            \resizebox * { ! } { \__dim_eval:w #2 \__dim_eval_end: }
              { \box_use:N #1 }
          }
      }
    \cs_set_protected:Npn \box_resize_to_wd:Nn #1#2
      {
        \hbox_set:Nn #1
          {
            \resizebox * { \__dim_eval:w #2 \__dim_eval_end: } { ! }
              { \box_use:N #1 }
          }
      }
    \cs_set_protected:Npn \box_scale:Nnn #1#2#3
      {
        \hbox_set:Nn #1
          {
            \exp_last_unbraced:Nx \scalebox
              { { \fp_eval:n {#2} } [ \fp_eval:n {#3} ] }
              { \box_use:N #1 }
          }
      }
  }
  {
    \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 ]
      }
    \@onefilewithoptions { l3 \l__expl_driver_tl } [ ] [ ] \c__expl_def_ext_tl
  }
\tl_put_left:Nn \@pushfilename
  {
    \tl_put_left:Nx \l__expl_status_stack_tl
      {
        \bool_if:NTF \l__kernel_expl_bool
          { 1 }
          { 0 }
      }
    \ExplSyntaxOff
  }
\tl_put_right:Nn \@popfilename
  {
    \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'.
