'Returns a list with copies of each command entry in the document
Arguments:
flags -- flags to filter the commands, which should for a be used over
over filtering the commands on your own (optimization/caching).
Possible flags are:
NO_BEGIN_END_COMMANDS - removes all begind and end commands
i.e.: exclude \begin{} and \end{} commands
ONLY_COMMANDS_WITH_ARGS - removes all commands without arguments
i.e.: allows \com{args} and \com{} but not \com
default flags are:
NO_BEGIN_END_COMMANDS | ONLY_COMMANDS_WITH_ARGS
Returns:
A list of all commands, which are preprocessed with the flags'

def commands(self, flags=DEFAULT_FLAGS):

    return self._commands(flags)
