latex define variable in document code example Example: use variables in latex \newcommand{\newCommandName}{text to insert}