I'd like to set the control sequence \my_cs
to the value of some LaTeX3 expression that expands to a control sequence, e.g. to the value of
\use:c {some_other_control_sequence}
In other words, \some_other_control_sequence
is an existing control sequence that is set to some value, and I'd like to set \my_cs
to this value, but without writing out the control sequence \some_other_control_sequence
explicitly. How can I do so?
For instance, suppose \some_other_control_sequence
is a global LaTeX3 variable set to the integer 42
, and suppose I'm writing a LaTeX3 function, and the name of this variable, namely some_other_control_sequence
is expected to be passed in as the parameter #1
, but I don't know the name of this variable at the time of writing the function. How can I set \my_cs
to \some_other_control_sequence
's value, namely 42
, inside the function that I'm writing?
\use:c
implies the name is constructed on-the-fly: is that the case or it is known in advance? – Joseph Wright♦ Oct 6 '17 at 8:38\cs_set_eq:cc {my_cs}{#1}
. – Ulrike Fischer Oct 6 '17 at 9:02