diff options
author | Karl Berry <karl@freefriends.org> | 2009-06-09 23:31:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-06-09 23:31:15 +0000 |
commit | 215b9a864d5829070bdc66ba736986eb72e5143e (patch) | |
tree | fe0882c81fc4ec945cee4b512f72eaa21ea5f791 /Master/texmf-dist/tex/latex/expl3/l3names.sty | |
parent | df90ec06321940c2f066b05e12f1b5ab099105da (diff) |
expl3 1407 (9jun09)
git-svn-id: svn://tug.org/texlive/trunk@13686 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3names.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/l3names.sty | 169 |
1 files changed, 128 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3names.sty b/Master/texmf-dist/tex/latex/expl3/l3names.sty index 485ad03e134..28f36638615 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3names.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3names.sty @@ -15,7 +15,7 @@ %% Do not distribute a modified version of this file. %% %% -%% File: l3names.dtx Copyright (C) 1990-2006 LaTeX3 project +%% File: l3names.dtx Copyright (C) 1990-2006,2009 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 @@ -33,7 +33,7 @@ %% %% The development version of the bundle can be found at %% -%% http://www.latex-project.org/cgi-bin/cvsweb.cgi/ +%% http://www.latex-project.org/svnroot/experimental/trunk/ %% %% for those people who are interested. %% @@ -48,7 +48,18 @@ %% %% ----------------------------------------------------------------------- \begingroup -\def\GetIdInfo$#1 #2.#3 #4 #5 #6 #7${% +\def\GetIdInfo$#1${% + \begingroup + \def\GetIdInfoString{#1}% + \def\IdInfoStringUnexp{Id}% + \ifx \GetIdInfoString \IdInfoStringUnexp + \def\next{\endgroup\GetIdInfoMissing} + \else + \def\next{\endgroup\GetIdInfoFull$#1$} + \fi + \next +} +\def\GetIdInfoFull$#1 #2.#3 #4 #5 #6 #7${% \GetIdInfoAux #5\relax{#2}#5\relax{#4}% } \def\GetIdInfoAux #1#2#3#4#5#6\relax{% @@ -70,9 +81,43 @@ \gdef\filedescription{#6}% \ProvidesPackage{#1}[#2/#3/#4 v#5 #6] } -\GetIdInfo$Id: l3names.dtx 621 2007-09-01 20:14:19Z morten $ +\def\GetIdInfoMissing#1{% + \gdef\fileversion{000}% + \gdef\filedate{0000/00/00}% + \gdef\filedescription{#1}% + \ProvidesPackage{[unknown package]}[0000/00/00 v0.0 #1] +} +\GetIdInfo$Id: l3names.dtx 1362 2009-05-28 20:19:21Z joseph $ {L3 Experimental Naming Scheme for TeX Primitives} \endgroup +\begingroup +\def\firstoftwo#1#2{#1} +\def\secondoftwo#1#2{#2} +\def\etexmissingerror{Not running under e-TeX} +\def\etexmissinghelp{% + This package requires e-TeX.^^J% + Try compiling the document with `elatex' instead of `latex'.^^J% + When using pdfTeX, try `pdfelatex' instead of `pdflatex'% +}% +\expandafter\ifx\csname eTeXversion\endcsname\relax + \expandafter\secondoftwo\else\expandafter\firstoftwo\fi + {\endgroup}{% + \PackageError{l3names}{\etexmissingerror}{\etexmissinghelp}% + \endgroup + \endinput + } +\edef\ExplSyntaxOff{ + \unexpanded{\ifodd \ExplSyntaxStatus\relax + \def\ExplSyntaxStatus{0} + } + \catcode 126=\the \catcode 126 \relax + \catcode 32=\the \catcode 32 \relax + \catcode 9=\the \catcode 9 \relax + \endlinechar =\the \endlinechar \relax + \catcode 95=\the \catcode 95 \relax + \catcode 58=\the \catcode 58 \relax + \noexpand\fi +} \catcode126=10\relax % tilde is a space char. \catcode32=9\relax % space is ignored \catcode9=9\relax % tab also ignored @@ -583,39 +628,70 @@ \name_primitive:NN \pdfresettimer \pdf_resettimer:D \name_primitive:NN \pdfsetrandomseed \pdf_setrandomseed:D \name_primitive:NN \pdfnoligatures \pdf_noligatures:D -\name_primitive:NN \textdir \aleph_textdir:D +\name_primitive:NN \XeTeXversion \xetex_version:D +\name_primitive:NN \directlua \luatex_directlua:D +\etex_ifdefined:D \strcmp + \etex_ifdefined:D \xetex_version:D + \name_primitive:NN \strcmp \pdf_strcmp:D + \tex_fi:D +\tex_fi:D \tex_def:D\ExplSyntaxOn{ - \tex_def:D\ExplSyntaxStatus{00} - \tex_catcode:D 126=10 \tex_relax:D % tilde is a space char. - \tex_catcode:D 32=9 \tex_relax:D % space is ignored - \tex_catcode:D 9=9 \tex_relax:D % tab also ignored - \tex_endlinechar:D =32 \tex_relax:D % endline is space - \tex_catcode:D 95=11 \tex_relax:D % underscore letter - \tex_catcode:D 58=11 \tex_relax:D % colon letter -} -\tex_def:D\ExplSyntaxOff{ - \tex_def:D\ExplSyntaxStatus{01} - \tex_catcode:D 126=13 \tex_relax:D - \tex_catcode:D 32=10 \tex_relax:D - \tex_catcode:D 9=10 \tex_relax:D - \tex_endlinechar:D =13 \tex_relax:D - \tex_catcode:D 95=8 \tex_relax:D - \tex_catcode:D 58=12 \tex_relax:D + \tex_ifodd:D \ExplSyntaxStatus \tex_relax:D + \tex_else:D + \tex_edef:D\ExplSyntaxOff{ + \etex_unexpanded:D{ + \tex_ifodd:D \ExplSyntaxStatus \tex_relax:D + \tex_def:D \ExplSyntaxStatus{0} + } + \tex_catcode:D 126=\tex_the:D \tex_catcode:D 126 \tex_relax:D + \tex_catcode:D 32=\tex_the:D \tex_catcode:D 32 \tex_relax:D + \tex_catcode:D 9=\tex_the:D \tex_catcode:D 9 \tex_relax:D + \tex_endlinechar:D =\tex_the:D \tex_endlinechar:D \tex_relax:D + \tex_catcode:D 95=\tex_the:D \tex_catcode:D 95 \tex_relax:D + \tex_catcode:D 58=\tex_the:D \tex_catcode:D 58 \tex_relax:D + \tex_noexpand:D \tex_fi:D + } + \tex_def:D\ExplSyntaxStatus{1} + \tex_catcode:D 126=10 \tex_relax:D % tilde is a space char. + \tex_catcode:D 32=9 \tex_relax:D % space is ignored + \tex_catcode:D 9=9 \tex_relax:D % tab also ignored + \tex_endlinechar:D =32 \tex_relax:D % endline is space + \tex_catcode:D 95=11 \tex_relax:D % underscore letter + \tex_catcode:D 58=11 \tex_relax:D % colon letter + \tex_fi:D } -\tex_let:D \CodeStart \ExplSyntaxOn -\tex_let:D \CodeStop \ExplSyntaxOff -\tex_def:D \NamesStart{ +\tex_def:D\ExplSyntaxStatus{1} +\tex_def:D \ExplSyntaxNamesOn{ \tex_catcode:D `\_=11\tex_relax:D \tex_catcode:D `\:=11\tex_relax:D } -\tex_def:D \NamesStop{ +\tex_def:D \ExplSyntaxNamesOff{ \tex_catcode:D `\_=8\tex_relax:D \tex_catcode:D `\:=12\tex_relax:D } \tex_def:D\GetIdInfo{ \tex_begingroup:D \tex_catcode:D 32=10 \tex_relax:D % needed? Probably for now. - \GetIdInfoAuxi:w + \GetIdInfoMaybeMissing:w +} +\tex_def:D\GetIdInfoMaybeMissing:w$#1$#2{ + \tex_def:D \l_tmpa_tl {#1} + \tex_def:D \l_tmpb_tl {Id} + \tex_ifx:D \l_tmpa_tl \l_tmpb_tl + \tex_def:D \l_tmpa_tl { + \tex_endgroup:D + \tex_def:D\filedescription{#2} + \tex_def:D\filename {[unknown~name]} + \tex_def:D\fileversion {000} + \tex_def:D\fileauthor {[unknown~author]} + \tex_def:D\filedate {0000/00/00} + \tex_def:D\filenameext {[unknown~ext]} + \tex_def:D\filetimestamp {[unknown~timestamp]} + } + \tex_else:D + \tex_def:D \l_tmpa_tl {\GetIdInfoAuxi:w$#1${#2}} + \tex_fi:D + \l_tmpa_tl } \tex_def:D\GetIdInfoAuxi:w$#1~#2.#3~#4~#5~#6~#7~#8$#9{ \tex_endgroup:D @@ -653,27 +729,31 @@ \ProvidesClass{#1}[#2~v#3~#4] \ExplSyntaxOn } -\tex_let:D \org@onefilewithoptions\@onefilewithoptions -\tex_def:D \@onefilewithoptions#1[#2][#3]#4{ - \tex_edef:D \ExplSyntaxStack{ \ExplSyntaxStatus\ExplSyntaxStack } - \ExplSyntaxOff - \org@onefilewithoptions{#1}[{#2}][{#3}]{#4} - \tex_expandafter:D\ExplSyntaxPopStack\ExplSyntaxStack\tex_relax:D -} -\g@addto@macro\@popfilename{% - \tex_ifnum:D\tex_the:D\tex_catcode:D`\@=12\tex_relax:D +\tex_edef:D \@pushfilename{ + \etex_unexpanded:D{ + \tex_edef:D \ExplSyntaxStack{ \ExplSyntaxStatus \ExplSyntaxStack } \ExplSyntaxOff - \tex_fi:D + } + \etex_unexpanded:D\tex_expandafter:D{\@pushfilename } } -\tex_def:D\ExplSyntaxPopStack#1#2#3\tex_relax:D{ - \tex_def:D\ExplSyntaxStack{#3} - \tex_if:D#1#2 +\tex_edef:D \@popfilename{ + \etex_unexpanded:D\tex_expandafter:D{\@popfilename + \tex_if:D 2\ExplSyntaxStack 2 + \ExplSyntaxOff + \tex_else:D + \tex_expandafter:D\ExplSyntaxPopStack\ExplSyntaxStack\q_nil + \tex_fi:D + } +} +\tex_def:D\ExplSyntaxPopStack#1#2\q_nil{ + \tex_def:D\ExplSyntaxStack{#2} + \tex_ifodd:D#1\tex_relax:D \ExplSyntaxOn \tex_else:D \ExplSyntaxOff \tex_fi:D } -\tex_def:D\ExplSyntaxStack{} +\tex_def:D \ExplSyntaxStack{0} \tex_let:D\tex_input:D \@@input \tex_let:D\tex_underline:D \@@underline \tex_let:D\tex_end:D \@@end @@ -683,7 +763,6 @@ \tex_let:D\tex_hyphen:D \@@hyph \tex_let:D\par \tex_par:D \tex_ifx:D\name_undefine:N\@gobble - \AtEndOfPackage{\ExplSyntaxOff} \tex_def:D\name_pop_stack:w{} \tex_else:D \tex_def:D\ProvidesPackage{ @@ -715,6 +794,14 @@ \tex_fi:D} \tex_fi:D \tex_futurelet:D\name_tmp:\name_pop_stack:w +\tex_def:D \package_check_loaded_expl: { + \@ifpackageloaded{expl3}{}{ + \PackageError{expl3}{Cannot~load~the~expl3~modules~separately}{ + The~expl3~modules~cannot~be~loaded~separately;\MessageBreak + please~\protect\usepackage{expl3}~instead. + } + } +} %% %% %% End of file `l3names.sty'. |