%% %% This is file `macroswap.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% macroswap.dtx (with options: `package') %% %% This is a generated file. %% %% Copyright (C) 2013 by Robert J Lee %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either %% version 1.2 of this license or (at your option) any later %% version. The latest version of this license is in: %% %% http://www.latex-project.org/lppl.txt %% %% and version 1.2 or later is part of all distributions of %% LaTeX version 1999/12/01 or later. %% \newcommand{\macroswap}[2]{% \expandafter\ifcsname#1\endcsname% \else% \PackageError{macrocode}{Two macro names are required for macroswap % (got ``#1'' and ``#2'')}{% Two macro names are required, but the first parameter does not % expand to a defined macro name. Macros have not been swapped.}% \fi% \expandafter\ifcsname#2\endcsname% \else% \PackageError{macrocode}{Two macro names are required for macroswap % (got ``#1'' and ``#2'')}{% Two macro names are required, but the second parameter does not % expand to a defined macro name. Macros have not been swapped.}% \fi% \expandafter\let\expandafter\macroswap@temp\csname#1\endcsname% \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname% \expandafter\let\csname#2\endcsname\macroswap@temp% \let\macroswap@temp\relax% } \newcommand{\gmacroswap}[2]{% \expandafter\let\expandafter\macroswap@temp\csname#1\endcsname% \expandafter\global\expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname% \expandafter\global\expandafter\let\csname#2\endcsname\macroswap@temp% \let\macroswap@temp\relax% } \endinput %% %% End of file `macroswap.sty'.