I have a macro like this:
\newcommand{\listanimals}[1]{
Animals in the farm: #1.
}
So using \listanimals{pig / sheep / cow / duck / goat} will print:
Animals in the farm: pig / sheep / cow / duck / goat.
I want to know, can I have other macros display only certain information within that parameter?
For example:
\listfirsttwoanimals{pig / sheep / cow / duck / goat}
First two animals: pig / sheep.
\listanimalsafterfirsttwo{pig / sheep / cow / duck / goat}
Animals after the first two: cow / duck / goat.