% ==============================================================
% here are user-defined macros to make latex source entry easier
% ==============================================================

% -----------------------------
% Begin, end, an cite equations
% -----------------------------

\newcommand{\beq}{\begin{equation}}
\newcommand{\eeq}{\end{equation}}
\newcommand{\bea}{\begin{eqnarray}}
\newcommand{\eea}{\end{eqnarray}}

\newcommand{\equ}[1]{Eq.~(\ref{eq:#1})}
\newcommand{\eqs}[2]{Eqs.~(\ref{eq:#1}) and (\ref{eq:#2})}
\newcommand{\equa}[1]{Equation~(\ref{eq:#1})}


% --------------------
% Mathematical symbols
% --------------------

\newcommand{\kk}{{\bf k}}
\newcommand{\qq}{{\bf q}}
\newcommand{\GG}{{\bf G}}
\newcommand{\rr}{{\bf r}}
\newcommand{\vv}{{\bf v}}
\newcommand{\RR}{{\bf R}}
\newcommand{\PP}{{\bf P}}
\newcommand{\E}{{\cal E}}
\newcommand{\EE}{{\bm{{\cal E}}}}
\newcommand{\0}{{\bf 0}}

\newcommand{\enk}{\epsilon_{n\kk}}
\newcommand{\enkh}{\overline{\epsilon}_{n\kk}}

%\newcommand{\hh}{{({\rm h})}}
%\newcommand{\ww}{{({\rm w})}}
\newcommand{\hh}{{{\rm H}}}
\newcommand{\ww}{{{\rm W}}}

\newcommand{\ravg}{\overline{\bf r}}

\newcommand{\la}{{\langle\kern-2.0pt\langle}}
\newcommand{\ra}{{\rangle\kern-2.0pt\rangle}}
\newcommand{\vt}{{\vert\kern-1.0pt\vert}}

\newcommand{\WW}{{\bf W}}
\newcommand{\HH}{{\bf H}}
\newcommand{\DD}{{\bf D}}
\newcommand{\BB}{{\bf B}}
\newcommand{\eps}{{\epsilon}}

% --------------------------
% Mathematical constructions
% --------------------------

\newcommand{\ket}[1]{\vert{#1}\rangle}
\newcommand{\bra}[1]{\langle#1\vert}
\newcommand{\inprod}[2]{\langle#1\vert{#2}\rangle}
\newcommand{\matel}[3]{\langle#1\vert{#2}\vert{#3}\rangle}

\newcommand{\bnk}{_{n\kk}}
\newcommand{\bmk}{_{m\kk}}

\newcommand{\intr}{\int \! d{\bf r} \;}
\newcommand{\ibz}{\frac{V}{(2\pi)^3}\int_{\rm BZ}}

\newcommand{\imag}{{\rm Im}}
\newcommand{\real}{{\rm Re}}

% Added by Ivo and David: number of bands and WFs
% This one for when we don't want to make a distinction
\newcommand{\nbw}{J}
% These two for when we need to distinguish between them
\newcommand{\nwann}{J}
\newcommand{\nbands}{{\cal J}}
%this is for colours
\newcommand{\tcb}{\textcolor{blue}}
\newcommand{\tcr}{\textcolor{red}}
\newcommand{\tcg}{\textcolor{green}}
