Created
May 22, 2017 21:08
-
-
Save Arth-ur/c8f9f85e6563538dd89928d0f799b2d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\makeatletter | |
\newcommand{\get}[1]{% | |
\@ifundefined{lookup@#1}{% | |
\PackageError{lookup}{No #1 key in lookup}{% | |
Key #1 was not found in lookup. % | |
You can insert it with \string\lookupPut{key}{value}.% | |
}% | |
}{% | |
\@nameuse{lookup@#1}% | |
}% | |
} | |
\newcommand{\@lookupPut}[2]{% | |
\@namedef{lookup@#1}{#2}% | |
} | |
\makeatother | |
\newcommand{\applysignrule}[1]{% | |
\StrSubstitute{#1}{+-}{-}% | |
} | |
%% Usage: \get{example.value1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment