diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex index 8f6f1639b0c..5441b9e101f 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex @@ -28,11 +28,11 @@ recommended for adventurous users. To add a new function to the math engine the following command can be used: -\begin{command}{\pgfmathdeclarefunction\marg{function name}\marg{number of arguments}\marg{code}} +\begin{command}{\pgfmathdeclarefunction\marg{name}\marg{number of arguments}\marg{code}} This will set up the parser to recognize a function called \meta{name}. The name of the function can consist of, uppercase or - lower case letters, numbers or the underscore |_|. In line with + lowercase letters, numbers or the underscore |_|. In line with many programming languages, a function name cannot begin with a number or contain any spaces. @@ -40,7 +40,7 @@ used: or the value |...|, which indicates a variable number of arguments. \pgfname{} treats constants, such as |pi| and |e|, as functions with zero arguments. Functions with more than nine - arguments or with variable arguments are a ``bit special'' and + arguments or with a variable number of arguments are a ``bit special'' and are discussed below. The effect of \meta{code} should be to set the macro @@ -85,7 +85,7 @@ used: \item |\pgfmath|\meta{function name} - This macro will provide ``public'' interface for the function + This macro will provide a ``public'' interface for the function \meta{function name} allowing the function to be called independently of the parser. All arguments passed to this macro are evaluated using |\pgfmathparse| and then passed on to the following @@ -94,11 +94,11 @@ used: \item |\pgfmath|\meta{function name}|@| - This macro is the ``private'' implementation of the functions + This macro is the ``private'' implementation of the function's algorithm (but note that, for speed, the parser calls this macro rather than the ``public'' one). Arguments passed to this macro are expected to be numbers without units. It is defined using - \meta{code}, but need not be self contained. + \meta{code}, but need not be self-contained. \end{itemize} @@ -123,7 +123,7 @@ used: This means that some ``extra work'' will be required to access each argument (although it is a fairly simple task). - Note, that there are, two exceptions to this arrangement: + Note that there are two exceptions to this arrangement: the public versions of the |min| and |max| functions still take two arguments for compatibility with older versions, but each of these arguments can take several comma separated values. @@ -147,7 +147,7 @@ used: \pgfname{} uses the last known definition of a function within the prevailing scope, so it is possible for a function to be redefined locally. You should also remember that any |.sty| or |.tex| file - containing any re-implementations should be loaded after pgf-Math. + containing any re-implementations should be loaded after |pgfmath|. In addition to the above commands, the following key is provided to quickly create simple ad hoc functions which can greatly improve @@ -171,13 +171,13 @@ used: Each definition in \meta{function definitions} takes the form \meta{name}|(|\meta{arguments}|)=|\meta{definition}|;| (note the semicolon at the end, this is very important). If multiple - functions are being defined the semicolon is used to separate + functions are being defined, the semicolon is used to separate them (\emph{not} a comma). The function \meta{name} can be any name that is not already a function name in the current scope. The list of \meta{arguments} are commands such as |\x|, or |\y| (it is not possible to declare functions that take variable numbers of arguments using this key). - If the function takes no arguments then the parentheses need not + If the function takes no arguments, then the parentheses need not be used. The \meta{definition} should be an expression that can be parsed by the mathematical engine and should use the commands |