鉴于:
\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}
我知道我可以使用 \Aboxed 在各个方程式周围放置一个框,但我怎样才能在整个组周围放置一个框并将其阴影化呢?
答案1
类似这样的事?
\documentclass{article}
\usepackage[many]{tcolorbox}
\begin{document}
\begin{tcolorbox}[enhanced,ams align,drop fuzzy shadow,
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}
答案2
或者像这样 ;)
\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}