summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.pdfbin512728 -> 512728 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l3calc.pdfbin377232 -> 377232 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3.pdfbin1566978 -> 1566851 bytes
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3luatex.dtx109
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3luatex.sty16
5 files changed, 95 insertions, 30 deletions
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.pdf b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
index 4d7031157c1..42f80e0ca3d 100644
--- a/Master/texmf-dist/doc/latex/expl3/expl3.pdf
+++ b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/l3calc.pdf b/Master/texmf-dist/doc/latex/expl3/l3calc.pdf
index 72c3a8a8c21..75d26313a1e 100644
--- a/Master/texmf-dist/doc/latex/expl3/l3calc.pdf
+++ b/Master/texmf-dist/doc/latex/expl3/l3calc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/source3.pdf b/Master/texmf-dist/doc/latex/expl3/source3.pdf
index 7d0fc94fb96..55c4c3b4aad 100644
--- a/Master/texmf-dist/doc/latex/expl3/source3.pdf
+++ b/Master/texmf-dist/doc/latex/expl3/source3.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/expl3/l3luatex.dtx b/Master/texmf-dist/source/latex/expl3/l3luatex.dtx
index 96ab4c8bab7..cabdde3192c 100644
--- a/Master/texmf-dist/source/latex/expl3/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3luatex.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3fp.dtx Copyright (C) 2010 LaTeX3 project
+%% File: l3luatex.dtx Copyright (C) 2010,2011 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
@@ -45,7 +45,7 @@
%\iffalse
\documentclass[full]{l3doc}
\begin{document}
- \DocInput{l3fp.dtx}
+ \DocInput{l3luatex.dtx}
\end{document}
%</driver>
% \fi
@@ -64,36 +64,77 @@
%
% The \LuaTeX\ engine provides access to the \Lua\ programming language,
% and with it access to the 'internals' of \TeX. In order to use
-% this within the framework provided here, two functions are available.
-% When used with \pdfTeX\ or \XeTeX these will raise an error: use
-% \cs{engine_if_luatex:T} to avoid this. Details of coding the \LuaTeX\
-% engine are detailed in the \LuaTeX\ manual.
+% this within the framework provided here, a family of functions is
+% available. When used with \pdfTeX\ or \XeTeX these will raise an
+% error: use \cs{engine_if_luatex:T} to avoid this. Details of coding
+% the \LuaTeX\ engine are detailed in the \LuaTeX\ manual.
%
-%\begin{function}{ \lua_now:x / (EXP) }
+%\begin{function}{
+% \lua_now:n / (EXP) |
+% \lua_now:x / (EXP) |
+%}
% \begin{syntax}
-% \cs{lua_now:x} \Arg{token list}
+% \cs{lua_now:n} \Arg{token list}
% \end{syntax}
-% The \meta{token list} is fully expandable using the current
-% applicable \TeX\ category codes: this will include converting line
-% ends to spaces in the usual \TeX\ manner. The resulting
-% \meta{Lua input} is passed to the Lua interpreter for processing.
-% Each \cs{lua_now:x} block is treated by Lua as a separate chunk.
-% The Lua interpreter will execute the \meta{Lua input} immediately,
+% The \meta{token list} is first tokenized by \TeX, which will include
+% converting line ends to spaces in the usual \TeX\ manner and which
+% respects currently-applicable \TeX\ category codes. The resulting
+% \meta{\Lua\ input} is passed to the \Lua\ interpreter for processing.
+% Each \cs{lua_now:n} block is treated by \Lua\ as a separate chunk.
+% The \Lua\ interpreter will execute the \meta{\Lua\ input} immediately,
% and in an expandable manner.
+% \begin{texnote}
+% \cs{lua_now:x} is the \LuaTeX\ primitive \cs{directlua} renamed.
+% \end{texnote}
%\end{function}
%
-%\begin{function}{ \lua_shipout:x / (EXP) }
+%\begin{function}{
+% \lua_shipout:n |
+% \lua_shipout:x |
+%}
% \begin{syntax}
% \cs{lua_shipout:x} \Arg{token list}
% \end{syntax}
-% The \meta{token list} is fully expandable using the current
-% applicable \TeX\ category codes: this will include converting line
-% ends to spaces in the usual \TeX\ manner. The resulting
-% \meta{Lua input} is passed to the Lua interpreter for processing.
-% Each \cs{lua_now:x} block is treated by Lua as a separate chunk.
-% The Lua interpreter will execute the \meta{Lua input} during the
-% page-building routine. (At a \TeX\ level, the \meta{Lua input} is
-% stored as a 'whatsit'.)
+% The \meta{token list} is first tokenized by \TeX, which will include
+% converting line ends to spaces in the usual \TeX\ manner and which
+% respects currently-applicable \TeX\ category codes. The resulting
+% \meta{\Lua\ input} is passed to the \Lua\ interpreter when the
+% current page is finalised (\emph{i.e}.~at shipout). Each
+% \cs{lua_shipout:n} block is treated by Lua as a separate chunk.
+% The \Lua\ interpreter will execute the \meta{\Lua\ input} during the
+% page-building routine: no \TeX\ expansion of the \meta{\Lua\ input}
+% will occur at this stage.
+% \begin{texnote}
+% At a \TeX\ level, the \meta{\Lua\ input} is stored as a
+% `whatsit'.
+% \end{texnote}
+%\end{function}
+%
+%\begin{function}{
+% \lua_shipout_x:n |
+% \lua_shipout_x:x |
+%}
+% \begin{syntax}
+% \cs{lua_shipout:n} \Arg{token list}
+% \end{syntax}
+% The \meta{token list} is first tokenized by \TeX, which will include
+% converting line ends to spaces in the usual \TeX\ manner and which
+% respects currently-applicable \TeX\ category codes. The resulting
+% \meta{\Lua\ input} is passed to the \Lua\ interpreter when the
+% current page is finalised (\emph{i.e}.~at shipout). Each
+% \cs{lua_shipout:n} block is treated by Lua as a separate chunk.
+% The \Lua\ interpreter will execute the \meta{\Lua\ input} during the
+% page-building routine: the \meta{\Lua\ input} is expanded during this
+% process in addition to any expansion when the argument was read. This
+% makes these functions suitable for including material finalised
+% during the page building process (such as the page number).
+% \begin{texnote}
+% \cs{lua_sjhipout_x:n} is the \LuaTeX\ primitive \cs{latelua}
+% named using the \LaTeX3 scheme.
+%
+% At a \TeX\ level, the \meta{\Lua\ input} is stored as a
+% `whatsit'.
+% \end{texnote}
%\end{function}
%
%\section{Category code tables}
@@ -189,7 +230,11 @@
%<*initex|package>
% \end{macrocode}
%
+%\begin{macro}{\lua_now:n}
%\begin{macro}{\lua_now:x}
+%\begin{macro}{\lua_shipout_x:n}
+%\begin{macro}{\lua_shipout_x:x}
+%\begin{macro}{\lua_shipout:n}
%\begin{macro}{\lua_shipout:x}
%\begin{macro}{\lua_wrong_engine:}
% When \LuaTeX\ is in use, this is all a question of primitives with new
@@ -200,13 +245,21 @@
% \begin{macrocode}
\luatex_if_engine:TF
{
- \cs_new_eq:NN \lua_now:x \luatex_directlua:D
- \cs_new_eq:NN \lua_shipout:x \luatex_latelua:D
+ \cs_new_eq:NN \lua_now:x \luatex_directlua:D
+ \cs_new_eq:NN \lua_shipout_x:n \luatex_latelua:D
}
{
\cs_new:Npn \lua_now:x #1 { \lua_wrong_engine: }
- \cs_new:Npn \lua_shipout:x #1 { \lua_wrong_engine: }
+ \cs_new_protected:Npn \lua_shipout_x:n #1 { \lua_wrong_engine: }
}
+\cs_new:Npn \lua_now:n #1 {
+ \lua_now:x { \exp_not:n {#1} }
+}
+\cs_generate_variant:Nn \lua_shipout_x:n { x }
+\cs_new_protected:Npn \lua_shipout:n #1 {
+ \lua_shipout_x:n { \exp_not:n {#1} }
+}
+\cs_generate_variant:Nn \lua_shipout:n { x }
\group_begin:
\char_make_letter:N\!
\char_make_letter:N\ %
@@ -218,6 +271,10 @@
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
%
%\subsection{Category code tables}
%
diff --git a/Master/texmf-dist/tex/latex/expl3/l3luatex.sty b/Master/texmf-dist/tex/latex/expl3/l3luatex.sty
index 49f232528f4..d32d740cee0 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3luatex.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3luatex.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3fp.dtx Copyright (C) 2010 LaTeX3 project
+%% File: l3luatex.dtx Copyright (C) 2010,2011 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
@@ -55,13 +55,21 @@
\package_check_loaded_expl:
\luatex_if_engine:TF
{
- \cs_new_eq:NN \lua_now:x \luatex_directlua:D
- \cs_new_eq:NN \lua_shipout:x \luatex_latelua:D
+ \cs_new_eq:NN \lua_now:x \luatex_directlua:D
+ \cs_new_eq:NN \lua_shipout_x:n \luatex_latelua:D
}
{
\cs_new:Npn \lua_now:x #1 { \lua_wrong_engine: }
- \cs_new:Npn \lua_shipout:x #1 { \lua_wrong_engine: }
+ \cs_new_protected:Npn \lua_shipout_x:n #1 { \lua_wrong_engine: }
}
+\cs_new:Npn \lua_now:n #1 {
+ \lua_now:x { \exp_not:n {#1} }
+}
+\cs_generate_variant:Nn \lua_shipout_x:n { x }
+\cs_new_protected:Npn \lua_shipout:n #1 {
+ \lua_shipout_x:n { \exp_not:n {#1} }
+}
+\cs_generate_variant:Nn \lua_shipout:n { x }
\group_begin:
\char_make_letter:N\!
\char_make_letter:N\ %