Created
October 17, 2013 20:19
-
-
Save vermiculus/7031558 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
\documentclass{article} | |
\usepackage{xparse,expl3,environ} | |
\ExplSyntaxOn | |
\NewEnviron{save}[1]{ | |
\tl_new:c { saved_text__#1 } | |
\tl_set:cv { saved_text__#1 } { | |
\BODY | |
} | |
} | |
\NewDocumentCommand \UseSaved { m } { | |
\use:c { saved_text__#1 } | |
} | |
\ExplSyntaxOff | |
\begin{document} | |
\begin{save}{some text} | |
I have some text. | |
This is a quotation. | |
I'm bad at coming up with examples. | |
\end{save} | |
\UseSaved{some text} | |
\UseSaved{some text} | |
\UseSaved{some text} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment