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.sty79
1 files changed, 67 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
index 507e7decc28..74a65cddb61 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
@@ -48,23 +48,29 @@
\RequirePackage{l3names}
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2011/09/15}
-\def\ExplFileVersion{2828}
+\def\ExplFileDate{2011/10/09}
+\def\ExplFileVersion{2900}
\RequirePackage{etex}
\reserveinserts{32}
\RequirePackage{calc}
-\RequirePackage{color,graphics}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\newcommand* \@l@expl@check@declarations@bool { 0 }
-\newcommand*\@l@expl@log@functions@bool { 0 }
+\newcommand* \l@expl@check@declarations@bool { 0 }
+\newcommand* \l@expl@log@functions@bool { 0 }
+\newcommand* \l@expl@native@drivers@bool { 0 }
\DeclareOption { check-declarations }
- { \def \@l@expl@check@declarations@bool { 1 } }
+ { \def \l@expl@check@declarations@bool { 1 } }
\DeclareOption { log-functions }
- {\def \@l@expl@log@functions@bool { 1 } }
+ { \def \l@expl@log@functions@bool { 1 } }
+\DeclareOption { native-drivers }
+ { \def \l@expl@native@drivers@bool { 1 } }
\ProcessOptions \relax
+\ifodd \l@expl@native@drivers@bool \relax
+\else
+ \RequirePackage { color , graphics }
+\fi
\RequirePackage{ l3basics, l3expan, l3tl }
-\ifodd \@l@expl@check@declarations@bool \relax
+\ifodd \l@expl@check@declarations@bool \relax
\cs_new_protected:Npn \tl_check_exists:N #1
{
\cs_if_exist:NF #1
@@ -125,20 +131,69 @@
l3color,
l3luatex
}
-\bool_if:nT { \@l@expl@check@declarations@bool }
+\bool_if:nT { \l@expl@check@declarations@bool }
{
\msg_kernel_new:nnnn { check } { non-declared-variable }
{ The~variable~#1~has~not~been~declared~\msg_line_context:. }
{
Checking~is~active,~and~you~have~tried~do~so~something~like: \\
- \ \ \tl_set:Nn #1 ~
- \iow_char:N \{ ~ ... ~ \iow_char:N \} \\
+ \ \ \tl_set:Nn ~ #1 ~ \iow_char:N \{ ~ ... ~ \iow_char:N \} \\
without~first~having: \\
- \ \ \tl_new:N #1 \\
+ \ \ \tl_new:N ~ #1 \\
\\
LaTeX~will~create~the~variable~and~continue.
}
}
+\bool_if:nTF { \l@expl@native@drivers@bool }
+ {
+ \xetex_if_engine:TF
+ { \file_input:n { l3xdvipdfmx.def } }
+ {
+ \RequirePackage { ifpdf }
+ \ifpdf
+ \file_input:n { l3pdfmode.def }
+ \else
+ \file_input:n { l3dvips.def }
+ \fi
+ }
+ \AtBeginDocument
+ {
+ \cs_if_free:NT \color
+ { \DeclareRobustCommand \color [2] [ ] { } }
+ }
+ }
+ {
+ \cs_set_protected_nopar:Npn \box_rotate:Nn #1#2
+ { \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } }
+ \cs_set_protected_nopar:Npn \box_resize:Nnn #1#2#3
+ {
+ \hbox_set:Nn #1
+ {
+ \resizebox *
+ { \etex_dimexpr:D #2 \scan_stop: }
+ { \etex_dimexpr:D #3 \scan_stop: }
+ { \box_use:N #1 }
+ }
+ }
+ \cs_set_protected_nopar:Npn \box_resize_to_ht_plus_dp:Nn #1#2
+ {
+ \hbox_set:Nn #1
+ {
+ \resizebox * { ! } { \etex_dimexpr:D #2 \scan_stop: }
+ { \box_use:N #1 }
+ }
+ }
+ \cs_set_protected_nopar:Npn \box_resize_to_wd:Nn #1#2
+ {
+ \hbox_set:Nn #1
+ {
+ \resizebox * { \etex_dimexpr:D #2 \scan_stop: } { ! }
+ { \box_use:N #1 }
+ }
+ }
+ \cs_set_protected_nopar:Npn \box_scale:Nnn #1#2#3
+ { \hbox_set:Nn #1 { \scalebox {#2} [#3] { \box_use:N #1 } } }
+ }
\cs_set_protected_nopar:Npn \ExplSyntaxOn
{
\bool_if:NF \l_expl_status_bool