I'm using tikz to compete in a codegolf question here. To get around having to write \typein
a whole bunch of times I have \def~{\typein[}
. Since nearly every \typein
is prepended by ]{}
so I would like to define ]{}\typein[
instead. However \def
doesn't like curly braces for obvious reasons.
Is there some way I could add curly braces to my definition?
Here is my code if that helps at all:
\documentclass[tikz]{standalone}\begin{document}\tikz\def~{\typein[}~\a]{}~\s]{}~\d]{}~\r]{}\def\u{)--(\a+\d}\draw(0,0)--(\a,127\u,\s\u+64,\s\u+\r+64,0);\end{document}