Answer by egreg for Create programmatically a macro whose name contains the...
If you're afraid of the access time to a sequence, you can use \csname:\documentclass{article}\ExplSyntaxOn\NewDocumentCommand{\newarray}{m} { % keep the next free index \int_new:c {...
View ArticleAnswer by wipet for Create programmatically a macro whose name contains the...
If you define\def\sdef#1{\expandafter\def\csname#1\endcsname}\def\cs#1{\csname#1\endcsname}then an equivalent of python'smyArray[0] = "mystyle"is\sdef{myArray[0]}{mystyle}and the value is accessible...
View ArticleCreate programmatically a macro whose name contains the value of a counter
I often need to define macros whose name contains the value of a counter, notably to attribute a value to multiple objects: in python I would do:myArray[0] = "mystyle"Unfortunately, I can't use...
View Article
More Pages to Explore .....