summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3.sty137
1 files changed, 124 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
index 0991128f880..268d2cd285d 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
@@ -60,8 +60,8 @@
}
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2012/09/29}
-\def\ExplFileVersion{4249}
+\def\ExplFileDate{2012/11/21}
+\def\ExplFileVersion{4332}
\RequirePackage{etex}
\reserveinserts{32}
\ProvidesExplPackage
@@ -75,8 +75,22 @@
}
\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 { native-drivers } \l@expl@native@drivers@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
+ \edef \l@expl@options@clist
+ {
+ \unexpanded \expandafter \expandafter \expandafter
+ {
+ \expandafter \l@expl@options@clist \expandafter , \CurrentOption
+ }
+ }
+ \fi
+ }
\ProcessOptions \relax
\RequirePackage { l3basics, l3expan, l3tl }
\ifodd \l@expl@check@declarations@bool \relax
@@ -219,19 +233,112 @@
\cs_if_exist:NF \color
{ \DeclareRobustCommand \color [2] [ ] { } }
}
-\bool_if:nTF { \l@expl@native@drivers@bool }
+\RequirePackage{ifpdf}
+\__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
+\keys_define:nn { expl }
{
- \xetex_if_engine:TF
- { \file_input:n { l3xdvipdfmx.def } }
+ driver .choice:,
+ driver / auto .code:n =
{
- \RequirePackage { ifpdf }
- \ifpdf
- \file_input:n { l3pdfmode.def }
- \else
- \file_input:n { l3dvips.def }
- \fi
- }
+ \xetex_if_engine:TF
+ { \tl_set:Nn \l__expl_driver_tl { xdvipdfmx } }
+ {
+ \ifpdf
+ \tl_set:Nn \l__expl_driver_tl { pdfmode }
+ \else
+ \tl_set:Nn \l__expl_driver_tl { dvips }
+ \fi
+ }
+ },
+ 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 { xdvipdmx }
+ }
+ {
+ \ifpdf
+ \__msg_kernel_error:nnnn { expl } { wrong-driver }
+ { dvipdfmx } { pdfmode }
+ \tl_set:Nn \l__expl_driver_tl { pdfmode }
+ \fi
+ }
+ },
+ 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 }
+ }
+ {
+ \ifpdf
+ \__msg_kernel_error:nnnn { expl } { wrong-driver }
+ { dvips } { pdfmode }
+ \tl_set:Nn \l__expl_driver_tl { pdfmode }
+ \fi
+ }
+ },
+ 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 }
+ }
+ {
+ \ifpdf
+ \else
+ \__msg_kernel_error:nnnn { expl } { wrong-driver }
+ { pdfmode } { dvips }
+ \tl_set:Nn \l__expl_driver_tl { dvips }
+ \fi
+ }
+ },
+ driver / xdvipdfmx .code:n =
+ {
+ \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
+ \xetex_if_engine:F
+ {
+ \ifpdf
+ \__msg_kernel_error:nnnn { expl } { wrong-driver }
+ { xdvipdfmx } { pdfmode }
+ \tl_set:Nn \l__expl_driver_tl { pdfmode }
+ \else
+ \__msg_kernel_error:nnnn { expl } { wrong-driver }
+ { xdvipdfmx } { dvips }
+ \tl_set:Nn \l__expl_driver_tl { dvips }
+ \fi
+ }
+ },
+ driver .initial:n = { latex2e } ,
+ 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:nVTF { latex2e } \l__expl_driver_tl
{
\tl_gput_left:Nn \@begindocumenthook { \RequirePackage { graphics } }
\__msg_kernel_new:nnnn { box } { clipping-not-available }
@@ -283,6 +390,10 @@
}
}
}
+ {
+ \tl_const:Nn \c__expl_def_ext_tl { def }
+ \@onefilewithoptions { l3 \l__expl_driver_tl } [ ] [ ] \c__expl_def_ext_tl
+ }
\cs_set_protected_nopar:Npn \ExplSyntaxOn
{
\bool_if:NF \l__kernel_expl_bool