Latex displays the command values by default - I am finding it more difficult to display the command names along with the values.
I have a list of commands that I would like to loop over and print each one's name and value.
\documentclass[11pt,letterpaper]{article}
\usepackage{tikz} % defines foreach
\begin{document}
\def\one{this is one}
\def\two{this is two}
\def\three{this is three}
\def\CMDs{\one,\two,\three} % list of commands I would like to loop over
\foreach \cmd in \CMDs
{
\string\cmd = \cmd \\ % should be name = value
}
\end{document}
But the \string is not resolving the \cmd, its just printing cmd.
Even tried \expandafter\string\csname\cmd\endcsname = \cmd as suggested here - no use, it is expanding and printing the value on both sides, not the name.
Please advice on how to achieve this.
In case one would like to know the background, this is for my CVMaker project - to keep track of internal variables and dump their values on demand, as debug-aid for the package users.

