xxxxxxxxxx
\newcommand{commandName}[#ofParams]{commandDefinition}
# Where in the 'commandDefinition', use #1, #2, ... to represent
# first, second, ... argument
xxxxxxxxxx
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\newcommand{\aut}[2]{#1~\textsc{#2}}
\begin{document}
\aut{Pierre}{Durant}
\end{document}
xxxxxxxxxx
If you use a command multiple times create e shortcut, like for example:
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\begin{document}
xxxxxxxxxx
\newcommand{\plusbinomial}[3][2]{(#2 + #3)^#1} %we have 3 params,
% and 2 is the optional value of the 1st param
To save some time when writing too many expressions
with exponents is by defining a new command to make simpler:
\[ \plusbinomial{x}{y} \]
And even the exponent can be changed
\[ \plusbinomial[4]{y}{y} \] %here we override the optional val of the 1st param with the 4