In some codes I encountered some \z command, for example:
\pgfmathrandomitem\z{mylist}\z\prunelist{mylist}
from this question: Generating random numbers without repetitions. What exactly does it mean?
In some codes I encountered some \z command, for example:
\pgfmathrandomitem\z{mylist}\z\prunelist{mylist}
from this question: Generating random numbers without repetitions. What exactly does it mean?
It's nothing more than a standard macro. Instead of \z you could have used \xxxyyy or any other valid macro name.
The line
\pgfmathrandomitem\z{mylist}
simply selects an item from the mylist list and stores it in the macro \z.
Then
\z\prunelist{mylist}
shows the item stored in \z and removes it from the list.
\z\prunelist{mylist} removes the item stored in \z from the list.
– Gonzalo Medina
Jan 30 '15 at 18:38
\pgfmathrandomitem does: `\documentclass{article}
\usepackage{tikz}
\begin{document}
\pgfmathdeclarerandomlist{mylist}{{one}{two}{three}{four}{five}{six}{seven}} \pgfmathrandomitem\z{mylist}
\z\z\z
\end{document}`
– Gonzalo Medina Jan 30 '15 at 18:52\xxxx \xxxx`
– Gonzalo Medina Jan 30 '15 at 18:56
\pgfmathrandomiteminternally makes the necessary definition. – Gonzalo Medina Jan 30 '15 at 18:34\zis a control sequence which is very often preferred by @DavidCarlisle . – wipet Jan 31 '15 at 07:03