summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-01-11 23:19:01 +0000
committerKarl Berry <karl@freefriends.org>2011-01-11 23:19:01 +0000
commit62764a821e78856fc5c6db6525928247bc194581 (patch)
tree0b5db9f4ad1fb636d4603a4fae663452fecc8f2f /Master/texmf-dist
parentcccf458bc431d5acf57051e42292f42ea20ebb7e (diff)
expl3 2126 (10jan11)
git-svn-id: svn://tug.org/texlive/trunk@21030 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.pdfbin512728 -> 512728 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/interface3.tex83
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l3calc.pdfbin377232 -> 377232 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3.pdfbin1566851 -> 1568303 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3body.tex391
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3fp.dtx83
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3int.dtx43
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3names.dtx5
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3prg.dtx6
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3skip.dtx96
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3fp.sty70
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3int.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3names.sty3
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3prg.sty6
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3skip.sty34
15 files changed, 710 insertions, 114 deletions
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.pdf b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
index 42f80e0ca3d..6fb8cadd754 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/interface3.tex b/Master/texmf-dist/doc/latex/expl3/interface3.tex
new file mode 100644
index 00000000000..cb2d3d88335
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/interface3.tex
@@ -0,0 +1,83 @@
+% \iffalse
+%% File: interface3.tex Copyright (C) 1990-2010 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/svnroot/experimental/trunk/
+%%
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+%% \fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This document will typeset the LaTeX3 interface descriptions a single
+% document. This will produce quite a large file (more than 170 pages
+% currently) and may take a long time on a slow machine.
+%
+% There is also a full version of the sources (source3.tex) which additionally
+% also typesets the command implementations.
+%
+% Do not forget to generate the index (as explained on the terminal output
+% near the end of the run)!
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\documentclass{l3doc} \listfiles
+
+\begin{document}
+%\catcode\string`\_\string=\active
+
+\title{The \LaTeX3 Interfaces}
+\author{\Team}
+
+\pagenumbering{roman}
+\maketitle
+
+%
+% First load all modules and typeset the documentation parts
+%
+
+\input{source3body} % all the individual modules
+
+
+
+\clearpage
+
+\begingroup
+\def\endash{--}
+\catcode`\-\active
+\def-{\futurelet\temp\indexdash}
+\def\indexdash{\ifx\temp-\endash\fi}
+
+\DelayPrintIndex
+\endgroup
+
+\end{document}
+
+
diff --git a/Master/texmf-dist/doc/latex/expl3/l3calc.pdf b/Master/texmf-dist/doc/latex/expl3/l3calc.pdf
index 75d26313a1e..477a2f0412f 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 55c4c3b4aad..f644a02e66e 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/doc/latex/expl3/source3body.tex b/Master/texmf-dist/doc/latex/expl3/source3body.tex
new file mode 100644
index 00000000000..017efe6530c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/source3body.tex
@@ -0,0 +1,391 @@
+% \iffalse
+%% File: source3body.tex Copyright (C) 1990-2010 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/svnroot/experimental/trunk/
+%%
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+%% \fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This file is used by
+%
+% source3.tex % documentation including implementation
+%
+% interface3.tex % only interface documentation
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\begin{abstract}
+
+\setlength\parindent{0pt}
+\setlength\parskip{\baselineskip}
+
+\noindent This is the reference documentation for the \pkg{expl3}
+programming environment. The \pkg{expl3} modules set up an experimental
+naming scheme for \LaTeX\ commands, which allow the \LaTeX\ programmer
+to systematically name functions and variables, and specify the argument
+types of functions.
+
+The \TeX\ and \eTeX\ primitives are all given a new name according to
+these conventions. However, in the main direct use of the primitives is
+not required or encouraged: the \pkg{expl3} modules define an
+independent low-level \LaTeX3 programming language.
+
+At present, the \pkg{expl3} modules are designed to be loaded on top of
+\LaTeXe. In time, a \LaTeX3 format will be produced based on this code.
+This allows the code to be used in \LaTeXe\ packages \emph{now} while a
+stand-alone \LaTeX3 is developed.
+
+\begin{bfseries}
+ While \pkg{expl3} is still experimental, the bundle is now regarded as
+ broadly stable. The syntax conventions and functions provided are now
+ ready for wider use. There may still be changes to some functions, but
+ these will be minor when compared to the scope of \pkg{expl3}.
+
+ New modules will be added to the distributed version of \pkg{expl3} as
+ they reach maturity.
+\end{bfseries}
+
+\end{abstract}
+
+\clearpage
+
+{\def\\{:}% fix "newlines" in the ToC
+\tableofcontents}
+
+\clearpage
+\pagenumbering{arabic}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Each of the following \DocInput lines includes a file with extension
+% .dtx. Each of these files may be typeset separately. For instance
+% pdflatex l3box.dtx
+% will typeset the source of the LaTeX3 box commands. If you use the
+% Makefile, the index will be generated automatically; e.g.,
+% make doc F=l3box
+%
+% If this file is processed, each of these separate dtx files will be
+% contained as a part of a single document.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\makeatletter
+\def\partname{Part}
+\def\maketitle{\part{\@title}}
+\let\thanks\@gobble
+\let\DelayPrintIndex\PrintIndex
+\let\PrintIndex\@empty
+\makeatother
+
+\part{Introduction to \pkg{expl3} and this document}
+
+This document is intended to act as a comprehensive reference manual
+for the \pkg{expl3} language. A general guide to the \LaTeX3
+programming language is found in \href{expl3.pdf}{expl3.pdf}.
+
+\section{Naming functions and variables}
+
+\LaTeX3 does not use \texttt{@} as a ``letter'' for defining
+internal macros. Instead, the symbols |_| and \texttt{:}
+are used in internal macro names to provide structure. The name of
+each \emph{function} is divided into logical units using \texttt{_},
+while \texttt{:} separates the \emph{name} of the function from the
+\emph{argument specifier} (``arg-spec''). This describes the arguments
+expected by the function. In most cases, each argument is represented
+by a single letter. The complete list of arg-spec letters for a function
+is referred to as the \emph{signature} of the function.
+
+Each function name starts with the \emph{module} to which it belongs.
+Thus apart from a small number of very basic functions, all \pkg{expl3}
+function names contain at least one underscore to divide the module
+name from the descriptive name of the function. For example, all
+functions concerned with comma lists are in module \texttt{clist} and
+begin \cs{clist_}.
+
+Every function must include an argument specifier. For functions which
+take no arguments, this will be blank and the function name will end
+\texttt{:}. Most functions take one or more arguments, and use the
+following argument specifiers:
+\begin{description}
+ \item[\texttt{D}] The \texttt{D} specifier means \emph{do not use}.
+ All of the \TeX\ primitives are initially \cs{let} to a \texttt{D}
+ name, and some are then given a second name. Only the kernel
+ team should use anything with a \texttt{D} specifier!
+ \item[\texttt{N} and \texttt{n}] These mean \emph{no manipulation},
+ of a single token for \texttt{N} and of a set of tokens given in
+ braces for \texttt{n}. Both pass the argument though exactly as
+ given. Usually, if you use a single token for an \texttt{n} argument,
+ all will be well.
+ \item[\texttt{c}] This means \emph{csname}, and indicates that the
+ argument will be turned into a csname before being used. So
+ So \cs{foo:c} |{ArgumentOne}| will act in the same way as \cs{foo:N}
+ \cs{ArgumentOne}.
+ \item[\texttt{V} and \texttt{v}] These mean \emph{value
+ of variable}. The \texttt{V} and \texttt{v} specifiers are used to
+ get the content of a variable without needing to worry about the
+ underlying \TeX\ structure containing the data. A \texttt{V}
+ argument will be a single token (similar to \texttt{N}), for example
+ \cs{foo:V} \cs{MyVariable}; on the other hand, using \texttt{v} a
+ csname is constructed first, and then the value is recovered, for
+ example \cs{foo:v} |{MyVariable}|.
+ \item[\texttt{o}] This means \emph{expansion once}. In general, the
+ \texttt{V} and \texttt{v} specifiers are favoured over \texttt{o}
+ for recovering stored information. However, \texttt{o} is useful
+ for correctly processing information with delimited arguments.
+ \item[\texttt{x}] The \texttt{x} specifier stands for \emph{exhaustive
+ expansion}: the plain \TeX\ \cs{edef}.
+ \item[\texttt{f}] The \texttt{f} specifier stands for \emph{full
+ expansion}, and in contrast to \emph{x} stops at the first
+ non-expandable item without trying to execute it.
+ \item[\texttt{T} and \texttt{F}] For logic tests, there are the branch
+ specifiers \texttt{T} (\emph{true}) and \texttt{F} (\emph{false}).
+ Both specifiers treat the input in the same way as \texttt{n} (no
+ change), but make the logic much easier to see.
+ \item[\texttt{p}] The letter \texttt{p} indicates \TeX\
+ \emph{parameters}. Normally this will be used for delimited
+ functions as \pkg{expl3} provides better methods for creating simple
+ sequential arguments.
+ \item[\texttt{w}] Finally, there is the \texttt{w} specifier for
+ \emph{weird} arguments. This covers everything else, but mainly
+ applies to delimited values (where the argument must be terminated
+ by some arbitrary string).
+\end{description}
+Notice that the argument specifier describes how the argument is
+processed prior to being passed to the underlying function. For example,
+\cs{foo:c} will take its argument, convert it to a control sequence and
+pass it to \cs{foo:N}.
+
+Variables are named in a similar manner to functions, but begin with
+a single letter to define the type of variable:
+\begin{description}
+ \item[\texttt{c}] Constant: global parameters whose value should not
+ be changed.
+ \item[\texttt{g}] Parameters whose value should only be set globally.
+ \item[\texttt{l}] Parameters whose value should only be set locally.
+\end{description}
+Each variable name is then build up in a similar way to that of a
+function, typically starting with the module\footnote{The module names are
+ not used in case of generic scratch registers defined in the data
+ type modules, e.g., the
+ \texttt{int} module contains some scratch variables called \cs{l_tmpa_int},
+ \cs{l_tmpb_int}, and so on. In such a case adding the module name up front
+ to denote the module
+ and in the back to indicate the type, as in
+ \cs{l_int_tmpa_int} would be very unreadable.} name
+and then a descriptive part.
+Variables end with a short identifier to show the variable type:
+\begin{description}
+ \item[\texttt{bool}] Either true or false.
+ \item[\texttt{box}] Box register.
+ \item[\texttt{clist}] Comma separated list.
+ \item[\texttt{dim}] `Rigid' lengths.
+ \item[\texttt{int}] Integer-valued count register.
+ \item[\texttt{num}] A `fake' integer type using only macros. Useful for
+ setting up allocation routines.
+ \item[\texttt{prop}] Property list.
+ \item[\texttt{skip}] `Rubber' lengths.
+ \item[\texttt{seq}] `Sequence': a data-type used to implement lists
+ (with access at both ends) and stacks.
+ \item[\texttt{stream}] An input or output stream (for reading from or
+ writing to, respectively).
+ \item[\texttt{tl}] Token list variables: placeholder for a token list.
+ \item[\texttt{toks}] Token register.
+\end{description}
+
+\subsubsection{Terminological inexactitude}
+
+A word of warning. In this document, and others referring to the \pkg{expl3}
+programming modules, we often refer to `variables' and `functions' as if they
+were actual constructs from a real programming language. In truth, \TeX\ is a
+macro processor, and functions are simply macros that may or mayn't take
+arguments and expand to their replacement text. Many of the common variables
+are \emph{also} macros, and if placed into the input stream will simply expand
+to their definition as well~--- a `function' with no arguments and a `token
+list variable' are in truth one and the same. On the other hand, some
+`variables' are actually registers that must be initialised and their values
+set and retreived with specific functions.
+
+The conventions of the \pkg{expl3} code are designed to clearly separate the
+ideas of `macros that contain data' and `macros that contain code', and a
+consistent wrapper is applied to all forms of `data' whether they be macros or
+actually registers. This means that sometimes we will use phrases like `the
+function returns a value', when actually we just mean `the macro expands to
+something'. Similarly, the term `execute' might be used in place of `expand'
+or it might refer to the more specific case of `processing in \TeX's stomach'
+(if you are familiar with the \TeX{}book parlance).
+
+If in doubt, please ask; chances are we've been hasty in writing certain
+definitions and need to be told to tighten up our terminology.
+
+\section{Documentation conventions}
+
+This document is typeset with the experimental \pkg{l3doc} class;
+several conventions are used to help describe the features of the code.
+A number of conventions are used here to make the documentation clearer.
+
+Each group of related functions is given in a box. For a function with
+a ``user'' name, this might read:
+\begin{function}{
+ \ExplSyntaxOn |
+ \ExplSyntaxOff
+ }
+ \begin{syntax}
+ "\ExplSyntaxOn" \dots\ "\ExplSyntaxOff"
+ \end{syntax}
+ The textual description of how the function works would appear here. The
+ syntax of the function is shown in mono-spaced text to the right of
+ the box. In this example, the function takes no arguments and so the
+ name of the function is simply reprinted.
+\end{function}
+
+For programming functions, which use \texttt{_} and \texttt{:} in their name
+there are a few additional conventions: If two related functions are given
+with identical names but different argument specifiers, these are termed
+\emph{variants} of each other, and the latter functions are printed in grey to
+show this more clearly. They will carry out the same function but will take
+different types of argument:
+\begin{function}{
+ \seq_new:N |
+ \seq_new:c
+ }
+ \begin{syntax}
+ "\seq_new:N" <sequence>
+ \end{syntax}
+ When a number of variants are described, the arguments are usually
+ illustrated only for the base function. Here, <sequence> indicates
+ that \cs{seq_new:N} expects the name of a sequence. From the argument
+ specifier, \cs{seq_new:c} also expects a sequence name, but as a
+ name rather than as a control sequence. Each argument given in the
+ illustration should be described in the following text.
+\end{function}
+
+Some functions are fully expandable, which allows it to be used within
+an \texttt{x}-type argument (in plain \TeX\ terms, inside an \cs{edef}).
+These fully expandable functions are indicated in the documentation by
+a star:
+\begin{function}{
+ \cs_to_str:N / (EXP)
+ }
+ \begin{syntax}
+ "\cs_to_str:N" <cs>
+ \end{syntax}
+ As with other functions, some text should follow which explains how
+ the function works. Usually, only the star will indicate that the
+ function is expandable. In this case, the function expects a <cs>,
+ shorthand for a <control sequence>.
+\end{function}
+
+Conditional (\texttt{if}) functions are normally defined in three variants, with
+\texttt{T}, \texttt{F} and \texttt{TF} argument specifiers. This allows
+them to be used for different `true'/`false' branches, depending on
+which outcome the conditional is being used to test. To indicate this
+without repetition, this information is given in a shortened form:
+\begin{function}{
+ \xetex_if_engine: / (TF) (EXP)
+ }
+ \begin{syntax}
+ "\xetex_if_engine:TF" <true code> <false code>
+ \end{syntax}
+ The underlining and italic of \texttt{TF} indicates that
+ \cs{xetex_if_engine:T}, \cs{xetex_if_engine:F} and
+ \cs{xetex_if_engine:TF} are all available. Usually, the illustration
+ will use the \texttt{TF} variant, and so both <true code>
+ and <false code> will be shown. The two variant forms \texttt{T} and
+ \texttt{F} take only <true code> and <false code>, respectively.
+ Here, the star also shows that this function is expandable.
+ With some minor exceptions, \emph{all} conditional functions in the
+ \pkg{expl3} modules should be defined in this way.
+\end{function}
+
+Variables, constants and so on are described in a similar manner:
+\begin{variable}{
+ \l_tmpa_tl
+ }
+ A short piece of text will describe the variable: there is no
+ syntax illustration in this case.
+\end{variable}
+
+In some cases, the function is similar to one in \LaTeXe\ or plain \TeX.
+In these cases, the text will include an extra `\textbf{\TeX{}hackers
+note}' section:
+\begin{function}{
+ \token_to_str:N / (EXP)
+ }
+ \begin{syntax}
+ "\token_to_str:N" <token>
+ \end{syntax}
+ The normal description text.
+ \begin{texnote}
+ Detail for the experienced \TeX\ or \LaTeXe\ programmer. In this
+ case, it would point out that this function is the \TeX\ primitive
+ \cs{string}.
+ \end{texnote}
+\end{function}
+
+\DisableImplementation
+
+\DocInput{l3names.dtx}
+
+\DocInput{l3basics.dtx}
+\DocInput{l3expan.dtx}
+\DocInput{l3prg.dtx}
+\DocInput{l3quark.dtx}
+\DocInput{l3token.dtx}
+
+\DocInput{l3int.dtx}
+\DocInput{l3skip.dtx}
+
+\DocInput{l3tl.dtx}
+\DocInput{l3toks.dtx}
+\DocInput{l3seq.dtx}
+\DocInput{l3clist.dtx}
+\DocInput{l3prop.dtx}
+
+\DocInput{l3io.dtx}
+\DocInput{l3msg.dtx}
+\DocInput{l3box.dtx}
+\DocInput{l3xref.dtx}
+\DocInput{l3keyval.dtx}
+\DocInput{l3keys.dtx}
+%\DocInput{l3calc.dtx}
+\DocInput{l3file.dtx}
+
+% \DocInput{l3precom.dtx}
+% \DocInput{l3alloc.dtx}
+% \DocInput{l3chk.dtx}
+
+\DocInput{l3fp.dtx}
+\DocInput{l3luatex.dtx}
+
+\endinput
diff --git a/Master/texmf-dist/source/latex/expl3/l3fp.dtx b/Master/texmf-dist/source/latex/expl3/l3fp.dtx
index 8eb2530143c..7251d1af935 100644
--- a/Master/texmf-dist/source/latex/expl3/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3fp.dtx
@@ -35,7 +35,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3fp.dtx 2104 2010-12-18 09:29:34Z joseph $
+\GetIdInfo$Id: l3fp.dtx 2128 2011-01-10 22:44:33Z joseph $
{L3 Experimental floating-point operations}
%\iffalse
%<*driver>
@@ -3058,10 +3058,11 @@
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\fp_sub:NNNNNNNNNN}
+%\begin{macro}{\fp_sub:NNNNNNNNN}
% Internal subtraction is needed only when the first number is bigger
% than the second, so there is no need to worry about the sign. This is
-% a good job as there are no arguments left.
+% a good job as there are no arguments left. The flipping flag is
+% used in the rare case where a sign change is possible.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \fp_sub:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {
#7 \etex_numexpr:D #1 - #4 \scan_stop:
@@ -3368,6 +3369,7 @@
%
%\begin{macro}{\fp_trig_normalise:}
%\begin{macro}[aux]{\fp_trig_normalise_aux:}
+%\begin{macro}[aux]{\fp_trig_sub:NNN}
% For normalisation, the code essentially switches to fixed-point
% arithmetic. There is a shift of the exponent, then repeated
% subtractions. The end result is a number in the range
@@ -3393,22 +3395,14 @@
}
\cs_new_protected_nopar:Npn \fp_trig_normalise_aux: {
\tex_ifnum:D \l_fp_input_a_integer_int > \c_three
- \fp_sub:NNNNNNNNN
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
+ \fp_trig_sub:NNN
\c_six \c_fp_two_pi_decimal_int \c_fp_two_pi_extended_int
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
\tex_expandafter:D \fp_trig_normalise_aux:
\tex_else:D
\tex_ifnum:D \l_fp_input_a_integer_int > \c_two
\tex_ifnum:D \l_fp_input_a_decimal_int > \c_fp_pi_decimal_int
- \fp_sub:NNNNNNNNN
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
- \c_six \c_fp_two_pi_decimal_int \c_fp_two_pi_extended_int
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
+ \fp_trig_sub:NNN
+ \c_six \c_fp_two_pi_decimal_int \c_fp_two_pi_extended_int
\tex_expandafter:D \tex_expandafter:D \tex_expandafter:D
\tex_expandafter:D \tex_expandafter:D \tex_expandafter:D
\tex_expandafter:D \fp_trig_normalise_aux:
@@ -3417,6 +3411,49 @@
\tex_fi:D
}
% \end{macrocode}
+% Here, there may be a sign change but there will never be any
+% variation in the input. So a dedicated function can be used.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \fp_trig_sub:NNN #1#2#3 {
+ \l_fp_input_a_integer_int
+ \etex_numexpr:D \l_fp_input_a_integer_int - #1 \scan_stop:
+ \l_fp_input_a_decimal_int
+ \etex_numexpr:D \l_fp_input_a_decimal_int - #2 \scan_stop:
+ \l_fp_input_a_extended_int
+ \etex_numexpr:D \l_fp_input_a_extended_int - #3 \scan_stop:
+ \tex_ifnum:D \l_fp_input_a_extended_int < \c_zero
+ \tex_advance:D \l_fp_input_a_decimal_int \c_minus_one
+ \tex_advance:D \l_fp_input_a_extended_int \c_one_thousand_million
+ \tex_fi:D
+ \tex_ifnum:D \l_fp_input_a_decimal_int < \c_zero
+ \tex_advance:D \l_fp_input_a_integer_int \c_minus_one
+ \tex_advance:D \l_fp_input_a_decimal_int \c_one_thousand_million
+ \tex_fi:D
+ \tex_ifnum:D \l_fp_input_a_integer_int < \c_zero
+ \l_fp_input_a_sign_int -\l_fp_input_a_sign_int
+ \tex_ifnum:D
+ \etex_numexpr:D
+ \l_fp_input_a_decimal_int + \l_fp_input_a_extended_int
+ = \c_zero
+ \l_fp_input_a_integer_int -\l_fp_input_a_integer_int
+ \tex_else:D
+ \l_fp_input_a_integer_int
+ \etex_numexpr:D
+ - \l_fp_input_a_integer_int - \c_one
+ \scan_stop:
+ \l_fp_input_a_decimal_int
+ \etex_numexpr:D
+ \c_one_thousand_million - \l_fp_input_a_decimal_int
+ \scan_stop:
+ \l_fp_input_a_extended_int
+ \etex_numexpr:D
+ \c_one_thousand_million - \l_fp_input_a_extended_int
+ \scan_stop:
+ \tex_fi:D
+ \tex_fi:D
+}
+% \end{macrocode}
+%\end{macro}
%\end{macro}
%\end{macro}
%
@@ -3932,6 +3969,19 @@
}
\cs_new_protected_nopar:Npn \fp_tan_aux_ii: {
\fp_trig_normalise:
+ \tex_ifnum:D \l_fp_input_a_sign_int > \c_zero
+ \tex_ifnum:D \l_fp_trig_octant_int > \c_two
+ \l_fp_output_sign_int \c_minus_one
+ \tex_else:D
+ \l_fp_output_sign_int \c_one
+ \tex_fi:D
+ \tex_else:D
+ \tex_ifnum:D \l_fp_trig_octant_int > \c_two
+ \l_fp_output_sign_int \c_one
+ \tex_else:D
+ \l_fp_output_sign_int \c_minus_one
+ \tex_fi:D
+ \tex_fi:D
\fp_cos_aux_ii:
\tex_ifnum:D \l_fp_input_a_decimal_int = \c_zero
\tex_ifnum:D \l_fp_input_a_integer_int = \c_zero
@@ -3990,11 +4040,6 @@
\etex_numexpr:D
\l_fp_input_a_exponent_int - \l_fp_input_b_exponent_int
\scan_stop:
- \tex_ifnum:D \l_fp_trig_octant_int < \c_three
- \l_fp_output_sign_int \c_one
- \tex_else:D
- \l_fp_output_sign_int \c_minus_one
- \tex_fi:D
\fp_standardise:NNNN
\l_fp_output_sign_int
\l_fp_output_integer_int
diff --git a/Master/texmf-dist/source/latex/expl3/l3int.dtx b/Master/texmf-dist/source/latex/expl3/l3int.dtx
index b71bffea94b..93fa6d7e6d1 100644
--- a/Master/texmf-dist/source/latex/expl3/l3int.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3int.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3int.dtx Copyright (C) 1990-2010 LaTeX3 project
+%% File: l3int.dtx Copyright (C) 1990-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
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3int.dtx 2077 2010-10-17 07:47:48Z will $
+\GetIdInfo$Id: l3int.dtx 2121 2011-01-07 08:46:09Z joseph $
{L3 Experimental Integer module}
%\iffalse
%<*driver>
@@ -75,16 +75,16 @@
%
%\subsection{Integer expressions}
%
-%\begin{function}{ \int_eval:n / (EXP) }
+%\begin{function}{
+% \int_eval:n / (EXP) |
+%}
% \begin{syntax}
% \cs{int_eval:n} \Arg{integer expression}
% \end{syntax}
% Evaluates the \meta{integer expression}, expanding any
% integer and token list variables within the \meta{expression}
% to their content (without requiring \cs{int_use:N}/\cs{tl_use:N})
-% and applying the standard mathematical rules. The result of the
-% calculation is left in the input stream as a number. For example
-% both
+% and applying the standard mathematical rules. For example both
% \begin{verbatim}
% \int_eval:n { 5 + 4 * 3 - ( 3 + 4 * 5 ) }
% \end{verbatim}
@@ -99,15 +99,22 @@
% both evaluate to \( -6 \). The \Arg{integer expression} may
% contain the operators \texttt{+}, \texttt{-}, \texttt{*} and
% \texttt{/}, along with parenthesis \texttt{(} and \texttt{)}.
+% After two expansions, \cs{int_eval:n} yields a
+% \meta{integer donation} which is left in the input stream. This is
+% \emph{not} an \meta{internal integer}, and therefore requires
+% suitable termination if used in a \TeX-style integer assignment.
%\end{function}
%
-%\begin{function}{ \int_abs:n / (EXP) }
+%\begin{function}{
+% \int_abs:n / (EXP) |
+%}
% \begin{syntax}
% \cs{int_abs:n} \Arg{integer expression}
% \end{syntax}
% Evaluates the \meta{integer expression} as described for
% \cs{int_eval:n} and leaves the absolute value of the result in
-% the input stream.
+% the input stream as an \meta{integer denotation} after two
+% expansions.
%\end{function}
%
%\begin{function}{ \int_div_round:nn / (EXP) }
@@ -117,17 +124,21 @@
% Evaluates the two \meta{integer expressions} as described earlier,
% then calculates the result of dividing the first value by the
% second, rounding any remainder. Note that division using "/"
-% is identical to this function.
+% is identical to this function. The result is left in the input
+% stream as a \meta{integer denotation} after two expansions.
%\end{function}
%
-%\begin{function}{ \int_div_truncate:nn / (EXP) }
+%\begin{function}{
+% \int_div_truncate:nn / (EXP) |
+%}
% \begin{syntax}
% \cs{int_div_truncate:nn} \Arg{intexpr1} \Arg{intexpr2}
% \end{syntax}
% Evaluates the two \meta{integer expressions} as described earlier,
% then calculates the result of dividing the first value by the
% second, truncating any remainder. Note that division using "/"
-% rounds the result.
+% rounds the result. The result is left in the input stream as a
+% \meta{integer denotation} after two expansions.
%\end{function}
%
%\begin{function}{
@@ -140,16 +151,20 @@
% \end{syntax}
% Evaluates the \meta{integer expressions} as described for
% \cs{int_eval:n} and leaves either the larger or smaller value
-% in the input stream, depending on the function name.
+% in the input stream as an \meta{integer denotation} after two
+% expansions.
%\end{function}
%
-%\begin{function}{ \int_mod:nn / (EXP) }
+%\begin{function}{
+% \int_mod:nn / (EXP) |
+%}
% \begin{syntax}
% \cs{int_mod:nn} \Arg{intexpr1} \Arg{intexpr2}
% \end{syntax}
% Evaluates the two \meta{integer expressions} as described earlier,
% then calculates the integer remainder of dividing the first
-% expression by the second. This is left in the input stream.
+% expression by the second. This is left in the input stream as an
+% \meta{integer denotation} after two expansions.
%\end{function}
%
%\subsection{Integer variables}
diff --git a/Master/texmf-dist/source/latex/expl3/l3names.dtx b/Master/texmf-dist/source/latex/expl3/l3names.dtx
index 6a36bf148cc..729fd8e6434 100644
--- a/Master/texmf-dist/source/latex/expl3/l3names.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3names.dtx
@@ -103,7 +103,7 @@
\RequirePackage{l3names}
%</driver>
%\fi
-\GetIdInfo$Id: l3names.dtx 2064 2010-10-03 23:27:33Z will $
+\GetIdInfo$Id: l3names.dtx 2122 2011-01-08 09:14:28Z joseph $
{L3 Experimental Naming Scheme for TeX Primitives}
%\iffalse
%<package>\endgroup
@@ -1242,7 +1242,7 @@
% as the packages in this distribution do like this:
% \begin{verbatim}
% \RequirePackage{l3names}
-% \GetIdInfo$Id: l3names.dtx 2064 2010-10-03 23:27:33Z will $
+% \GetIdInfo$Id: l3names.dtx 2122 2011-01-08 09:14:28Z joseph $
% {L3 Experimental Box module}
% \ProvidesExplPackage
% {\filename}{\filedate}{\fileversion}{\filedescription}
@@ -1387,6 +1387,7 @@
\tex_let:D\tex_hyphen:D \@@hyph
\tex_let:D\luatex_catcodetable:D \luatexcatcodetable
\tex_let:D\luatex_initcatcodetable:D \luatexinitcatcodetable
+\tex_let:D\luatex_latelua:D \luatexlatelua
\tex_let:D\luatex_savecatcodetable:D \luatexsavecatcodetable
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/expl3/l3prg.dtx b/Master/texmf-dist/source/latex/expl3/l3prg.dtx
index e61fc3eeb8f..a48517c6f12 100644
--- a/Master/texmf-dist/source/latex/expl3/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3prg.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3prg.dtx Copyright (C) 2005-2010 LaTeX3 project
+%% File: l3prg.dtx Copyright (C) 2005-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
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3prg.dtx 2063 2010-10-03 08:26:49Z mittelba $
+\GetIdInfo$Id: l3prg.dtx 2121 2011-01-07 08:46:09Z joseph $
{L3 Experimental control structures}
%\iffalse
%<*driver>
@@ -1655,7 +1655,7 @@
% Same as |\prg_case_dim:nnn| except it is for \meta{dim} registers.
% \begin{macrocode}
\cs_new:Npn \prg_case_dim:nnn #1 #2 {
- \exp_args:No \prg_case_dim_aux:nnn {\dim_use:N \dim_eval:n{#1}} #2
+ \exp_args:No \prg_case_dim_aux:nnn {\dim_eval:n{#1}} #2
\q_recursion_tail ? \q_recursion_stop
}
\cs_new:Npn \prg_case_dim_aux:nnn #1#2#3{
diff --git a/Master/texmf-dist/source/latex/expl3/l3skip.dtx b/Master/texmf-dist/source/latex/expl3/l3skip.dtx
index c42de0485e7..75e1982a573 100644
--- a/Master/texmf-dist/source/latex/expl3/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3skip.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3skip.dtx Copyright (C) 2005-2010 Frank Mittelbach, LaTeX3 project
+%% File: l3skip.dtx Copyright (C) 2005-2011 Frank Mittelbach, 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
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3skip.dtx 2088 2010-11-23 20:27:27Z joseph $
+\GetIdInfo$Id: l3skip.dtx 2121 2011-01-07 08:46:09Z joseph $
{L3 Experimental skip registers}
%\iffalse
%<*driver>
@@ -215,21 +215,21 @@
%
%
%
-% \begin{function}{%
-% \skip_eval:n / (EXP) |
-% }
-% \begin{syntax}
-% "\skip_eval:n" \Arg{skip expr}
-% \end{syntax}
-% Evaluates the value of <skip expr> so that
-% "\skip_eval:n {5pt plus 3fil + 3pt minus 1fil}" puts
-% "8.0pt plus 3.0fil minus 1.0fil" back into the input stream.
-% Expandable.
-% \begin{texnote}
-% This is the \eTeX{} primitive \tn{glueexpr} turned into a function
-% taking an argument.
-% \end{texnote}
-% \end{function}
+%\begin{function}{
+% \skip_eval:n / (EXP) |
+%}
+% \begin{syntax}
+% \cs{skip_eval:n} \Arg{skip expression}
+% \end{syntax}
+% Evaluates the \meta{skip expression}, expanding any skips
+% and token list variables within the \meta{expression}
+% to their content (without requiring \cs{skip_use:N}/\cs{tl_use:N})
+% and applying the standard mathematical rules. The result of the
+% calculation is left in the input stream as a \meta{glue denotation}
+% after two expansions. This will be expressed in points (\texttt{pt}),
+% and will require suitable termination if used in a \TeX-style
+% assignment as it is \emph{not} an \meta{internal glue}.
+%\end{function}
%
%
% \subsection{Formatting a skip register value}
@@ -429,20 +429,22 @@
% \end{function}
%
%
-% \begin{function}{%
-% \dim_eval:n |
-% }
-% \begin{syntax}
-% "\dim_eval:n" \Arg{dim expr}
-% \end{syntax}
-% Evaluates the value of a dimension expression so that
-% "\dim_eval:n {5pt+3pt}" puts "8pt" back into the input stream.
-% Expandable.
-% \begin{texnote}
-% This is the \eTeX{} primitive \tn{dimexpr} turned into a function
-% taking an argument.
-% \end{texnote}
-% \end{function}
+%\begin{function}{
+% \dim_eval:n / (EXP) |
+%}
+% \begin{syntax}
+% \cs{dim_eval:n} \Arg{dimension expression}
+% \end{syntax}
+% Evaluates the \meta{dimension expression}, expanding any
+% dimensions and token list variables within the \meta{expression}
+% to their content (without requiring \cs{dim_use:N}/\cs{tl_use:N})
+% and applying the standard mathematical rules. The result of the
+% calculation is left in the input stream as a
+% \meta{dimension denotation} after two expansions. This will be
+% expressed in points (\texttt{pt}), and will require suitable
+% termination if used in a \TeX-style assignment as it is \emph{not}
+% an \meta{internal dimension}.
+%\end{function}
%
% \begin{function}{%
% \if_dim:w |
@@ -450,7 +452,7 @@
% \begin{syntax}
% "\if_dim:w" <dimen1> <rel> <dimen2> <true> "\else:" <false> "\fi:"
% \end{syntax}
-% Compare two dimensions. It is recommended to use "\dim_eval:n" to
+% Compare two dimensions. It is recommended to use "\dim_eval:w" to
% correctly evaluate and terminate these numbers. <rel> is one of
% "<", "=" or ">" with catcode 12.
% \begin{texnote}
@@ -665,7 +667,7 @@
% uniform at the moment to get a better overview.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \skip_set:Nn #1#2 {
- #1\skip_eval:n{#2}
+ #1 \etex_glueexpr:D #2 \scan_stop:
%<*check>
\chk_local_or_pref_global:N #1
%</check>
@@ -735,7 +737,7 @@
% We need to say |by| in case the first argment is a register
% accessed by its number, e.g., |\skip23|.
% \begin{macrocode}
- \tex_advance:D#1 by \skip_eval:n{#2}
+ \tex_advance:D#1 by \etex_glueexpr:D #2 \scan_stop:
%<*check>
\chk_local_or_pref_global:N #1
%</check>
@@ -745,7 +747,7 @@
%
% \begin{macrocode}
\cs_new_protected_nopar:Npn \skip_sub:Nn #1#2{
- \tex_advance:D#1-\skip_eval:n{#2}
+ \tex_advance:D #1 -\etex_glueexpr:D #2 \scan_stop:
%<*check>
\chk_local_or_pref_global:N #1
%</check>
@@ -793,10 +795,14 @@
% \end{macrocode}
%
% \begin{macrocode}
-\cs_new_nopar:Npn \skip_horizontal:n #1 { \skip_horizontal:N \skip_eval:n{#1} }
+\cs_new_nopar:Npn \skip_horizontal:n #1 {
+ \skip_horizontal:N \etex_glueexpr:D #1 \scan_stop:
+}
\cs_new_eq:NN \skip_vertical:N \tex_vskip:D
\cs_generate_variant:Nn \skip_vertical:N {c}
-\cs_new_nopar:Npn \skip_vertical:n #1 { \skip_vertical:N \skip_eval:n{#1} }
+\cs_new_nopar:Npn \skip_vertical:n #1 {
+ \skip_vertical:N \etex_glueexpr:D #1 \scan_stop:
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -828,7 +834,9 @@
% \begin{macro}{\skip_eval:n}
% Evaluating a calc expression.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \skip_eval:n #1 { \etex_glueexpr:D #1 \scan_stop: }
+\cs_new_protected_nopar:Npn \skip_eval:n #1 {
+ \tex_the:D \etex_glueexpr:D #1 \scan_stop:
+}
% \end{macrocode}
% \end{macro}
%
@@ -947,7 +955,9 @@
% We add |\dim_eval:n| in order to allow simple arithmetic
% and a space just for those using |\dimen1| or alike. See OR!
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dim_set:Nn #1#2 { #1~ \dim_eval:n{#2} }
+\cs_new_protected_nopar:Npn \dim_set:Nn #1#2 {
+ #1~ \etex_dimexpr:D #2 \scan_stop:
+}
\cs_generate_variant:Nn \dim_set:Nn {cn,Nc}
% \end{macrocode}
%
@@ -1026,7 +1036,7 @@
% We need to say |by| in case the first argment is a register
% accessed by its number, e.g., |\dimen23|.
% \begin{macrocode}
- \tex_advance:D#1 by \dim_eval:n{#2}\scan_stop:
+ \tex_advance:D#1 by \etex_dimexpr:D #2 \scan_stop:
}
\cs_generate_variant:Nn \dim_add:Nn {cn,Nc}
% \end{macrocode}
@@ -1117,7 +1127,9 @@
% \begin{macro}{\dim_eval:n}
% Evaluating a calc expression.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dim_eval:n #1 { \etex_dimexpr:D #1 \scan_stop: }
+\cs_new_protected_nopar:Npn \dim_eval:n #1 {
+ \tex_the:D \etex_dimexpr:D #1 \scan_stop:
+}
% \end{macrocode}
% \end{macro}
%
@@ -1136,7 +1148,7 @@
% \begin{macro}[TF]{\dim_compare:nNn}
% \begin{macrocode}
\prg_new_conditional:Nnn \dim_compare:nNn {p,TF,T,F} {
- \if_dim:w \dim_eval:n {#1} #2 \dim_eval:n {#3}
+ \if_dim:w \etex_dimexpr:D #1 #2 \etex_dimexpr:D #3 \scan_stop:
\prg_return_true: \else: \prg_return_false: \fi:
}
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3fp.sty b/Master/texmf-dist/tex/latex/expl3/l3fp.sty
index b5bb0661edc..73dac125835 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3fp.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3fp.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3fp.dtx 2104 2010-12-18 09:29:34Z joseph $
+\GetIdInfo$Id: l3fp.dtx 2128 2011-01-10 22:44:33Z joseph $
{L3 Experimental floating-point operations}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -1656,22 +1656,14 @@
}
\cs_new_protected_nopar:Npn \fp_trig_normalise_aux: {
\tex_ifnum:D \l_fp_input_a_integer_int > \c_three
- \fp_sub:NNNNNNNNN
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
+ \fp_trig_sub:NNN
\c_six \c_fp_two_pi_decimal_int \c_fp_two_pi_extended_int
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
\tex_expandafter:D \fp_trig_normalise_aux:
\tex_else:D
\tex_ifnum:D \l_fp_input_a_integer_int > \c_two
\tex_ifnum:D \l_fp_input_a_decimal_int > \c_fp_pi_decimal_int
- \fp_sub:NNNNNNNNN
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
+ \fp_trig_sub:NNN
\c_six \c_fp_two_pi_decimal_int \c_fp_two_pi_extended_int
- \l_fp_input_a_integer_int \l_fp_input_a_decimal_int
- \l_fp_input_a_extended_int
\tex_expandafter:D \tex_expandafter:D \tex_expandafter:D
\tex_expandafter:D \tex_expandafter:D \tex_expandafter:D
\tex_expandafter:D \fp_trig_normalise_aux:
@@ -1679,6 +1671,44 @@
\tex_fi:D
\tex_fi:D
}
+\cs_new_protected_nopar:Npn \fp_trig_sub:NNN #1#2#3 {
+ \l_fp_input_a_integer_int
+ \etex_numexpr:D \l_fp_input_a_integer_int - #1 \scan_stop:
+ \l_fp_input_a_decimal_int
+ \etex_numexpr:D \l_fp_input_a_decimal_int - #2 \scan_stop:
+ \l_fp_input_a_extended_int
+ \etex_numexpr:D \l_fp_input_a_extended_int - #3 \scan_stop:
+ \tex_ifnum:D \l_fp_input_a_extended_int < \c_zero
+ \tex_advance:D \l_fp_input_a_decimal_int \c_minus_one
+ \tex_advance:D \l_fp_input_a_extended_int \c_one_thousand_million
+ \tex_fi:D
+ \tex_ifnum:D \l_fp_input_a_decimal_int < \c_zero
+ \tex_advance:D \l_fp_input_a_integer_int \c_minus_one
+ \tex_advance:D \l_fp_input_a_decimal_int \c_one_thousand_million
+ \tex_fi:D
+ \tex_ifnum:D \l_fp_input_a_integer_int < \c_zero
+ \l_fp_input_a_sign_int -\l_fp_input_a_sign_int
+ \tex_ifnum:D
+ \etex_numexpr:D
+ \l_fp_input_a_decimal_int + \l_fp_input_a_extended_int
+ = \c_zero
+ \l_fp_input_a_integer_int -\l_fp_input_a_integer_int
+ \tex_else:D
+ \l_fp_input_a_integer_int
+ \etex_numexpr:D
+ - \l_fp_input_a_integer_int - \c_one
+ \scan_stop:
+ \l_fp_input_a_decimal_int
+ \etex_numexpr:D
+ \c_one_thousand_million - \l_fp_input_a_decimal_int
+ \scan_stop:
+ \l_fp_input_a_extended_int
+ \etex_numexpr:D
+ \c_one_thousand_million - \l_fp_input_a_extended_int
+ \scan_stop:
+ \tex_fi:D
+ \tex_fi:D
+}
\cs_new_protected_nopar:Npn \fp_trig_octant: {
\l_fp_trig_octant_int \c_one
\fp_trig_octant_aux:
@@ -2086,6 +2116,19 @@
}
\cs_new_protected_nopar:Npn \fp_tan_aux_ii: {
\fp_trig_normalise:
+ \tex_ifnum:D \l_fp_input_a_sign_int > \c_zero
+ \tex_ifnum:D \l_fp_trig_octant_int > \c_two
+ \l_fp_output_sign_int \c_minus_one
+ \tex_else:D
+ \l_fp_output_sign_int \c_one
+ \tex_fi:D
+ \tex_else:D
+ \tex_ifnum:D \l_fp_trig_octant_int > \c_two
+ \l_fp_output_sign_int \c_one
+ \tex_else:D
+ \l_fp_output_sign_int \c_minus_one
+ \tex_fi:D
+ \tex_fi:D
\fp_cos_aux_ii:
\tex_ifnum:D \l_fp_input_a_decimal_int = \c_zero
\tex_ifnum:D \l_fp_input_a_integer_int = \c_zero
@@ -2139,11 +2182,6 @@
\etex_numexpr:D
\l_fp_input_a_exponent_int - \l_fp_input_b_exponent_int
\scan_stop:
- \tex_ifnum:D \l_fp_trig_octant_int < \c_three
- \l_fp_output_sign_int \c_one
- \tex_else:D
- \l_fp_output_sign_int \c_minus_one
- \tex_fi:D
\fp_standardise:NNNN
\l_fp_output_sign_int
\l_fp_output_integer_int
diff --git a/Master/texmf-dist/tex/latex/expl3/l3int.sty b/Master/texmf-dist/tex/latex/expl3/l3int.sty
index c8f4b0836e2..276059fb0bf 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3int.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3int.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3int.dtx Copyright (C) 1990-2010 LaTeX3 project
+%% File: l3int.dtx Copyright (C) 1990-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
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3int.dtx 2077 2010-10-17 07:47:48Z will $
+\GetIdInfo$Id: l3int.dtx 2121 2011-01-07 08:46:09Z joseph $
{L3 Experimental Integer module}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3names.sty b/Master/texmf-dist/tex/latex/expl3/l3names.sty
index 13a2bf23621..b162f1371a3 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3names.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3names.sty
@@ -87,7 +87,7 @@
\gdef\filedescription{#1}%
\ProvidesPackage{[unknown package]}[0000/00/00 v0.0 #1]
}
-\GetIdInfo$Id: l3names.dtx 2064 2010-10-03 23:27:33Z will $
+\GetIdInfo$Id: l3names.dtx 2122 2011-01-08 09:14:28Z joseph $
{L3 Experimental Naming Scheme for TeX Primitives}
\endgroup
\def\@tempa{%
@@ -804,6 +804,7 @@
\tex_let:D\tex_hyphen:D \@@hyph
\tex_let:D\luatex_catcodetable:D \luatexcatcodetable
\tex_let:D\luatex_initcatcodetable:D \luatexinitcatcodetable
+\tex_let:D\luatex_latelua:D \luatexlatelua
\tex_let:D\luatex_savecatcodetable:D \luatexsavecatcodetable
\tex_let:D\par \tex_par:D
\tex_ifx:D\name_undefine:N\@gobble
diff --git a/Master/texmf-dist/tex/latex/expl3/l3prg.sty b/Master/texmf-dist/tex/latex/expl3/l3prg.sty
index 13d62b490a9..8dc053e7c5f 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3prg.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3prg.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3prg.dtx Copyright (C) 2005-2010 LaTeX3 project
+%% File: l3prg.dtx Copyright (C) 2005-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
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prg.dtx 2063 2010-10-03 08:26:49Z mittelba $
+\GetIdInfo$Id: l3prg.dtx 2121 2011-01-07 08:46:09Z joseph $
{L3 Experimental control structures}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -390,7 +390,7 @@
{ \prg_case_int_aux:nnn {#1}}
}
\cs_new:Npn \prg_case_dim:nnn #1 #2 {
- \exp_args:No \prg_case_dim_aux:nnn {\dim_use:N \dim_eval:n{#1}} #2
+ \exp_args:No \prg_case_dim_aux:nnn {\dim_eval:n{#1}} #2
\q_recursion_tail ? \q_recursion_stop
}
\cs_new:Npn \prg_case_dim_aux:nnn #1#2#3{
diff --git a/Master/texmf-dist/tex/latex/expl3/l3skip.sty b/Master/texmf-dist/tex/latex/expl3/l3skip.sty
index 73a6b5efb7a..7248309d1cb 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3skip.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3skip.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3skip.dtx Copyright (C) 2005-2010 Frank Mittelbach, LaTeX3 project
+%% File: l3skip.dtx Copyright (C) 2005-2011 Frank Mittelbach, 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
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3skip.dtx 2088 2010-11-23 20:27:27Z joseph $
+\GetIdInfo$Id: l3skip.dtx 2121 2011-01-07 08:46:09Z joseph $
{L3 Experimental skip registers}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -59,7 +59,7 @@
}
\cs_generate_variant:Nn \skip_new:N {c}
\cs_new_protected_nopar:Npn \skip_set:Nn #1#2 {
- #1\skip_eval:n{#2}
+ #1 \etex_glueexpr:D #2 \scan_stop:
}
\cs_new_protected_nopar:Npn \skip_gset:Nn {
\pref_global:D
@@ -77,11 +77,11 @@
\cs_generate_variant:Nn \skip_zero:N {c}
\cs_generate_variant:Nn \skip_gzero:N {c}
\cs_new_protected_nopar:Npn \skip_add:Nn #1#2 {
- \tex_advance:D#1 by \skip_eval:n{#2}
+ \tex_advance:D#1 by \etex_glueexpr:D #2 \scan_stop:
}
\cs_generate_variant:Nn \skip_add:Nn {cn}
\cs_new_protected_nopar:Npn \skip_sub:Nn #1#2{
- \tex_advance:D#1-\skip_eval:n{#2}
+ \tex_advance:D #1 -\etex_glueexpr:D #2 \scan_stop:
}
\cs_new_protected_nopar:Npn \skip_gadd:Nn {
\pref_global:D
@@ -94,15 +94,21 @@
}
\cs_new_eq:NN \skip_horizontal:N \tex_hskip:D
\cs_generate_variant:Nn \skip_horizontal:N {c}
-\cs_new_nopar:Npn \skip_horizontal:n #1 { \skip_horizontal:N \skip_eval:n{#1} }
+\cs_new_nopar:Npn \skip_horizontal:n #1 {
+ \skip_horizontal:N \etex_glueexpr:D #1 \scan_stop:
+}
\cs_new_eq:NN \skip_vertical:N \tex_vskip:D
\cs_generate_variant:Nn \skip_vertical:N {c}
-\cs_new_nopar:Npn \skip_vertical:n #1 { \skip_vertical:N \skip_eval:n{#1} }
+\cs_new_nopar:Npn \skip_vertical:n #1 {
+ \skip_vertical:N \etex_glueexpr:D #1 \scan_stop:
+}
\cs_new_eq:NN \skip_use:N \tex_the:D
\cs_generate_variant:Nn \skip_use:N {c}
\cs_new_eq:NN \skip_show:N \kernel_register_show:N
\cs_generate_variant:Nn \skip_show:N {c}
-\cs_new_protected_nopar:Npn \skip_eval:n #1 { \etex_glueexpr:D #1 \scan_stop: }
+\cs_new_protected_nopar:Npn \skip_eval:n #1 {
+ \tex_the:D \etex_glueexpr:D #1 \scan_stop:
+}
%%\chk_if_free_cs:N \l_tmpa_skip
%%\tex_skipdef:D\l_tmpa_skip 255 %currently taken up by \skip@
\skip_new:N \l_tmpa_skip
@@ -135,7 +141,9 @@
\newdimen #1
}
\cs_generate_variant:Nn \dim_new:N {c}
-\cs_new_protected_nopar:Npn \dim_set:Nn #1#2 { #1~ \dim_eval:n{#2} }
+\cs_new_protected_nopar:Npn \dim_set:Nn #1#2 {
+ #1~ \etex_dimexpr:D #2 \scan_stop:
+}
\cs_generate_variant:Nn \dim_set:Nn {cn,Nc}
\cs_new_protected_nopar:Npn \dim_gset:Nn { \pref_global:D \dim_set:Nn }
\cs_generate_variant:Nn \dim_gset:Nn {cn,Nc,cc}
@@ -160,7 +168,7 @@
\cs_new_protected_nopar:Npn \dim_gzero:N { \pref_global:D \dim_zero:N }
\cs_generate_variant:Nn \dim_gzero:N {c}
\cs_new_protected_nopar:Npn \dim_add:Nn #1#2{
- \tex_advance:D#1 by \dim_eval:n{#2}\scan_stop:
+ \tex_advance:D#1 by \etex_dimexpr:D #2 \scan_stop:
}
\cs_generate_variant:Nn \dim_add:Nn {cn,Nc}
\cs_new_protected_nopar:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn }
@@ -181,13 +189,15 @@
\dim_new:N \g_tmpb_dim
\cs_new_eq:NN \c_zero_dim \c_zero_skip
\cs_new_eq:NN \c_max_dim \c_max_skip
-\cs_new_protected_nopar:Npn \dim_eval:n #1 { \etex_dimexpr:D #1 \scan_stop: }
+\cs_new_protected_nopar:Npn \dim_eval:n #1 {
+ \tex_the:D \etex_dimexpr:D #1 \scan_stop:
+}
\cs_new_eq:NN \if_dim:w \tex_ifdim:D
\cs_set_eq:NN \dim_value:w \tex_number:D
\cs_set_eq:NN \dim_eval:w \etex_dimexpr:D
\cs_set_protected:Npn \dim_eval_end: {\tex_relax:D}
\prg_new_conditional:Nnn \dim_compare:nNn {p,TF,T,F} {
- \if_dim:w \dim_eval:n {#1} #2 \dim_eval:n {#3}
+ \if_dim:w \etex_dimexpr:D #1 #2 \etex_dimexpr:D #3 \scan_stop:
\prg_return_true: \else: \prg_return_false: \fi:
}
\prg_new_conditional:Npnn \dim_compare:n #1 {p,TF,T,F} {