I've just wanted to add some elements to an existing command/variable without success. There are many examples for different ways on how to achieve that goal, but none of them seem to work for me.
In the following minimal working example, I've tried to copy the solution from there https://tex.stackexchange.com/a/101694/109350
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{MWS}
\author{r2p2}
\date{July 2016}
\newcommand{\features}[0]{}
\newcommand{\feature}[1] {
\let\oldfeatures\features
\renewcommand{\features}[0]{\oldfeatures, #1}
}
\feature{one}
\feature{two}
\feature{three}
\begin{document}
\maketitle
\section{Introduction}
\features
\end{document}
But I get
TeX capacity exceeded, sorry [input stack size=5000].
\oldfeatures ->\oldfeatures
, two
as error message, which should not happen, seince oldfeatures is just an old copy of features does not contain features itself. What do I miss?
Thanks in advance.
one, \feature{two} ->one, twoand \feature{three} ->one, two, three? – Bernard Jul 03 '16 at 13:33\begin{itemize} \item myspecialfeature ... \end{itemize}everytime. Instead, I want to automate the list creation. Which makes it overall easier to read if you just see a list of\feature {this}. (Hope that makes sense.) – r2p2 Jul 03 '16 at 14:48