summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/expl3/l3names.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3/l3names.dtx')
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3names.dtx446
1 files changed, 393 insertions, 53 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3names.dtx b/Master/texmf-dist/source/latex/expl3/l3names.dtx
index 1f981eb2d45..e9345ce37e0 100644
--- a/Master/texmf-dist/source/latex/expl3/l3names.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3names.dtx
@@ -1,27 +1,78 @@
% \iffalse
-%% File: l3names.dtx Copyright (C) 1990-1997 LaTeX3 project
-%
+%% File: l3names.dtx Copyright (C) 1990-2006 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 ``expl3 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/cgi-bin/cvsweb.cgi/
+%%
+%% 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 LaTeX Project Team.
+%%
+%% -----------------------------------------------------------------------
+%^^A We need some basic initial character codes to be set up
+%^^A immediately.
+%<*initex>
+\catcode`\{=1 % left brace is begin-group character
+\catcode`\}=2 % right brace is end-group character
+\catcode`\#=6 % hash mark is macro parameter character
+\catcode`\^=7 %
+\catcode`\^^I=10 % ascii tab is a blank space
+\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
+ \immediate\write-1{#1; v#2, #3/#4/#5; #8}%
+}
+%</initex>
+%<*package>
+\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
+ \def\fileversion{#2}%
+ \def\filedate{#3/#4/#5}%
+ \ProvidesPackage{#1}[#3/#4/#5 v#2 #8]%
+}
+%</package>
%<*dtx>
- \ProvidesFile{l3names.dtx}
+%\fi
+\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
+ \def\fileversion{#2}%
+ \def\filedate{#3/#4/#5}%
+ \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
+}
+%\iffalse
%</dtx>
-%<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{l3names}
-%<driver> \ProvidesFile{l3names.drv}
-% \fi
-% \ProvidesFile{l3names.dtx}
- [1998/04/20 v2.0b L3 Experimental Naming Scheme for TeX Primitives]
+%\fi
+\GetIdInfo$Id: l3names.dtx 577 2006-11-21 18:10:26Z morten $
+ {L3 Experimental Naming Scheme for TeX Primitives}
+%
%
% \iffalse
%<*driver>
\documentclass{l3doc}
-
\begin{document}
\DocInput{l3names.dtx}
\end{document}
%</driver>
% \fi
%
-% \GetFileInfo{l3names.dtx}
% \title{The \textsf{l3names} package\thanks{This file
% has version number \fileversion, last
% revised \filedate.}\\
@@ -108,7 +159,7 @@
% token without any braces around it.
%
% \item[w] One or more arguments with ``weird'' syntax that one has
-% to know by hard or better leave it alone.
+% to know by heart or better leave it alone.
%
% \item[p] Denotes parameter text specification part, e.g.\^^M
% |#1#2\q_stop#3|.
@@ -132,9 +183,9 @@
% \end{description}
%
% One could perhaps envisage an extended system which allocated
-% lettters to denote the various primitive argument types available in
+% letters to denote the various primitive argument types available in
% \TeX, however it seems that this just complicates the system
-% withoutadding any real benefit, as these primitives would never be
+% without adding any real benefit, as these primitives would never be
% used in production code, as higher level packages should offer a
% better interface. Thus the following letters, although they were
% considered have not been used. ``D'' is used in most cases in
@@ -223,17 +274,17 @@
%
% \end{description}
%
-%
+%
%
% \section{Modules}
-%
+%
% Nearly all operations of \LaTeX3 are carried out by calling control
% sequences. For better programming concepts many types of functions are
% identified and gathered in modules. Functions in such modules starts
% with special prefixes, for example "\tlp_" is the prefix for functions
% dealing with token list pointers.
-%
-%
+%
+%
%
% \StopEventually{}
%
@@ -295,7 +346,7 @@
% \begin{macrocode}
%<*initex>
\long\def\name_undefine:N#1{
- \tex_let:D#1\tex_undefined:}
+ \tex_let:D#1\c_undefined}
%</initex>
% \end{macrocode}
%
@@ -303,7 +354,7 @@
%<*package>
\DeclareOption{removeoldnames}{
\long\def\name_undefine:N#1{
- \tex_let:D#1\tex_undefined:}}
+ \tex_let:D#1\c_undefined}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -342,7 +393,7 @@
\name_primitive:NN \/ \tex_italiccor:D
\name_primitive:NN \- \tex_hyphen:D
% \end{macrocode}
-%
+%
% Now all the other primitives.
% \begin{macrocode}
\name_primitive:NN \let \tex_let:D
@@ -473,6 +524,7 @@
\name_primitive:NN \textstyle \tex_textstyle:D
\name_primitive:NN \scriptstyle \tex_scriptstyle:D
\name_primitive:NN \scriptscriptstyle \tex_scriptscriptstyle:D
+\name_primitive:NN \nonscript \tex_nonscript:D
\name_primitive:NN \eqno \tex_eqno:D
\name_primitive:NN \leqno \tex_leqno:D
\name_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D
@@ -568,6 +620,7 @@
\name_primitive:NN \tolerance \tex_tolerance:D
\name_primitive:NN \spaceskip \tex_spaceskip:D
\name_primitive:NN \xspaceskip \tex_xspaceskip:D
+\name_primitive:NN \parfillskip \tex_parfillskip:D
\name_primitive:NN \everypar \tex_everypar:D
\name_primitive:NN \prevgraf \tex_prevgraf:D
\name_primitive:NN \spacefactor \tex_spacefactor:D
@@ -667,13 +720,206 @@
\name_primitive:NN \mathcode \tex_mathcode:D
% \end{macrocode}
%
+%
+%
+%
+% Since \LaTeX3 will require at least the \eTeX{} extensions,
+% we also rename the additional primitives. These are all
+% given the prefix |\etex_|.
+% \begin{macrocode}
+\name_primitive:NN \ifdefined \etex_ifdefined:D
+\name_primitive:NN \ifcsname \etex_ifcsname:D
+\name_primitive:NN \unless \etex_unless:D
+\name_primitive:NN \eTeXversion \etex_eTeXversion:D
+\name_primitive:NN \eTeXrevision \etex_eTeXrevision:D
+\name_primitive:NN \marks \etex_marks:D
+\name_primitive:NN \topmarks \etex_topmarks:D
+\name_primitive:NN \firstmarks \etex_firstmarks:D
+\name_primitive:NN \botmarks \etex_botmarks:D
+\name_primitive:NN \splitfirstmarks \etex_splitfirstmarks:D
+\name_primitive:NN \splitbotmarks \etex_splitbotmarks:D
+\name_primitive:NN \unexpanded \etex_unexpanded:D
+\name_primitive:NN \detokenize \etex_detokenize:D
+\name_primitive:NN \scantokens \etex_scantokens:D
+\name_primitive:NN \showtokens \etex_showtokens:D
+\name_primitive:NN \readline \etex_readline:D
+\name_primitive:NN \tracingassigns \etex_tracingassigns:D
+\name_primitive:NN \tracingscantokens \etex_tracingscantokens:D
+\name_primitive:NN \tracingnesting \etex_tracingnesting:D
+\name_primitive:NN \tracingifs \etex_tracingifs:D
+\name_primitive:NN \currentiflevel \etex_currentiflevel:D
+\name_primitive:NN \currentifbranch \etex_currentifbranch:D
+\name_primitive:NN \currentiftype \etex_currentiftype:D
+\name_primitive:NN \tracinggroups \etex_tracinggroups:D
+\name_primitive:NN \currentgrouplevel \etex_currentgrouplevel:D
+\name_primitive:NN \currentgrouptype \etex_currentgrouptype:D
+\name_primitive:NN \showgroups \etex_showgroups:D
+\name_primitive:NN \showifs \etex_showifs:D
+\name_primitive:NN \interactionmode \etex_interactionmode:D
+\name_primitive:NN \lastnodetype \etex_lastnodetype:D
+\name_primitive:NN \iffontchar \etex_iffontchar:D
+\name_primitive:NN \fontcharht \etex_fontcharht:D
+\name_primitive:NN \fontchardp \etex_fontchardp:D
+\name_primitive:NN \fontcharwd \etex_fontcharwd:D
+\name_primitive:NN \fontcharic \etex_fontcharic:D
+\name_primitive:NN \parshapeindent \etex_parshapeindent:D
+\name_primitive:NN \parshapelength \etex_parshapelength:D
+\name_primitive:NN \parshapedimen \etex_parshapedimen:D
+\name_primitive:NN \numexpr \etex_numexpr:D
+\name_primitive:NN \dimexpr \etex_dimexpr:D
+\name_primitive:NN \glueexpr \etex_glueexpr:D
+\name_primitive:NN \muexpr \etex_muexpr:D
+\name_primitive:NN \gluestretch \etex_gluestretch:D
+\name_primitive:NN \glueshrink \etex_glueshrink:D
+\name_primitive:NN \gluestretchorder \etex_gluestretchorder:D
+\name_primitive:NN \glueshrinkorder \etex_glueshrinkorder:D
+\name_primitive:NN \gluetomu \etex_gluetomu:D
+\name_primitive:NN \mutoglue \etex_mutoglue:D
+\name_primitive:NN \lastlinefit \etex_lastlinefit:D
+\name_primitive:NN \interlinepenalties \etex_interlinepenalties:D
+\name_primitive:NN \clubpenalties \etex_clubpenalties:D
+\name_primitive:NN \widowpenalties \etex_widowpenalties:D
+\name_primitive:NN \displaywidowpenalties \etex_displaywidowpenalties:D
+\name_primitive:NN \middle \etex_middle:D
+\name_primitive:NN \savinghyphcodes \etex_savinghyphcodes:D
+\name_primitive:NN \savingvdiscards \etex_savingvdiscards:D
+\name_primitive:NN \pagediscards \etex_pagediscards:D
+\name_primitive:NN \splitdiscards \etex_splitdiscards:D
+\name_primitive:NN \TeXXETstate \etex_TeXXETstate:D
+\name_primitive:NN \beginL \etex_beginL:D
+\name_primitive:NN \endL \etex_endL:D
+\name_primitive:NN \beginR \etex_beginR:D
+\name_primitive:NN \endR \etex_endR:D
+\name_primitive:NN \predisplaydirection \etex_predisplaydirection:D
+\name_primitive:NN \everyeof \etex_everyeof:D
+\name_primitive:NN \protected \etex_protected:D
+% \end{macrocode}
+%
+%
+% All major distributions\footnote{At the time of writing MiK\TeX\
+% does not but I have a gut feeling that will change.} use
+% pdf\eTeX{} as engine so we add these names as well. Since the
+% pdf\TeX{} team has been very good at prefixing most primitives
+% with |pdf| (so far only five do not start with |pdf|) we do not
+% give then a double |pdf| prefix. The list below covers pdf\TeX
+% v~1.30.4.
+% \begin{macrocode}
+%% integer registers:
+\name_primitive:NN \pdfoutput \pdf_output:D
+\name_primitive:NN \pdfminorversion \pdf_minorversion:D
+\name_primitive:NN \pdfcompresslevel \pdf_compresslevel:D
+\name_primitive:NN \pdfdecimaldigits \pdf_decimaldigits:D
+\name_primitive:NN \pdfimageresolution \pdf_imageresolution:D
+\name_primitive:NN \pdfpkresolution \pdf_pkresolution:D
+\name_primitive:NN \pdftracingfonts \pdf_tracingfonts:D
+\name_primitive:NN \pdfuniqueresname \pdf_uniqueresname:D
+\name_primitive:NN \pdfadjustspacing \pdf_adjustspacing:D
+\name_primitive:NN \pdfprotrudechars \pdf_protrudechars:D
+\name_primitive:NN \efcode \pdf_efcode:D
+\name_primitive:NN \lpcode \pdf_lpcode:D
+\name_primitive:NN \rpcode \pdf_rpcode:D
+\name_primitive:NN \pdfforcepagebox \pdf_forcepagebox:D
+\name_primitive:NN \pdfoptionalwaysusepdfpagebox \pdf_optionalwaysusepdfpagebox:D
+\name_primitive:NN \pdfinclusionerrorlevel\pdf_inclusionerrorlevel:D
+\name_primitive:NN \pdfoptionpdfinclusionerrorlevel \pdf_optionpdfinclusionerrorlevel:D
+\name_primitive:NN \pdfimagehicolor \pdf_imagehicolor:D
+\name_primitive:NN \pdfimageapplygamma \pdf_imageapplygamma:D
+\name_primitive:NN \pdfgamma \pdf_gamma:D
+\name_primitive:NN \pdfimagegamma \pdf_imagegamma:D
+%% dimen registers:
+\name_primitive:NN \pdfhorigin \pdf_horigin:D
+\name_primitive:NN \pdfvorigin \pdf_vorigin:D
+\name_primitive:NN \pdfpagewidth \pdf_pagewidth:D
+\name_primitive:NN \pdfpageheight \pdf_pageheight:D
+\name_primitive:NN \pdflinkmargin \pdf_linkmargin:D
+\name_primitive:NN \pdfdestmargin \pdf_destmargin:D
+\name_primitive:NN \pdfthreadmargin \pdf_threadmargin:D
+%% token registers:
+\name_primitive:NN \pdfpagesattr \pdf_pagesattr:D
+\name_primitive:NN \pdfpageattr \pdf_pageattr:D
+\name_primitive:NN \pdfpageresources \pdf_pageresources:D
+\name_primitive:NN \pdfpkmode \pdf_pkmode:D
+%% expandable commands:
+\name_primitive:NN \pdftexrevision \pdf_texrevision:D
+\name_primitive:NN \pdftexbanner \pdf_texbanner:D
+\name_primitive:NN \pdfcreationdate \pdf_creationdate:D
+\name_primitive:NN \pdfpageref \pdf_pageref:D
+\name_primitive:NN \pdfxformname \pdf_xformname:D
+\name_primitive:NN \pdffontname \pdf_fontname:D
+\name_primitive:NN \pdffontobjnum \pdf_fontobjnum:D
+\name_primitive:NN \pdffontsize \pdf_fontsize:D
+\name_primitive:NN \pdfincludechars \pdf_includechars:D
+\name_primitive:NN \leftmarginkern \pdf_leftmarginkern:D
+\name_primitive:NN \rightmarginkern \pdf_rightmarginkern:D
+\name_primitive:NN \pdfescapestring \pdf_escapestring:D
+\name_primitive:NN \pdfescapename \pdf_escapename:D
+\name_primitive:NN \pdfescapehex \pdf_escapehex:D
+\name_primitive:NN \pdfunescapehex \pdf_unescapehex:D
+\name_primitive:NN \pdfstrcmp \pdf_strcmp:D
+\name_primitive:NN \pdfuniformdeviate \pdf_uniformdeviate:D
+\name_primitive:NN \pdfnormaldeviate \pdf_normaldeviate:D
+\name_primitive:NN \pdfmdfivesum \pdf_mdfivesum:D
+\name_primitive:NN \pdffilemoddate \pdf_filemoddate:D
+\name_primitive:NN \pdffilesize \pdf_filesize:D
+\name_primitive:NN \pdffiledump \pdf_filedump:D
+%% read-only integers:
+\name_primitive:NN \pdftexversion \pdf_texversion:D
+\name_primitive:NN \pdflastobj \pdf_lastobj:D
+\name_primitive:NN \pdflastxform \pdf_lastxform:D
+\name_primitive:NN \pdflastximage \pdf_lastximage:D
+\name_primitive:NN \pdflastximagepages \pdf_lastximagepages:D
+\name_primitive:NN \pdflastannot \pdf_lastannot:D
+\name_primitive:NN \pdflastxpos \pdf_lastxpos:D
+\name_primitive:NN \pdflastypos \pdf_lastypos:D
+\name_primitive:NN \pdflastdemerits \pdf_lastdemerits:D
+\name_primitive:NN \pdfelapsedtime \pdf_elapsedtime:D
+\name_primitive:NN \pdfrandomseed \pdf_randomseed:D
+\name_primitive:NN \pdfshellescape \pdf_shellescape:D
+%% general commands:
+\name_primitive:NN \pdfobj \pdf_obj:D
+\name_primitive:NN \pdfrefobj \pdf_refobj:D
+\name_primitive:NN \pdfxform \pdf_xform:D
+\name_primitive:NN \pdfrefxform \pdf_refxform:D
+\name_primitive:NN \pdfximage \pdf_ximage:D
+\name_primitive:NN \pdfrefximage \pdf_refximage:D
+\name_primitive:NN \pdfannot \pdf_annot:D
+\name_primitive:NN \pdfstartlink \pdf_startlink:D
+\name_primitive:NN \pdfendlink \pdf_endlink:D
+\name_primitive:NN \pdfoutline \pdf_outline:D
+\name_primitive:NN \pdfdest \pdf_dest:D
+\name_primitive:NN \pdfthread \pdf_thread:D
+\name_primitive:NN \pdfstartthread \pdf_startthread:D
+\name_primitive:NN \pdfendthread \pdf_endthread:D
+\name_primitive:NN \pdfsavepos \pdf_savepos:D
+\name_primitive:NN \pdfinfo \pdf_info:D
+\name_primitive:NN \pdfcatalog \pdf_catalog:D
+\name_primitive:NN \pdfnames \pdf_names:D
+\name_primitive:NN \pdfmapfile \pdf_mapfile:D
+\name_primitive:NN \pdfmapline \pdf_mapline:D
+\name_primitive:NN \pdffontattr \pdf_fontattr:D
+\name_primitive:NN \pdftrailer \pdf_trailer:D
+\name_primitive:NN \pdffontexpand \pdf_fontexpand:D
+%%\name_primitive:NN \vadjust [<pre spec>] <filler> { <vertical mode material> } (h, m)
+\name_primitive:NN \pdfliteral \pdf_literal:D
+%%\name_primitive:NN \special <pdfspecial spec>
+\name_primitive:NN \pdfresettimer \pdf_resettimer:D
+\name_primitive:NN \pdfsetrandomseed \pdf_setrandomseed:D
+\name_primitive:NN \pdfnoligatures \pdf_noligatures:D
+% \end{macrocode}
+%
+% What about Omega and Aleph? The status of both are unclear but let's
+% start by adding a single primitive which we can use for testing if
+% we have one of these engines.
+% \begin{macrocode}
+\name_primitive:NN \textdir \aleph_textdir:D
+% \end{macrocode}
% \begin{macro}{\CodeStart}
% \begin{macro}{\CodeStop}
% Here we define functions that are used to turn on and off the
-% special conventions used in the kernel of \LaTeX3.
+% special conventions used in the kernel of \LaTeX3.
%
% First of all, the space, tab and the return characters will all be
-% ignored inside \LaTeX3 code. When space characters are needed in
+% ignored inside \LaTeX3 code. When space characters are needed in
% \LaTeX3 code the |~| character will be used for that purpose.
%
% \begin{macrocode}
@@ -701,13 +947,72 @@
% \end{macro}
% \end{macro}
%
-%
+% \begin{macro}{\NamesStart}
+% \begin{macro}{\NamesStop}
+% Sometimes we need to be able to use names from the kernel of
+% \LaTeX3 without adhering it's conventions according to space
+% characters. These macros provide the necessary settings.
+% \begin{macrocode}
+\tex_def:D \NamesStart{
+ \tex_catcode:D `\_=11\scan_stop:
+ \tex_catcode:D `\:=11\scan_stop:
+ }
+\tex_def:D \NamesStop{
+ \tex_catcode:D `\_=8\scan_stop:
+ \tex_catcode:D `\:=12\scan_stop:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%<*initex>
+\tex_def:D\GetIdInfo{\CodeStop\GetIdInfoAux}
+\tex_def:D\GetIdInfoAux$#1~#2.dtx~#3~#4-#5-#6~#7~#8$#9{%
+ \tex_immediate:D\tex_write:D-1{#2;~v#3,~#4/#5/#6;~#9}%
+ \CodeStart
+}
+%</initex>
+% \end{macrocode}
+%
% Finally some corrections in the case we are running over \LaTeXe.
%
+% Every single experimental package should start by doing something
+% like this:
+% \begin{verbatim}
+% \RequirePackage{l3names}
+% \GetIdInfo$Id: l3names.dtx 577 2006-11-21 18:10:26Z morten $
+% {L3 Experimental sequences and stacks}
+% \end{verbatim}
+% \emph{OR}
+% \begin{verbatim}
+% \RequirePackage{l3names}
+% \CodeStart
+% \end{verbatim}
+% Since we have to make |\GetIdInfo| stop the special catcode regime
+% when reading the package in order to get the information extracted
+% correctly, we might as well use it to also issue |\CodeStart|. This
+% also means that we automatically get |\CodeStart| issued at the
+% beginning of every package without tampering with |\ProvidesPackage|
+% which can cause problems when using these experimental packages with
+% code relying on characters having traditional catcodes, noticeably
+% the catcode of the space character. We cannot simply use the code
+% from the top of this file since it contains a call to |\def| which
+% may not exist at this point.
+% \begin{macrocode}
+%<*package>
+\tex_def:D\GetIdInfo{\CodeStop\GetIdInfoAux}
+\tex_def:D\GetIdInfoAux$#1~#2.dtx~#3~#4-#5-#6~#7~#8$#9{%
+ \tex_def:D \fileversion{#3}%
+ \tex_def:D \filedate{#4/#5/#6}%
+ \ProvidesPackage{#2}[#4/#5/#6~ v#3~ #9]%
+ \CodeStart
+}
+% \end{macrocode}
+%
% A few of the `primitives' assigned above have already been stolen
% by \LaTeX, so assign them by hand to the saved real primitive.
% \begin{macrocode}
-%<*package>
\tex_let:D\tex_input:D \@@input
\tex_let:D\tex_underline:D \@@underline
\tex_let:D\tex_end:D \@@end
@@ -723,40 +1028,20 @@
\tex_let:D\par \tex_par:D
% \end{macrocode}
%
-% As mentioned above, The \LaTeXe\ package mechanism will insert some code
-% to handle the filename stack, and reset the package options, this
-% code will die if the \TeX\ primitives have gone, so skip past it
-% and insert some equivalent code that will work.
-%
-% First a version of |\ProvidesPackage| that can cope.
-% \begin{macrocode}
-\tex_def:D\ProvidesPackage{
- \tex_begingroup:D
- \CodeStop
- \package_provides:w}
-% \end{macrocode}
%
-% \begin{macrocode}
-\tex_def:D\package_provides:w#1#2[#3]{
- \tex_endgroup:D
- \tex_immediate:D\tex_write:D-1{Package: #1#2 #3}
- \tex_expandafter:D\tex_xdef:D
- \tex_csname:D ver@#1.sty\tex_endcsname:D{}}
-% \end{macrocode}
%
% \begin{macrocode}
\tex_ifx:D\name_undefine:N\@gobble
% \end{macrocode}
%
% Normally just set the catcodes, and let \LaTeXe\ handle the
-% package stack. If \LaTeXe\ resets @ reset the white space as well.
+% package stack. If \LaTeXe\ resets @ reset the white space as well.
% \begin{macrocode}
\tex_def:D\name_pop_stack:w{}
\g@addto@macro\@popfilename{%
\tex_ifnum:D12=\tex_the:D\tex_catcode:D`@
\CodeStop
\tex_fi:D}
- \g@addto@macro\@pushfilename{\CodeStart}
% \end{macrocode}
%
% \begin{macrocode}
@@ -765,9 +1050,30 @@
%
% But if traditional \TeX\ code is disabled, do this\ldots
%
-% In this case the catcode preserving stack is not maintained and
+% As mentioned above, The \LaTeXe\ package mechanism will insert some code
+% to handle the filename stack, and reset the package options, this
+% code will die if the \TeX\ primitives have gone, so skip past it
+% and insert some equivalent code that will work.
+%
+% First a version of |\ProvidesPackage| that can cope.
+% \begin{macrocode}
+\tex_def:D\ProvidesPackage{
+ \tex_begingroup:D
+ \CodeStop
+ \package_provides:w}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tex_def:D\package_provides:w#1#2[#3]{
+ \tex_endgroup:D
+ \tex_immediate:D\tex_write:D-1{Package:~#1#2~#3}
+ \tex_expandafter:D\tex_xdef:D
+ \tex_csname:D ver@#1.sty\tex_endcsname:D{#1}}
+% \end{macrocode}
+%
+% In this case the catcode preserving stack is not maintained and
% |\CodeStart| conventions stay in force once on. You'll need
-% to turn then off explicitky with |\CodeStop| (although as currently
+% to turn then off explicitly with |\CodeStop| (although as currently
% built on 2e, nothing except very experimental code will run in
% this mode!) Also note that |\RequirePackage| is a simple definition, just for
% one file, with no options.
@@ -791,14 +1097,15 @@
% \begin{macrocode}
\tex_def:D\NeedsTeXFormat#1{}
\tex_def:D\RequirePackage#1{
- \tex_expandafter:D\tex_ifx:D
- \tex_csname:D ver@#1.sty\tex_endcsname:D\tex_relax:D
- \CodeStart
- \tex_input:D#1.sty\tex_relax:D
- \tex_fi:D}
+ \tex_expandafter:D\tex_ifx:D
+ \tex_csname:D ver@#1.sty\tex_endcsname:D\tex_relax:D
+ \CodeStart
+ \tex_input:D#1.sty\tex_relax:D
+ \tex_fi:D}
\tex_fi:D
% \end{macrocode}
%
+%
% The |\futurelet| just forces the special end of file marker to vanish,
% so the argument of |\name_pop_stack:w| does not cause an end-of-file
% error. (Normally I use |\expandafter| for this trick, but here the next
@@ -808,3 +1115,36 @@
%</package>
% \end{macrocode}
%
+% \endinput
+%
+% $Log$
+% Revision 1.17 2006/01/15 07:55:48 morten
+% Fixed minor typo
+%
+% Revision 1.16 2006/01/15 07:17:43 morten
+% Imported \NamesStart and \NamesStop from l3messages.
+%
+% Revision 1.15 2005/12/27 10:00:03 morten
+% Changed RCS information retrieval, code to run as package under 2e
+% changed slightly to not set special catcodes directly.
+%
+% Revision 1.14 2005/12/01 22:58:16 morten
+% Added pdfTeX primitives
+%
+% Revision 1.13 2005/03/26 21:04:19 morten
+% Fix typo.
+%
+% Revision 1.12 2005/03/22 23:23:57 morten
+% Added an Aleph primitive
+%
+% Revision 1.11 2005/03/15 23:16:21 braams
+% Some tweaking with the docstrip guards to get the documentation to
+% come out right.
+%
+% Revision 1.10 2005/03/15 22:48:31 braams
+% Made it possible to load this as the very first file with initex
+%
+% Revision 1.9 2005/03/11 21:29:56 braams
+% Fixed the use of RCS information; moved definition of \eTeX
+% to l3doc.cls
+%