I want to store values, texts, commands... in variables to use them later. For example, I would like to have something like


where the commands \partx should be defined in the preamble and the arguments A,B,C,D are passed to variables that are used in the command \printit. More precisely, the \printit command could be to print the arguments A,B,C,D in a certain style and a certain order (not neccesarily the one given in the document). I am aware of \newcommand but I am not sure if this can be of help here?


this seems to be the same model as as \author{...} , \title{...} etc which save their arguments for use by \maketitle.

For that you just need


\newcommand\printit{ blah \zzpartb\ and foobar \zzparta.}
  • Hi, I vote your answer +1. I vote always positive for my friends. – Sebastiano Oct 12 '17 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.