\(%%% IMPORTANT: The space that surrounds a parameter from both sides is mandatory!
% operators
\let\div\divOld
\DeclareMathOperator{\div}{div}
\DeclareMathOperator{\grad}{\nabla\!}
\DeclareMathOperator{\tr}{\mathrm{tr}}
% differential operators
\newcommand{\diff}{\operatorname{d}}
\renewcommand{\d}{\diff\!}
%\newcommand{\ddir}[1]{\nabla_{\! #1 }}
\newcommand{\ddir}[1]{\partial_{\tau}}
% spaces
\newcommand{\R}{\mathbb{R}}
% vectors and tensors
% \renewcommand{\vec}[1]{\boldsymbol{ #1 }}
\newcommand{\tensorq}[1]{\boldsymbol{ #1 }}
% shorthand notation for frequently used vectors and tensors
\newcommand{\va}{\vec{a}}
\newcommand{\vb}{\vec{b}}
\newcommand{\ve}{\vec{e}}
\newcommand{\vf}{\vec{f}}
\newcommand{\vF}{\vec{F}}
\newcommand{\vg}{\vec{g}}
\newcommand{\vn}{\vec{n}}
\newcommand{\vm}{\vec{m}}
\newcommand{\vM}{\vec{M}}
\newcommand{\vq}{\vec{q}}
\newcommand{\vr}{\vec{r}}
\newcommand{\vR}{\vec{R}}
\newcommand{\vt}{\vec{t}}
\newcommand{\vu}{\vec{u}}
\newcommand{\vv}{\vec{v}}
\newcommand{\vx}{\vec{x}}
\newcommand{\vX}{\vec{X}}
\newcommand{\veps}{\vec{\epsilon}}
\newcommand{\vgamma}{\vec{\gamma}}
\newcommand{\vchi}{\vec{\chi}}
\newcommand{\vomega}{\vec{\omega}}
\newcommand{\vsigma}{\vec{\sigma}}
\newcommand{\vtau}{\vec{\tau}}
\newcommand{\vtheta}{\vec{\theta}}
\newcommand{\tI}{\tensorq{I}}
\newcommand{\tT}{\tensorq{T}}
\newcommand{\teps}{\tensorq{\epsilon}}
\newcommand{\tsigma}{\tensorq{\sigma}}
% norms
\newcommand{\norm}[2][]{\lVert #2 \rVert_{ #1 }}
\newcommand{\seminorm}[2]{\lvert #2 \rvert_{ #1 }}
\newcommand{\abs}[1]{\lvert #1 \rvert}
% brackets
\newcommand{\bc}[1]{\left( #1 \right)}
\newcommand{\be}[1]{\left[ #1 \right]}
\newcommand{\bp}[1]{\left\{ #1 \right\}}\)