我的 MWE,
\documentclass[a4paper,11pt]{article}
\usepackage{empheq}
\usepackage[svgnames]{xcolor}
\definecolor{backcolor}{RGB}{255,255,170}
\newcommand*\mybox[1]{%
\colorbox{backcolor}{\hspace{1em}#1\hspace{1em}}}
\begin{document}
\begin{empheq}[box=\mybox]{align}
\alpha \qquad \beta \qquad \gamma
\end{empheq}
\end{document}
并显示
但是,我想要方程式在中间,见下图,
是否有一个基本的解决方案(无需多列和表格)?
答案1
\documentclass{article}
\usepackage[svgnames]{xcolor}
\definecolor{backcolor}{RGB}{255,255,170}
\newcommand*\mybox[1]{\colorbox{backcolor}{\hspace{1em}$\strut#1$\hspace{1em}}}
\begin{document}
\begin{align}
\mybox{\alpha} \qquad \mybox{\beta} \qquad \mybox{\gamma}
\end{align}
\end{document}