diff options
author | Karl Berry <karl@freefriends.org> | 2013-08-18 23:32:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-08-18 23:32:33 +0000 |
commit | f917dbdfae2021d592989828a2993fa2b4a78aae (patch) | |
tree | 6587f88a395e0b7e8e7a7f60ec39c8a690a4a5db /Master/texmf-dist/tex/latex/macroswap | |
parent | 008b1c4fc694eb541c50db9f3d406607e269d2fc (diff) |
macroswap (18aug13)
git-svn-id: svn://tug.org/texlive/trunk@31462 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/macroswap')
-rw-r--r-- | Master/texmf-dist/tex/latex/macroswap/macroswap.sty | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/macroswap/macroswap.sty b/Master/texmf-dist/tex/latex/macroswap/macroswap.sty new file mode 100644 index 00000000000..6d719cde5a0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/macroswap/macroswap.sty @@ -0,0 +1,43 @@ +%% +%% 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. +%% +\makeatletter +\newcommand{\gmacroswap}[2]{% + \edef\macro@swap@left{\csexpandonce{#1}}% + \edef\macro@swap@right{\csexpandonce{#2}}% + \expandafter\xdef\csname#2\endcsname{\expandonce{\macro@swap@left}}% + \expandafter\xdef\csname#1\endcsname{\expandonce{\macro@swap@right}}% + \let\macroswap@left\relax% + \let\macroswap@right\relax% +} +\newcommand{\macroswap}[2]{% + \edef\macro@swap@left{\csexpandonce{#1}}% + \edef\macro@swap@right{\csexpandonce{#2}}% + \expandafter\edef\csname#2\endcsname{\expandonce{\macro@swap@left}}% + \expandafter\edef\csname#1\endcsname{\expandonce{\macro@swap@right}}% + \let\macroswap@left\relax% + \let\macroswap@right\relax% +} +\makeatother +\endinput +%% +%% End of file `macroswap.sty'. |