For this particular application you can simply do
\newcommand{\nodexnX}[1]{\expandafter\nodexn\expandafter{#1}}
and call \nodexnX{\points}{B}
Or you can go further and redefine \nodexn so that it fully expands its first argument
\let\PSTRICKSnodexn\nodexn
\renewcommand{\nodexn}[1]{%
\begingroup\edef\x{\endgroup
\noexpand\PSTRICKSnodexn{#1}}\x
}
The LaTeX3 kernel has \exp_args:Nx that's implicitly added with \cs_generate_variant:Nn:
\usepackage{expl3}
\ExplSyntaxOn
\cs_set_eq:NN \pstricks_nodexn:nn \nodexn
\cs_generate_variant:Nn \pstricks_nodexn:nn { x }
\cs_set_eq:NN \nodexn \pstricks_nodexn:xn
\ExplSyntaxOff
If you need to fully expand also the second argument, you can do
\cs_set_eq:NN \pstricks_nodexn:nn \nodexn
\cs_generate_variant:Nn \pstricks_nodexn:nn { xx }
\cs_set_eq:NN \nodexn \pstricks_nodexn:xx
In both case you have effectively redefined \nodexn to expand its argument(s) before the original macro is called.
Addition 2022
In the next LaTeX kernel, it will be available \ExpandArgs and
\ExpandArgs{x}\nodexn{\points}{B}
will do the trick. This is an interface to \exp_args:Nx, meaning that the next token is jumped over and the contents of the following braced group will be fully expanded.
You you want to fully expand also the second argument?
\ExpandArgs{xx}\nodexn{\points}{\foo}
will do.
So long as \exp_args:N<characters> exists, one can use \ExpandArgs{<characters>}. The characters are
N to denote “jump over a token”
n to denote “jump over a braced group”
x to fully expand the contents of a braced group using \edef
e to fully expand the contents of a braced group using \expanded
f to recursively the contents of a braced group until finding an unexpandable token
o to expand once the first token inside a braced group
If a needed particular combination does not exist, there is no “official“ user interface to create it, but one can do
\ExplSyntaxOn
\exp_args_generate:n { <characters>, ... }
\ExplSyntaxOff
Many combinations can be generated at once, separating the strings of characters by a comma.
\expandafter\nodexn\expandafter{\points}{B}work? You're just expanding the{token (which stays{). The LaTeX kernel also defines\@expandtwoargswhich would\edefs the first two arguments of a macro:\@expandtwoargs\nodexn{\points}{B}. – Qrrbrbirlbel Sep 17 '13 at 13:42\defthe list up to that point, and expandafter the\defand following{: `\documentclass{article} \usepackage[T1]{fontenc} \newcommand\manyargs[4]{#1.#2.#3.\detokenize{#4}} \def\expandthis{EXP} \begin{document} \manyargs{a}{b}{c}{\expandthis}\def\tmp{\manyargs{a}{b}{c}} \expandafter\tmp\expandafter{\expandthis} \end{document} ` I learned that from David Carlisle.
– Steven B. Segletes Sep 17 '13 at 13:51pst-node.texfrom http://texnik.dante.de/tex/generic/pst-node/ you can simply write\nodexn{\points}{B}without any\expandafter– Sep 17 '13 at 18:23