%%%%%%%%%%%%%%%%%%%%%%%%
%
%		213-lecture-macros.tex
%
%		Last updated 6.2.2019
%
%%%%%%%%%%%%%%%%%%%%%%%%

\usetikzlibrary{decorations.pathreplacing}

%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Answer highlighting
%
%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\answer}[1]{{\color{cyan} {#1} }}
\newcommand{\ans}[1]{{\color{cyan}${#1}$}}


%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Miscellaneous \newcommand's
%
%%%%%%%%%%%%%%%%%%%%%%%%


\newcommand{\R}{\mathbb{R}}

\newcommand{\eps}{\varepsilon}
\newcommand{\lam}{\lambda}

\newcommand{\dsum}{\displaystyle\sum}
\newcommand{\dint}{\displaystyle\int}
\newcommand{\diint}{\displaystyle\iint}

\newcommand{\xbar}{\overline{x}}

\newcommand{\dee}{\partial}

%%

\newcommand{\bfa}{\mathbf{a}}
\newcommand{\bfb}{\mathbf{b}}
\newcommand{\bfc}{\mathbf{c}}
\newcommand{\bfd}{\mathbf{d}}

\newcommand{\bfh}{\mathbf{h}}

\newcommand{\bfm}{\mathbf{m}}
\newcommand{\bfn}{\mathbf{n}}

\newcommand{\bfu}{\mathbf{u}}
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfw}{\mathbf{w}}
\newcommand{\bfx}{\mathbf{x}}

%%%

\newcommand{\ii}{\mathbf{i}}
\newcommand{\jj}{\mathbf{j}}
\newcommand{\kk}{\mathbf{k}}

%%%

\newcommand{\rr}{\mathbf{r}}

%%%

\newcommand{\bfr}{\mathbf{r}}

%%%

\newcommand{\bfA}{\mathbf{A}}
\newcommand{\bfB}{\mathbf{B}}
\newcommand{\bfD}{\mathbf{D}}
\newcommand{\bfE}{\mathbf{E}}
\newcommand{\bfF}{\mathbf{F}}
\newcommand{\bfL}{\mathbf{L}}
\newcommand{\bfN}{\mathbf{N}}
\newcommand{\bfS}{\mathbf{S}}
\newcommand{\bfT}{\mathbf{T}}

%%%

\newcommand{\bftheta}{\boldsymbol{\theta}}

%%%%%%%%%%%%%%%%%%%%%%%%
%
%		\fbox options
%
%%%%%%%%%%%%%%%%%%%%%%%%

\fboxsep=5mm
\fboxrule=1pt

%%%%%%%%%%%%%%%%%%%%%%%%
%
%		TikZ shorthand
%
%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\drawxy}[1]
{
\draw[thick,->,>=stealth]	(-#1,0)	--	(#1,0);
\draw[thick,->,>=stealth]	(0,-#1)	--	(0,#1);
%%
\node[right]	at	(#1,0)		{\scriptsize{$x$}};
\node[above] at	(0,#1)		{\scriptsize{$y$}};
}
\newcommand{\drawxyz}[1]
{
\draw[thick,->,>=stealth]	(0,0,0)	--	++(#1,0,0);
\draw[thick,->,>=stealth]	(0,0,0)	--	++(0,#1,0);
\draw[thick,->,>=stealth]	(0,0,0)	--	++(0,0,#1);
%%
\node[below] at	(0,0,#1)		{\scriptsize{$x$}};
\node[right] at		(#1,0,0)		{\scriptsize{$y$}};
\node[above] at	(0,#1,0)		{\scriptsize{$z$}};
}

\tikzset{->-/.style={decoration={
  markings,
%  mark=at position .55 with {\arrow{triangle 45}} },postaction={decorate}}}
  mark=at position .55 with {\arrow{stealth}} },postaction={decorate}}}

%%%%%%%%%%%%%%%%%%%%%%%%