# Put a box and shade it around aligned equations

Given:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{amssymb}
\author{Sam Keene}
\title{Notes}
\begin{document}
\section{Notes}

\begin{align}
\tan{\theta} &= \frac{2t}{1-t^2} &
\sin{\theta} &= \frac{2t}{1+t^2} &
\cos{\theta} &= \frac{1-t^2}{1+t^2}
\end{align}

\end{document}


I know I can put a box around individual equations using \Aboxed, but how could I put a box around the entire group and have it shaded?

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Nov 19 '14 at 15:08
• @ChristianHupfer Thanks! I've added in the rest of the code. – Qhost Nov 19 '14 at 15:13

Something like that?

\documentclass{article}
\usepackage[many]{tcolorbox}
\begin{document}
colback=yellow!10!white,colframe=yellow!50!black]
\tan{\theta} &= \frac{2t}{1-t^2} &
\sin{\theta} &= \frac{2t}{1+t^2} &
\cos{\theta} &= \frac{1-t^2}{1+t^2}
\end{tcolorbox}
\end{document}


Or like this ;)

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
%\usepackage{amsmath}    %% not needed, loaded by empheq
\usepackage{amsfonts}
\usepackage{empheq}
\usepackage{amssymb}
\usepackage[most]{tcolorbox}
%% box from tcolorbox manual
\newtcbox{\otherbox}[1][]{nobeforeafter,math upper,tcbox raise base,
enhanced,frame hidden,boxrule=0pt,interior style={top color=green!10!white,
bottom color=green!10!white,middle color=green!50!yellow},
fuzzy halo=1pt with green,#1}
\author{Sam Keene}
\title{Notes}
\begin{document}
\section{Notes}

\begin{empheq}[box=\otherbox]{align}
\tan{θ} &= \frac{2t}{1-t²} &
\sin{θ} &= \frac{2t}{1+t²} &
\cos{θ} &= \frac{1-t²}{1+t²}
\end{empheq}

\end{document}