diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex-dev/base/usrguide.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex-dev/base/usrguide.tex | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex-dev/base/usrguide.tex b/Master/texmf-dist/doc/latex-dev/base/usrguide.tex index 32e12a13977..7234ac821cb 100644 --- a/Master/texmf-dist/doc/latex-dev/base/usrguide.tex +++ b/Master/texmf-dist/doc/latex-dev/base/usrguide.tex @@ -865,7 +865,7 @@ specification then an error is issued. -\section{Copying and showing (robust) commands} +\section{Copying and showing (robust) commands and environments} If you want to (slightly) alter an existing command you may want to save the current definition under a new name and then use that in a @@ -911,9 +911,6 @@ token but need \enquote{constructing}, you can use \cs{ExpandArgs} as explained in Section~\ref{sec:preconstructing-csnames}. - - - \begin{decl} |\ShowCommand| \arg{cmd} \end{decl} @@ -926,6 +923,26 @@ also the actual payload code and in case of commands declared with \cs{NewDocumentCommand}, etc.\ it also gives you detailed information about the argument signature. +\begin{decl} + |\NewEnvironmentCopy| \arg{env} \arg{existing-env} \\ + |\RenewEnvironmentCopy| \arg{env} \arg{existing-env} \\ + |\DeclareEnvironmentCopy| \arg{env} \arg{existing-env} +\end{decl} + +This copies the definition for environment \meta{existing-env} to +\meta{env} (both the beginning and end code), i.e., it is simply +applying \cs{NewCommandCopy} twice to the internal commands that +define an environment, i.e., \cs{}\meta{env} and \cs{end}\meta{env}. +The differences between \cs{New...}, \cs{Renew...}, and +\cs{Declare...} are the usual ones. + +\begin{decl} + |\ShowEnvironment| \arg{env} +\end{decl} +This displays the meaning of the begin end end code for environment \meta{env}. + + + \section[Preconstructing command names \\ (or otherwise expanding arguments)] {Preconstructing command names (or otherwise expanding arguments)} |