diff options
author | Karl Berry <karl@freefriends.org> | 2010-05-23 23:52:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-05-23 23:52:38 +0000 |
commit | 6e411d4c9dba73649f1ca5e25984ae667d57997a (patch) | |
tree | 020927d5513315116fc4add60a559f733765de21 /Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx | |
parent | 120f7e4c07269238a49d6bf82cdd01e0be96f2a7 (diff) |
xpackages update (23may10)
git-svn-id: svn://tug.org/texlive/trunk@18440 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx b/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx index 45b7ab9bb96..f1d6ebf872d 100644 --- a/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx +++ b/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx @@ -41,7 +41,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: xparse.dtx 1905 2010-05-19 07:45:31Z joseph $ +\GetIdInfo$Id: xparse.dtx 1927 2010-05-23 11:00:21Z joseph $ {Generic document command parser} %\iffalse %<*driver> @@ -191,6 +191,28 @@ % argument processors is a somewhat advanced topic, (or at least a less % commonly used feature) and is covered in Section~\ref{sec:processors}. % +%\subsection{Spacing and optional arguments} +% +% TeX will find the first argument after a function name irrespective +% of any intervening spaces. This is true for both mandatory and +% optional arguments. So "\foo[arg]" and \verb*"\foo [arg]" are +% equivalent. Spaces are also ignored when collecting arguments up +% to the last mandatory argument to be collected (as it must exist). +% So after +%\begin{verbatim} +% \DeclareDocumentCommand \foo { m o m } { ... } +%\end{verbatim} +% the user input "\foo{arg1}[arg2]{arg3}" and +% \verb*"\foo{arg1} [arg2] {arg3}" will both be parsed in the same +% way. However, spaces are \emph{not} ignored when parsing optional +% arguments after the last mandatory argument. Thus with +%\begin{verbatim} +% \DeclareDocumentCommand \foo { m o } { ... } +%\end{verbatim} +% "\foo{arg1}[arg2]" will find an optional argument but +% \verb*"\foo{arg1} [arg2]" will not. This is so that trailing optional +% arguments are not picked up `by accident' in input. +% %\subsection{Declaring commands and environments} % % With the concept of an argument specifier defined, it is now |