Skip to content

Instantly share code, notes, and snippets.

View FiggChristian's full-sized avatar

Christian Figueroa FiggChristian

View GitHub Profile
@FiggChristian
FiggChristian / extras.tex
Last active April 12, 2020 05:37
Helper TeX file for CS 103 and CS 109 Stanford courses (and probably a bunch of other courses, but that's all I've taken so far).
% 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}%
\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}%