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
% Filename: extras.tex | |
% Author: Christian Figueroa (cfigg@stanford.edu) | |
% Usage: | |
% 1. Drop this file in whatever directory your source .tex file is in. | |
% 2. Add "\include{extras}" before the "\begin{document}" line. | |
% 3. Change the \me command on the next line so that your paper actually says your name, not mine. | |
\newcommand\me{Christian Figueroa}% | |
\usepackage{xspace}% | |
\usepackage{expl3}% | |
\usepackage{environ}% |
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
\usepackage{expl3}% | |
\ExplSyntaxOn% | |
\makeatletter% | |
\providecommand\withexpansion[2][\expand]{% | |
\edef\@withexpansion@expand@compare{\detokenize{#1}}% | |
\@withexpansion@expansion@count=0% | |
\tl_set:Nn\@withexpansion@tl@one{#2}% | |
\tl_reverse:N\@withexpansion@tl@one% | |
\tl_clear:N\@withexpansion@tl@two% | |
\expandafter\@withexpansion@while\expandafter{\@withexpansion@tl@one}% |